Configuration parsers¶
All parsers inherit from BaseParser and override the _parse_stream and, possibly, the _parse_file methods. After a parser has been initialised it can be used to build a single system through its make_system() method or a whole trajectory by using it to initialise a Trajectory object.
Use oxDNA/topology files to build systems. |
|
Overloaded function. |
|
Build systems out of PatchyParticles configurations. |
-
class
baggianalysis.core.BaseParser(self: baggianalysis.core.BaseParser) → None¶ Bases:
pybind11_builtins.pybind11_object-
_parse_file(self: baggianalysis.core.BaseParser, arg0: str) → baggianalysis.core.System¶
-
make_system(self: baggianalysis.core.BaseParser, arg0: str) → baggianalysis.core.System¶
-
set_topology(self: baggianalysis.core.BaseParser, arg0: baggianalysis.core.Topology) → None¶
-
-
class
baggianalysis.core.OxDNAParser(*args, **kwargs)¶ Bases:
baggianalysis.core.BaseParserUse oxDNA/topology files to build systems.
Overloaded function.
__init__(self: baggianalysis.core.OxDNAParser, topology_file: str) -> None
Initialise the parser by using the
Defaulttopology parser to parse the given topology file.- Parameters
topology_file (str) – The topology file to be used for initialisation.
__init__(self: baggianalysis.core.OxDNAParser, topology_parser: baggianalysis.core.oxDNA_topology.Default) -> None
Initialise the parser by using the given topology parser.
- Parameters
topology – An oxDNA topology parser, which should be an instance of an object inheriting from the
Defaulttopology parser.
-
class
baggianalysis.core.oxDNA_topology.Default(self: baggianalysis.core.oxDNA_topology.Default, arg0: str) → None¶ Bases:
pybind11_builtins.pybind11_object-
N(self: baggianalysis.core.oxDNA_topology.Default) → int¶ Return the number of particles as specified in the topology file.
- Returns
The number of particles as specified in the topology file.
- Return type
-
N_A(self: baggianalysis.core.oxDNA_topology.Default) → int¶ A default oxDNA topology contains either a single number (the total number of particles, N) or two numbers (N and the number of particles of the first species, NA). This method returns N in the former case and NA in the latter.
- Returns
The number of particles of species A as specified in the topology file.
- Return type
-
-
class
baggianalysis.core.oxDNA_topology.TSP(self: baggianalysis.core.oxDNA_topology.TSP, arg0: str) → None¶ Bases:
baggianalysis.core.oxDNA_topology.Default-
N_arms(self: baggianalysis.core.oxDNA_topology.TSP, arg0: int) → int¶
-
N_monomers_per_arm(self: baggianalysis.core.oxDNA_topology.TSP, arg0: int) → int¶
-
N_stars(self: baggianalysis.core.oxDNA_topology.TSP) → int¶
-
-
class
baggianalysis.core.GroParser(self: baggianalysis.core.GroParser, arg0: float) → None¶
-
class
baggianalysis.core.LAMMPSDataFileParser(*args, **kwargs)¶ Bases:
baggianalysis.core.BaseParserOverloaded function.
__init__(self: baggianalysis.core.LAMMPSDataFileParser, arg0: str) -> None
__init__(self: baggianalysis.core.LAMMPSDataFileParser, arg0: int, arg1: int) -> None
-
class
baggianalysis.core.LAMMPSDumpParser(self: baggianalysis.core.LAMMPSDumpParser, rescaled_coords: bool = False) → None¶
-
class
baggianalysis.core.LJKAParser(self: baggianalysis.core.LJKAParser) → None¶
-
class
baggianalysis.core.PatchyParticlesParser(*args, **kwargs)¶ Bases:
baggianalysis.core.BaseParserBuild systems out of PatchyParticles configurations. These files store the particles’ positios and orientation matrices.
Overloaded function.
__init__(self: baggianalysis.core.PatchyParticlesParser) -> None
Default constructor: the parser will assume that the particles have four patches arranged on a tetrahedron.
__init__(self: baggianalysis.core.PatchyParticlesParser, base_patches: List[glm::tvec3<scalar, P>]) -> None
The object can also be built by providing a list of vectors storing the base patches, that is, those vectors that, when multiplied by the orientation matrix, yield the particles’ patches.
__init__(self: baggianalysis.core.PatchyParticlesParser, patch_filename: str) -> None
Obtain the list of vectors storing the base patches from the given file.