Read Potentials and Initial Testing

This commit is contained in:
2023-03-04 16:20:25 -03:00
parent 7a87204181
commit 71744641ff
35 changed files with 793 additions and 2836 deletions

View File

@@ -0,0 +1,24 @@
from diceplayer.shared.utils.dataclass_protocol import Dataclass
from dataclasses import dataclass
from dacite import from_dict
@dataclass
class PlayerDTO(Dataclass):
opt: bool
maxcyc: int
nprocs: int
qmprog: str = 'g16'
altsteps: int = 20000
simulation_dir = 'simfiles'
def __post_init__(self):
MIN_STEP = 20000
# altsteps value is always the nearest multiple of 1000
self.altsteps = round(max(MIN_STEP, self.altsteps) / 1000) * 1000
@classmethod
def from_dict(cls, param: dict):
return from_dict(PlayerDTO, param)