I am trying to create an interface between the metadynamics and the LAMMPS code. Both the codes are written in two different languages. How can I proceed to create an interface.
Thank you
Matter Modeling Stack Exchange is a question and answer site for materials modelers and data scientists. It only takes a minute to sign up.
Sign up to join this communityColvars package is required to use collective variables and various methods of sampling such as metadynamics, umbrella sampling, ABF, etc. The package can be called using the fix colvars
command. However, it does not come with LAMMPS and must be installed separately.
1- Based on your OS, To install LAMMPS and Colvars, carefully follow the instructions at Build lammps.
1.1. If using cmake
, use the flag -D PKG_COLVARS=yes
. For make
, use make lib-colvars args="-m g++-debug”
. You may need to modify Makefile.serial
and Makefile.mpi
to include the following, for example:
CC = clang++
CCFLAGS = -std=c++11 -stdlib=libc++
1.2. Additional packages, such as reaxff or molecules, may also be required. See here for the appropriate flags.
fix colvars
. Colvars provides well-written manuals for different MD packages, including LAMMPS. Find the manual for LAMMPS here. From the manual (P. 75), to perform metadynamics, a colvar must be defined, for example:colvar {
name r
distance { ... }
upperBoundary 15.0
width 0.2
}
metadynamics {
name meta_r
colvars r
hillWeight 0.001
hillWidth 2.0
}
harmonicWalls {
name wall_r
colvars r
upperWalls 13.0
upperWallConstant 2.0
}
build
LAMMPS with the COLVARS package included, then use the command "fix metad Colvars..." $\endgroup$