ERROR: the system is looking for a value outside the grid along the 0 (ds.z) index

799 views
Skip to first unread message

Lakshman Verma

unread,
Jun 4, 2021, 7:12:01 PM6/4/21
to PLUMED users
Hi everyone,
I am trying to metadynamics simulation on 2 CVs, z distance, and local density (using DENSITY and AROUND) in a cubic section of my simulation box. I have gone through the tutorial and used the same parameters for different parameters, height, sigma, bias factor. I also tried changing these values a bit based on the suggestions in the earlier thread available in the forum, links. 
But for every run after a few ns simulations, I get the error: the system is looking for a value outside the grid along the 0 (ds.z) index. I checked the values of my CVs (ds.z and dens1) and they are within the defined GRID_MAX and GRID_MIN. I didn't provide GRID_BIN or GRID_SPACING as suggested by Max in a previous thread (link 1). 

One thing I noticed in the previous threads, people used an Upper wall at GRID_MAX to restrict CVs along with metadynamics. My question is do we need additional to constrain the CVs or does metadynamics take care of constraining the CVs in the given MIN and MAX GRID?


This my plumed file. Please let me know any suggestions and recommendations to make this work. 
#############################
RESTART
WHOLEMOLECULES ENTITY0=1-3774 ENTITY1=3775-3848
c: COM ATOMS=3775-3848
ds: DISTANCE ATOMS=1910,c COMPONENTS

vol: VOLUME
ene: ENERGY

rxy: MATHEVAL ARG=ds.x,ds.y VAR=x,y FUNC=sqrt((x-0.271023)*(x-0.271023)+(y-0.164407)*(y-0.164407)) PERIODIC=NO

Theta: ANGLE ATOMS=1910,c,3840
Phi: TORSION ATOMS=1910,c,3840,3784
Psi: TORSION ATOMS=985,1910,c,3840

DENSITY SPECIES=3849-21498 LABEL=dens
AROUND ATOM=1910 DATA=dens SIGMA=0.1 XLOWER=-0.3 XUPPER=0.4 YLOWER=-0.3 YUPPER=0.7 ZLOWER=0.0 ZUPPER=1 LABEL=dens1

metad: METAD ARG=ds.z,dens1 PACE=500 SIGMA=0.1,1 HEIGHT=1 FILE=HILLS  GRID_MIN=0,0 GRID_MAX=1.5,120

PRINT STRIDE=500 ARG=* FILE=COLVAR
DUMPMASSCHARGE FILE=mcfile
###############################################

Thank you very much,
Lakshman

Krushna Sonar

unread,
Jun 6, 2021, 7:37:02 AM6/6/21
to PLUMED users
Hi Lakshman,

Completely different situation. But when I used to work with COORDINATION NUMBER as CV I would get the same error when the system is trying to sample conformations that would result in values for this CV more thant the set value. 

Try having a look in the trajectory as to when this error pops up and at what CV values. 

Regards,
Krushna

Lakshman Verma

unread,
Jun 7, 2021, 1:49:47 PM6/7/21
to PLUMED users
Hi Krushna,
I checked the trajectory and indeed I got this error sometimes when the CV values were beyond the provided grid max/min. But it also happens when the values are not even close to the grid limit. There could be one possibility that it happens in the time step smaller than 0.5 ps, which is the significant step of the output and doesn't show up in the output file.
How did you work around your problem? Did you use wall potentials to limit the CV Metadynamics can explore?

Thanks,
Lakshman

Krushna Sonar

unread,
Jun 10, 2021, 12:41:24 AM6/10/21
to PLUMED users
Hi Lakshman,

I am sorry for the delay. We ended up not using that CV because we were using other CVs as well (WT-BEMD) which might cause a conformation that when swapped with the replica of this CV resulted in an error.
The coordination CV would not necessarily throw the above error but sometimes crash the system due to links error. But this was pertaining to this CV, coordination number.

As to answer your question:
1. We did have an upper wall and it did work, try with higher kappa with and without grids.
2. I can see that you are running a 2D cv but there is something called an Interval, which is more of a hard wall as compared to any wall but it works only with 1D cv.

However, without the grids you loose efficiency as the system takes a lot of time to read from HILLS file, since you only have technically1 replica running, it shouldn't hamper efficiency much.

Regards,
Krushna

Lakshman Verma

unread,
Jun 10, 2021, 2:01:02 PM6/10/21
to PLUMED users
Hi Krushna, 
Thank you for the suggestions I will try using walls with high KAPPA and without grids. Did you try wall with grids too? 
I  tried using the upper wall ( AT 1.5 nm) which is higher than the GRID_MAX (=1.4 nm) for metadynamics. I think I should use an upper wall at lower CV than GRID_MAX, it might work.
I want to limit the sampling of CV in a given range. That's why I want to use the GRID_MAX. But if the upper wall without GRID would work then it's better.

Thank you,
Lakshman 

Krushna Sonar

unread,
Jun 21, 2021, 9:47:49 PM6/21/21
to PLUMED users
Hi Lakshman,

Yes, I do use grids. However, I would use upper wall always below the grid_max.
You can give the later option a try.

Let me know how it goes. :-)

Lakshman Verma

unread,
Jun 22, 2021, 5:09:41 PM6/22/21
to PLUMED users
Hi Krushna,
I used wall before GRID_MAX and it works.
Thank you very much for the help,
Lakshman

Krushna Sonar

unread,
Jun 29, 2021, 2:17:58 AM6/29/21
to PLUMED users
Yay!
You are welcome.

Reply all
Reply to author
Forward
0 new messages