mythos.input.oxdna_input
oxDNA input file parser.
Attributes
Classes
Data loaded from an oxDNA input directory. |
Functions
|
|
|
|
|
|
|
|
|
Read an oxDNA input file. |
|
Write an oxDNA input file. |
|
Read the box size from an oxDNA configuration file. |
|
Load topology, temperature and box size from an oxDNA input directory. |
|
Write an oxDNA input file. |
Module Contents
- mythos.input.oxdna_input.INVALID_DICT_LINE = 'Invalid dictionary line: {}'
- mythos.input.oxdna_input._parse_dict(in_line: str, lines: Iterable[str]) tuple[dict[str, str | float | int | bool], Iterable[str]][source]
- mythos.input.oxdna_input.read(input_file: pathlib.Path) dict[str, str | float | int | bool][source]
Read an oxDNA input file.
- mythos.input.oxdna_input.write_to(input_config: dict, f: io.TextIOWrapper) None[source]
Write an oxDNA input file.
- mythos.input.oxdna_input.read_box_size(conf_file: pathlib.Path) jax.numpy.ndarray[source]
Read the box size from an oxDNA configuration file.
Parses the
b = ...line from the configuration file header.- Parameters:
conf_file – Path to the oxDNA configuration (
.conf/.dat) file.- Returns:
A JAX array of shape
(3,)with the box dimensions.- Raises:
ValueError – If no
b = ...line is found in the file.
- class mythos.input.oxdna_input.oxDNAInputData[source]
Data loaded from an oxDNA input directory.
- topology
The parsed topology.
- kT
The simulation temperature in oxDNA energy units.
- box_size
Box dimensions as a JAX array of shape
(3,).
- config
The full parsed input-file dictionary.
- topology: mythos.input.topology.Topology
- box_size: jax.numpy.ndarray
- mythos.input.oxdna_input.read_input_dir(input_dir: pathlib.Path, input_file: str = 'input') oxDNAInputData[source]
Load topology, temperature and box size from an oxDNA input directory.
Reads the oxDNA
inputfile (or the name given by input_file), extracts the topology, simulation temperature (kT), and box dimensions from the configuration files referenced therein.- Parameters:
input_dir – Directory containing the oxDNA input files.
input_file – Name of the input file inside input_dir.
- Returns:
An
oxDNAInputDatawith the parsed values.
- mythos.input.oxdna_input.write(input_config: dict, input_file: pathlib.Path) None[source]
Write an oxDNA input file.