iphasimulator.data.amber_openmm.run_openmm_md

Staged OpenMM MD for an Amber system (system.prmtop / system.inpcrd).

Written by iPHASimulator (notebook 06C). The stages and file names mirror the GROMACS run folders: step6.0_minimization, step6.1_nvt, step6.2_npt and step7_production. All settings come from protocol.json next to this script.

python run_openmm_md.py step6.0_minimization # local python run_openmm_md.py step6.1_nvt step6.2_npt step7_production # HPC python run_openmm_md.py –short-test # quick check

Each stage starts from the previous stage’s state (<stage>.xml) and writes <stage>.xml, <stage>.pdb and <stage>.csv; NVT/NPT/production also write <stage>.dcd frames. Every MD stage resumes from its own <stage>.chk and validates its input fingerprint from <stage>.restart.json. Completed stages take no new steps. Keep system.prmtop, system.inpcrd, this file and protocol.json together; OpenMM is required, but an iPHASimulator installation is not.

Attributes

STAGES

PREVIOUS_STAGE

PROTEIN_RESIDUES

BACKBONE_ATOMS

SHORT_TEST_PS

SHORT_TEST_MINIMIZATION_ITERATIONS

Functions

load_protocol(→ dict)

stage_steps(→ int)

Number of MD steps for a stage (0 for minimisation).

stage_intervals(→ tuple[float, float])

CSV and trajectory intervals in ps, with defaults for older protocol files.

input_signature(→ str)

Bind a restart to its topology, original coordinates and physical settings.

validate_inputs(→ dict)

Check particle counts, finite coordinates and a PME-compatible periodic box.

restraint_groups(→ tuple[list[int], list[int]])

Split heavy atoms into backbone-type and side-chain restraint groups.

run_stage(→ dict)

Run one stage and return a summary (energy in kJ/mol, density in g/mL).

run_short_test(→ list[dict])

Minimise, then 10 ps NVT and 10 ps NPT, into short_test/ (protocol settings otherwise).

main(→ None)

Module Contents

iphasimulator.data.amber_openmm.run_openmm_md.STAGES = ('step6.0_minimization', 'step6.1_nvt', 'step6.2_npt', 'step7_production')
iphasimulator.data.amber_openmm.run_openmm_md.PREVIOUS_STAGE
iphasimulator.data.amber_openmm.run_openmm_md.PROTEIN_RESIDUES
iphasimulator.data.amber_openmm.run_openmm_md.BACKBONE_ATOMS
iphasimulator.data.amber_openmm.run_openmm_md.SHORT_TEST_PS = 10.0
iphasimulator.data.amber_openmm.run_openmm_md.SHORT_TEST_MINIMIZATION_ITERATIONS = 1000
iphasimulator.data.amber_openmm.run_openmm_md.load_protocol(folder: str | pathlib.Path = '.') → dict
iphasimulator.data.amber_openmm.run_openmm_md.stage_steps(protocol: dict, stage: str, picoseconds: float | None = None) → int

Number of MD steps for a stage (0 for minimisation).

iphasimulator.data.amber_openmm.run_openmm_md.stage_intervals(protocol: dict, stage: str) → tuple[float, float]

CSV and trajectory intervals in ps, with defaults for older protocol files.

iphasimulator.data.amber_openmm.run_openmm_md.input_signature(folder: pathlib.Path, protocol: dict) → str

Bind a restart to its topology, original coordinates and physical settings.

iphasimulator.data.amber_openmm.run_openmm_md.validate_inputs(prmtop, inpcrd, cutoff_nm: float) → dict

Check particle counts, finite coordinates and a PME-compatible periodic box.

iphasimulator.data.amber_openmm.run_openmm_md.restraint_groups(atoms, polymer_residues) → tuple[list[int], list[int]]

Split heavy atoms into backbone-type and side-chain restraint groups.

atoms yields (index, residue_name, atom_name, element_symbol). As in the CHARMM-GUI packages: protein N/CA/C/O and polymer heavy atoms use the backbone force constant, other protein heavy atoms the side-chain one; water, ions and hydrogens are never restrained.

iphasimulator.data.amber_openmm.run_openmm_md.run_stage(stage: str, folder: str | pathlib.Path = '.', *, output_dir: str | pathlib.Path | None = None, picoseconds: float | None = None, max_iterations: int | None = None, platform_name: str | None = None) → dict

Run one stage and return a summary (energy in kJ/mol, density in g/mL).

iphasimulator.data.amber_openmm.run_openmm_md.run_short_test(folder: str | pathlib.Path = '.', *, platform_name: str | None = None) → list[dict]

Minimise, then 10 ps NVT and 10 ps NPT, into short_test/ (protocol settings otherwise).

iphasimulator.data.amber_openmm.run_openmm_md.main(argv=None) → None