moltemplate, pair_coeff order, and many-body pair_styles

In the other hand, I am getting a warning from moltemplate saying (Atom
order in some pair_coeff commands was swapped to pacify LAMMPS. For some
exotic pair_styles such as hbond/dreiding, this is not enough). My
pair_style is hybrid lj/cut 10.0 eam/alloy.

Just a quick, sloppy reply for now. Perhaps I can reply more
carefully next week.

Most pair_coeff commands have this syntax

pair_coeff i j parameter_list

    Moltemplate is only warning you that it automatically swapped the
i j arguments in some of your pair_coeff commands. It did this
because, after the numbers were assigned to each atom_type, some of
the i j pairs were in decreasing order.

    LAMMPS requires the atom-type arguments in each pair_coeff command
to be in increasing order. As a concrete example, LAMMPS will
silently ignore pair_coeff commands like these ones:

pair_coeff 2 1 0.15 3.6

(or pair_coeff 2 1 lj/cut 0.15 3.6 if you are using a hybrid pair_style)

...because 2>1

Moltemplate attempts to prevent this from occuring by swapping i and
j, so that the system.in.settings file contains this line instead:

pair_coeff 1 2 0.15 3.6

This will not alter any of the atom_type numbers in your
system.in.data file (or elsewhere in your system.in.settings file)
which moltemplate creates.

----- Many-Body pair_style syntax ------
         (sw, tersoff, eam, reax, eim, lcbop, etc...)

It is usually save to use moltemplate with many-body pair styles (such
as EAM) if you use "star-star" syntax (eg "* *"). For example:

pair_coeff * * si.sw Si NULL NULL

(or pair_coeff * * sw si.sw Si NULL NULL, if you are using a hybrid style)
In this example I assumed you have 3 atom types in this example
(assigned to 1,2,3)

Moltemplate should leave pair_coeff commands with "* *" syntax alone.

However, in this example, you should probably confirm that your "Si"
atom assigned to 1 (because "Si" is first in the list: "Si NULL
NULL"). To do that, invoke moltemplate this way.
moltemplate.sh -a "@atom:/Si 1" system.lt
Here I am assuming you named this atom "@atom:Si" in your LT files.

(If this is not working, then, after running moltemplate, see the
"ttree_assignments.txt" file located in the "output_ttree" directory,
to search for the FULL name of all of the atom types in your
simulation. See page 21, (section 5.2.3 and 5.3) of the moltemplate
manual for details.)

Unlike some many-body styles, pair_style EAM allows you to use both "*
*" and regular "i j" syntax. Just do not mix the two. Please avoid
this:

pair_coeff 3 * Ni_smf7.eam
or this:
pair_coeff 3*4 3*4 Ni_smf7.eam

(In a moltemplate LT file, this might look like
pair_coeff @atom:Ni * Ni_smf7.eam
pair_coeff @{atom:Ni}*@{atom:Pb} @{atom:Ni}*@{atom:Pb} Ni_smf7.eam

...I think moltemplate will let you do this, but unless you are
certain that @atom:Ni and @atom:Pb will be assigned to numbers 3 and
4, then this could lead to unnexpected behavoir. (Opinions may
differ, but I find that using this kind of syntax in LAMMPS is
dangerous even when not using moltemplate.)

   Anyway, I suspect this issue is not the source of your problem,
unfortunately.

As of now, in order to develop the model I have just one fix line (fix
1 all nve) in my lammps model code and that's it. I'm getting error (Bond
atoms ... ... missing on proc 0). I checked all lammps mailing list database
and figured there should be some error in my initial file.

This is one of the most common errors in LAMMPS. It means there is a
problem with the physics of your simulation. It happens when the
force between atoms is very large. This can happen if there is a
problem in the initial coordinates, periodic-boundaries, or
force-field.

Generally, this error most frequently occurs when a pair of atoms are
too close together (either at t=0, or later).

Sometimes, it can also occur if you are running the simulation with a
timestep which is too large and the atoms are jumping to far during
each timestep. You can try reducing the timestep by a large factor
(ie 1.0 -> 0.05). See if that helps. (Usually it does not.) If
reducing the timestep did not eliminate the error, then it probably
means there is a problem with the initial files.

Unfortunately these kinds of errors can be very difficult to eliminate
because there are so many reasons they can happen. The best way to
find out why they are happening is to visualize the system in VMD.
(Some generic instructions how to do that were attached to this
message. Also see chapter 4.5 and appendix C of the moltemplate
manual.) Look for pairs of atoms which may be too close together. In
VMD, you can select the "Graphics->Representations" menu option, click
on the "periodic" tab, and make sure your periodic images do not
overlap with each other.

   Anyway, sorry you are having trouble with missing bond atoms.
Those kinds of errors are never fun to solve.

Andrew

I am busy and unable to reply to email until 10/01

README_visualize.txt (2.85 KB)