Finishes DiceInterface Refactoring and Continues Tests Implementation
This commit is contained in:
@@ -7,10 +7,11 @@ from typing import List
|
||||
|
||||
@dataclass
|
||||
class DiceDTO(Dataclass):
|
||||
|
||||
"""
|
||||
Data Transfer Object for the Dice configuration.
|
||||
"""
|
||||
ljname: str
|
||||
outname: str
|
||||
ncores: int
|
||||
dens: float
|
||||
nmol: List[int]
|
||||
nstep: List[int]
|
||||
@@ -20,6 +21,7 @@ class DiceDTO(Dataclass):
|
||||
isave: int = 1000
|
||||
press: float = 1.0
|
||||
temp: float = 300.0
|
||||
progname: str = "dice"
|
||||
randominit: str = 'first'
|
||||
|
||||
def __post_init__(self):
|
||||
@@ -44,7 +46,7 @@ class DiceDTO(Dataclass):
|
||||
"Error: 'nmol' keyword not defined appropriately in config file"
|
||||
)
|
||||
|
||||
if not isinstance(self.nstep, list):
|
||||
if not isinstance(self.nstep, list) or len(self.nstep) not in (2, 3):
|
||||
raise ValueError(
|
||||
"Error: 'nstep' keyword not defined appropriately in config file"
|
||||
)
|
||||
|
||||
@@ -6,6 +6,9 @@ from dacite import from_dict
|
||||
|
||||
@dataclass
|
||||
class GaussianDTO(Dataclass):
|
||||
"""
|
||||
Data Transfer Object for the Gaussian configuration.
|
||||
"""
|
||||
level: str
|
||||
qmprog: str
|
||||
keywords: str
|
||||
|
||||
@@ -6,9 +6,13 @@ from dacite import from_dict
|
||||
|
||||
@dataclass
|
||||
class PlayerDTO(Dataclass):
|
||||
"""
|
||||
Data Transfer Object for the player configuration.
|
||||
"""
|
||||
opt: bool
|
||||
maxcyc: int
|
||||
nprocs: int
|
||||
ncores: int
|
||||
|
||||
qmprog: str = 'g16'
|
||||
altsteps: int = 20000
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from diceplayer.shared.environment.molecule import Molecule
|
||||
from diceplayer.shared.config.player_dto import PlayerDTO
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import List
|
||||
@@ -6,13 +7,16 @@ from typing import List
|
||||
|
||||
@dataclass
|
||||
class StepDTO:
|
||||
nprocs: int = None
|
||||
ncores: int = None
|
||||
altsteps: int = None
|
||||
switchcyc: int = None
|
||||
opt: str = None
|
||||
"""
|
||||
Data Transfer Object for the step configuration.
|
||||
"""
|
||||
ncores: int
|
||||
nprocs: int
|
||||
simulation_dir: str
|
||||
|
||||
altsteps: int
|
||||
|
||||
nmol: List[int] = None
|
||||
molecule: List[Molecule] = None
|
||||
|
||||
charges: List[float] = None
|
||||
position: List[float] = None
|
||||
position: List[float] = None
|
||||
|
||||
Reference in New Issue
Block a user