adaptivemd.Engine¶
-
class
adaptivemd.
Engine
[source]¶ An generator for trajectory simulation tasks
Methods
__init__
()x.__init__(…) initializes x; see help(type(x)) for signature add_output_type
(name[, filename, stride, …])Add an output type for a trajectory kind to be generated by this engine args
()Return a list of args of the __init__ function of a class base
()Return the most parent class actually derived from StorableMixin descendants
()Return a list of all subclassed objects extend
(target, length)Create a task that extends a trajectory given in the input from_dict
(dct)Reconstruct an object from a dictionary representation get_uuid
()Create a new unique ID :returns: the unique number for an object in the project :rtype: long idx
(store)Return the index which is used for the object in the given store. items
()named
(name)Attach a .name property to an object objects
()Returns a dictionary of all storable objects run
(target)Create a task that returns a trajectory given in the input stage
(obj[, target])Short cut to add a file to be staged to_dict
()Convert object into a dictionary representation Attributes
ACTIVE_LONG
CREATION_COUNT
INSTANCE_UUID
base_cls
Return the base class base_cls_name
Return the name of the base class cls
Return the class name as a string files
full_strides
list of strides for trajectories that have full coordinates native_stride
The least common multiple stride of all generated trajectories. stage_in
Return a list of actions needed before tasks can be generated -
classmethod
from_dict
(dct)[source]¶ Reconstruct an object from a dictionary representation
Parameters: dct (dict) – the dictionary containing a state representation of the class. Returns: the reconstructed storable object Return type: StorableMixin
-
to_dict
()[source]¶ Convert object into a dictionary representation
Used to convert the dictionary into JSON string for serialization
Returns: the dictionary representing the (immutable) state of the object Return type: dict
-
run
(target)[source]¶ Create a task that returns a trajectory given in the input
Parameters: target (Trajectory) – location of the created target trajectory Returns: the task object containing the job description Return type: Task
-
extend
(target, length)[source]¶ Create a task that extends a trajectory given in the input
Parameters: - target (Trajectory) – location of the target trajectory to be extended
- length (int) – number of additional frames to be computed
Returns: the task object containing the job description
Return type: Task
-
add_output_type
(name, filename=None, stride=1, selection=None)[source]¶ Add an output type for a trajectory kind to be generated by this engine
Parameters: - name (str) – the name to call the output type by
- filename (str) – a filename to be used for this output type
- stride (int) – the stride used by this particular trajectory relative to the native steps of the engine.
- selection (str) – an mdtraj.Topology.select type filter string to store only a subset of atoms
-
native_stride
¶ The least common multiple stride of all generated trajectories.
If you want consistent trajectory length your simulation length need to be multiples of this number. The number is relative to the native time steps
Returns: the lcm stride relative to the engines timesteps Return type: int
-
full_strides
¶ list of strides for trajectories that have full coordinates
this is useful to figure out from which frames you can restart a new trajectory. Usually you only have a single one with full frames.
Returns: the list of strides for full trajectories Return type: list of int
-
classmethod