feat: initial dice-wrapper structure and working prototype
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from typing_extensions import Literal
|
||||
|
||||
import random
|
||||
|
||||
|
||||
class DiceConfig(BaseModel):
|
||||
"""
|
||||
@@ -10,6 +12,9 @@ class DiceConfig(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
frozen=True,
|
||||
)
|
||||
nprocs: int = Field(
|
||||
..., description="Number of processes to use for the DICE simulations"
|
||||
)
|
||||
|
||||
ljname: str = Field(..., description="Name of the Lennard-Jones potential file")
|
||||
outname: str = Field(
|
||||
@@ -48,4 +53,4 @@ class DiceConfig(BaseModel):
|
||||
randominit: str = Field(
|
||||
"first", description="Method for initializing the random number generator"
|
||||
)
|
||||
seed: int | None = Field(None, description="Seed for the random number generator")
|
||||
seed: int = Field(default_factory=lambda: random.randint(0, 2**32 - 1), description="Seed for the random number generator")
|
||||
|
||||
@@ -47,9 +47,6 @@ class PlayerConfig(BaseModel):
|
||||
switch_cyc: int = Field(..., description="Switch cycle configuration")
|
||||
|
||||
mem: int = Field(None, description="Memory configuration")
|
||||
nprocs: int = Field(
|
||||
..., description="Number of processors to use for the QM calculations"
|
||||
)
|
||||
ncores: int = Field(
|
||||
..., description="Number of cores to use for the QM calculations"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user