Trees | Indices | Help |
|
---|
|
object --+ | Frame
This class, as its name suggests, represents a single trajectory frame. So far, we allow a frame to be mutated in the following ways: - Assign a new chemical time - Reduce to a subset of particles - Coordinates of all particles are translated We call changes generally as ``decorations''. They might not make into the frame data, or at least not immediately. Why? This avoids making multiple expensive copies of the data.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
natoms | |||
time | |||
box | |||
orig_index | |||
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
str(x)
|
Makes a copy of the native trajectory-frame object and decorates the copied object if necessary.
|
Solidifies decorations. If there are decorations or |
Return a copy of this |
Return the position vector(s). @type i: Any of the following types: C{None}: Return the whole position-vector array; C{int} : C{i} should be a GID, and this function return position vector of the particle C{i}. C{Iterable}: C{i} should be a "list" of GIDs, and this function returns a NEW numpy array of position-vectors of the specified particles. |
Return the velocity vector(s). This method may throw if this frame doesn't have velocity data. @type i: Any of the following types: C{None}: Return the whole velocity-vector array; C{int} : C{i} should be a GID, and this function return velocity vector of the particle C{i}. C{Iterable}: C{i} should be a "list" of GIDs, and this function returns a NEW numpy array of position-vectors of the specified particles. |
Tentatively replace the internal position array of this L{Frame} object with an external numpy array C{impos}. We can call the external array "imposter". After calling this method, the L{pos} method will return values from the imposter until the imposter is removed (by calling C{hijackPos(None)}). The imposter should be a Nx3 numpy array, where N can be of any size. Note the impacts on other methods of this class: - pos Use C{impos}. - copy The entire C{impos} array will be copied into the copy of this C{Frame} object. - reduce Still function in the same way, but note that the C{impos} array will not be changed by these methods. - moveby The same as C{reduce} - write Still function in the same way, note that it's the internal position array, not C{impos}, that will be written out. @type impos: C{None}, or C{numpy.ndarray} of size Nx3, where N is arbitray number @param impos: The position array to tentatively replac the internal position array in this L{Frame} object. If the value is C{None}, we remove the "imposter" and recover the internal position array. |
Keep only the atoms specified by
|
|
natoms
|
box
|
orig_index
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue May 2 06:33:09 2017 | http://epydoc.sourceforge.net |