mythos.simulators.lammps.lammps_oxdna
LAMMPS-based OxDNA simulator for mythos.
Attributes
Classes
LAMMPS-based OxDNA simulator. |
Functions
|
|
|
|
|
|
|
|
|
|
|
Reads LAMMPS trajectory dump file and extracts the final energy values. |
Module Contents
- class mythos.simulators.lammps.lammps_oxdna.LAMMPSoxDNASimulator[source]
Bases:
mythos.simulators.base.InputDirSimulatorLAMMPS-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).
- Parameters:
input_dir – Path to the directory containing the LAMMPS input files.
overwrite – Whether to overwrite the input directory or copy to a temporary directory.
input_file_name – Name of the LAMMPS input file (default “input”).
energy_fn – Energy function used in the simulation, for updating parameters.
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”.
- energy_fn: mythos.energy.base.EnergyFunction
- run_simulation(input_dir: pathlib.Path, params: mythos.utils.types.Params, seed: int | None = None) mythos.simulators.base.SimulatorOutput[source]
Run the simulation in the given input directory.
- mythos.simulators.lammps.lammps_oxdna._lammps_oxdna_replace_inputs(input_lines: list[str], params: list[dict[str, float]], seed: int | None, variables: dict[str, Any] | None = None) list[str][source]
- mythos.simulators.lammps.lammps_oxdna._replace_parts_in_line(inputs: str, replacements: tuple[str], params: dict[str, float]) str[source]
- mythos.simulators.lammps.lammps_oxdna.REPLACEMENT_MAP
- mythos.simulators.lammps.lammps_oxdna.REPLACEMENT_MAP
- mythos.simulators.lammps.lammps_oxdna.LAMMPS_REQUIRED_FIELDS
- mythos.simulators.lammps.lammps_oxdna._transform_lammps_state(state: numpy.ndarray, fields: str) numpy.ndarray[source]
- mythos.simulators.lammps.lammps_oxdna._transform_lammps_quat(quat: numpy.ndarray) numpy.ndarray[source]
- mythos.simulators.lammps.lammps_oxdna._read_lammps_output(output_file: pathlib.Path) mythos.input.trajectory.Trajectory[source]
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.
- Parameters:
output_file – Path to the LAMMPS trajectory dump file.
- Returns:
A Trajectory object in mythos format.