LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Functions
loos.pyloos.ensembles Namespace Reference

Functions

 averageStructure (traj)
 Python version of averageStructure (using loos.pyloos.Trajectory-like objects) The subset defined in the trajectory controls what is averaged over.
 
 extractCoords (traj)
 Returns the coordinates for an entire trajectory as an MxN numpy matrix where M is 3*natoms and N is the length of the trajectory.
 
 svd (traj)
 Returns a tuple containing the SVD result for a trajectory, along with the average structure.
 

Detailed Description

PyLOOS functions applicable to ensembles (trajectories or trajectory-like collections)

Function Documentation

◆ averageStructure()

loos.pyloos.ensembles.averageStructure ( traj)

Python version of averageStructure (using loos.pyloos.Trajectory-like objects) The subset defined in the trajectory controls what is averaged over.

The trajectory may actually be a VirtualTrajectory or an AlignedVirtualTrajectory.

Returns the average structure for a trajectory.
>>> avg = loos.pyloos.averageStructure(traj)

◆ extractCoords()

loos.pyloos.ensembles.extractCoords ( traj)

Returns the coordinates for an entire trajectory as an MxN numpy matrix where M is 3*natoms and N is the length of the trajectory.

The subset in the trajectory controls what is extracted. The trajectory may actually be a VirtualTrajectory or an AlignedVirtualTrajectory.

Extracts coords from a trajectory as a NumPy matrix
>>> A = loos.pyloos.extractCoords(traj)

◆ svd()

loos.pyloos.ensembles.svd ( traj)

Returns a tuple containing the SVD result for a trajectory, along with the average structure.

The tuple is, (left-singular-vectors, singular-values, right-singular-vectors, average)

The subset set in the trajectory controls what is used for the SVD. The trajectory may be a VirtualTrajectory or an AlignedVirtualTrajectory. The following example computes an SVD using backbone atoms for a trajectory that has been iteratively aligned using C-alphas

traj = loos.pyloos.Trajectory('foo.dcd', model, subset = 'backbone')
aligned = loos.pyloos.AlignedVirtualTrajectory(traj, alignwith = 'name == "CA"')
(L,S,V,avg) = loos.pyloos.svd(aligned)
A virtual trajectory that supports iterative alignment.
Definition trajectories.py:626
Python-based wrapper for LOOS Trajectories This class turns a loos Trajectory into something more pyt...
Definition trajectories.py:55
Returns a tuple containing SVD results along with the average structure for a trajectory
>>> (L,S,V,avg) = loos.pyloos.svd(traj)