moleculekit.projections.projection module#
- class moleculekit.projections.projection.Projection#
Bases:
ABCAbstract base class for all trajectory projecting (Metric) classes.
A projection maps the coordinates of a
Moleculeonto a lower-dimensional representation (e.g. distances, dihedral angles, RMSD). Concrete subclasses (theMetric*classes) must implementproject()andgetMapping(). This class cannot be instantiated directly.- copy()#
Produces a deep copy of the object
- Returns:
proj – A deep copy of this projection object.
- Return type:
Projectionobject
- abstractmethod getMapping(mol)#
Returns the description of each projected dimension.
Subclasses must implement this method.
- Parameters:
mol (
Molecule) – AMoleculeobject which will be used to calculate the descriptions of the projected dimensions.- Returns:
map – A DataFrame mapping each projected dimension (output column) to the atoms it describes, with columns describing the type, atom indexes and a description.
- Return type:
DataFrameobject
- abstractmethod project(mol)#
Projects a molecule onto the lower-dimensional representation.
Subclasses must implement this method.
- Parameters:
- Returns:
data – An array containing the projected data, with one row per frame.
- Return type: