openpathsampling.collectivevariables.PLUMEDCV
- class openpathsampling.collectivevariables.PLUMEDCV(name, plmd, definition, components=None, cv_requires_lists=True, cv_wrap_numpy_array=True, cv_scalarize_numpy_singletons=True, **kwargs)[source]
Make CollectiveVariable computed by PLUMED [PLU2a] according to the command name: definition, where name is a PLUMED label and definition contains all PLUMED keywords. Takes an openpathsampling.engines.trajectory.Trajectory as input.
References
[PLU2a]G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni, G. Bussi, PLUMED2: New feathers for an old bird, Comp. Phys. Comm. 185, 604 (2014); https://doi.org/10.1016/j.cpc.2013.09.018
Examples
>>> # To create a `CollectiveVariable` which calculates the dihedral psi >>> # formed by the atoms [7,9,15,17] in Ala dipeptide: >>> from openpathsampling import PLUMEDCV, PLUMEDInterface >>> plmd = PLUMEDInterface(top) >>> # top is an `openpathsampling.engines.topology.MDTrajTopology` >>> psi_plumed = PLUMEDCV("psi",plmd,"TORSION ATOMS=7,9,15,17") >>> print psi_plumed(traj) # returns psi values for the trajectory
- __init__(name, plmd, definition, components=None, cv_requires_lists=True, cv_wrap_numpy_array=True, cv_scalarize_numpy_singletons=True, **kwargs)[source]
- Parameters:
name (string) – A descriptive name of the PLUMED collective variable, equivalent to a label in a PLUMED input file.
plmd (
openpathsampling.collectivevariable.PLUMEDInterface) – An interface to the Cython PLUMED wrapper. If the PLUMED collective variable is a function of previously defined ones, or if it is defined based on group/virtual atoms, the plmd interface must be the same one that was used for the preceding instantiantions.definition (string) – The PLUMED keywords that define the collective variable (see http://www.plumed.org/documentation).
components (list of string) – The components (either default of customized) of the PLUMED collective variable (see http://www.plumed.org/documentation).
cv_requires_lists
cv_wrap_numpy_array
cv_scalarize_numpy_singletons
kwargs
Methods
__init__(name, plmd, definition[, ...])args()Return a list of args of the __init__ function of a class
base()Return the most parent class actually derived from StorableObject
cache_all()Sync this CV with attached storages
compute_cv(trajectory)Compute a PLUMED collective variable.
count_weaks()Return number of objects subclassed from StorableObject still in memory
create_plumed_var(name, definition)Create a PLUMED collective variable.
descendants()Return a list of all subclassed objects
disable_diskcache()enable_diskcache()fix_name()Set the objects name to be immutable.
from_dict(dct)Reconstruct an object from a dictionary representaiton
get_uuid()idx(store)Return the index which is used for the object in the given store.
named(name)Name an unnamed object.
objects()Returns a dictionary of all storable objects
reverse_uuid()ruuid(uid)set_cache_store(value_store)Attach store variables to the collective variables.
set_observer(active)(De-)Activate observing creation of storable objects
str_chain()Return a string representation of the chain of dicts called.
sync()Sync this CV with the attached storages
to_dict()Convert object into a dictionary representation
with_diskcache([template, chunksize, ...])Attributes
ACTIVE_LONGCREATION_COUNTINSTANCE_UUIDbase_clsReturn the base class
base_cls_nameReturn the name of the base class
clsReturn the class name as a string
default_nameReturn the default name.
fis_namedTrue if this object has a custom name.
nameReturn the current name of the object.
observe_objectspassing_chainReturn a list of chaindicts in order they will be tried.