pair energy calculation

Hi! Could anyone help me with pair energy calculation?

I have 2 atom types. 1 -1 interacts with tersoff pair style, 2-2 and 1-2 both interact with morse pair style.

Here is a part of my script:

pair_style hybrid tersoff morse 2.5 morse 2.5

pair_coeff * * tersoff SiC.tersoff Si NULL

pair_coeff 1 2 morse 1 0.2274 1.5390 4.4992 2.5

pair_coeff 2 2 morse 2 2.4230 2.5550 2.522

I’d like to calculate pair energy separately for each interaction: 1-1, 1-2 and 2-2.

As far as I could understand this line calculate pair energy for all atoms in the system not only for 1-1 interactions.

compute enp_11 all pair tersoff epair

These lines don’t work.

compute enp_12 all pair morse 1 epair

compute enp_22 all pair morse 2 epair

How can I organize correct pair energy calculation?

Thank you,

Oksana.

Hi! Could anyone help me with pair energy calculation?

I have 2 atom types. 1 -1 interacts with tersoff pair style, 2-2 and 1-2
both interact with morse pair style.

Here is a part of my script:

pair_style hybrid tersoff morse 2.5 morse 2.5

pair_coeff * * tersoff SiC.tersoff Si NULL

pair_coeff 1 2 morse 1 0.2274 1.5390 4.4992 2.5

pair_coeff 2 2 morse 2 2.4230 2.5550 2.522

I’d like to calculate pair energy separately for each interaction: 1-1, 1-2
and 2-2.

As far as I could understand this line calculate pair energy for all atoms
in the system not only for 1-1 interactions.

compute enp_11 all pair tersoff epair

first off, this compute does not "compute" anything, it merely signals
the pair style to collect the desired information in a specific
location.
second, this will collect the contribution to epair from all tersoff
interactions, which just happen to be interactions between type 1
atoms only in your setup. the documentation clearly states, that the
group information is ignored.

These lines don’t work.

compute enp_12 all pair morse 1 epair

compute enp_22 all pair morse 2 epair

How can I organize correct pair energy calculation?

that is because compute pair in its current implementation predates
allowing multiple substyles of the same kind in hybrid pair styles and
thus does not support it. you need to modify the LAMMPS source to
support the kind of calculation you want to do. the simplest way would
be to make the following change to the source:

diff --git a/src/pair_morse.h b/src/pair_morse.h
index 83cf327..674782b 100644
--- a/src/pair_morse.h
+++ b/src/pair_morse.h
@@ -14,6 +14,7 @@
#ifdef PAIR_CLASS

PairStyle(morse,PairMorse)
+PairStyle(morse2,PairMorse)

#else

which will result in having two differently names morse styles (morse
and morse2). if you use this, you don't need the "1" or "2" substyle
designators.

axel.