feat: initial dice-wrapper structure and working prototype

This commit is contained in:
2026-03-16 00:11:07 -03:00
parent 6a154429e9
commit 30be88e6b4
8 changed files with 174 additions and 25 deletions

View File

@@ -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")