BEMD in PLUMED-2.0

518 views
Skip to first unread message

Thomas Evangelidis

unread,
Jul 22, 2013, 11:49:27 AM7/22/13
to plumed...@googlegroups.com
Hello,

I have a few questions about the input and output of Bias Exchange MetaD in PLUMED-2.0 and GROMACS-4.6.1. Below are is the relevant section of my plumed.dat file. Please ignore the numerical parameter values, they are just for experimentation.


METAD ARG=coord_ca SIGMA=0.1 HEIGHT=0.1 PACE=10 LABEL=COORD_Ca FILE=HILLS GRID_MIN=0 GRID_MAX=100 GRID_BIN=2000 GRID_WFILE=bias GRID_WSTRIDE=10 INTERVAL=37,53
PRINT ARG=coord_ca STRIDE=10 FILE=COLVAR

METAD ARG=coord_cg SIGMA=0.2 HEIGHT=0.2 PACE=10 LABEL=COORD_Cg FILE=HILLS GRID_MIN=0 GRID_MAX=100 GRID_BIN=2000 GRID_WFILE=bias GRID_WSTRIDE=10 INTERVAL=17,29
PRINT ARG=coord_cg STRIDE=10 FILE=COLVAR

METAD ARG=ab SIGMA=0.3 HEIGHT=0.3 PACE=10 LABEL=AB FILE=HILLS GRID_MIN=0 GRID_MAX=100 GRID_BIN=2000 GRID_WFILE=bias GRID_WSTRIDE=10 INTERVAL=0.5,5.8
PRINT ARG=ab STRIDE=10 FILE=COLVAR

METAD ARG=dihcor SIGMA=0.4 HEIGHT=0.4 PACE=10 LABEL=DIHCOR FILE=HILLS GRID_MIN=0 GRID_MAX=100 GRID_BIN=2000 GRID_WFILE=bias GRID_WSTRIDE=10 INTERVAL=4,13.5
PRINT ARG=dihcor STRIDE=10 FILE=COLVAR

METAD ARG=coord_bb SIGMA=0.5 HEIGHT=0.5 PACE=10 LABEL=COORD_BB FILE=HILLS GRID_MIN=0 GRID_MAX=100 GRID_BIN=2000 GRID_WFILE=bias GRID_WSTRIDE=10 INTERVAL=0.2,13.5
PRINT ARG=coord_bb STRIDE=10 FILE=COLVAR

METAD ARG=coord_sc SIGMA=0.6 HEIGHT=0.6 PACE=10 LABEL=COORD_SC FILE=HILLS GRID_MIN=0 GRID_MAX=100 GRID_BIN=2000 GRID_WFILE=bias GRID_WSTRIDE=10 INTERVAL=0.9,7.5
PRINT ARG=coord_sc STRIDE=10 FILE=COLVAR

METAD ARG=coord_bb_sc SIGMA=0.7 HEIGHT=0.7 PACE=10 LABEL=COORD_BB_SC FILE=HILLS GRID_MIN=0 GRID_MAX=100 GRID_BIN=2000 GRID_WFILE=bias GRID_WSTRIDE=10 INTERVAL=1.5,8.0
PRINT ARG=coord_bb_sc STRIDE=10 FILE=COLVAR


1) Can I keep the same name for hills, colvar and grid file as I did below? Like this, I get files named COLVA.0-7, HILLS.0-7 and bias.0-7, they seem to contain information about the same CV(s) (judging from the headers, sigma and height values) but the actual numbers they contain are different. On the other hand, if I use different file names (e.g. COLVAR0-7) I get files named like COLVAR[0-7].[0-7]. This is confusing. Can someone explain what's happening?

2) How can I add an unbiased replica? Is it just by using the about setup and -multi 8 option in mdrun?

3) Are all these bck.* files necessary? Can I suppress them somehow?


thanks in advance.
~Thomas

Giovanni Bussi

unread,
Jul 22, 2013, 12:49:25 PM7/22/13
to plumed...@googlegroups.com
Hi!

Plumed is adding a .[0-7] to all your output files, pretty much the same thing gromacs is doing with the traj,log, etc. So you are right, you should use "COLVAR" everywhere.

Also, to reproduce the behavior of plumed 1 (with randomly chosen exchanges) you should use the directive "RANDOM_EXCHANGES" (I know it is not documented, and this is a bug... but it should work, just put it at the beginning of the input in a separate line).

Finally, I assume that you have same colvars in the replicas but you change the ARG of METAD, right?
 

2) How can I add an unbiased replica? Is it just by using the about setup and -multi 8 option in mdrun?

Just prepare a replica without METAD 
 

3) Are all these bck.* files necessary? Can I suppress them somehow?

Well, now backup is always on... If you really think this is a problem we could add a flag to avoid it. The easiest way would be to do it through an environment variable (again: copying the idea from GROMACS). Would that fit? But remember that you can just type
rm -fr bck*
and they will all disappear...

Ciao!

Giovanni

 


thanks in advance.
~Thomas

--
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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Thomas Evangelidis

unread,
Jul 23, 2013, 5:49:23 AM7/23/13
to plumed...@googlegroups.com
Plumed is adding a .[0-7] to all your output files, pretty much the same thing gromacs is doing with the traj,log, etc. So you are right, you should use "COLVAR" everywhere.

Also, to reproduce the behavior of plumed 1 (with randomly chosen exchanges) you should use the directive "RANDOM_EXCHANGES" (I know it is not documented, and this is a bug... but it should work, just put it at the beginning of the input in a separate line).

Finally, I assume that you have same colvars in the replicas but you change the ARG of METAD, right?

Hi Giovanni,

Sorry for being bothersome, but there isn't any proper example in the bundle. It is not quite clear what you ask here. My impression is that in v2.0 you have to supply a single plumed.dat file containing the CV definition and a series of METAD commandlines (see the attachment). This is what I did, in my plumed.dat file the METAD lines are exactly as in my previous message, namely all CVs are activated. However, the resulting COLVAR* files contain either the values of coord_bb_sc or of dihcor (see below). What am I doing wrong?

==> COLVAR.0 <==
#! FIELDS time coord_bb_sc
 0.000000 12.196370
 0.020000 12.174843
 0.040000 12.337033

==> COLVAR.1 <==
#! FIELDS time coord_bb_sc
 0.000000 12.196370
 0.020000 12.174843
 0.040000 12.337033

==> COLVAR.2 <==
#! FIELDS time coord_bb_sc
 0.000000 12.196370
 0.020000 12.174843
 0.040000 12.337033

==> COLVAR.3 <==
#! FIELDS time coord_bb_sc
 0.000000 12.196370
 0.020000 12.174843
 0.040000 12.337033

==> COLVAR.4 <==
#! FIELDS time coord_bb_sc
 0.000000 12.196370
 0.020000 12.174843
 0.040000 12.337033

==> COLVAR4.0 <==
#! FIELDS time dihcor
 0.000000 6.540748
 0.020000 6.508790
 0.040000 6.552753

==> COLVAR4.1 <==
#! FIELDS time dihcor
 0.000000 6.540748
 0.020000 6.508790
 0.040000 6.552753

==> COLVAR4.2 <==
#! FIELDS time dihcor
 0.000000 6.540748
 0.020000 6.508790
 0.040000 6.552753

==> COLVAR4.3 <==
#! FIELDS time dihcor
 0.000000 6.540748
 0.020000 6.508790
 0.040000 6.552753

==> COLVAR4.4 <==
#! FIELDS time dihcor
 0.000000 6.540748
 0.020000 6.508790
 0.040000 6.552753

==> COLVAR4.5 <==
#! FIELDS time dihcor
 0.000000 6.540748
 0.020000 6.508790
 0.040000 6.552753

==> COLVAR4.6 <==
#! FIELDS time dihcor
 0.000000 6.540748
 0.020000 6.508790
 0.040000 6.552753

==> COLVAR4.7 <==
#! FIELDS time dihcor
 0.000000 6.540748
 0.020000 6.508790
 0.040000 6.552753

==> COLVAR.5 <==
#! FIELDS time coord_bb_sc
 0.000000 12.196370
 0.020000 12.174843
 0.040000 12.337033

==> COLVAR.6 <==
#! FIELDS time coord_bb_sc
 0.000000 12.196370
 0.020000 12.174843
 0.040000 12.337033

==> COLVAR.7 <==
#! FIELDS time coord_bb_sc
 0.000000 12.196370
 0.020000 12.174843
 0.040000 12.337033
 

2) How can I add an unbiased replica? Is it just by using the about setup and -multi 8 option in mdrun?

Just prepare a replica without METAD 
 

This is how I run GROMACS:

mpirun -np 8 $GMX_HOME/mdrun_mpi_d -nice 0 -plumed plumed -multi 8 -replex 1000

In the plumed.dat file I had defined only 7 CVs, consequently the 8th replica should be the unbiased, right? Yet coord_bb_sc is biased in all bias.[0-7] and HILLS.[0-7] files (see below).

==> bias.0 <==
#! FIELDS coord_bb_sc COORD_BB_SC.bias der_coord_bb_sc
#! SET min_coord_bb_sc 0
#! SET max_coord_bb_sc 100
#! SET nbins_coord_bb_sc  2001
#! SET periodic_coord_bb_sc false

==> bias.1 <==
#! FIELDS coord_bb_sc COORD_BB_SC.bias der_coord_bb_sc
#! SET min_coord_bb_sc 0
#! SET max_coord_bb_sc 100
#! SET nbins_coord_bb_sc  2001
#! SET periodic_coord_bb_sc false

==> bias.2 <==
#! FIELDS coord_bb_sc COORD_BB_SC.bias der_coord_bb_sc
#! SET min_coord_bb_sc 0
#! SET max_coord_bb_sc 100
#! SET nbins_coord_bb_sc  2001
#! SET periodic_coord_bb_sc false

==> bias.3 <==
#! FIELDS coord_bb_sc COORD_BB_SC.bias der_coord_bb_sc
#! SET min_coord_bb_sc 0
#! SET max_coord_bb_sc 100
#! SET nbins_coord_bb_sc  2001
#! SET periodic_coord_bb_sc false

==> bias.4 <==
#! FIELDS coord_bb_sc COORD_BB_SC.bias der_coord_bb_sc
#! SET min_coord_bb_sc 0
#! SET max_coord_bb_sc 100
#! SET nbins_coord_bb_sc  2001
#! SET periodic_coord_bb_sc false

==> bias.5 <==
#! FIELDS coord_bb_sc COORD_BB_SC.bias der_coord_bb_sc
#! SET min_coord_bb_sc 0
#! SET max_coord_bb_sc 100
#! SET nbins_coord_bb_sc  2001
#! SET periodic_coord_bb_sc false

==> bias.6 <==
#! FIELDS coord_bb_sc COORD_BB_SC.bias der_coord_bb_sc
#! SET min_coord_bb_sc 0
#! SET max_coord_bb_sc 100
#! SET nbins_coord_bb_sc  2001
#! SET periodic_coord_bb_sc false

==> bias.7 <==
#! FIELDS coord_bb_sc COORD_BB_SC.bias der_coord_bb_sc
#! SET min_coord_bb_sc 0
#! SET max_coord_bb_sc 100
#! SET nbins_coord_bb_sc  2001
#! SET periodic_coord_bb_sc false

==> HILLS.0 <==
#! FIELDS time coord_bb_sc sigma_coord_bb_sc height biasf
#! SET multivariate false
                   0.02      12.17484339179707                    0.6                    0.5                      1
                   0.04      12.33703287727747                    0.6                    0.5                      1

==> HILLS.1 <==
#! FIELDS time coord_bb_sc sigma_coord_bb_sc height biasf
#! SET multivariate false
                   0.02      12.17484339179707                    0.6                    0.5                      1
                   0.04      12.33703287727747                    0.6                    0.5                      1

==> HILLS.2 <==
#! FIELDS time coord_bb_sc sigma_coord_bb_sc height biasf
#! SET multivariate false
                   0.02      12.17484339179707                    0.6                    0.5                      1
                   0.04      12.33703287727747                    0.6                    0.5                      1

==> HILLS.3 <==
#! FIELDS time coord_bb_sc sigma_coord_bb_sc height biasf
#! SET multivariate false
                   0.02      12.17484339179707                    0.6                    0.5                      1
                   0.04      12.33703287727747                    0.6                    0.5                      1

==> HILLS.4 <==
#! FIELDS time coord_bb_sc sigma_coord_bb_sc height biasf
#! SET multivariate false
                   0.02      12.17484339179707                    0.6                    0.5                      1
                   0.04      12.33703287727747                    0.6                    0.5                      1

==> HILLS.5 <==
#! FIELDS time coord_bb_sc sigma_coord_bb_sc height biasf
#! SET multivariate false
                   0.02      12.17484339179707                    0.6                    0.5                      1
                   0.04      12.33703287727747                    0.6                    0.5                      1

==> HILLS.6 <==
#! FIELDS time coord_bb_sc sigma_coord_bb_sc height biasf
#! SET multivariate false
                   0.02      12.17484339179707                    0.6                    0.5                      1
                   0.04      12.33703287727747                    0.6                    0.5                      1

==> HILLS.7 <==
#! FIELDS time coord_bb_sc sigma_coord_bb_sc height biasf
#! SET multivariate false
                   0.02      12.17484339179707                    0.6                    0.5                      1
                   0.04      12.33703287727747                    0.6                    0.5                      1
 

3) Are all these bck.* files necessary? Can I suppress them somehow?

Well, now backup is always on... If you really think this is a problem we could add a flag to avoid it. The easiest way would be to do it through an environment variable (again: copying the idea from GROMACS). Would that fit? But remember that you can just type
rm -fr bck*
and they will all disappear...

No problem, I mentioned it because the workdir is being filled with files that are not necessary.


thanks,
Thomas

--

======================================================================

Thomas Evangelidis

PhD student

University of Athens
Faculty of Pharmacy
Department of Pharmaceutical Chemistry
Panepistimioupoli-Zografou
157 71 Athens
GREECE

email: tev...@pharm.uoa.gr

          tev...@gmail.com


website: https://sites.google.com/site/thomasevangelidishomepage/


plumed.dat

Thomas Evangelidis

unread,
Jul 23, 2013, 7:40:28 AM7/23/13
to plumed...@googlegroups.com
Problem solved thanks to Carlo.

I just created 8 separate files named plumed.dat.[0-7] (not plumed.dat[0-7] or plumed[0-7].dat), each one containing only a single METAD uncommented and the last one (plumed.dat.7) have all METAD lines commented out (that is the unbiased replica). Then I launched Bias Exchange in GROMACS using:

mpirun -np 8 $GMX_HOME/mdrun_mpi_d -nice 0 -plumed plumed.dat -multi 8 -replex 1000

Giovanni Bussi

unread,
Jul 23, 2013, 3:04:55 PM7/23/13
to plumed...@googlegroups.com
On Tue, Jul 23, 2013 at 11:49 AM, Thomas Evangelidis <tev...@gmail.com> wrote:
3) Are all these bck.* files necessary? Can I suppress them somehow?

Well, now backup is always on... If you really think this is a problem we could add a flag to avoid it. The easiest way would be to do it through an environment variable (again: copying the idea from GROMACS). Would that fit? But remember that you can just type
rm -fr bck*
and they will all disappear...

No problem, I mentioned it because the workdir is being filled with files that are not necessary.

Concerning this, I just pushed (on v2.0) a change that does the things in the same way as gromacs does. I.e.

* Maximum number of backups is 100 (per file)
* with export PLUMED_MAXBACKUP=-1 you switch off backups
* with export PLUMED_MAXBACKUP=10 you set the maximum number to 10.

Cheers,

Giovanni

Thomas Evangelidis

unread,
Aug 18, 2013, 6:24:55 AM8/18/13
to plumed...@googlegroups.com
Hi!

I get the following error after 100 steps of writing to grid file (bias.[0-7]):

cannot backup file bias.6 maximum number of backup is 101

I tried to switch off the backing up of the grid files by "export PLUMED_MAXBACKUP=-1" prior to configuring and compiling plumed-2.2 and also by adding "export PLUMED_MAXBACKUP=-1" into my batch script, but I still get backup files (bck.[0-9]+.bias.[0-7]). I also tried to run GROMACS-4.6.2 & PLUMED-2.2 interactively on a single node but I still got those backup files. It is worth noting that on my laptop I can switch off backing up with "export PLUMED_MAXBACKUP=-1". It seems that somehow PLUMED-2.2 cannot find PLUMED_MAXBACKUP environment variable on the HPC facility.

So far I circumvent that problem by adding the following loop prior to launching metadynamics in my batch script:

while :; do sleep 30; rm bck.*; done &

I wonder if anyone knows what may be wrong with PLUMED_MAXBACKUP.

~Thomas

Giovanni Bussi

unread,
Aug 18, 2013, 4:36:22 PM8/18/13
to plumed...@googlegroups.com
Hi Thomas. Notice that environment during compilation is irrelevant. Runtime it should work. Are you running on a cluster? Check if the environment is correctly propagated to other nodes. Sometime you should set the variable as an option of mpirun if you want it to be set on the computing nodes.

As a side note, you are using plumed 2.0, not 2.2.

Ciao, Giovanni 

Inviato da iPhone

Andrea Spitaleri

unread,
Aug 18, 2013, 5:21:41 PM8/18/13
to plumed...@googlegroups.com
I put the line in sourceme.sh in the bash script before the mpirun command. I use torque/maui queue system on cluster

hope it helps

and


2013/8/18 Giovanni Bussi <giovann...@gmail.com>



--
"finche' andate in bici e fischia il vento
non sara' mai una brutta giornata"
----------------------------------------------------------------
http://sites.google.com/site/andreaspitaleri/
----------------------------------------------------------------
http://it.linkedin.com/in/andreaspitaleri
----------------------------------------------------------------
http://biomolnmr.org/

Thomas Evangelidis

unread,
Sep 15, 2013, 3:50:55 PM9/15/13
to plumed...@googlegroups.com
Hi,

For future reference for others having the same problem, this is the right way to suppress backup files:

export PLUMED_MAXBACKUP=-1 # no backups
/opt/parastation/bin/mpiexec -x $PLUMED_MAXBACKUP -np $NSLOTS $GMX_HOME/mdrun_mpi_d -plumed plumed.dat -multi $NSIMS -replex $REPFREQ -v -s topol -deffnm BEMDrun${run}_replica

As I expected exporting PLUMED_MAXBACKUP into sourceme.sh did't work.

~Thomas


On 19 August 2013 00:21, Andrea Spitaleri <andrea.s...@gmail.com> wrote:
I put the line in sourceme.sh in the bash script before the mpirun command. I use torque/maui queue system on cluster

hope it helps

and


2013/8/18 Giovanni Bussi <giovann...@gmail.com>
Hi Thomas. Notice that environment during compilation is irrelevant. Runtime it should work. Are you running on a cluster? Check if the environment is correctly propagated to other nodes. Sometime you should set the variable as an option of mpirun if you want it to be set on the computing nodes.

As a side note, you are using plumed 2.0, not 2.2.

Ciao, Giovanni 

Inviato da iPhone

Il giorno 18/ago/2013, alle ore 12:24, Thomas Evangelidis <tev...@gmail.com> ha scritto:

cy13...@iith.ac.in

unread,
Sep 20, 2013, 2:35:54 AM9/20/13
to plumed...@googlegroups.com
Dear sir ,

please help me when i was installing for make command this error coming
installing gromacs-4.6.3]$ cd plumed-2.0b1

/usr/bin/ld: cannot find -llapack
collect2: ld returned 1 exit status
make[4]: *** [plumed] Error 1
make[4]: Leaving directory `/home/srinivas/gromacs-4.6.3/plumed-2.0b1/src/lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/srinivas/gromacs-4.6.3/plumed-2.0b1/src/lib'
make[2]: *** [lib] Error 2
make[2]: Leaving directory `/home/srinivas/gromacs-4.6.3/plumed-2.0b1/src'
make[1]: *** [lib] Error 2
make[1]: Leaving directory `/home/srinivas/gromacs-4.6.3/plumed-2.0b1'
make: *** [all] Error 2

Giovanni Bussi

unread,
Sep 20, 2013, 4:13:17 AM9/20/13
to plumed...@googlegroups.com
Hi,

check if lapack libraries are already installed on your system.

Giovanni




--
Reply all
Reply to author
Forward
0 new messages