iphasimulator.data.amber_openmm.run_openmm_md ============================================= .. py:module:: iphasimulator.data.amber_openmm.run_openmm_md .. autoapi-nested-parse:: 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 (.xml) and writes .xml, .pdb and .csv; NVT/NPT/production also write .dcd frames. Every MD stage resumes from its own .chk and validates its input fingerprint from .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 ---------- .. autoapisummary:: iphasimulator.data.amber_openmm.run_openmm_md.STAGES 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 iphasimulator.data.amber_openmm.run_openmm_md.SHORT_TEST_MINIMIZATION_ITERATIONS Functions --------- .. autoapisummary:: iphasimulator.data.amber_openmm.run_openmm_md.load_protocol iphasimulator.data.amber_openmm.run_openmm_md.stage_steps iphasimulator.data.amber_openmm.run_openmm_md.stage_intervals iphasimulator.data.amber_openmm.run_openmm_md.input_signature iphasimulator.data.amber_openmm.run_openmm_md.validate_inputs iphasimulator.data.amber_openmm.run_openmm_md.restraint_groups iphasimulator.data.amber_openmm.run_openmm_md.run_stage iphasimulator.data.amber_openmm.run_openmm_md.run_short_test iphasimulator.data.amber_openmm.run_openmm_md.main Module Contents --------------- .. py:data:: STAGES :value: ('step6.0_minimization', 'step6.1_nvt', 'step6.2_npt', 'step7_production') .. py:data:: PREVIOUS_STAGE .. py:data:: PROTEIN_RESIDUES .. py:data:: BACKBONE_ATOMS .. py:data:: SHORT_TEST_PS :value: 10.0 .. py:data:: SHORT_TEST_MINIMIZATION_ITERATIONS :value: 1000 .. py:function:: load_protocol(folder: str | pathlib.Path = '.') -> dict .. py:function:: stage_steps(protocol: dict, stage: str, picoseconds: float | None = None) -> int Number of MD steps for a stage (0 for minimisation). .. py:function:: stage_intervals(protocol: dict, stage: str) -> tuple[float, float] CSV and trajectory intervals in ps, with defaults for older protocol files. .. py:function:: input_signature(folder: pathlib.Path, protocol: dict) -> str Bind a restart to its topology, original coordinates and physical settings. .. py:function:: validate_inputs(prmtop, inpcrd, cutoff_nm: float) -> dict Check particle counts, finite coordinates and a PME-compatible periodic box. .. py:function:: 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. .. py:function:: 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). .. py:function:: 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). .. py:function:: main(argv=None) -> None