Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use WALKERS_MPI with gromacs 2019, 2020 and 2021 #4

Open
yangkimm opened this issue Dec 30, 2021 · 5 comments
Open

how to use WALKERS_MPI with gromacs 2019, 2020 and 2021 #4

yangkimm opened this issue Dec 30, 2021 · 5 comments

Comments

@yangkimm
Copy link

the flag of -multi was deprecated in gromacs after 2018, when I used the other flag -multidir, the BIAS file only wrote in first directory, and got error informations of "file BIAS cannot be found". How can I employ MW to reduce the real time of the calculation with gromacs 2019, 2020 and 2021?

@h2nch2co2h
Copy link
Collaborator

Dear Yangkimm,

You can activate multiple walkers by setting FILE=../BIAS
This is the same workaround suggested by the developers for HILLS of METAD. You will have the files that should be read by all walkers in the parent folder.

Hope it helps.

@yangkimm
Copy link
Author

yangkimm commented Jan 13, 2022

Thank you! That's worked. Another question, how can I continue my simulations when present simulations termined or just didn't reach convergence?
My simulations were termined and I want to continue the simulations, I added "RESTART" at the head of file of plumed.dat, then performed the simulations with following command:
gmx_mpi mdrun -v -deffnm FMAP -cpi FMAP.cpt -multidir a b c d e -nsteps 30000000 -plumed ../plumed.dat.
by I found restarted values of "metad.bias metad.rbias metad.rct metad.work" only same as them in COLVAR.0, and changed in COLVAR.1,2,3,4, but lwall.bias changed to 0.000000 in all COLVAR files;
part of my plumed.dat
FUNNEL ARG=fps.lp,fps.ld ZCC=4.5 ALPHA=0.6 RCYL=0.1 MINS=-0.2 MAXS=6.2 KAPPA=35100 NBINS=500 NBINZ=500 FILE=../BIAS LABEL=funnel WALKERS_MPI

METAD ARG=d1 SIGMA=0.01 HEIGHT=2.0 PACE=500 TEMP=300 BIASFACTOR=20 GRID_MIN=0.15 GRID_MAX=5.5 GRID_WFILE=grid_w.dat GRID_WSTRIDE=250000 GRID_BIN=2700 CALC_RCT RCT_USTRIDE=1 FILE=../a/HILLS LABEL=metad WALKERS_MPI

LOWER_WALLS ARG=fps.lp AT=0.0 KAPPA=50000 EXP=2 OFFSET=0 LABEL=lwall
UPPER_WALLS ARG=fps.lp AT=6.0 KAPPA=50000 EXP=2 OFFSET=0 LABEL=uwall
UPPER_WALLS ARG=d1 AT=5.3 KAPPA=50000 EXP=2 OFFSET=0 LABEL=distwall

PRINT STRIDE=500 ARG=* FILE=../COLVAR

COLVAR.0
96109.000000 2.198917 1.892073 0.404758 0.000000 333.558542 -90.709756 424.268132 220.653286 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
#! FIELDS time d1 fps.lp fps.ld funnel.bias metad.bias metad.rbias metad.rct metad.work lwall.bias lwall.force2 uwall.bias uwall.force2 distwall.bias distwall.force2
96109.000000 2.198917 1.892073 0.404758 0.000000 333.571103 -90.686736 424.257840 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
CLOVAR.1
96109.000000 1.780908 2.839233 0.789773 0.000000 126.146539 -37.431134 163.577608 7632.246704 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
#! FIELDS time d1 fps.lp fps.ld funnel.bias metad.bias metad.rbias metad.rct metad.work lwall.bias lwall.force2 uwall.bias uwall.force2 distwall.bias distwall.force2
96109.000000 1.780908 2.839233 0.789773 0.000000 351.231638 -73.026202 424.257840 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
COLVAR.2
96109.000000 1.080012 1.860810 0.425376 0.000000 157.691606 -5.886067 163.577608 4858.749321 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
#! FIELDS time d1 fps.lp fps.ld funnel.bias metad.bias metad.rbias metad.rct metad.work lwall.bias lwall.force2 uwall.bias uwall.force2 distwall.bias distwall.force2
96109.000000 1.080012 1.860810 0.425376 0.000000 398.482799 -25.775041 424.257840 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
COLVAR.3
96109.000000 0.772960 1.296631 0.637114 0.000000 151.220413 -12.357260 163.577608 4827.026781 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
#! FIELDS time d1 fps.lp fps.ld funnel.bias metad.bias metad.rbias metad.rct metad.work lwall.bias lwall.force2 uwall.bias uwall.force2 distwall.bias distwall.force2
96109.000000 0.772960 1.296631 0.637114 0.000000 400.974274 -23.283566 424.257840 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
COLVAR.4
96109.000000 2.872504 2.968279 0.335706 0.000000 116.507562 -47.070112 163.577608 7146.759700 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
#! FIELDS time d1 fps.lp fps.ld funnel.bias metad.bias metad.rbias metad.rct metad.work lwall.bias lwall.force2 uwall.bias uwall.force2 distwall.bias distwall.force2
96109.000000 2.872504 2.968279 0.335706 0.000000 314.120329 -110.137511 424.257840 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
how do I modify the files for continuing or extending the simulations?

@yangkimm yangkimm reopened this Jan 13, 2022
@h2nch2co2h
Copy link
Collaborator

Dear Yangkimm,

I think your problem is in "FILE=../a/HILLS", because only the first walker will continue the simulation this way. RESTART reads the HILLS file IF it finds it. Therefore, the first walker will read it and all others will not. Moreover, if you print the grid, why don't you drop the RESTART and ask for a grid read (GRID_RFILE) at the beginning of the simulation?

However, you must be sure about the restarting point. If you have mismatch between deposited gaussians and simulation frames it will be a mess to reconstruct and might not be possible to reweight.

Hope it helps.

@yangkimm
Copy link
Author

yangkimm commented Mar 29, 2022

Thank you very much for your help. Another question, how can I reweight my multi_walker metadynamcis simulations? Does there have a template file for benzamidine–trypsin system? I can reweight a single simulation trajectory with plumed. Is it
necessary to keep track of which bias was used to produce every single frame (i.e. the order of lines in HILLS is in accordance with the order of frames in trajectory )?

@h2nch2co2h
Copy link
Collaborator

In a simulation with multiple walkers, the COLVAR must be reconstructed in order to reweight. You should have several COLVAR files that must be merged to apply HISTOGRAM or the reweight.X script of Plumed 1.3 (the choice is yours at that point). In our lab we prefer to use the latter, thus we need to have the COLVAR in the same format of the HILLS.
Example:
first walker - first time
second walker - first ime
third walker - first time
etc.

HISTOGRAM instead works slightly differently because part of the simulation must be removed. Still it would be simpler to have a united COLVAR file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants