GAFF Preparation for LAMMPS

Hello,

Does anyone have much experience preparing LAMMPS input using the General Amber Force Field? Does anyone have a few commands, to get ne started, using Antechamber that would assign atomtypes and force field parameters for an XYZ file (Axel?)?

Thanks for the help

Carrie

Amber does not use simple rules to assign charges to each atom.
Instead AmberTools perform a quantum calculation to estimate what
these partial charges should be. This is becoming increasingly
common. (The tools which come with BOSS to prepare simulations using
the OPLSAA3 force field typically do this as well.) This is one of
the obstacles you must overcome.

If you want to use AMBER, then there are two choices that I'm aware of:

1) Use AmberTools to build your system, and convert them into LAMMPS
format using "amber2lmp". (You may encounter bugs in this script. It
is no longer actively maintained.)
http://lammps.sandia.gov/doc/Section_tools.html#amber2lmp-tool

2) Moltemplate is a general molecule builder program which supports a
relatively large number of force field formats including GAFF and
GAFF2. But it does not understand quantum chemistry and cannot assign
atomic charges this way.

You can use moltemplate to build the LAMMPS input and data files (see
below), but you will have to determine the atomic partial charges of
your atoms by other means. Ideally you should use AmberTools to
generate the atomic charges. Once you have the list of atomic
charges, you can write a for-loop to generate file containing a list
of "set" commands with the following format:

set atom 1 charge -0.18
set atom 2 charge 0.06
set atom 3 charge 0.06
set atom 4 charge 0.06
:

http://lammps.sandia.gov/doc/set.html

This would be a useful script. If you are able to figure out
AmberTools, and you are able to figure out which of the files it
creates contain the atomic charges, then I can help you write this
for-loop, and we can included it in moltemplate.

---- how to build a molecular system using GAFF/GAFF2 force field ---
There are several examples of molecules using the AMBER/GAFF force
field located in the "examples" subdirectory included with
moltemplate. Currently, you can browse these examples at the link
below (which may change in the future):
https://github.com/jewettaij/moltemplate/tree/master/examples/all_atom/force_field_AMBER

Here is an example of how you define a simple molecule using
moltemplate using the GAFF (or GAFF2) force field:

---- ethylene.lt ----

import "gaff.lt" # or "gaff2.lt"

# The "gaff.lt" and "gaff2.lt" files are usually located in "force_fields"
# subdirectory of the moltemplate distribution.
# It contains definitions of the atoms "c2", "hc", as well as the bonded
# and non-bonded interactions between them (and many other atoms).

Ethylene inherits GAFF { # or GAFF2

  # atom-id mol-id atom-type charge X Y Z
  write('Data Atoms') {
    $atom:C1 $mol @atom:c2 -0.23 -0.6695 0.000000 0.000
    $atom:C2 $mol @atom:c2 -0.23 0.6695 0.000000 0.000
    $atom:H11 $mol @atom:hc 0.115 -1.234217 -0.854458 0.000
    $atom:H12 $mol @atom:hc 0.115 -1.234217 0.854458 0.000
    $atom:H21 $mol @atom:hc 0.115 1.234217 -0.854458 0.000
    $atom:H22 $mol @atom:hc 0.115 1.234217 0.854458 0.000
  }
  write('Data Bond List') {
    $bond:C12 $atom:C1 $atom:C2
    $bond:C1H1 $atom:C1 $atom:H11
    $bond:C1H2 $atom:C1 $atom:H12
    $bond:C2H1 $atom:C2 $atom:H21
    $bond:C2H2 $atom:C2 $atom:H22
  }
} # Ethylene

---- system.lt ----

import "ethylene.lt" # <- defines the "Ethylene" molecule type.

# Create a 3-dimensional array of 1000 ethylenes (10x10x10)

ethylenes = new Ethylene[10].move(8.0, 0, 0)
                        [10].move(0, 8.0, 0)
                        [10].move(0, 0, 8.0)

# Periodic boundary conditions:
write_once("Data Boundary") {
  0.0 80.00 xlo xhi
  0.0 80.00 ylo yhi
  0.0 80.00 zlo zhi
}

Hello,

Does anyone have much experience preparing LAMMPS input using the General
Amber Force Field? Does anyone have a few commands, to get ne started,
using Antechamber that would assign atomtypes and force field parameters
for an XYZ file (Axel?)?

​the first part of your question is a question to the Amber community and
for the documentation of the Amber/GAFF force field.
as for converting from Amber format to LAMMPS, please have a look at ParmEd
or rather InterMol (​ https://github.com/shirtsgroup/InterMol , which uses
ParmEd)

axel.

Hey, this looks like a really useful tool. Thanks Axel!

Steve, can we include a link to the InterMol at
http://lammps.sandia.gov/prepost.html ?
(https://github.com/shirtsgroup/InterMol)

This looks like a much better choice than either of the suggestions I
made (amber2lmp, moltemplate).

There's no way to compete with the original molecule building software
(such as AmberTools) which was designed specifically for the
particular force field you want to use (eg. AMBER). And newer force
fields increasingly rely on quantum chemistry calculations to generate
the atomic partial charges. Neither moltemplate or EMC (to my
knowledge) can do that. And unlike amber2lmp, both AmberTools and
InterMol appear to be in active development. (And I have a high
opinion of Michael Shirts, and I think software coming from his lab
will be solid.) If you use a more generic tool like moltemplate, you
currently run a risk of choosing the precise atom types (eg, SP2 vs.
SP3 carbon, "c1", "c2", "c3", "ca", "cp"...) incorrectly because
moltemplate does not yet infer these details automatically from PDB
files. (And I have occasionally guessed atom types incorrectly in the
past...)

So if you've decided you want to use one of the AMBER force fields,
then learn AmberTools, and learn InterMol(ParmEd).
If you've decided you want to use the GROMOS force field, learn the
gromacs molecule builder tools (pdb2gmx, grompp,? etc), and use
InterMol, ...
...

Cool!

andrew