adaptivemd.Trajectory¶
-
class
adaptivemd.
Trajectory
(location, frame, length, engine=None)[source]¶ Represents a trajectory
File
on the clusterVariables: Methods
__init__
(location, frame, length[, engine])args
()Return a list of args of the __init__ function of a class base
()Return the most parent class actually derived from StorableMixin clone
()copy
([target])copy file to a target create
(scheduler)Mark file as being existent on a specific scheduler. descendants
()Return a list of all subclassed objects extend
(length)Get a task to extend this trajectory if the engine is set file
(f)Return a file location to a file inside the trajectory folder from_dict
(dct)get_file
()Return the file content it has been loaded get_uuid
()Create a new unique ID idx
(store)Return the index which is used for the object in the given store. link
([target])link file to a target load
([scheduler])Load a local file into memory modified
()Mark a file as being altered and not existent anymore move
([target])move file to a target named
(name)Attach a .name property to an object objects
()Returns a dictionary of all storable objects outputs
(outtype)Get a location to the file containing the output by given name pick
()Return a random frame from all possible full frames remove
()remove file run
()Return a task to run this engine set_file
(content)Set the file content. to_dict
()touch
()touch file transfer
([target])transfer file to a target Attributes
ACTIVE_LONG
CREATION_COUNT
INSTANCE_UUID
allowed_drives
base_cls
Return the base class base_cls_name
Return the name of the base class basename
returns: the file basename basename_short
returns: the basename without extension cls
Return the class name as a string created
default_drive
dirname
returns: the path of the directory, like os.path.dirname drive
return the prefix name engine
existing_frames
returns: a sorted list of frame indices with full coordinates that can be exists
returns: True if the file exists, i.e. has a positive created timestamp extension
returns: the filename extension or ‘’ of non exists generator
has_file
returns: True if the file content is attached. is_folder
is_temp
returns: True when the location is a temporary folder that might be path
returns: the complete path without prefix short
returns: a shortened form of the path split
returns: split_drive
returns: * str – the drive (prefix with ://) task
types
Return the OutputTypeDescriptions for this trajectory url
returns: return the full form always with a prefix use_absolute_local_paths
-
pick
()[source]¶ Return a random frame from all possible full frames
Returns: the frame you can restart from Return type: Frame
-
file
(f)[source]¶ Return a file location to a file inside the trajectory folder
Parameters: f (str or OutputTypeDescription) – the filename to be appended to the trajectories directory Returns: the object containing the location Return type: File
-
run
()[source]¶ Return a task to run this engine
Returns: the task object that can be submitted to the queue Return type: Task
-
extend
(length)[source]¶ Get a task to extend this trajectory if the engine is set
Parameters: length (int or list of int) – the length to extend by as a single int or a list of ints Returns: the task object to extend the trajectory Return type: Task
-
outputs
(outtype)[source]¶ Get a location to the file containing the output by given name
Parameters: outtype (str or OutputTypeDescription) – the name of the outputtype as str or the full description object Returns: a file location that points to the concrete file that contains the data for a particular output type Return type: File
-
types
¶ Return the OutputTypeDescriptions for this trajectory
Returns: dict str – the output description dict of the engine Return type: OutputTypeDescription
-
existing_frames
¶ Returns: a sorted list of frame indices with full coordinates that can be used for restart. relative to the engines timesteps Return type: list of int
-