RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::Trajectory Class Reference

#include <Trajectory.h>

Public Member Functions

 Trajectory (unsigned int dimension, unsigned int numPoints, SnapshotVect *snapshotVect=nullptr)
 Constructor.
 
 Trajectory (const Trajectory &other)
 Copy constructor.
 
unsigned int dimension () const
 
unsigned int numPoints () const
 
size_t size () const
 
unsigned int addSnapshot (const Snapshot &s)
 Appends a Snapshot to this Trajectory.
 
const SnapshotgetSnapshot (unsigned int snapshotNum) const
 
unsigned int insertSnapshot (unsigned int snapshotNum, Snapshot s)
 Inserts a Snapshot into this Trajectory.
 
unsigned int removeSnapshot (unsigned int snapshotNum)
 Removes a Snapshot from this Trajectory.
 
void clear ()
 Clear all Snapshots from a Trajectory.
 
unsigned int addConformersToMol (ROMol &mol, int from=-1, int to=-1)
 Add conformations from the Trajectory to a molecule.
 

Detailed Description

Definition at line 21 of file Trajectory.h.

Constructor & Destructor Documentation

◆ Trajectory() [1/2]

RDKit::Trajectory::Trajectory ( unsigned int  dimension,
unsigned int  numPoints,
SnapshotVect snapshotVect = nullptr 
)

Constructor.

Parameters
dimensionrepresents the dimensionality of this Trajectory's coordinate tuples; this is normally 2 (2D coordinates) or 3 (3D coordinates)
numPointsis the number of coordinate tuples associated to each Snapshot
snapshotVect(optional, defaults to NULL) is a pointer to a SnapshotVect used to initialize the Trajectory; if not NULL, the Trajectory takes ownership of the SnapshotVect

◆ Trajectory() [2/2]

RDKit::Trajectory::Trajectory ( const Trajectory other)

Copy constructor.

Member Function Documentation

◆ addConformersToMol()

unsigned int RDKit::Trajectory::addConformersToMol ( ROMol mol,
int  from = -1,
int  to = -1 
)

Add conformations from the Trajectory to a molecule.

Parameters
mol- ROMol to which Conformers with coordinates from the Trajectory will be added; the Trajectory must have numPoints() == mol.getNumAtoms()
from- the first Snapshot that will be added as a Conformer; defaults to -1 (first available)
to- the last Snapshot that will be added as a Conformer; defaults to -1 (all)
Returns
the number of conformations added

◆ addSnapshot()

unsigned int RDKit::Trajectory::addSnapshot ( const Snapshot s)

Appends a Snapshot to this Trajectory.

Parameters
sis the Snapshot to be added; the Trajectory takes ownership of the snapshot coordinates
Returns
the zero-based index position of the added Snapshot

◆ clear()

void RDKit::Trajectory::clear ( )
inline

Clear all Snapshots from a Trajectory.

Definition at line 71 of file Trajectory.h.

◆ dimension()

unsigned int RDKit::Trajectory::dimension ( ) const
inline
Returns
the dimensionality of this Trajectory's coordinate tuples

Definition at line 38 of file Trajectory.h.

◆ getSnapshot()

const Snapshot & RDKit::Trajectory::getSnapshot ( unsigned int  snapshotNum) const
Parameters
snapshotNumis the zero-based index of the retrieved Snapshot
Returns
a const reference to the relevant Snapshot in the Trajectory

◆ insertSnapshot()

unsigned int RDKit::Trajectory::insertSnapshot ( unsigned int  snapshotNum,
Snapshot  s 
)

Inserts a Snapshot into this Trajectory.

Parameters
snapshotNumis the zero-based index of the Trajectory's Snapshot before which the Snapshot s will be inserted
sis the Snapshot to be inserted; the Trajectory takes ownership of the snapshot coordinates
Returns
the zero-based index position of the inserted Snapshot

◆ numPoints()

unsigned int RDKit::Trajectory::numPoints ( ) const
inline
Returns
the number of coordinate tuples associated to each Snapshot

Definition at line 41 of file Trajectory.h.

◆ removeSnapshot()

unsigned int RDKit::Trajectory::removeSnapshot ( unsigned int  snapshotNum)

Removes a Snapshot from this Trajectory.

Parameters
snapshotNumis the zero-based index of Snapshot to be removed
Returns
the zero-based index position of the Snapshot after the removed one; if the last Snapshot was removed, it returns the size of the trajectory

◆ size()

size_t RDKit::Trajectory::size ( ) const
inline
Returns
the number of Snapshots associated to this Trajectory

Definition at line 44 of file Trajectory.h.


The documentation for this class was generated from the following file: