trajectory
Module for Configuration
and related classes
- class MDMC.trajectory_analysis.trajectory.AtomCollection[source]
Base class for
Configurations
- property dimensions: numpy.ndarray
Get the
dimensions
of theUniverse
in which theAtomCollection
exists- Returns
array – The
dimensions
of theUniverse
- Return type
- class MDMC.trajectory_analysis.trajectory.Configuration(*structures: Structure, **settings: dict)[source]
A
Configuration
storesAtom
objects and their positions and velocities- Parameters
*structures – Zero or more
Structure
objects to be added to theConfiguration
**settings –
universe
(Universe
)The
Universe
of theConfiguration
- add_structure(structures: Structure) None [source]
Adds the
Atom
objects from aStructure
to the data- Parameters
structures (Structure) – The
Structure
to add
- property atom_positions: list
Get the list of
Atom.position
which belong to theConfiguration
- Returns
A list of
Atom.position
- Return type
- property atoms: list[Atom]
Get the list of
Atom
which belong to theConfiguration
- Returns
A list of
Atom
- Return type
- property data: numpy.ndarray
Get or set the
Atom
,Atom.position
, andAtom.velocity
which belong to theConfiguration
- Returns
A structured NumPy
array
with'atom'
,'position'
, and'velocity'
fields- Return type
- property element_list: list
Get the list of
Atom.element
which belong to theConfiguration
- Returns
A list of str for the elements
- Return type
- filter_atoms(predicate: function) list[Atom] [source]
Filters the list of
Atom
using the predicate- Parameters
predicate (function) – A function which returns a bool when passed an
Atom
- Returns
A list of
Atom
which are True for the given predicate- Return type
- filter_structures(predicate: function) list[Structure] [source]
Filters the list of
Structures
using the predicate- Parameters
predicate (function) – A function which returns a bool when passed a
Structure
- Returns
A list of
Structures
which are True for the given predicate- Return type
- property molecule_list: list[Molecule]
Get the list of
Molecule
which belong to theConfiguration
- Returns
A list of
Molecule
- Return type
- scale(factor: float, vectors: str = 'positions') None [source]
Scales either
atom_positions
oratom_velocities
by a factor- Parameters
- Raises
NotImplementedError – THIS IS NOT IMPEMENTED
- property structure_list: list[Structure]
Get the list of
Structure
which 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
Universe
as theConfiguration
- Parameters
structure (Structure) – The
Structure
to validate- Raises
AssertionError – If the
Structure
does not belong to the sameUniverse
as theConfiguration