How to set parameters of the well-tempered metadynamics(colvars.dat) in the Colvars-patched Gromacs

GROMACS version:2020.7-colvars
GROMACS modification: Yes
I want to use the well-tempered metadynamics method to compute the free energy profiles during the unfolding of a DNA hairpin structure by the colvars. My parameters of the colvars.dat are set as follows:
####################
units gromacs
colvar {
name dist
distance {
group1 { atomNumbers { 2 } }
group2 { atomNumbers { 417} }
}
}

activate well-tempered metadynamics

metadynamics {
name well-tempered-meta
colvars dist
hillWeight 0.05
hillWidth 3.0
wellTempered on
biasTemperature 5.0
}
################################

However, The output value of the md.pmf is only 0 after I ran a 10ns simulation by using the well-tempered metadynamics. For this problem, how can I set the appropriate parameters of colvars? Could someone please give me some empirical parameters ? Thank you very much in advance.
################# md.pmf

1

0 1 1 0

0.5 -0

#################

Besides the aboved problem, I have another question about defining the rmsd as a collective variable. I want to define the rmsd as a collective variable. But only the xyz files can be recognized for refPositionsFile. I just convert the xx.gro/xx.pdb file to the xyz file by VMD/pymol/openbebel. It still can’t recognize it and reports an error. What should I do?

Hi, you’re almost there, but you should specify a correct range for the PMF by setting lowerBoundary and upperBoundary for the colvar. Since you are using a distance, a default value of 0 is already provided for the former, but for the latter the default value (which is reported in the output messages: please check it, at least for your first job) is probably not appropriate for you and you should define it explicitly.

You should probably also define width, i.e. the grid bin’s width, which is set to 1 by default but this may be too coarse to represent a PMF for a distance between two atoms. You may keep the Gaussian width in relative units as you have already with hillWidth, or use gaussianSigmas (your preference, but whichever you use please read the doc).

There isn’t much information on what your problem with the XYZ file is, since you don’t include the error message, or what coordinates does the file contain (the whole system, or just the selection?). The constraints on the XYZ format are listed here.

Giacomo

P.S. For metadynamics specifically I also recommend reading this.

@giacomo.fiorin . Firstly, thanks for your reply, Prof Fiorin. I will follow your advice and try again. About the using of the XYZ Coordinate file, I just want to use the npt.xyz(only including DNA atoms and converted from the npt.gro) Coordinate file as the refPositionsFile during defining the rmsd as a collective variable. The specific documents are as follows:

npt.gro

418
1G5 HO5’ 1 5.576 5.951 5.545 0.0896 3.9617 2.0015
1G5 O5’ 2 5.589 5.987 5.457 -0.1842 -0.1539 0.0093
1G5 C5’ 3 5.609 5.894 5.355 0.4687 -0.4951 0.0579
1G5 H5’ 4 5.552 5.920 5.266 0.3437 -0.2684 0.2015
1G5 H5’’ 5 5.575 5.792 5.373 1.1522 -0.3627 2.5544
1G5 C4’ 6 5.761 5.877 5.318 -0.1703 -0.1243 -0.4072
1G5 H4’ 7 5.773 5.813 5.231 3.1531 -3.6160 2.2953
1G5 O4’ 8 5.822 6.003 5.288 0.0687 0.1208 0.1166
1G5 C1’ 9 5.955 6.008 5.334 -0.3246 -0.1999 -0.4052
1G5 H1’ 10 6.021 6.023 5.248 -1.0710 -2.7298 -1.5097
1G5 N9 11 5.968 6.116 5.441 -0.1358 0.6573 -0.0946
1G5 C8 12 5.864 6.176 5.513 0.2336 0.6238 0.5637
1G5 H8 13 5.764 6.136 5.516 0.6329 -0.3732 1.5121
1G5 N7 14 5.904 6.260 5.596 0.3436 -0.3063 0.2450
1G5 C5 15 6.045 6.263 5.578 0.9077 -0.1835 0.1818
1G5 C6 16 6.147 6.344 5.640 0.8370 0.7488 -0.4096
1G5 O6 17 6.130 6.444 5.712 0.3977 -0.7081 0.2378
1G5 N1 18 6.280 6.310 5.599 0.4636 -0.1921 0.2816
1G5 H1 19 6.354 6.371 5.633 -0.0010 0.5426 -0.0166
1G5 C2 20 6.309 6.222 5.497 0.1423 0.7565 -0.3442
1G5 N2 21 6.433 6.201 5.458 0.3057 -0.1475 0.3411
1G5 H21 22 6.510 6.233 5.515 0.0787 -0.5527 0.8775
1G5 H22 23 6.452 6.125 5.394 1.8148 1.5687 -1.3878
1G5 N3 24 6.214 6.151 5.433 0.4478 -0.4706 0.0911
1G5 C4 25 6.085 6.173 5.480 0.2496 0.3031 -0.7985
1G5 C3’ 26 5.842 5.813 5.428 -0.0378 0.6106 -0.2560
1G5 H3’ 27 5.801 5.853 5.520 1.2988 2.1568 -0.2775
1G5 C2’ 28 5.982 5.867 5.392 -0.2197 0.2898 -0.0309
1G5 H2’ 29 6.046 5.859 5.481 -1.3576 0.4897 0.8307
1G5 O2’ 30 6.022 5.785 5.283 -0.2459 -0.2649 -0.0041
1G5 HO2’ 31 5.988 5.699 5.309 2.1824 -0.6753 2.2069
1G5 O3’ 32 5.841 5.668 5.427 -0.1055 -0.4401 0.4220

npt.xyz

RNA
C 56.090000 58.939999 53.549999
O 55.889999 59.869999 54.570000
C 57.610001 58.770000 53.180000
O 58.220001 60.029999 52.880001
C 58.419998 58.130001 54.279999
O 58.410000 56.680000 54.270000
C 59.820000 58.669998 53.919998
O 60.220001 57.849998 52.830002
C 59.549999 60.080002 53.340000
N 62.799999 63.099998 55.990002
C 63.090000 62.220001 54.970001
N 64.330002 62.009998 54.580002
N 62.139999 61.509998 54.330002
C 60.849998 61.730000 54.799999
C 60.450001 62.630001 55.779999
C 61.470001 63.439999 56.400002
O 61.299999 64.440002 57.119999
N 59.040001 62.599998 55.959999
C 58.639999 61.759998 55.130001
N 59.680000 61.160000 54.410000
H 59.880001 56.990002 53.090000
H 55.759998 59.509998 55.450001
H 63.540001 63.709999 56.330002
H 57.639999 61.360001 55.160000
H 60.209999 60.230000 52.480000
H 60.459999 58.590000 54.810001
H 65.099998 62.330002 55.150002
H 58.009998 58.529999 55.200001
H 64.519997 61.250000 53.939999
H 57.730000 58.130001 52.310001
H 55.520000 59.200001 52.660000
H 55.750000 57.919998 53.730000
P 58.450001 55.880001 55.619999

Why do the converted .xyz coordinates expand by 10 times? I suspect this is the reason for the error. But I dare not change it. So I want to ask your advice.
I am going to benchmark several enhanced sampling methods(Thermodynamic integration; Adaptive Biasing Force; Extended-system Adaptive Biasing Force (eABF); Other variants of the metadynamics ) supported in the current colvars-refman-gromacs later. I’ll ask you later. Thank you again for your advice.

The factor of 10 accounts for the unit conversion from nm to Å: most programs besides GROMACS will expect the latter. (Don’t worry, there will be a conversion back to nm when the XYZ file is being read by Colvars in GROMACS).

Before guessing, please do look again at the error message, and possibly other messages up to the point where things didn’t work the way you were hoping.

Giacomo