The collection of timeseries (such as Atom, Bond, Dihedral...) can be computed from a trajectory in one go, foregoing the need to iterate through the trajectory frame by frame in python. Inspired by CHARMM’s correl command.
The disadvantage is that the timeseries ‘plugins’ must be implemented in C-code. Hence not all trajectory readers (see MDAnalysis.coordinates) support them.
Base timeseries class - define subclasses for specific timeseries computations
shape tuple of the underlying numpy array
A collection of timeseries objects.
The collection of timeseries (such as Atom, Bond, Dihedral...) can be computed from a trajectory in one go, foregoing the need to iterate through the trajectory frame by frame in python. Inspired by CHARMM’s correl command.
The disadvantage is that the timeseries ‘plugins’ must be implemented in C-code.
collection = TimeseriesCollection()
collection.addTimeseries(Timeseries.Atom(...)) - add a new Timeseries object
collection.compute(...) - compute the collection of timeseries from the trajectory
collection.clear() - clear the collection
collection[i] - access the i'th timeseries
len(collection) - return the number of Timeseries added to the collection
add a Timeseries object to the collection
clear the timeseries collection
trj - dcd trajectory object (ie universe.dcd) start, stop, skip and self explanatory, although it is important to note that start and stop are inclusive
Create a timeseries that returns coordinate data for an atom or group of atoms
t = Atom(code, atoms)
code is one of ‘x’, ‘y’, ‘z’, or ‘v’ (‘vector’, which returns all three dimensions) atoms can be a single Atom object, a list of Atom objects, or an AtomGroup
Create a timeseries that returns a timeseries for a bond
t = Bond(atoms)
atoms must contain 2 Atoms, either as a list or an AtomGroup
Create a timeseries that returns a timeseries for an angle
t = Angle(atoms)
atoms must contain 3 Atoms, either as a list or an AtomGroup
Create a timeseries that returns a timeseries for a dihedral angle
t = Dihedral(atoms)
atoms must contain 4 Atoms, either as a list or an AtomGroup
Create a timeseries that returns distances between 2 atoms
t = Distance(code, atoms)
code is one of ‘d’ (distance vector), or ‘r’ (scalar distance) atoms must contain 2 Atoms, either as a list or an AtomGroup
Create a timeseries that returns the center of geometry of a group of atoms
t = CenterOfGeometry(atoms)
atoms can be a list of Atom objects, or an AtomGroup
Create a timeseries that returns the center of mass of a group of atoms
t = CenterOfMass(atoms)
atoms can be a list of Atom objects, or an AtomGroup
Create a timeseries that returns the principle axis for a group of atoms
t = principleAxis(atoms)
atoms can be a list of Atom objects, or an AtomGroup
Create a Timeseries that returns a timeseries for the dipole vector of a 3-site water
t = WaterDipole(atoms)
atoms must contain 3 Atoms, either as a list or an AtomGroup; the first one MUST be the oxygen, the other two are the hydrogens. The vector is calculated as
d = xO + (xH1 - xH2)/2