Talk to Rishabh, Jingyang, or Ryan if you have LAMMPS questions!
More Information to come
Creating a LAMMPS data file with relevant force field parameters
Create the molecule in Avogadro or wherever you want to
Then use antechamber to get the partial charges. Antechamber is part of AmberTools. Installation instructions are available in their manual
The relevant command:-
antechamber -fi pdb -fo prepi -i <infile.pdb> -o output.prepi -c bcc -j 4 -at gaff -nc -1
The -nc flag is the net charge in the molecule. It will error out if not invoked for ions.
Sometimes it might be advisable to take partial charges and LJ pair coefficients directly from papers. This is especially important if you are trying to benchmark your results against previous publications. For instance, in case of TFSI-, antechamber partial charges are significantly different than partial charges available in previous publications - https://pubs.acs.org/doi/full/10.1021/jp0686893
In short, antechamber is a good starting point, but it is always advisable to tread carefully with partial charges in MD. Also remember, that these charges are not scaled. Why is charge scaling important? Go here – ‘Kirby, B. J.; Jungwirth, P. Charge Scaling Manifesto: A Way of Reconciling the Inherently Macroscopic and Microscopic Natures of Molecular Simulations. J. Phys. Chem. Lett. 2019, 10 (23), 7531–7536. https://doi.org/10.1021/acs.jpclett.9b02652.’
Open the .pdb file in VMD. Use Extensions -> TK console to open the TCL scripting menu
Then use this sequence of commands to get the bonds, angles, dihedrals and most importantly, the box size
topo retype bonds
topo guessanglestopo guessdihedrals
set sel [atomselect top all]
Once all these TCL commands execute without any errors, we can get the lammps data file using: -
topo writelammpsdata <lammps.data> full
[Note: we can change the atom type to something else like atomic depending on the system, but mostly for molecular systems, full will be the way to go]
This is just a skeletal data file with the relevant bonds, angles, and dihedrals. No parameters are currently in this datafile. Sadly, the grunt work starts here. On paper, we can use the moltemplate package to get all the parameters, but it has never worked reliably (at least for me) . The work around is to visit the relevant force field parameter page on the moltemplate GitHub. For instance, for GAFF go to, https://github.com/jewettaij/moltemplate/blob/master/moltemplate/force_fields/gaff.lt
and extract all the parameters (LJ, bond, angle, dihedral) from there. Remember to benchmark your LJ parameters.
The GPU parallelized versions that works with KOKKOS is still a work in process. Most of the time, there is a default module load lammps on each super computer. This is specifically designed for those we needs to compile LAMMPs with an external package.
Please refer to https://docs.lammps.org/Build_extras.html for what LAMMPs can accommodate.
#substitute this line for whichever type of lammps is configured to your code
git clone https://github.com/ICAMS/lammps-user-pace.git
cd lammps
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_MPI=ON -DPKG_ML-PACE=ON ../cmake
make
After executing the last line in the command prompt, you will have an lmp binary in the lammps/build. directory. You can set up a submit script like below: