Trees | Indices | Help |
|
---|
|
object --+ | dict --+ | collections.OrderedDict --+ | _CustomCalc
An instance of this class will store custom calculation requests (keys) and results (values). Each request is represented as a calculation ID (or CID for short). If the same calculation is requested by different analyzers, using the same CID can avoid duplicate calculation. A CID must be a hashable object of any type, whereas the results (values) can just be of any type. A CID can be either a callable or noncallable object. If it's callable, the C{GeomCalc} object will call it with the following arguments: callable_object(data, pbc, fr, self) where C{data} is the current value corresponding to this CID, C{pbc} is a L{Pbc} object, C{fr} is a trajectory frame (L{traj.Frame}), and C{self} is this L{_CustomCalc} object. This function should return a new value to replace the old one. If a CID is noncallable object, the analyzer(s) that needs the data is responsible to update the data from the current trajectory frame. Note that if you have more than one analyzers reading the data, you have to somehow ensure that the data is updated only once for each trajectory frame.
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
|
|||
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Jan 25 01:17:52 2017 | http://epydoc.sourceforge.net |