LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
A virtual trajectory that supports iterative alignment. More...
Public Member Functions | |
__init__ (self, *trajs, **kwargs) | |
append (self, *traj) | |
alignWith (self, selection) | |
__iter__ (self) | |
setReference (self, reference) | |
rmsd (self) | |
iters (self) | |
__getitem__ (self, i) | |
Public Member Functions inherited from loos.pyloos.trajectories.VirtualTrajectory | |
stride (self, n) | |
skip (self, n) | |
allStride (self, n) | |
allSkip (self, n) | |
setSubset (self, selection) | |
frame (self) | |
index (self) | |
frameLocation (self, i) | |
Returns information about the ith frame in the VirtualTrajectory The tuple returned has the following format: | |
frameBoundaries (self) | |
__len__ (self) | |
reset (self) | |
__next__ (self) | |
Protected Member Functions | |
_align (self) | |
_getSlice (self, s) | |
Protected Member Functions inherited from loos.pyloos.trajectories.VirtualTrajectory | |
_initFrameList (self) | |
Protected Attributes | |
_aligned | |
_xformlist | |
_rmsd | |
_iters | |
_alignwith | |
_reference | |
_stale | |
_index | |
_framelist | |
Protected Attributes inherited from loos.pyloos.trajectories.VirtualTrajectory | |
_skip | |
_stride | |
_nframes | |
_iterator | |
_trajectories | |
_index | |
_framelist | |
_trajlist | |
_stale | |
A virtual trajectory that supports iterative alignment.
Only the transformation needed to align each frame is stored. When a frame is accessed, it is automatically transformed into the aligned orientation. All keywords from VirtualTrajectory are supported, along with the following new ones,
Keyword | Description |
---|---|
alignwith=s | Use 's' to select what part of the model is used for aligning. |
reference=g | Use the AtomicGroup g as a reference structure. All frames will be aligned to it. |
There are two ways that a trajectory can be aligned. The first uses in iterative alignment method (the same used in LOOS). This is the default method. In order to do the alignment, the alignwith subset must be read into memory and temporarily stored. This can potentially use a lot of memory and create delays in execution. Once the alignment is complete, however, those cached frames are released and subsequent frame accesses will be quick.
The second method is to align each frame to a reference structure. This method is selected when a reference structure is passed to the constructor (with the 'reference' keyword), or when setReference() is called. Note that you can pass None to setReference() which will return the AlignedVirtualTrajectory to the iterative method. Also note that the reference structure is copied into the AVT object as a deep copy (i.e. it does not share any atoms).
See VirtualTrajectory for some basic examples in addition to below...
Align using only C-alphas (the default)
Align using only backbone atoms
Add another trajectory
Align using only C-alphas and a reference structure
Combine loos.pyloos.Trajectory objects and align them >>> aligned = loos.pyloos.AlignedVirtualTrajectory(traj1, traj2, alignwith = 'backbone') Supports the same keywords as VirtualTrajectory. New keywords: alignwith = Selection used for alignment (default is all C-alphas) reference = AtomicGroup that all frames are aligned to (disables iterative alignment) See the Doxygen documentation for more details.
loos.pyloos.trajectories.AlignedVirtualTrajectory.__init__ | ( | self, | |
* | trajs, | ||
** | kwargs ) |
Reimplemented from loos.pyloos.trajectories.VirtualTrajectory.
loos.pyloos.trajectories.AlignedVirtualTrajectory.__getitem__ | ( | self, | |
i ) |
Returns the ith frame aligned. Supports Python slices. Negative indices are relative to the end of the composite trajectory.
Reimplemented from loos.pyloos.trajectories.VirtualTrajectory.
loos.pyloos.trajectories.AlignedVirtualTrajectory.__iter__ | ( | self | ) |
Reimplemented from loos.pyloos.trajectories.VirtualTrajectory.
|
protected |
Align the frames (called implicitly on iterator or array access)
|
protected |
Reimplemented from loos.pyloos.trajectories.VirtualTrajectory.
loos.pyloos.trajectories.AlignedVirtualTrajectory.alignWith | ( | self, | |
selection ) |
Change the selection used to align with. Requires re-aligning
loos.pyloos.trajectories.AlignedVirtualTrajectory.append | ( | self, | |
* | traj ) |
Add another trajectory at the end. Requires re-aligning
Reimplemented from loos.pyloos.trajectories.VirtualTrajectory.