Calculate the distance RMSD with respect to a reference structure.
To calculate the root-mean-square deviation between the atoms in two configurations you must first superimpose the two structures in some ways. Obviously, it is the internal vibrational motions of the structure - i.e. not the translations and rotations - that are interesting. However, aligning two structures by removing the translational and rotational motions is not easy. Furthermore, in some cases there can be alignment issues caused by so-called frame-fitting problems. It is thus often cheaper and easier to calculate the distances between all the pairs of atoms. The distance between the two structures, \(\mathbf{X}^a\) and \(\mathbf{X}^b\) can then be measured as:
where \(N\) is the number of atoms and \(d(\mathbf{x}_i,\mathbf{x}_j)\) represents the distance between atoms \(i\) and \(j\). Clearly, this representation of the configuration is invariant to translation and rotation. However, it can become expensive to calculate when the number of atoms is large. This can be resolved within the DRMSD colvar by setting LOWER_CUTOFF and UPPER_CUTOFF. These keywords ensure that only pairs of atoms that are within a certain range are incorporated into the above sum.
In PDB files the atomic coordinates and box lengths should be in Angstroms unless you are working with natural units. If you are working with natural units then the coordinates should be in your natural length unit. For more details on the PDB file format visit http://www.wwpdb.org/docs.html
Examples
The following tells plumed to calculate the distance RMSD between the positions of the atoms in the reference file and their instantaneous position. Only pairs of atoms whose distance in the reference structure is within 0.1 and 0.8 nm are considered.
Click on the labels of the actions for more information on what each action computes
the pair of atom that we are calculating the distance between.
=8,9
ATOMS2
the pair of atom that we are calculating the distance between.
=8,10
ATOMS3
the pair of atom that we are calculating the distance between.
=8,12
ATOMS4
the pair of atom that we are calculating the distance between.
=8,14
ATOMS5
the pair of atom that we are calculating the distance between.
=9,12 # Action input conctinues with 4 further ATOMSn keywords, The DISTANCE action with label @0_d calculates a single scalar value@0_ref: CONSTANT
VALUES
the numbers that are in your constant value
=0.437873,0.493257,0.507082,0.3331,0.100018,0.162838,0.163727,0.251047,0.190289 The CONSTANT action with label @0_ref calculates a single scalar value@0_diffs: CUSTOM
ARG
compulsory keyword
the values input to this function
=@0_d,@0_ref
FUNC
compulsory keyword
the function you wish to evaluate
=(x-y)*(x-y)
PERIODIC
compulsory keyword
if the output of your function is periodic then you should specify the periodicity
of the function.
=NO The CUSTOM action with label @0_diffs
The reference file is a PDB file that looks like this
ATOM 8 HT3 ALA 2 -1.480 -1.560 1.212 1.00 1.00 DIA H
ATOM 9 CAY ALA 2 -0.096 2.144 -0.669 1.00 1.00 DIA C
ATOM 10 HY1 ALA 2 0.871 2.385 -0.588 1.00 1.00 DIA H
ATOM 12 HY3 ALA 2 -0.520 2.679 -1.400 1.00 1.00 DIA H
ATOM 14 OY ALA 2 -1.139 0.931 -0.973 1.00 1.00 DIA O
END
The following tells plumed to calculate a DRMSD value for a pair of molecules.
Click on the labels of the actions for more information on what each action computes
the pair of atom that we are calculating the distance between.
=12,8
ATOMS2
the pair of atom that we are calculating the distance between.
=12,9
ATOMS3
the pair of atom that we are calculating the distance between.
=12,10
ATOMS4
the pair of atom that we are calculating the distance between.
=14,8
ATOMS5
the pair of atom that we are calculating the distance between.
=14,9 # Action input conctinues with 1 further ATOMSn keywords, The DISTANCE action with label @0_d calculates a single scalar value@0_ref: CONSTANT
VALUES
the numbers that are in your constant value
=0.507082,0.100018,0.163727,0.3331,0.162838,0.251047 The CONSTANT action with label @0_ref calculates a single scalar value@0_diffs: CUSTOM
ARG
compulsory keyword
the values input to this function
=@0_d,@0_ref
FUNC
compulsory keyword
the function you wish to evaluate
=(x-y)*(x-y)
PERIODIC
compulsory keyword
if the output of your function is periodic then you should specify the periodicity
of the function.
=NO The CUSTOM action with label @0_diffs
In the input reference file (file.pdb) the atoms in each of the two molecules are separated by a TER command as shown below.
ATOM 8 HT3 ALA 2 -1.480 -1.560 1.212 1.00 1.00 DIA H
ATOM 9 CAY ALA 2 -0.096 2.144 -0.669 1.00 1.00 DIA C
ATOM 10 HY1 ALA 2 0.871 2.385 -0.588 1.00 1.00 DIA H
TER
ATOM 12 HY3 ALA 2 -0.520 2.679 -1.400 1.00 1.00 DIA H
ATOM 14 OY ALA 2 -1.139 0.931 -0.973 1.00 1.00 DIA O
END
In this example the INTER-DRMSD type ensures that the set of distances from which the final quantity is computed involve one atom from each of the two molecules. If this is replaced by INTRA-DRMSD then only those distances involving pairs of atoms that are both in the same molecule are computed.
Glossary of keywords and components
Description of components
Quantity
Description
.#!value
the DRMSD distance between the instantaneous structure and the reference structure
Compulsory keywords
REFERENCE
a file in pdb format containing the reference structure and the atoms involved in the CV.
TYPE
( default=DRMSD ) what kind of DRMSD would you like to calculate. You can use either the normal DRMSD involving all the distances between the atoms in your molecule. Alternatively, if you have multiple molecules you can use the type INTER-DRMSD to compute DRMSD values involving only those distances between the atoms at least two molecules or the type INTRA-DRMSD to compute DRMSD values involving only those distances between atoms in the same molecule
Options
SQUARED
( default=off ) This should be setted if you want MSD instead of RMSD
NOPBC
( default=off ) ignore the periodic boundary conditions when calculating distances
NUMERICAL_DERIVATIVES
( default=off ) calculate the derivatives for these quantities numerically
LOWER_CUTOFF
only pairs of atoms further than LOWER_CUTOFF are considered in the calculation.
UPPER_CUTOFF
only pairs of atoms closer than UPPER_CUTOFF are considered in the calculation.