mythos.simulators.gromacs ========================= .. py:module:: mythos.simulators.gromacs .. autoapi-nested-parse:: GROMACS simulator module. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/mythos/simulators/gromacs/gromacs/index /autoapi/mythos/simulators/gromacs/utils/index Classes ------- .. autoapisummary:: mythos.simulators.gromacs.GromacsSimulator Package Contents ---------------- .. py:class:: GromacsSimulator Bases: :py:obj:`mythos.simulators.base.InputDirSimulator` A simulator based on running a GROMACS simulation. This simulator runs a GROMACS simulation from an input directory containing the necessary configuration files and outputs a trajectory in `SimulatorTrajectory` format. All _file parameters refer to filenames within the input directory. :param input_dir: Path to the directory containing the GROMACS input files. :param energy_fn: The energy function to use for parameter updates. Parameters from this energy function will be used to update the topology file. :param mdp_file: Name of the .mdp (molecular dynamics parameter) file. :param topology_file: Name of the topology file (e.g., .top). Parameters from the energy function will be written to this file. :param trajectory_file: Name of the output trajectory file (e.g., .xtc, .trr). :param structure_file: Name of the structure/coordinate file (e.g., .gro, .pdb). :param binary_path: Path to the GROMACS binary. If not provided, will search for 'gmx' in PATH. :param input_overrides: Key-value pairs to override in the .mdp input file. :param overwrite_input: Whether to overwrite the input directory or copy it. .. py:attribute:: energy_fn :type: mythos.energy.base.EnergyFunction .. py:attribute:: mdp_file :type: str :value: 'md.mdp' .. py:attribute:: topology_file :type: str :value: 'topol.top' .. py:attribute:: structure_file :type: str :value: 'membrane.gro' .. py:attribute:: index_file :type: str :value: 'index.ndx' .. py:attribute:: equilibration_steps :type: int :value: 0 .. py:attribute:: simulation_steps :type: int | None :value: None .. py:attribute:: binary_path :type: pathlib.Path | None :value: None .. py:attribute:: input_overrides :type: dict[str, Any] .. py:method:: __post_init__(*args, **kwds) -> None Check the validity of the configuration. .. py:method:: run_simulation(input_dir: pathlib.Path, opt_params: dict[str, Any] | None = None, seed: int | None = None, **_) -> mythos.simulators.base.SimulatorOutput Run a GROMACS simulation. :param input_dir: Path to the working directory for the simulation. :param opt_params: Optional parameters to update. These will be used to update the energy function and subsequently the topology file. :param seed: Optional random seed for the simulation. By default, a random seed is generated. :returns: SimulatorOutput containing the trajectory. .. py:method:: _run_simulation_step(structure_file: str, overrides: dict[str, Any], input_dir: pathlib.Path, step: str) -> None .. py:method:: _run_gromacs(cmd: list[str], cwd: pathlib.Path, log_prefix: str) -> None .. py:method:: _read_trajectory(input_dir: pathlib.Path) -> mythos.simulators.io.SimulatorTrajectory .. py:method:: _update_topology_params(input_dir: pathlib.Path, params: dict[str, Any]) -> None