Miscelaneous tools for LAMMPS.
-
create_conf: create initial input files for LAMMPS, with polarizability (drudes) and/or free energy calculations. -
zmat2xyz: convert .zmat files to .xyz (with connections). -
fusion_mols: fusion two .xyz files (for free energy calculations). -
fepfdtintibar: scripts to analyse energy results from a LAMMPS fep output file. -
lib/*: various libraries used by the scripts. -
data/*: various data files. -
examples/*: examples.
Clone the repository (easier to stay updated):
git clone https://github.com/jdevemy/lammps-tools.git
Install the software :
cd lammps-tools
python setup.py build
sudo python setup.py install
-
For each molecule or ion prepare a file containing a z-matrix (
molecule.zmat). See theexamplesdirectory and check the Wikipedia entry for "Z-matrix (chemistry)" (examples taken from Agilio Padua'sfftoolproject).The script determines the connectivity (which atoms are linked by covalent bonds) from the z-matrix. Cyclic molecules require additional
connectrecords to close rings.Improper dihedrals cannot be inferred from connectivity and must be indicated by
improperrecords. -
Create one or multiple force fields file parameters:
You can choose to create only one file for all the molecules (
database.ff), or create one for each molecule (spce.ff,CC.ff, ...).For the format of the
.fffile, see theexamplesdirectory or see Agilio Padua'silffproject. -
Convert each of the
.zmatfiles to a.xyz:zmat2xyz spce.zmat zmat2xyz CC.zmat -
Create a
packmolinput like:tolerance 2.0 filetype xyz output simbox.xyz add_box_sides 2.0 structure CC.xyz number 1 inside box -13. -13. -13. 13. 13. 13. end structure structure spce.xyz number 360 inside box -13. -13. -13. 13. 13. 13. end structureAnd pack
packmol < pack.inp -
Run
create_conf:create_conf -m 2.0 simbox.xyz 1 CC.xyz CC.ff 360 spce.xyz spce.ff -
Run LAMMPS with the
in.lmpanddata.lmpfiles generated bycreate_conf:mpirun -np 12 -np 12 /opt/lammps/lmp_openmpi -i lammps.input
It's the same as the normal simulation but:
-
the
.fffiles must provide the polarizability value of each atom, which corresponds to the 8th column in the file, and the thole factor (i.e. 2.089) in the 9th column of the file. -
the option
-pshould be added to thecreate_confcommand line. -
the option
--dmcan be used to change the mass of the drude, and--dkto change the stiffness of the core-drude bond. -
run LAMMPS as usual (LAMMPS should be compiled with the package
user-drude)
The steps are quite the same as the normal simulation, but you should fusion two molecules :
-
you should provide a
.fffile containing the parameters of both the molecules to fusion (CC-CO.ff). -
you should fusion the 2 molecules :
fusion_mols CC.xyz CO.xyz CC-CO.ff -
do the packing using the resulting molecule (
CC-CO.xyz). -
run
create_confindicating the free energy type (fep01, fep10, fdti01, fdti10, bar01, bar10). For more infos, cf https://github.com/agiliopadua/compute_fep.The command line will look like :
create_conf --freetype fep01 -m 2.0 simbox.xyz 1 CC.xyz/CO.xyz CC-CO.ff 360 spce.xyz spce.ff -
run LAMMPS as usual (LAMMPS should be compiled with the package
user-fep) -
you can then output energy results using the
fepoutput files (fep01.lmp,fep10.lmp, ...) with the corresponding scripts:fep,fdti,ntiandbar.
-
Packmol: L. Martinez et al. J Comp Chem 30 (2009) 2157, DOI: 10.1002/jcc.21224
-
LAMMPS: S. Plimpton, J Comp Phys 117 (1995) 1, DOI: 10.1006/jcph.1995.1039