LAMMPS

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

  1. Create the molecule in Avogadro or wherever you want to

  2. Then use antechamber to get the partial charges. Antechamber is part of AmberTools. Installation instructions are available in their manual

  3. 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.’

  4. Open the .pdb file in VMD. Use Extensions -> TK console to open the TCL scripting menu

  5. 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

  6. 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]

  7. 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.

  8. Here is what a finished file will look like

Lawrencium

module load ms/lammps/3Mar20-mpi

Compiling LAMMPs

author: Bryant Li

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.

Kestrel

Below is an example with PyACE:

Useful links:

https://docs.lammps.org/Build_extras.html#ml-pace https://github.com/ICAMS/lammps-user-pace/ https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart/#lammps Note: if doesn't work/not fast enough, try to speed it up with this: https://docs.nersc.gov/development/programming-models/kokkos/

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:

Perlmutter

Below is an example with pair_allegro. WARNING!!!! ONLY WORKS FOR CPU.

Prereqs:

Conda env setup:

Make lammps:

Module list at the time:

GPU Setup (THIS HASN'T WORKED FOR pair_allegro; due to a PyTorch error. You may have better luck if you use a different external code).

module list:

Prereqs:

Conda env setup:

Make lammps:

Last updated