Download src/casmd/bundle/spec.py from zzhaobz/HsingMD: direct link, hf CLI and curl.
- Browser
- Download file 1.45 kB
-
https://huggingface.co/spaces/zzhaobz/HsingMD/resolve/main/src/casmd/bundle/spec.py
- Command line
-
hf download hf://spaces/zzhaobz/HsingMD/src/casmd/bundle/spec.py
-
curl -L -o spec.py https://huggingface.co/spaces/zzhaobz/HsingMD/resolve/main/src/casmd/bundle/spec.py
1.45 kB
| """Configuration object for an CasMD HPC bundle. | |
| The simulation defaults use ff19SB-compatible MDPs, 310.15 K, and a 500 ns | |
| production target. Cluster settings remain editable for each deployment. | |
| """ | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| class BundleSpec: | |
| # ---- MDP-side ---- | |
| production_ns: float = 500.0 | |
| nvt_ps: float = 500.0 | |
| npt_ps: float = 500.0 | |
| timestep_fs: float = 2.0 | |
| temperature_K: float = 310.15 | |
| output_every_ps: float = 100.0 | |
| em_steps: int = 50_000 | |
| # ---- SLURM-side (editable example cluster defaults) ---- | |
| job_name: str = "casmd_run" | |
| account: str = "hsinglab" | |
| partition: str = "gpu-l20" | |
| gpus_per_node: str = "l20:4" | |
| cpus_per_task: int = 64 | |
| nodes: int = 1 | |
| time_hours: int = 72 | |
| email: str | None = None | |
| # ---- GROMACS-side ---- | |
| gmx_binary: str = "gmx_mpi" | |
| spack_env: str | None = "gromacs" | |
| # ---- Derived ---- | |
| def production_steps(self) -> int: | |
| return int(self.production_ns * 1_000 / (self.timestep_fs / 1_000.0)) | |
| def nvt_steps(self) -> int: | |
| return int(self.nvt_ps / (self.timestep_fs / 1_000.0)) | |
| def npt_steps(self) -> int: | |
| return int(self.npt_ps / (self.timestep_fs / 1_000.0)) | |
| def output_every_steps(self) -> int: | |
| return int(self.output_every_ps / (self.timestep_fs / 1_000.0)) | |