openpathsampling.collectivevariables.PLUMEDInterface

class openpathsampling.collectivevariables.PLUMEDInterface(topology, pathtoplumed='', timestep=1.0, kbt=1.0, molinfo='', logfile='plumed.log')[source]

Interfaces the Cython PLUMED wrapper [PLU2b] located at /path/to/plumed2/python and allows to set and get non-PLUMEDCV commands (i.e., non-outputting). This includes groups of atoms, centers of mass, include files, etc. Requires PLUMED development version (see https://github.com/plumed/plumed2) and sourcing /path/to/plumed2/sourceme.sh.

References

[PLU2b]

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 group the atoms [7,9,15,17] corresponding to the dihedral psi
>>> # in Ala dipeptide:
>>> from openpathsampling import PLUMEDCV, PLUMEDInterface
>>> plmd = PLUMEDInterface(top)
>>> # top is an `openpathsampling.engines.topology.MDTrajTopology`
>>> plmd.set("group","GROUP ATOMS=7,9,15,17")
>>> psi_plumed = PLUMEDCV("psi",plmd,"TORSION ATOMS=group")
>>> print psi_plumed(traj)  # returns psi values for the trajectory
>>> pld.get()  # returns (('group', 'GROUP ATOMS=7,9,15,17'))
__init__(topology, pathtoplumed='', timestep=1.0, kbt=1.0, molinfo='', logfile='plumed.log')[source]
Parameters:

Methods

__init__(topology[, pathtoplumed, timestep, ...])

args()

Return a list of args of the __init__ function of a class

base()

Return the most parent class actually derived from StorableObject

cmd(*args, **kwargs)

count_weaks()

Return number of objects subclassed from StorableObject still in memory

descendants()

Return a list of all subclassed objects

fix_name()

Set the objects name to be immutable.

from_dict(dct)

Reconstruct an object from a dictionary representaiton

get()

Get commands set in the PLUMEDInterface.

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(name, definition)

Set a non-outputting command in the PLUMEDInterface.

set_observer(active)

(De-)Activate observing creation of storable objects

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

default_name

Return the default name.

is_named

True if this object has a custom name.

name

Return the current name of the object.

observe_objects