> Dear LAMMPS developers,
> Sorry for asking this pre-processing problem in lammps mailing list.
> I would like to know that will LAMMPS in the future have a force field selection option which is similar like the one GROMACS or moltemplate provides?
> For simple force fields it is easy to do in lammps. When I want to use the force field like CHARMM27 or OPLS-AA/L force fields,
> it is usually a big headache for me find those force field parameters corresponding to my complex polymer structure like asphaltene.
I think you have underestimated the magnitude of what you are asking for.
this is not going to change by having automated force field tools.
those tools are usually extremely dumb and prone to make mistakes for
all but the most straightforward to do tasks. e.g. most peptides can
be easily converted to a complete topology with atom type and force
field assignments from a data base, since they consist of a rather
small set of building blocks. have some not so common amino acids in
your peptide and you are in trouble and have to add custom entries to
your topology fragment database.
thus complex systems will *always* require some more complex
processing of force field parameters, and topology building and
require careful and sometimes manual atom type assignment. add to
that, that different force fields have different rules and procedures
how force field parameters are assigned. most MD packages which supply
automated force field assignment, either handle only systems, that are
compatible with pre-existing data bases, or have a simple increment
system (typically resulting in reduced accuracy of the force field).
for most complex structures, the atom type assignment is not easy to
automate unless you know something about the chemistry of the specific
system at hand, the structural patterns, and how they can be matched
to the force field parameters.
It's to be expected that molecules like aslphaltine will be extremely
challenging to parameterize, especially since they are so
heterogeneous and contain metals. ATB database contains molecules
whose parameters have supposedly been optimized using quantum chemical
calculations, but I don't think this database would contain any
molecules which are as complicated as as asphaltene.
because of this, it makes very little
sense, to include such tools into LAMMPS itself, which is extremely
flexible and trying to be very generic.
To add to Axel's great reply:
Force field assignment is very text heavy, and it's kind of
inconvenient to write good parsing code in C or C++. It's much easier
to write it in python.
Disclaimer: I wrote moltemplate.
Moltemplate was written in python, and the goal of moltemplate was to
be the closest thing possible to a general, universal molecule builder
for LAMMPS. However it is not a part of LAMMPS. Some users note that
it is slow and has it's own (quirky) syntax, and it cannot (yet) be
invoked from inside python (or LAMMPS). (And it is far from
universal. Force fields like CHARMM, GROMOS, CVFF, PCFF, DRIEDING are
not yet supported, and automatic PDB-atom type inference is not
You mentioned OPLSSAA and LOPLSAA. OPLSAA has been available in
moltemplate for a while. The 2015 version of LOPLSAA was added to
moltemplate in December. AMBER and COMPASS are supported, but you
must generate the partial charges for AMBER simulations yourself, and
the most of the COMPASS force field parameters are not publicly
available. If my memory is correct, the parameters for the GROMOS and
CHARMM force fields (at least the older versions) would not be
difficult to convert into moltemplate format. However if you are
going to use these force fields, why not just use Gromacs or OpenMM?
That said, if the LAMMPS developers want to add automatic force-field
capability to LAMMPS (or to "fix bond/react"), I'd be happy to convert
these force-fields into whatever format they agree upon, and/or to be
active in suggesting what that format should be.
But the important concerns that Axel raises would remain.
it is much more straightforward to either use existing tools for the
given force fields at hand and then converting the results to LAMMPS,
Most traditional MD programs were designed to work with only one kind
of force field, and they come with tools to read certain kinds of PDB
files and look up force-field parameters for the atoms in them, using
that particular force-field. (Exception: The OpenMM software appears
to support multiple force fields, but it's not as general as LAMMPS)
In addition to looking up force-field parameters, these tools also
typically assign partial charges to each atom, add missing hydrogen
atoms, and generally clean up the PDB files which are fed to them.
Because this process is so arduous, once you have decided which
force-field you want to use, it's probably better to use the MD
program that comes with the best tools for building molecules that use
that particular force field. There are a few programs (with varying
degrees of glitchy-ness) which can convert the files generated by
these tools into LAMMPS format (if for some reason, you want to run
the simulation in LAMMPS). I have not yet heard anything bad about
InterMol, and Axel recommends it.
if practical, or to write custom tools/scripts on top of "middleware"
packages like TopoTools (you can see in the OPLS/AA examples how
knowledge about the molecules is used to apply OPLS/AA's increment
system to assign charges and atom types. this is much more easily done
with specific tools like VMD/Tcl scripting, than trying to build a
generic tool for LAMMPS.
in short: there ain't no such thing as a free lunch.
Yes. ...And what you're trying to simulate sounds challenging.
There is always a trade-off between generality (LAMMPS is quite
general), and ease-of-use. It's possible to spend your entire PhD
learning the horrible intricacies of these molecule builder tools, so
ease-of-use is worth considering.