Talk to Rishabh, Jingyang, or Ryan if you have LAMMPS questions!
More Information to come
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 guessangles
topo guessdihedrals
set sel [atomselect top all]
set center [measure center $sel weight none]
$sel moveby [vecscale -1.0 $center]
set minmax [measure minmax $sel -withradii]
set box [vecscale 1.1 [vecsub [lindex $minmax 1] [lindex $minmax 0]]]
pbc set $box
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.
Here is what a finished file will look like
module load ms/lammps/3Mar20-mpi