plumed / plumed2

Development version of plumed 2
https://www.plumed.org
GNU Lesser General Public License v3.0
323 stars 269 forks source link

epsilon variable in OPES_METAD #1057

Closed aniruddha-seal closed 2 months ago

aniruddha-seal commented 2 months ago

Hi, I'm trying to use the OPES_METAD routine for a high-barrier process (180 kJ/mol) but with BARRIER set to 180, I get an error message of you must choose a value for EPSILON greater than zero. Is your BARRIER too high?

In opes/OPESmetad.cpp, EPSILON is computed as exp(-barrier/biasprefactor/kbt_) which cannot be zero. Any leads on if I'm missing something/fixing it would be helpful.

plumed.dat

ene: ENERGY
d1: DISTANCE ATOMS=1,2 NOPBC
d5: DISTANCE ATOMS=1,6 NOPBC
c1:  COMBINE ARG=d1,d5 COEFFICIENTS=0.500,-0.500 PERIODIC=NO
UPPER_WALLS ARG=d1 AT=+4.0 KAPPA=150.0 EXP=2 LABEL=uwall_1
UPPER_WALLS ARG=d5 AT=+4.0 KAPPA=150.0 EXP=2 LABEL=uwall_2
OPES_METAD …
    LABEL=opes
    ARG=c1
    PACE=50
    BARRIER=180
    FILE=HILLS
    TEMP=300
…
PRINT STRIDE=1 ARG=d1,d5,c1,opes.*,ene FILE=COLVAR
FLUSH STRIDE=1
invemichele commented 2 months ago

I cannot reproduce the error, when I use BARRIER=180 I get EPSILON=1.657405270120292e-32 It even works for BARRIER = 1800 kJ/mol, but I get the epsilon = 0 error at 1900 kJ/mol

Which version of plumed have you tested? With which MD code?

aniruddha-seal commented 2 months ago

I'm using Plumed version 2.9.0 with ASE as the MD engine using the Plumed calculator. I'll flag it with them and check!

invemichele commented 2 months ago

It's most likely a unit conversion problem. If the units are kJ/mol and T=300K, in the plumed log you will find the value of kBT around 2.5 (or beta around 0.4)

aniruddha-seal commented 2 months ago

I ran the unit tests for the Plumed calculator which checks the unit conversions, and it ran fine. Also I did check the value of kBT in the plumed log file which shows a value of KbT: 2.494337. Is there something else I can check ?

aniruddha-seal commented 2 months ago

I figured out the error. I was indeed the unit conversion twice (an error in the ASE-Plumed tutorial, will flag it with them) and getting the error. With proper unit conversion I get EPSILON = 1.65734e-32. The issue can be closed! Thanks!!