mythos.simulators.lammps.lammps_oxdna ===================================== .. py:module:: mythos.simulators.lammps.lammps_oxdna .. autoapi-nested-parse:: LAMMPS-based OxDNA simulator for mythos. Attributes ---------- .. autoapisummary:: mythos.simulators.lammps.lammps_oxdna.REPLACEMENT_MAP mythos.simulators.lammps.lammps_oxdna.REPLACEMENT_MAP mythos.simulators.lammps.lammps_oxdna.LAMMPS_REQUIRED_FIELDS Classes ------- .. autoapisummary:: mythos.simulators.lammps.lammps_oxdna.LAMMPSoxDNASimulator Functions --------- .. autoapisummary:: mythos.simulators.lammps.lammps_oxdna._lammps_oxdna_replace_inputs mythos.simulators.lammps.lammps_oxdna._replace_parts_in_line mythos.simulators.lammps.lammps_oxdna._transform_param mythos.simulators.lammps.lammps_oxdna._transform_lammps_state mythos.simulators.lammps.lammps_oxdna._transform_lammps_quat mythos.simulators.lammps.lammps_oxdna._read_lammps_output Module Contents --------------- .. py:class:: LAMMPSoxDNASimulator Bases: :py:obj:`mythos.simulators.base.InputDirSimulator` LAMMPS-based OxDNA simulator. Please note that for LAMMPS simulations of oxDNA, BondedExcludedVolume should be left out of the energy function, as LAMMPS does not implement it (or does not in a compatible way). :param input_dir: Path to the directory containing the LAMMPS input files. :param overwrite: Whether to overwrite the input directory or copy to a temporary directory. :param input_file_name: Name of the LAMMPS input file (default "input"). :param energy_fn: Energy function used in the simulation, for updating parameters. :param variables: Additional variables to set in the LAMMPS input file before run. These variables must already be defined in the input file using a command of the form "variable name equal value". .. py:attribute:: energy_fn :type: mythos.energy.base.EnergyFunction .. py:attribute:: input_file_name :type: str :value: 'input' .. py:attribute:: variables :type: dict[str, Any] .. py:method:: __post_init__() -> None .. py:method:: run_simulation(input_dir: pathlib.Path, params: mythos.utils.types.Params, seed: int | None = None) -> mythos.simulators.base.SimulatorOutput Run the simulation in the given input directory. .. py:method:: _replace_parameters(input_dir: pathlib.Path, params: mythos.utils.types.Params, seed: int | None) -> None .. py:function:: _lammps_oxdna_replace_inputs(input_lines: list[str], params: list[dict[str, float]], seed: int | None, variables: dict[str, Any] | None = None) -> list[str] .. py:function:: _replace_parts_in_line(inputs: str, replacements: tuple[str], params: dict[str, float]) -> str .. py:data:: REPLACEMENT_MAP .. py:data:: REPLACEMENT_MAP .. py:function:: _transform_param(param: str, value: float) -> float .. py:data:: LAMMPS_REQUIRED_FIELDS .. py:function:: _transform_lammps_state(state: numpy.ndarray, fields: str) -> numpy.ndarray .. py:function:: _transform_lammps_quat(quat: numpy.ndarray) -> numpy.ndarray .. py:function:: _read_lammps_output(output_file: pathlib.Path) -> mythos.input.trajectory.Trajectory Reads LAMMPS trajectory dump file and extracts the final energy values. The file must have been created by a dump LAMMPS dump command similar to: compute quat all property/atom quatw quati quatj quatk dump {name} all custom {freq} trajectory.dat x y z vx vy vz & c_quat[1] c_quat[2] c_quat[3] c_quat[4] angmomx angmomy angmomz noting that the above fields are required, but other fields may also be present in the dump. :param output_file: Path to the LAMMPS trajectory dump file. :returns: A Trajectory object in mythos format.