adaptivemd.Trajectory¶
-
class
adaptivemd.Trajectory(location, frame, length, engine=None)[source]¶ Represents a trajectory
Fileon the clusterVariables: -
__init__(location, frame, length, engine=None)[source]¶ x.__init__(…) initializes x; see help(type(x)) for signature
Methods
__init__(location, frame, length[, engine])x.__init__(…) initializes x; see help(type(x)) for signature args()Return a list of args of the __init__ function of a class base()Return the most parent class actually derived from StorableMixin clone()create a cloned object with equal attributes 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)Reconstruct an object from a dictionary representation get_file()Return the file content it has been loaded 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. 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()Convert object into a dictionary representation touch()touch file transfer([target])transfer file to a target Attributes
ACTIVE_LONGCREATION_COUNTINSTANCE_UUIDallowed_drivesbase_clsReturn the base class base_cls_nameReturn the name of the base class basenamereturns: the file basename basename_shortreturns: the basename without extension clsReturn the class name as a string createddefault_drivedirnamereturns: the path of the directory, like os.path.dirname drivereturn the prefix name engineexisting_framesreturns: a sorted list of frame indices with full coordinates that can be existsreturns: True if the file exists, i.e. has a positive created timestamp extensionreturns: the filename extension or ‘’ of non exists generatorhas_filereturns: True if the file content is attached. is_folderis_tempreturns: True when the location is a temporary folder that might be pathreturns: the complete path without prefix shortreturns: a shortened form of the path splitreturns: split_drivereturns: - str – the drive (prefix with ://)
tasktypesReturn the OutputTypeDescriptions for this trajectory urlreturns: return the full form always with a prefix use_absolute_local_paths-
clone()[source]¶ create a cloned object with equal attributes
Returns: the same type as this object Return type: Location
-
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
-