There isn't a simple way to do this, that I can think of,
since the neigh_modify exclusions apply to both neighbor
lists (for Terssoff and LJ). Here are 2 options, neither ideal.
a) define 30 atom types, one per layer, the define
the epsilon for each I = J interaction to be 0.0. I != J is
normal non-zero LJ. However, this will require your Tersoff
potential to recognize 30 types, diffo for the Tersoff potential
file - which would be tedious to construct
b) use the molecule approach you describe, but don't use
neigh-modify exclude. Add some code to pair_lj_cut.cpp
to check if the molecule IDs of the 2 atoms are the same
and skip the interaction if so.
If you only want to turn off the LJ interactions, then there's a new
pair style "lj/coul/charmm/coul/inter" which does what Steve
described. I attached the source code files to this message. Copy
these files to the "src" directory of your LAMMPS folder and recompile
LAMMPS, (I'll try to keep this pair style up to date. In the future
you should be able to download updated versions of this pair style
from moltemplate.org.) For now, the documentation and examples for
this pair style is located here:
http://lammps.sandia.gov/threads/msg30584.html
In your case, since you are also using tersoff, I would try something like this:
pair_style hybrid/overlay tersoff lj/charmm/coul/charmm/inter 7.5 8.0
(This should all fit on one line).
The pair_coeff command which turns off LJ interactions between atoms
in the -same- molecule would be this:
pair_coeff 1 1 0.0 3.6 0.0 3.6 0.40 3.6
--- explanation of the pair_coeff command ---
Following the atom type pair ("1 1" in this example),
-the next two columns are epsilon and sigma parameters for atoms in
the same molecule.
-the next two columns are the epsilon and sigma parameters for 1-4 interactions
(which are usually in the same molecule).
-the last two columns are the epsilon and sigma parameters for atoms
in different molecules.
---- repulsive interactions ---
If you only want to turn off the attractive portion of the LJ
interaction, you could use:
pair_style hybrid/overlay tersoff lj/charmm/coul/charmm/inter es4k4l 7.5 8.0
(again this should fit on one line)
pair_coeff 1 1 0.40 3.6 1 0 0.40 3.6 10 0.40 3.6 1 -1
The extra parameters ("1 0" or "1 -1") are the dimensionless
coefficients which are inserted in front of the 1/r^12 and 1/r^6
terms. Mixing rules work for this pair style as well, so you don't
have to define coeffs for every atom pair. (See documentation in link
above.)
Let me know if you have any trouble using this.
If you want to create your own pair style, the relevant section of
the code are on lines 135 and following line 199 of
"pair_lj_charmm_coul_charmm_inter.cpp" (attached file).
int *molecule = atom->molecule;
:
and
:
if (molecule[i] == molecule[j]) {
do something
}
else {
do something else
}
Unfortunately for users browsing the mail-list-archives, the the
source files I attach end up getting embedded in the message body, so
nobody can easily compile them. Hopefully one day these files will be
included with LAMMPS. Until then, people can get these files from
moltemplate.org)
I do hope this is helpful to someone.
Andrew
pair_lj_charmm_coul_charmm_inter.cpp (36.3 KB)
pair_lj_charmm_coul_charmm_inter.h (3.55 KB)
pair_lj_remix.cpp (15.9 KB)
pair_lj_remix.h (8.98 KB)
pair_lj_softcore2.cpp (9.06 KB)
pair_lj_softcore2.h (2.61 KB)