Using moltemplate for ReaxFF simulation

Thank you, Axel and Aidan, for responding so promptly.
I probably need to change the atom_style, since I was getting: “ERROR: Incorrect atom format in data file (…/atom.cpp:749)” when I ran the example input script (for CHO) as-is using my data file. In the example script, atom_style was charge, which seems to not support molecule ID. After going through LAMMPS documentation, I also found that I could add the molecule ID in “charge” atom_style, by using “fix property/atom” command. I will try using “atom_style full” first.



Dear Ankit

    I have never run a REAXFF simulation, but I cannot think of any
reason it would not work with moltemplate. (For example, go to the
webpage at and scroll down to the example:
"Many-Body Force-Field Example") As for your specific questions:

1) As Axel mentioned, the many-body pair styles in LAMMPS (such as
REAX) are compatible with atom-style full, or any other atom style
which includes molecule-ID numbers. Don't worry about the
molecule-ID. Just use the standard counter variable name that
moltemplate uses. (either "$mol:." or the shorthand equivalent:
"$mol". Moltemplate will substitute a number for that variable when
it creates the DATA file which LAMMPS reads, however it will be
ignored when you run LAMMPS.)

   Here's an excerpt of that example I mentioned above. It uses
another many-body pair style (pair_style sw), along with atom_style

   # AtomID MolID AtomType Charge X Y Z

  write("Data Atoms") {
    $atom:mW $mol @atom:mW 0.0 0.0 0.0 0.0
  # (Note: There is only one atom in this particular molecule type)


2) You can use any atom style you like with moltemplate.

There is no reason I can think of not to use atom_style full. But if,
for some reason, you don't want to use atom_style full, you can
override this default option by:

A) Change the atom_style command in your "In Init" section from
"atom_style full" to "atom_style charge".

B) Change the format of the columns in your "Data Atoms" section(s)
If you change the atomstyle, you will also have to change the order of
the columns in your "Data Atoms" section. If you were using
atom_style "charge", then the previous example would look like this:

  # AtomID AtomType Charge X Y Z
  write("Data Atoms") {
    $atom:mW @atom:mW 0.0 0.0 0.0 0.0
(See for details about the
column format.)

C) Finally, run moltemplate this way: -atomstyle "charge"

(You can choose hybrid atom_styles too, but I don't think you need to.
Furthermore, if all you need is charge., I also strongly doubt you
need to use fix property/atom. However you can use fix property/atom
with moltemplate. I can elaborate if you need me to.)

I hope this helps


P.S. One potential advantage to using atom_style full is that it
allows you later on to have the option to have your REAXFF atoms
interact with atoms belonging to other molecules which (unlike REAXFF)
use explicit bonds to keep their atoms from drifting apart from each
other. I'm not sure if combining REAXFF with non-REAXFF force-fields
in the same simulation is a good idea, but LAMMPS will let you do
this, and moltemplate will too.