Shortcut: PDB2CONSTANT

Module generic
Description Usage
Create a constant value from a PDB input file used in 1 tutorialsused in 3 eggs
output value type
a value that is constructed from the information in the PDB file scalar/vector/matrix

Input

The arguments that serve as the input for this action are specified using one or more of the keywords in the following table.

Keyword Type Description
ARG scalar/vector read this single argument from the input rather than the atomic structure

Further details and examples

Create a constant value from a PDB input file

This shortcut converts the contents of a PDB file to one or more CONSTANT actions. Converting PDB files to Values in this way is useful because it means that when we implement methods, like those in the refdist or mapping modules or the RMSD action, that calculate the distance between two configurations those two configurations are both stored in PLUMED values. The same code can thus be used to calculate the difference between the instantaneous configuration and a constant reference configuration that was read from a file or between two reference configuration.

The following example illustrates how this action can be used to read a set of reference atomic positions

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/basic/rt19/test0.pdb
ref: PDB2CONSTANTCreate a constant value from a PDB input file This action is a shortcut and it has hidden defaults. More details REFERENCEa file in pdb format containing the reference structure=
regtest/basic/rt19/test0.pdb
Click here to see an extract from this file.
×

FILE: regtest/basic/rt19/test0.pdb

ATOM      2  O   ALA     2      -0.926  -2.447  -0.497  1.00  1.00      DIA  O
ATOM      4  HNT ALA     2       0.533  -0.396   1.184  1.00  1.00      DIA  H
ATOM      6  HT1 ALA     2      -0.216  -2.590   1.371  1.00  1.00      DIA  H
ATOM      7  HT2 ALA     2      -0.309  -1.255   2.315  1.00  1.00      DIA  H
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
ATOM     16  HN  ALA     2       1.713   1.021  -0.873  1.00  1.00      DIA  H
ATOM     18  HA  ALA     2       0.099  -0.774  -2.218  1.00  1.00      DIA  H
ATOM     19  CB  ALA     2       2.063  -1.223  -1.276  1.00  1.00      DIA  C
ATOM     20  HB1 ALA     2       2.670  -0.716  -2.057  1.00  1.00      DIA  H
ATOM     21  HB2 ALA     2       2.556  -1.051  -0.295  1.00  1.00      DIA  H
ATOM     22  HB3 ALA     2       2.070  -2.314  -1.490  1.00  1.00      DIA  H

You can see how the reference positions are converted to CONSTANT action that outputs a vector by expanding the shortcut.

You can also use this command to read in multiple reference positions as illustrated below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/mapping/rt-pathtools-3/all.pdb
ref: PDB2CONSTANTCreate a constant value from a PDB input file This action is a shortcut and it has hidden defaults. More details REFERENCEa file in pdb format containing the reference structure=
regtest/mapping/rt-pathtools-3/all.pdb
Click here to see an extract from this file.
×

FILE: regtest/mapping/rt-pathtools-3/all.pdb

ATOM      1  CL  ALA     1      -3.171   0.295   2.045  1.00  1.00
ATOM      5  CLP ALA     1      -1.819  -0.143   1.679  1.00  1.00
ATOM      6  OL  ALA     1      -1.177  -0.889   2.401  1.00  1.00
ATOM      7  NL  ALA     1      -1.313   0.341   0.529  1.00  1.00
ATOM      8  HL  ALA     1      -1.845   0.961  -0.011  1.00  1.00
ATOM      9  CA  ALA     1      -0.003  -0.019   0.021  1.00  1.00
ATOM     10  HA  ALA     1       0.205  -1.051   0.259  1.00  1.00
ATOM     11  CB  ALA     1       0.009   0.135  -1.509  1.00  1.00
ATOM     15  CRP ALA     1       1.121   0.799   0.663  1.00  1.00
ATOM     16  OR  ALA     1       1.723   1.669   0.043  1.00  1.00
ATOM     17  NR  ALA     1       1.423   0.519   1.941  1.00  1.00
ATOM     18  HR  ALA     1       0.873  -0.161   2.413  1.00  1.00
ATOM     19  CR  ALA     1       2.477   1.187   2.675  1.00  1.00
END
FIXED
ATOM      1  CL  ALA     1      -3.175   0.365   2.024  1.00  1.00
ATOM      5  CLP ALA     1      -1.814  -0.106   1.685  1.00  1.00
ATOM      6  OL  ALA     1      -1.201  -0.849   2.425  1.00  1.00
ATOM      7  NL  ALA     1      -1.296   0.337   0.534  1.00  1.00
ATOM      8  HL  ALA     1      -1.807   0.951  -0.044  1.00  1.00
ATOM      9  CA  ALA     1       0.009  -0.067   0.033  1.00  1.00
ATOM     10  HA  ALA     1       0.175  -1.105   0.283  1.00  1.00
ATOM     11  CB  ALA     1       0.027   0.046  -1.501  1.00  1.00
ATOM     15  CRP ALA     1       1.149   0.725   0.654  1.00  1.00
ATOM     16  OR  ALA     1       1.835   1.491  -0.011  1.00  1.00
ATOM     17  NR  ALA     1       1.380   0.537   1.968  1.00  1.00
ATOM     18  HR  ALA     1       0.764  -0.060   2.461  1.00  1.00
ATOM     19  CR  ALA     1       2.431   1.195   2.683  1.00  1.00
END
ATOM      1  CL  ALA     1      -2.990   0.383   2.277  1.00  1.00
ATOM      5  CLP ALA     1      -1.664  -0.085   1.831  1.00  1.00
ATOM      6  OL  ALA     1      -0.987  -0.835   2.533  1.00  1.00
ATOM      7  NL  ALA     1      -1.227   0.364   0.646  1.00  1.00
ATOM      8  HL  ALA     1      -1.798   0.982   0.124  1.00  1.00
ATOM      9  CA  ALA     1       0.026  -0.028   0.044  1.00  1.00
ATOM     10  HA  ALA     1       0.224  -1.060   0.284  1.00  1.00
ATOM     11  CB  ALA     1      -0.076   0.107  -1.483  1.00  1.00
ATOM     15  CRP ALA     1       1.217   0.776   0.577  1.00  1.00
ATOM     16  OR  ALA     1       1.900   1.463  -0.158  1.00  1.00
ATOM     17  NR  ALA     1       1.494   0.666   1.888  1.00  1.00
ATOM     18  HR  ALA     1       0.882   0.122   2.437  1.00  1.00
ATOM     19  CR  ALA     1       2.580   1.341   2.529  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.006   0.350   2.252  1.00  1.00
ATOM      5  CLP ALA     1      -1.680  -0.112   1.826  1.00  1.00
ATOM      6  OL  ALA     1      -1.025  -0.896   2.508  1.00  1.00
ATOM      7  NL  ALA     1      -1.220   0.368   0.654  1.00  1.00
ATOM      8  HL  ALA     1      -1.771   1.013   0.137  1.00  1.00
ATOM      9  CA  ALA     1       0.040  -0.029   0.062  1.00  1.00
ATOM     10  HA  ALA     1       0.210  -1.076   0.277  1.00  1.00
ATOM     11  CB  ALA     1      -0.066   0.148  -1.465  1.00  1.00
ATOM     15  CRP ALA     1       1.241   0.738   0.605  1.00  1.00
ATOM     16  OR  ALA     1       1.986   1.347  -0.125  1.00  1.00
ATOM     17  NR  ALA     1       1.446   0.694   1.940  1.00  1.00
ATOM     18  HR  ALA     1       0.796   0.210   2.481  1.00  1.00
ATOM     19  CR  ALA     1       2.544   1.350   2.582  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.002   0.343   2.271  1.00  1.00
ATOM      5  CLP ALA     1      -1.672  -0.125   1.828  1.00  1.00
ATOM      6  OL  ALA     1      -1.028  -0.942   2.486  1.00  1.00
ATOM      7  NL  ALA     1      -1.213   0.373   0.670  1.00  1.00
ATOM      8  HL  ALA     1      -1.752   1.033   0.169  1.00  1.00
ATOM      9  CA  ALA     1       0.041  -0.032   0.055  1.00  1.00
ATOM     10  HA  ALA     1       0.201  -1.079   0.245  1.00  1.00
ATOM     11  CB  ALA     1      -0.079   0.194  -1.466  1.00  1.00
ATOM     15  CRP ALA     1       1.257   0.720   0.601  1.00  1.00
ATOM     16  OR  ALA     1       2.057   1.240  -0.140  1.00  1.00
ATOM     17  NR  ALA     1       1.422   0.730   1.942  1.00  1.00
ATOM     18  HR  ALA     1       0.740   0.303   2.500  1.00  1.00
ATOM     19  CR  ALA     1       2.528   1.373   2.598  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.144   1.457   1.417  1.00  1.00
ATOM      5  CLP ALA     1      -1.943   0.587   1.450  1.00  1.00
ATOM      6  OL  ALA     1      -1.588   0.028   2.480  1.00  1.00
ATOM      7  NL  ALA     1      -1.281   0.449   0.306  1.00  1.00
ATOM      8  HL  ALA     1      -1.578   0.914  -0.520  1.00  1.00
ATOM      9  CA  ALA     1      -0.132  -0.428   0.139  1.00  1.00
ATOM     10  HA  ALA     1      -0.264  -1.291   0.758  1.00  1.00
ATOM     11  CB  ALA     1      -0.066  -0.855  -1.329  1.00  1.00
ATOM     15  CRP ALA     1       1.193   0.220   0.554  1.00  1.00
ATOM     16  OR  ALA     1       2.195   0.098  -0.140  1.00  1.00
ATOM     17  NR  ALA     1       1.224   0.872   1.737  1.00  1.00
ATOM     18  HR  ALA     1       0.399   0.943   2.273  1.00  1.00
ATOM     19  CR  ALA     1       2.413   1.511   2.254  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.140   1.441   1.453  1.00  1.00
ATOM      5  CLP ALA     1      -1.944   0.576   1.465  1.00  1.00
ATOM      6  OL  ALA     1      -1.587  -0.018   2.487  1.00  1.00
ATOM      7  NL  ALA     1      -1.274   0.465   0.322  1.00  1.00
ATOM      8  HL  ALA     1      -1.571   0.957  -0.486  1.00  1.00
ATOM      9  CA  ALA     1      -0.124  -0.418   0.135  1.00  1.00
ATOM     10  HA  ALA     1      -0.274  -1.304   0.729  1.00  1.00
ATOM     11  CB  ALA     1      -0.063  -0.813  -1.347  1.00  1.00
ATOM     15  CRP ALA     1       1.201   0.199   0.572  1.00  1.00
ATOM     16  OR  ALA     1       2.227   0.007  -0.072  1.00  1.00
ATOM     17  NR  ALA     1       1.215   0.910   1.709  1.00  1.00
ATOM     18  HR  ALA     1       0.369   1.020   2.200  1.00  1.00
ATOM     19  CR  ALA     1       2.393   1.536   2.237  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.140   1.420   1.442  1.00  1.00
ATOM      5  CLP ALA     1      -1.948   0.546   1.448  1.00  1.00
ATOM      6  OL  ALA     1      -1.618  -0.065   2.460  1.00  1.00
ATOM      7  NL  ALA     1      -1.255   0.469   0.311  1.00  1.00
ATOM      8  HL  ALA     1      -1.538   0.979  -0.490  1.00  1.00
ATOM      9  CA  ALA     1      -0.107  -0.412   0.124  1.00  1.00
ATOM     10  HA  ALA     1      -0.257  -1.312   0.685  1.00  1.00
ATOM     11  CB  ALA     1      -0.028  -0.770  -1.375  1.00  1.00
ATOM     15  CRP ALA     1       1.217   0.186   0.600  1.00  1.00
ATOM     16  OR  ALA     1       2.269  -0.069   0.026  1.00  1.00
ATOM     17  NR  ALA     1       1.193   0.966   1.687  1.00  1.00
ATOM     18  HR  ALA     1       0.333   1.114   2.120  1.00  1.00
ATOM     19  CR  ALA     1       2.377   1.589   2.240  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.110   1.698   0.880  1.00  1.00
ATOM      5  CLP ALA     1      -2.021   0.734   1.142  1.00  1.00
ATOM      6  OL  ALA     1      -1.859   0.257   2.258  1.00  1.00
ATOM      7  NL  ALA     1      -1.229   0.414   0.114  1.00  1.00
ATOM      8  HL  ALA     1      -1.371   0.826  -0.771  1.00  1.00
ATOM      9  CA  ALA     1      -0.173  -0.593   0.188  1.00  1.00
ATOM     10  HA  ALA     1      -0.481  -1.374   0.851  1.00  1.00
ATOM     11  CB  ALA     1       0.011  -1.180  -1.220  1.00  1.00
ATOM     15  CRP ALA     1       1.163  -0.060   0.716  1.00  1.00
ATOM     16  OR  ALA     1       2.227  -0.564   0.393  1.00  1.00
ATOM     17  NR  ALA     1       1.127   0.960   1.594  1.00  1.00
ATOM     18  HR  ALA     1       0.234   1.295   1.847  1.00  1.00
ATOM     19  CR  ALA     1       2.303   1.549   2.172  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.139   1.652   0.924  1.00  1.00
ATOM      5  CLP ALA     1      -2.039   0.698   1.169  1.00  1.00
ATOM      6  OL  ALA     1      -1.868   0.201   2.278  1.00  1.00
ATOM      7  NL  ALA     1      -1.239   0.411   0.139  1.00  1.00
ATOM      8  HL  ALA     1      -1.385   0.842  -0.737  1.00  1.00
ATOM      9  CA  ALA     1      -0.173  -0.574   0.193  1.00  1.00
ATOM     10  HA  ALA     1      -0.477  -1.381   0.833  1.00  1.00
ATOM     11  CB  ALA     1       0.029  -1.142  -1.231  1.00  1.00
ATOM     15  CRP ALA     1       1.162  -0.048   0.731  1.00  1.00
ATOM     16  OR  ALA     1       2.220  -0.597   0.472  1.00  1.00
ATOM     17  NR  ALA     1       1.122   1.024   1.537  1.00  1.00
ATOM     18  HR  ALA     1       0.233   1.395   1.752  1.00  1.00
ATOM     19  CR  ALA     1       2.300   1.629   2.102  1.00  1.00
END

The CONSTANT that is created by this action is a matrix. Each row of the output matrix contains one set of reference positions. Notice also that if you have a PDB input which contains multiple reference configurations you can create a vector constant by using the NUMBER keyword to specify the particular configuration that you would like to read in as shown below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/mapping/rt-pathtools-3/all.pdb
ref: PDB2CONSTANTCreate a constant value from a PDB input file This action is a shortcut. More details REFERENCEa file in pdb format containing the reference structure=
regtest/mapping/rt-pathtools-3/all.pdb
Click here to see an extract from this file.
×

FILE: regtest/mapping/rt-pathtools-3/all.pdb

ATOM      1  CL  ALA     1      -3.171   0.295   2.045  1.00  1.00
ATOM      5  CLP ALA     1      -1.819  -0.143   1.679  1.00  1.00
ATOM      6  OL  ALA     1      -1.177  -0.889   2.401  1.00  1.00
ATOM      7  NL  ALA     1      -1.313   0.341   0.529  1.00  1.00
ATOM      8  HL  ALA     1      -1.845   0.961  -0.011  1.00  1.00
ATOM      9  CA  ALA     1      -0.003  -0.019   0.021  1.00  1.00
ATOM     10  HA  ALA     1       0.205  -1.051   0.259  1.00  1.00
ATOM     11  CB  ALA     1       0.009   0.135  -1.509  1.00  1.00
ATOM     15  CRP ALA     1       1.121   0.799   0.663  1.00  1.00
ATOM     16  OR  ALA     1       1.723   1.669   0.043  1.00  1.00
ATOM     17  NR  ALA     1       1.423   0.519   1.941  1.00  1.00
ATOM     18  HR  ALA     1       0.873  -0.161   2.413  1.00  1.00
ATOM     19  CR  ALA     1       2.477   1.187   2.675  1.00  1.00
END
FIXED
ATOM      1  CL  ALA     1      -3.175   0.365   2.024  1.00  1.00
ATOM      5  CLP ALA     1      -1.814  -0.106   1.685  1.00  1.00
ATOM      6  OL  ALA     1      -1.201  -0.849   2.425  1.00  1.00
ATOM      7  NL  ALA     1      -1.296   0.337   0.534  1.00  1.00
ATOM      8  HL  ALA     1      -1.807   0.951  -0.044  1.00  1.00
ATOM      9  CA  ALA     1       0.009  -0.067   0.033  1.00  1.00
ATOM     10  HA  ALA     1       0.175  -1.105   0.283  1.00  1.00
ATOM     11  CB  ALA     1       0.027   0.046  -1.501  1.00  1.00
ATOM     15  CRP ALA     1       1.149   0.725   0.654  1.00  1.00
ATOM     16  OR  ALA     1       1.835   1.491  -0.011  1.00  1.00
ATOM     17  NR  ALA     1       1.380   0.537   1.968  1.00  1.00
ATOM     18  HR  ALA     1       0.764  -0.060   2.461  1.00  1.00
ATOM     19  CR  ALA     1       2.431   1.195   2.683  1.00  1.00
END
ATOM      1  CL  ALA     1      -2.990   0.383   2.277  1.00  1.00
ATOM      5  CLP ALA     1      -1.664  -0.085   1.831  1.00  1.00
ATOM      6  OL  ALA     1      -0.987  -0.835   2.533  1.00  1.00
ATOM      7  NL  ALA     1      -1.227   0.364   0.646  1.00  1.00
ATOM      8  HL  ALA     1      -1.798   0.982   0.124  1.00  1.00
ATOM      9  CA  ALA     1       0.026  -0.028   0.044  1.00  1.00
ATOM     10  HA  ALA     1       0.224  -1.060   0.284  1.00  1.00
ATOM     11  CB  ALA     1      -0.076   0.107  -1.483  1.00  1.00
ATOM     15  CRP ALA     1       1.217   0.776   0.577  1.00  1.00
ATOM     16  OR  ALA     1       1.900   1.463  -0.158  1.00  1.00
ATOM     17  NR  ALA     1       1.494   0.666   1.888  1.00  1.00
ATOM     18  HR  ALA     1       0.882   0.122   2.437  1.00  1.00
ATOM     19  CR  ALA     1       2.580   1.341   2.529  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.006   0.350   2.252  1.00  1.00
ATOM      5  CLP ALA     1      -1.680  -0.112   1.826  1.00  1.00
ATOM      6  OL  ALA     1      -1.025  -0.896   2.508  1.00  1.00
ATOM      7  NL  ALA     1      -1.220   0.368   0.654  1.00  1.00
ATOM      8  HL  ALA     1      -1.771   1.013   0.137  1.00  1.00
ATOM      9  CA  ALA     1       0.040  -0.029   0.062  1.00  1.00
ATOM     10  HA  ALA     1       0.210  -1.076   0.277  1.00  1.00
ATOM     11  CB  ALA     1      -0.066   0.148  -1.465  1.00  1.00
ATOM     15  CRP ALA     1       1.241   0.738   0.605  1.00  1.00
ATOM     16  OR  ALA     1       1.986   1.347  -0.125  1.00  1.00
ATOM     17  NR  ALA     1       1.446   0.694   1.940  1.00  1.00
ATOM     18  HR  ALA     1       0.796   0.210   2.481  1.00  1.00
ATOM     19  CR  ALA     1       2.544   1.350   2.582  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.002   0.343   2.271  1.00  1.00
ATOM      5  CLP ALA     1      -1.672  -0.125   1.828  1.00  1.00
ATOM      6  OL  ALA     1      -1.028  -0.942   2.486  1.00  1.00
ATOM      7  NL  ALA     1      -1.213   0.373   0.670  1.00  1.00
ATOM      8  HL  ALA     1      -1.752   1.033   0.169  1.00  1.00
ATOM      9  CA  ALA     1       0.041  -0.032   0.055  1.00  1.00
ATOM     10  HA  ALA     1       0.201  -1.079   0.245  1.00  1.00
ATOM     11  CB  ALA     1      -0.079   0.194  -1.466  1.00  1.00
ATOM     15  CRP ALA     1       1.257   0.720   0.601  1.00  1.00
ATOM     16  OR  ALA     1       2.057   1.240  -0.140  1.00  1.00
ATOM     17  NR  ALA     1       1.422   0.730   1.942  1.00  1.00
ATOM     18  HR  ALA     1       0.740   0.303   2.500  1.00  1.00
ATOM     19  CR  ALA     1       2.528   1.373   2.598  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.144   1.457   1.417  1.00  1.00
ATOM      5  CLP ALA     1      -1.943   0.587   1.450  1.00  1.00
ATOM      6  OL  ALA     1      -1.588   0.028   2.480  1.00  1.00
ATOM      7  NL  ALA     1      -1.281   0.449   0.306  1.00  1.00
ATOM      8  HL  ALA     1      -1.578   0.914  -0.520  1.00  1.00
ATOM      9  CA  ALA     1      -0.132  -0.428   0.139  1.00  1.00
ATOM     10  HA  ALA     1      -0.264  -1.291   0.758  1.00  1.00
ATOM     11  CB  ALA     1      -0.066  -0.855  -1.329  1.00  1.00
ATOM     15  CRP ALA     1       1.193   0.220   0.554  1.00  1.00
ATOM     16  OR  ALA     1       2.195   0.098  -0.140  1.00  1.00
ATOM     17  NR  ALA     1       1.224   0.872   1.737  1.00  1.00
ATOM     18  HR  ALA     1       0.399   0.943   2.273  1.00  1.00
ATOM     19  CR  ALA     1       2.413   1.511   2.254  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.140   1.441   1.453  1.00  1.00
ATOM      5  CLP ALA     1      -1.944   0.576   1.465  1.00  1.00
ATOM      6  OL  ALA     1      -1.587  -0.018   2.487  1.00  1.00
ATOM      7  NL  ALA     1      -1.274   0.465   0.322  1.00  1.00
ATOM      8  HL  ALA     1      -1.571   0.957  -0.486  1.00  1.00
ATOM      9  CA  ALA     1      -0.124  -0.418   0.135  1.00  1.00
ATOM     10  HA  ALA     1      -0.274  -1.304   0.729  1.00  1.00
ATOM     11  CB  ALA     1      -0.063  -0.813  -1.347  1.00  1.00
ATOM     15  CRP ALA     1       1.201   0.199   0.572  1.00  1.00
ATOM     16  OR  ALA     1       2.227   0.007  -0.072  1.00  1.00
ATOM     17  NR  ALA     1       1.215   0.910   1.709  1.00  1.00
ATOM     18  HR  ALA     1       0.369   1.020   2.200  1.00  1.00
ATOM     19  CR  ALA     1       2.393   1.536   2.237  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.140   1.420   1.442  1.00  1.00
ATOM      5  CLP ALA     1      -1.948   0.546   1.448  1.00  1.00
ATOM      6  OL  ALA     1      -1.618  -0.065   2.460  1.00  1.00
ATOM      7  NL  ALA     1      -1.255   0.469   0.311  1.00  1.00
ATOM      8  HL  ALA     1      -1.538   0.979  -0.490  1.00  1.00
ATOM      9  CA  ALA     1      -0.107  -0.412   0.124  1.00  1.00
ATOM     10  HA  ALA     1      -0.257  -1.312   0.685  1.00  1.00
ATOM     11  CB  ALA     1      -0.028  -0.770  -1.375  1.00  1.00
ATOM     15  CRP ALA     1       1.217   0.186   0.600  1.00  1.00
ATOM     16  OR  ALA     1       2.269  -0.069   0.026  1.00  1.00
ATOM     17  NR  ALA     1       1.193   0.966   1.687  1.00  1.00
ATOM     18  HR  ALA     1       0.333   1.114   2.120  1.00  1.00
ATOM     19  CR  ALA     1       2.377   1.589   2.240  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.110   1.698   0.880  1.00  1.00
ATOM      5  CLP ALA     1      -2.021   0.734   1.142  1.00  1.00
ATOM      6  OL  ALA     1      -1.859   0.257   2.258  1.00  1.00
ATOM      7  NL  ALA     1      -1.229   0.414   0.114  1.00  1.00
ATOM      8  HL  ALA     1      -1.371   0.826  -0.771  1.00  1.00
ATOM      9  CA  ALA     1      -0.173  -0.593   0.188  1.00  1.00
ATOM     10  HA  ALA     1      -0.481  -1.374   0.851  1.00  1.00
ATOM     11  CB  ALA     1       0.011  -1.180  -1.220  1.00  1.00
ATOM     15  CRP ALA     1       1.163  -0.060   0.716  1.00  1.00
ATOM     16  OR  ALA     1       2.227  -0.564   0.393  1.00  1.00
ATOM     17  NR  ALA     1       1.127   0.960   1.594  1.00  1.00
ATOM     18  HR  ALA     1       0.234   1.295   1.847  1.00  1.00
ATOM     19  CR  ALA     1       2.303   1.549   2.172  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.139   1.652   0.924  1.00  1.00
ATOM      5  CLP ALA     1      -2.039   0.698   1.169  1.00  1.00
ATOM      6  OL  ALA     1      -1.868   0.201   2.278  1.00  1.00
ATOM      7  NL  ALA     1      -1.239   0.411   0.139  1.00  1.00
ATOM      8  HL  ALA     1      -1.385   0.842  -0.737  1.00  1.00
ATOM      9  CA  ALA     1      -0.173  -0.574   0.193  1.00  1.00
ATOM     10  HA  ALA     1      -0.477  -1.381   0.833  1.00  1.00
ATOM     11  CB  ALA     1       0.029  -1.142  -1.231  1.00  1.00
ATOM     15  CRP ALA     1       1.162  -0.048   0.731  1.00  1.00
ATOM     16  OR  ALA     1       2.220  -0.597   0.472  1.00  1.00
ATOM     17  NR  ALA     1       1.122   1.024   1.537  1.00  1.00
ATOM     18  HR  ALA     1       0.233   1.395   1.752  1.00  1.00
ATOM     19  CR  ALA     1       2.300   1.629   2.102  1.00  1.00
END
NUMBER if there are multiple structures in the pdb file you can specify that you want the RMSD from a specific structure by specifying its place in the file here=4

The input above will reads in the fourth configuration in the input PDB file only.

The PDB file format

PLUMED uses the PDB file format here and in several other places

  • To read the molecular structure (MOLINFO).
  • To read reference conformations (RMSD, but also in methods such as FIT_TO_TEMPLATE, etc).

The implemented PDB reader expects a file formatted correctly according to the PDB standard. In particular, the following columns are read from ATOM records

columns | content
1-6     | record name (ATOM or HETATM)
7-11    | serial number of the atom (starting from 1)
13-16   | atom name
18-20   | residue name
22      | chain id
23-26   | residue number
31-38   | x coordinate
39-46   | y coordinate
47-54   | z coordinate
55-60   | occupancy
61-66   | beta factor

The PLUMED parser is slightly more permissive than the official PDB format in the fact that the format of real numbers is not fixed. In other words, any real number that can be parsed is OK and the dot can be placed anywhere. However, columns are interpret strictly. A sample PDB should look like the following

ATOM      2  CH3 ACE     1      12.932 -14.718  -6.016  1.00  1.00
ATOM      5  C   ACE     1      21.312  -9.928  -5.946  1.00  1.00
ATOM      9  CA  ALA     2      19.462 -11.088  -8.986  1.00  1.00

Notice that serial numbers need not to be consecutive. In the three-line example above, only the coordinates of three atoms are provided. This is perfectly legal and indicates to PLUMED that information about these atoms only is available. This could be both for structural information in MOLINFO, where the other atoms would have no name assigned, and for reference structures used in RMSD, where only the provided atoms would be used to compute RMSD.

Including arguments in PDB files

If you wish to specify reference values for PLUMED Values in the REMARKS of a PLUMED input file like this:

REMARK t1=-4.3345
REMARK t2=3.4725
END

You can read in these reference values by using the PDB2CONSTANT command as follows:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/mapping/rt-pathtools-4/epath.pdb
t1: TORSIONCalculate one or multiple torsional angles. More details ATOMSthe four atoms involved in the torsional angle=1,2,3,4
t2: TORSIONCalculate one or multiple torsional angles. More details ATOMSthe four atoms involved in the torsional angle=5,6,7,8
t1_ref: PDB2CONSTANTCreate a constant value from a PDB input file This action is a shortcut and it has hidden defaults. More details REFERENCEa file in pdb format containing the reference structure=
regtest/mapping/rt-pathtools-4/epath.pdb
Click here to see an extract from this file.
×

FILE: regtest/mapping/rt-pathtools-4/epath.pdb

REMARK t1=-4.3345  t2=3.4725   
END
REMARK t1=-4.1940  t2=3.3420   
END
REMARK t1=-4.0535  t2=3.2114   
END
REMARK t1=-3.9130  t2=3.0809   
END
REMARK t1=-3.7724  t2=2.9504   
END
REMARK t1=-3.6319  t2=2.8199   
END
REMARK t1=-3.4914  t2=2.6893   
END
REMARK t1=-3.3508  t2=2.5588   
END
REMARK t1=-3.2103  t2=2.4283   
END
REMARK t1=-3.0698  t2=2.2978   
END
ARGread this single argument from the input rather than the atomic structure=t1
t2_ref: PDB2CONSTANTCreate a constant value from a PDB input file This action is a shortcut and it has hidden defaults. More details REFERENCEa file in pdb format containing the reference structure=
regtest/mapping/rt-pathtools-4/epath.pdb
Click here to see an extract from this file.
×

FILE: regtest/mapping/rt-pathtools-4/epath.pdb

REMARK t1=-4.3345  t2=3.4725   
END
REMARK t1=-4.1940  t2=3.3420   
END
REMARK t1=-4.0535  t2=3.2114   
END
REMARK t1=-3.9130  t2=3.0809   
END
REMARK t1=-3.7724  t2=2.9504   
END
REMARK t1=-3.6319  t2=2.8199   
END
REMARK t1=-3.4914  t2=2.6893   
END
REMARK t1=-3.3508  t2=2.5588   
END
REMARK t1=-3.2103  t2=2.4283   
END
REMARK t1=-3.0698  t2=2.2978   
END
ARGread this single argument from the input rather than the atomic structure=t2

Notice that the input must define values with the labels that are being read in from the reference file and that separate PDB2CONSTANT commands are required for reading in t1 and t2. Furthermore, because the input PDB file contains multiple frames vectors containing all the values for t1 and t2 are output from the constant commands that are created by the shortcuts in the above input. If you want to read only one of the configurations in the input PDB file you can use a pdb with a single frame or the NUMBER keyword described above.

Occupancy and beta factors

PLUMED also reads the occupancy and beta factors from the input PDB files. However, these columns of data are given a very special meaning. In cases where the PDB structure is used as a reference for an alignment (that's the case for instance in RMSD and in FIT_TO_TEMPLATE), the occupancy column is used to provide the weight of each atom in the alignment. In cases where, perhaps after alignment, the displacement between running coordinates and the provided PDB is computed, the beta factors are used as weight for the displacement. Since setting the weights to zero is the same as not including an atom in the alignment or displacement calculation, the two following reference files would be equivalent when used in an RMSD calculation. First file: \verbatim ATOM 2 CH3 ACE 1 12.932 -14.718 -6.016 1.00 1.00 ATOM 5 C ACE 1 21.312 -9.928 -5.946 1.00 1.00 ATOM 9 CA ALA 2 19.462 -11.088 -8.986 0.00 0.00 \endverbatim Second file: \verbatim ATOM 2 CH3 ACE 1 12.932 -14.718 -6.016 1.00 1.00 ATOM 5 C ACE 1 21.312 -9.928 -5.946 1.00 1.00 \endverbatim However notice that many extra atoms with zero weight might slow down the calculation, so removing lines is better than setting their weights to zero. In addition, weights for alignment need not to be equivalent to weights for displacement. Starting with PLUMED 2.7, if all the weights are set to zero they will be normalized to be equal to the inverse of the number of involved atoms. This means that it will be possible to use files with the weight columns set to zero obtaining a meaningful result. In previous PLUMED versions, setting all weights to zero was resulting in an error instead.

Systems with more than 100k atoms

Notice that it very likely does not make any sense to compute the RMSD or any other structural deviation using many atoms. However, if the protein for which you want to compute RMSD has atoms with large serial numbers (e.g. because it is located after solvent in the sorted list of atoms) you might end up with troubles with the limitations of the PDB format. Indeed, since there are 5 columns available for atom serial number, this number cannot be larger than 99999. In addition, providing MOLINFO with names associated to atoms with a serial larger than 99999 would be impossible.

Since PLUMED 2.4 we allow the hybrid 36 format to be used to specify atom numbers. This format is not particularly widespread, but has the nice feature that it provides a one-to-one mapping between numbers up to approximately 80 millions and strings with 5 characters, plus it is backward compatible for numbers smaller than 100000. This is not true for notations like the hex notation exported by VMD. Using the hybrid 36 format, the ATOM records for atom ranging from 99997 to 100002 would read like these: \verbatim ATOM 99997 Ar X 1 45.349 38.631 15.116 1.00 1.00 ATOM 99998 Ar X 1 46.189 38.631 15.956 1.00 1.00 ATOM 99999 Ar X 1 46.189 39.471 15.116 1.00 1.00 ATOM A0000 Ar X 1 45.349 39.471 15.956 1.00 1.00 ATOM A0000 Ar X 1 45.349 38.631 16.796 1.00 1.00 ATOM A0001 Ar X 1 46.189 38.631 17.636 1.00 1.00 \endverbatim There are tools that can be found to translate from integers to strings and back using hybrid 36 format (a simple python script can be found here). In addition, as of PLUMED 2.5, we provide a command line tool that can be used to renumber atoms in a PDB file.

Syntax

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
ARG input none read this single argument from the input rather than the atomic structure
REFERENCE compulsory none a file in pdb format containing the reference structure
NUMBER compulsory 0 if there are multiple structures in the pdb file you can specify that you want the RMSD from a specific structure by specifying its place in the file here
NOARGS optional false the arguments that are being read from the PDB file are not in the plumed input