LAMMPS and multiple walkers

563 views
Skip to first unread message

bol...@gmail.com

unread,
Jan 6, 2015, 6:21:25 AM1/6/15
to plumed...@googlegroups.com
Hi all,

I am having trouble with finding information about correct setup and run of simulation with multiple walkers in LAMMPS. I've read this tutorial but, unfortunately, it didn't help me to understand how to do that. I am able to prepare PLUMED input file for this simulation but I can't understand how to create a correct LAMMPS input file for multiple walkers. Should I just create several LAMMPS inputs for each walker and make them share biasing potential via file or there is another way of doing this?

Thank you in advance,
Viacheslav

Paolo Raiteri

unread,
Jan 6, 2015, 7:19:03 PM1/6/15
to plumed...@googlegroups.com

Should I just create several LAMMPS inputs for each walker and make them share biasing potential via file

That the normal way of doing it, regardless of the MD engine you use.

or there is another way of doing this?

In the case of LAMMPS, you can use one input file which contains a “world" variable (http://lammps.sandia.gov/doc/variable.html) and the -partition command line option in the submission script. Obviously each walker has to run in a separate directory avoid overwriting the PLUMED output files, and you can use this world variable to change directory from where you submitted your job.
I would however recommend the first option, as in this latter case if one walker dies you would have heaps of idle processors.

Paolo

bol...@gmail.com

unread,
Jan 8, 2015, 5:37:47 AM1/8/15
to plumed...@googlegroups.com
Thank you very much for your answer, Paolo. The only thing which I don't understand at the moment is the following: is there any way to setup replica exhange with lammps?

среда, 7 января 2015 г., 1:19:03 UTC+1 пользователь Paolo написал:

bol...@gmail.com

unread,
Jan 8, 2015, 6:35:55 AM1/8/15
to plumed...@googlegroups.com
So I've tried to setup a system with two walkers sharing bias potential via file like this:

INCLUDE FILE=../plumed_common.dat
metad: METAD ARG=grad PACE=600 HEIGHT=6.3 SIGMA=0.15 FILE=../HILLS WALKERS_MPI
PRINT STRIDE=20 ARG=metad.bias,grad FILE=COLVAR FMT=%8.4f
FLUSH STRIDE=100
ENDPLUMED

and the resulting HILLS file looks like this:

#! FIELDS time grad sigma_grad height biasf
#! SET multivariate false
                    0.3    0.00767301534942784                   0.15                    6.3                      1
#! FIELDS time grad sigma_grad height biasf
#! SET multivariate false
                    0.3   0.006254170703734354                   0.15                    6.3                      1
                    0.6    0.01085452290196289                   0.15                    6.3                      1
                    0.6   0.007224804413953537                   0.15                    6.3                      1

Can you please tell me if it is intended to look like this or I've made some mistake in my initial setup?

Thank you,
Viacheslav


среда, 7 января 2015 г., 1:19:03 UTC+1 пользователь Paolo написал:

Paolo Raiteri

unread,
Jan 8, 2015, 7:04:33 AM1/8/15
to plumed...@googlegroups.com
I’m not sure, I’ve never used the WALKERS_MPI function, Giovanni may be able to help you with that.
My suggestions was to use the old fashioned way where the walkers communicate via an external file and not internally.
I guess If you want to use the WALKERS_MPI you can only do it using the -partition, however I don’t thin anyone has ever tested it with LAMMPS.

In the way I run it every walker writes a different file and this is how the metadynamics block looks like

# metadynamics
METAD ...
  ARG=d1,c1                    # active CV(s)
  HEIGHT=0.026                 # height
  SIGMA=0.2,0.1                # width
  PACE=500                     # deposition pace
  WALKERS_DIR=../HILLS_DIR     # multiple walkers directory
  WALKERS_RSTRIDE=500          # multiple walkers reading pace
  WALKERS_ID=XXXX WALKERS_N=25 # multiple walkers ID and total no
... METAD

Obviously you each walker must have a unique ID and you have to replace the “XXXX” with that ID.
Note that the IDs must start from 0
Also note that you must have the RESTART keyword in the plumed input file otherwise the walkers may have some issues to read each other’s gaussians. Finally, the walkers must start from different configurations otherwise you may get artefacts in the free energy.

Cheers,
Paolo

--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To post to this group, send email to plumed...@googlegroups.com.
Visit this group at http://groups.google.com/group/plumed-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/b00597f7-794f-4cf2-9f2f-2f0b315e5685%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Giovanni Bussi

unread,
Jan 8, 2015, 7:06:41 AM1/8/15
to plumed...@googlegroups.com
Hi!

WALKERS_MPI is not compatible with LAMMPS. It is probably not a big effort to make it compatible (it should be sufficient to find out which is the global communicator used by LAMMPS and pass it to PLUMED in the fix-plumed).

Giovanni


Paolo Raiteri

unread,
Jan 8, 2015, 7:07:38 AM1/8/15
to plumed...@googlegroups.com
The only thing which I don't understand at the moment is the following: is there any way to setup replica exhange with lammps?

Did you check the LAMMPS manual ?

bol...@gmail.com

unread,
Jan 8, 2015, 7:45:03 AM1/8/15
to plumed...@googlegroups.com
Sorry I might have expressed myself not entirely correct, I was interested in the way of setting up the biasing potential exchange. So have I understood correctly that in order to make walkers share information I don not have to make them dump it to the same HILLS file? I just have to set WALKERS_DIR and WALKERS_RSTRIDE, so each walker will create its own HILLS file but they will read each other's file?

четверг, 8 января 2015 г., 13:07:38 UTC+1 пользователь Paolo написал:

bol...@gmail.com

unread,
Jan 8, 2015, 8:29:43 AM1/8/15
to plumed...@googlegroups.com
By the way is "fix plumed" compatible with one of multi-replica LAMMPS commands (neb, prd, tad, temper)? So if I actually want to setup replica exchange in system is it possible to it with temper command?


четверг, 8 января 2015 г., 13:07:38 UTC+1 пользователь Paolo написал:
The only thing which I don't understand at the moment is the following: is there any way to setup replica exhange with lammps?

Giovanni Bussi

unread,
Jan 8, 2015, 9:50:24 AM1/8/15
to plumed...@googlegroups.com
On Thu, Jan 8, 2015 at 2:29 PM, <bol...@gmail.com> wrote:
By the way is "fix plumed" compatible with one of multi-replica LAMMPS commands (neb, prd, tad, temper)? So if I actually want to setup replica exchange in system is it possible to it with temper command?

No this is not possible.

Giovanni
 


четверг, 8 января 2015 г., 13:07:38 UTC+1 пользователь Paolo написал:
The only thing which I don't understand at the moment is the following: is there any way to setup replica exhange with lammps?

Did you check the LAMMPS manual ?

--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To post to this group, send email to plumed...@googlegroups.com.
Visit this group at http://groups.google.com/group/plumed-users.

Paolo Raiteri

unread,
Jan 8, 2015, 7:30:00 PM1/8/15
to plumed...@googlegroups.com
> So have I understood correctly that in order to make walkers share information I don not have to make them dump it to the same HILLS file? I just have to set WALKERS_DIR and WALKERS_RSTRIDE, so each walker will create its own HILLS file but they will read each other's file?

Yes, each walker writes a file called HILLS.X, where X is the walker's ID set into its plumed input file.
The total number of walkers (WALKERS_N) is required so that the walkers know which files to look for.
You can then find all the gaussians in WALKERS_DIR and you can collate them all into one file an the end of all the simulations to get the final free energy.

Paolo

bol...@gmail.com

unread,
Jan 9, 2015, 6:45:14 AM1/9/15
to plumed...@googlegroups.com
Hi Paolo and Giovanni,

Thank you very much for your answers, I was able to set everything up now.

Viacheslav

пятница, 9 января 2015 г., 1:30:00 UTC+1 пользователь Paolo написал:
Reply all
Reply to author
Forward
0 new messages