trajectory
Module for Configuration and related classes
- class MDMC.trajectory_analysis.trajectory.AtomCollection[source]
Base class for
Configurations
- class MDMC.trajectory_analysis.trajectory.Configuration(*structures: Structure, **settings: dict)[source]
A
ConfigurationstoresAtomobjects and their positions and velocities- Parameters:
*structures – Zero or more
Structureobjects to be added to theConfiguration**settings –
universe(Universe)The
Universeof theConfiguration
- add_structure(structures: Structure) None[source]
Adds the
Atomobjects from aStructureto the data- Parameters:
structures (Structure) – The
Structureto add
- property atom_positions: list
Get the list of
Atom.positionwhich belong to theConfiguration- Returns:
A list of
Atom.position- Return type:
- property atoms: list[Atom]
Get the list of
Atomwhich belong to theConfiguration- Returns:
A list of
Atom- Return type:
- property data: ndarray
Get or set the
Atom,Atom.position, andAtom.velocitywhich belong to theConfiguration- Returns:
A structured NumPy
arraywith'atom','position', and'velocity'fields- Return type:
- property element_list: list
Get the list of
Atom.element.symbolwhich belong to theConfiguration- Returns:
A list of str for the elements
- Return type:
- filter_atoms(predicate: function) list[Atom][source]
Filters the list of
Atomusing the predicate- Parameters:
predicate (function) – A function which returns a bool when passed an
Atom- Returns:
A list of
Atomwhich are True for the given predicate- Return type:
- filter_structures(predicate: function) list[Structure][source]
Filters the list of
Structuresusing the predicate- Parameters:
predicate (function) – A function which returns a bool when passed a
Structure- Returns:
A list of
Structureswhich are True for the given predicate- Return type:
- property molecule_list: list[Molecule]
Get the list of
Moleculewhich belong to theConfiguration- Returns:
A list of
Molecule- Return type:
- scale(factor: float, vectors: str = 'positions') None[source]
Scales either
atom_positionsoratom_velocitiesby a factor- Parameters:
- Raises:
NotImplementedError – THIS IS NOT IMPEMENTED
- property structure_list: list[Structure]
Get the list of
Structurewhich belong to theConfiguration- Returns:
A list of
Structure- Return type:
- validate_structure(structure: Structure) None[source]
Validates the structure by testing that it belongs to the same
Universeas theConfiguration- Parameters:
structure (Structure) – The
Structureto validate- Raises:
AssertionError – If the
Structuredoes not belong to the sameUniverseas theConfiguration