# Groups and Virtual Atoms:

## WHOLEMOLECULES

Note:
DISTANCENOPBC 参数，在距离大于模拟盒子的一半长度的时候使用。

## Virtual Atoms

Keyword Description
CENTER_OF_MULTICOLVAR Calculate a a weighted average position based on the value of some multicolvar.
CENTER Calculate the center for a group of atoms, with arbitrary weights.
COM Calculate the center of mass for a group of atoms.
FIXEDATOM Add a virtual atom in a fixed position.
GHOST Calculate the absolute position of a ghost atom with fixed coordinatesin the local reference frame formed by three atoms. The computed ghost atom is stored as a virtual atom that can be accessed inan atom list through the the label for the GHOST action that creates it.

# CV Documentation

Keyword Description
ALPHABETA Measures a distance including pbc between the instantaneous values of a set of torsional angles and set of reference values.
ALPHARMSD Probe the alpha helical content of a protein structure.
ANGLE Calculate an angle.
ANTIBETARMSD Probe the antiparallel beta sheet content of your protein structure.
CELL Calculate the components of the simulation cell
CONSTANT Return one or more constant quantitieswith or without derivatives.
CONTACTMAP Calculate the distances between a number of pairs of atoms and transform each distance by a switching function.
COORDINATION Calculate coordination numbers.
CS2BACKBONE This collective variable calculates the backbone chemical shifts for a protein.
DHENERGY Calculate Debye-Huckel interaction energy among GROUPA and GROUPB.
DIHCOR Measures the degree of similarity between dihedral angles.
DIPOLE Calculate the dipole moment for a group of atoms.
DISTANCE_FROM_CONTOUR Calculate the perpendicular distance from a Willard-Chandler dividing surface.
DISTANCE Calculate the distance between a pair of atoms.
ENERGY Calculate the total energy of the simulation box.
ERMSD Calculate eRMSD with respect to a reference structure.
FAKE This is a fake colvar container used by cltools or various other actionsand just support input and period definition
FRET Calculate the FRET efficiency between a pair of atoms.The efficiency is calculated using the Forster relation:
GPROPERTYMAP Property maps but with a more flexible framework for the distance metric being used.
GYRATION Calculate the radius of gyration, or other properties related to it.
JCOUPLING Calculates 3J coupling constants for a dihedral angle.
NOE Calculates NOE intensities as sums of 1/r^6, also averaging over multiple equivalent atomsor ambiguous NOE.
PARABETARMSD Probe the parallel beta sheet content of your protein structure.
PATHMSD This Colvar calculates path collective variables.
PATH Path collective variables with a more flexible framework for the distance metric being used.
PCAVARS Projection on principal component eigenvectors or other high dimensional linear subspace
POSITION Calculate the components of the position of an atom.
PRE Calculates the Paramegnetic Resonance Enhancement intensity ratio between two atoms.
PROPERTYMAP Calculate generic property maps.
PUCKERING Calculate sugar pseudorotation coordinates.
RDC Calculates the (Residual) Dipolar Coupling between two atoms.
TEMPLATE This file provides a template for if you want to introduce a new CV.
TORSION Calculate a torsional angle.
VOLUME Calculate the volume of the simulation box.

## Distances from reference configurations

Keyword Description
DRMSD Calculate the distance RMSD with respect to a reference structure.
MULTI-RMSD Calculate the RMSD distance moved by a number of separated domains from their positions in a reference structure.
PCARMSD Calculate the PCA components ( see [56] and [54] ) for a number of provided eigenvectors and an average structure. Performs optimal alignment at every step and reports the rmsd so you know if you are far or close from the average structure.It takes the average structure and eigenvectors in form of a pdb.Note that beta and occupancy values in the pdb are neglected and all the weights are placed to 1 (differently from the RMSD colvar for example)
RMSD Calculate the RMSD with respect to a reference structure.
TARGET This function measures the pythagorean distance from a particular structure measured in the space defined by some set of collective variables.

## Functions

Keyword Description
COMBINE Calculate a polynomial combination of a set of other variables.
ENSEMBLE Calculates the replica averaging of a collective variable over multiple replicas.
FUNCPATHMSD This function calculates path collective variables.
FUNCSUMHILLS This function is intended to be called by the command line tool sum_hillsand it is meant to integrate a HILLS file or an HILLS file interpreted as a histogram i a variety of ways. Therefore it is not expected that you use this during your dynamics (it will crash!)
LOCALENSEMBLE Calculates the average over multiple arguments.
MATHEVAL Calculate a combination of variables using a matheval expression.
PIECEWISE Compute a piecewise straight line through its arguments that passes througha set of ordered control points.
SORT This function can be used to sort colvars according to their magnitudes.
STATS Calculates statistical properties of a set of collective variables with respect to a set of reference values.In particular it calculates and store as components the sum of the squared deviations, the correlation, theslope and the intercept of a linear fit.

## MultiColvar

eg. DISTANCES 能够计算一对或多对原子之间的距离，最小距离，小于特定值的距离的个数，处于特定范围的距离的个数..

## Exploiting contact matrices

Contact matrix 是N×N的矩阵，其第i行j列的元素表面第i/j个原子(分子)是否相邻。

Keyword Description
ALIGNED_MATRIX Adjacency matrix in which two molecule are adjacent if they are within a certain cutoff and if they have the same orientation.
CONTACT_MATRIX Adjacency matrix in which two atoms are adjacent if they are within a certain cutoff.
HBOND_MATRIX Adjacency matrix in which two atoms are adjacent if there is a hydrogen bond between them.
SMAC_MATRIX Adjacency matrix in which two molecules are adjacent if they are within a certain cutoff and if the angle between them is within certain ranges.

Keyword Description
CLUSTER_WITHSURFACE Find the various connected components in an adjacency matrix and then output averageproperties of the atoms in those connected components.
COLUMNSUMS Sum the columns of a contact matrix
DFSCLUSTERING Find the connected components of the matrix using the DFS clustering algorithm.
ROWSUMS Sum the rows of a contact matrix
SPRINT Calculate SPRINT topological variables from an adjacency matrix.

Keyword Description
CLUSTER_DIAMETER Print out the diameter of one of the connected components.
CLUSTER_DISTRIBUTION Calculate functions of the distribution of properties in your connected components..
CLUSTER_NATOMS Gives the number of atoms in the connected component.
CLUSTER_PROPERTIES Calculate properties of the distribution of some quantities that are part of a connected component.
OUTPUT_CLUSTER Output the indices of the atoms in one of the clusters identified by a clustering object.

# Analysis

PLUMED 既能在MD过程中进行分析，也能通过后处理进行分析。

Keyword Description
COMMITTOR Does a committor analysis.
DUMPATOMS Dump selected atoms on a file.
DUMPDERIVATIVES Dump the derivatives with respect to the input parameters for one or more objects (generally CVs, functions or biases).
DUMPFORCES Dump the force acting on one of a values in a file.
DUMPMASSCHARGE Dump masses and charges on a selected file.
DUMPMULTICOLVAR Dump atom positions and multicolvar on a file.
DUMPPROJECTIONS Dump the derivatives with respect to the input parameters for one or more objects (generally CVs, functions or biases).
PRINT Print quantities to a file.
UPDATE_IF Conditional update of other actions.

Note:

## DUMPFORCES

Dump the force acting on one of a values in a file.

For a CV this command will dump the force on the CV itself. Be aware that in order to have the forces on the atoms you should multiply the output from this argument by the output from DUMPDERIVATIVES. Furthermore, also note that you can output the forces on multiple quantities simultaneously by specifying more than one argument.

## DUMPMASSCHARGE

Note: 如果希望通过driver来处理电荷(e.g. reading traj.gro)，则必须使用以下脚本来修改原子序号:

## DUMPPROJECTIONS

Dump the derivatives with respect to the input parameters for one or more objects (generally CVs, functions or biases).

## FLUSH

This command instructs plumed to flush all the open files with a user specified frequency. Notice that all files are flushed anyway every 10000 steps.

## UPDATE_IF

Conditional update of other actions.

## Reweight

Keyword Description
REWEIGHT_BIAS Calculate weights for ensemble averages that negate the effect the bias has on the region of phase space explored
REWEIGHT_METAD Calculate the weights configurations should contribute to the histogram in a simulation in which a metadynamics bias acts upon the system.
REWEIGHT_TEMP Calculate weights for ensemble averages allow for the computing of ensemble averages at temperatures lower/higher than that used in your original simulation.

Keyword Description
AVERAGE Calculate the ensemble average of a collective variable
HISTOGRAM Accumulate the average probability density along a few CVs from a trajectory.
MULTICOLVARDENS Evaluate the average value of a multicolvar on a grid.

For many of the above commands data is accumulated on the grids. These grids can be further analysed using one of the actions:

Keyword Description
CONVERT_TO_FES Convert a histogram, H(x), to a free energy surface using F(x)=−kBTlnH(x).
DUMPCUBE Output a three dimensional grid using the Gaussian cube file format.
DUMPGRID Output the function on the grid to a file with the PLUMED grid format.
FIND_CONTOUR_SURFACE Find an isocontour by searching along either the x, y or direction.
FIND_CONTOUR Find an isocontour in a smooth function.
FIND_SPHERICAL_CONTOUR Find an isocontour in a three dimensional grid by searching over a Fibonacci sphere.
FOURIER_TRANSFORM Compute the Discrete Fourier Transform (DFT) by means of FFTW of data stored on a 2D grid.
INTERPOLATE_GRID Interpolate a smooth function stored on a grid onto a grid with a smaller grid spacing.

example:

Note: 进行上述分析的时候，第一帧总是被当做MD的初始构象而被忽略

## Dimensionality Reduction

Keyword Description
CLASSICAL_MDS Create a low-dimensional projection of a trajectory using the classical multidimensional scaling algorithm.
PCA Perform principal component analysis (PCA) using either the positions of the atoms a large number of collective variables as input.

# Bias

Keyword Description
ABMD Adds a ratchet-and-pawl like restraint on one or more variables.
BIASVALUE Takes the value of one variable and use it as a bias
EXTERNAL Calculate a restraint that is defined on a grid that is read during start up
LOWER_WALLS Defines a wall for the value of one or more collective variables, which limits the region of the phase space accessible during the simulation.
METAINFERENCE Calculate the Metainference Score for a set of back calculated experimental data.
MOVINGRESTRAINT Add a time-dependent, harmonic restraint on one or more variables.
RESTRAINT Adds harmonic and/or linear restraints on one or more variables.
UPPER_WALLS Defines a wall for the value of one or more collective variables, which limits the region of the phase space accessible during the simulation.

METAD or PBMETAD，这类依赖历史信息的bias能通过RESTART关键字进行restart

## ABMD

Adds a ratchet-and-pawl like restraint on one or more variables.
This action can be used to evolve a system towards a target value in CV space using an harmonic potential moving with the thermal fluctuations of the CV.

## BIASVALUE

eg: 把关于CV的函数作为bias势

## MOVINGRESTRAINT

Add a time-dependent, harmonic restraint on one or more variables.

## RESTRAINT

Adds harmonic and/or linear restraints on one or more variables.

Either or both of SLOPE and KAPPA must be present to specify the linear and harmonic force constants respectively.

## RESTART

Activate restart.

# Command Line Tools

PLUMED包含一系列的简单命令行工具，如下格式:

Keyword Description
driver-float Equivalent to driver, but using single precision reals.
driver driver is a tool that allows one to to use plumed to post-process an existing trajectory.
gentemplate gentemplate is a tool that you can use to construct template inputs for the variousactions
info This tool allows you to obtain information about your plumed version
kt Print out the value of kBT at a particular temperature
manual manual is a tool that you can use to construct the manual page for a particular action
simplemd simplemd allows one to do molecular dynamics on systems of Lennard-Jones atoms.
sum_hills sum_hills is a tool that allows one to to use plumed to post-process an existing hills/colvar file

## driver

driver并不事先知道质量和电荷，所以如果分析与质量和电荷有关的量，比如质心，就需要 -pdb or -mc 来读入质量或者电荷信息

Check the available molfile plugins and limitations.
To have support of all of VMD’s plugins you need to recompile PLUMED. You need to download the SOURCE of VMD, which contains a plugins directory. Adapt build.sh and compile it. At the end, you should get the molfile plugins compiled as a static library libmolfile_plugin.a. Locate said file and libmolfile_plugin.h, and customize the configure command with something along the lines of:

xdrfile的xtc或trr，比molfile的更稳健一些。

--trajectory-stride 设置为MD时保存轨迹的频率，-–timestep 设置为MD时的时间步长。

## sum_hills

sum_hills 对已经存在的 hills或者cv文件进行后处理

# Tutorials

Keyword Description
Belfast tutorial Analyzing CVs This tutorial explains how to use plumed to analyze CVs
Belfast tutorial Adaptive variables I How to use path CVs
Belfast tutorial Adaptive variables II Dimensionality reduction and sketch maps
Belfast tutorial Umbrella sampling Umbrella sampling, reweighting, and weighted histogram
Belfast tutorial Out of equilibrium dynamics How to run a steered MD simulations and how to estimate the free energy
Belfast tutorial Replica exchange I Parallel tempering and Metadynamics, Well-Tempered Ensemble
Belfast tutorial Replica exchange II and Multiple walkers Bias exchange and multiple walkers
Belfast tutorial NMR restraints NMR restraints
Belfast tutorial Steinhardt Parameters Steinhardt Parameters
Cineca tutorial A short 2 hours tutorial that introduces analysis, well-tempered metadynamics, and multiple-restraints umbrella sampling.
Using Hamiltonian replica exchange with GROMACS This tutorial explains how to use Hamiltonian replica exchange in GROMACS
Julich tutorial Developing CVs in plumed Implementing new collective variables in plumed
Moving from PLUMED 1 to PLUMED 2 This tutorial explains how plumed 1 input files can be translated into the new plumed 2 syntax.
Munster tutorial A short 3 hours tutorial that introduces analysis, well-tempered metadynamics, and multiple-restraints umbrella sampling.
http://www.youtube.com/watch?v=iDvZmbWE5ps A short video introduction to the use of multicolvars in PLUMED 2
http://www.youtube.com/watch?v=PxJP16qNCYs A short video introduction to the syntax of the PLUMED 2 input file