Package schrodinger :: Package application :: Package desmond :: Package packages :: Module topo :: Class DuckFrame
[hide private]
[frames] | no frames]

Class DuckFrame

object --+
         |
        DuckFrame


A duck-type frame with limited interface.

FIXME: I only implemented the interface for what is needed now. We may need
enhancements down the road, but that should be easy. -YW (Jun 2, 2016)

We can duck-type a msys model (i.e., a L{msys.System} object) into a
`DuckFrame' object, example:

   dfr = DuckFrame(msys_model)

Changes on the `DuckFrame' object should NOT affect the original L{model}
object.

Instance Methods [hide private]
 
__init__(self, model)
Copy the coordinates, the velocities, and the box matrix of the original model.
 
pos(self, i=None)
Return the position vector(s).
 
vel(self)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  box

Inherited from object: __class__

Method Details [hide private]

__init__(self, model)
(Constructor)

 

Copy the coordinates, the velocities, and the box matrix of the original model.

FIXME: We only support msys.System type of model for now.

Overrides: object.__init__

pos(self, i=None)

 

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.


Property Details [hide private]

box

Get Method:
unreachable.box(self)