pair hybrid and compute group/group

Dear all,

I have a system as follows:

B: co2
interaction between water(tip4p): pair_style lj/cut/tip4p/long
interaction between CO2: pair_style lj/cut/coul/long
interaction between water(tip4p)-CO2: pair_sytle lj/cut/coul/long (If I use this pairstyle for water-co2, will the system know that my water is tip4p?)

Based on these interactions I am using the command line as follows:

pair_style hybrid lj/cut/coul/long 15.0 lj/cut/tip4p/long 1 2 1 1 0.1577 15.000

And in my data production, I will need to calculate the potential energy of A-A, B-B, and A-B. I searched the manual and find that ‘compute group/group’ is the right command I should use, and then I got the error message as follows:
" Pair hybrid sub-style does not support single call (…/pair_hybrid.cpp:686)"

Does this mean the hybird pair style is not compatible with the compute group/group? If this is true, what alternatives do i have to calculate PE for a certain group? I cannot use compute pe/atom, because I don’t want the PE contribution from interactions of atoms outside the group.

Any help will be appreciated and thank you all for your attention.

Best,
Qianping

Dear all,

I have a system as follows:
A: water(tip4p)
B: co2
interaction between water(tip4p): pair_style lj/cut/tip4p/long
interaction between CO2: pair_style lj/cut/coul/long
interaction between water(tip4p)-CO2: pair_sytle lj/cut/coul/long (If I use
this pairstyle for water-co2, will the system know that my water is tip4p?)

no. this setup is wrong. you have to use lj/cut/tip4p/long for *everything*.

Based on these interactions I am using the command line as follows:
pair_style hybrid lj/cut/coul/long 15.0 lj/cut/tip4p/long 1 2 1 1 0.1577
15.000

no hybrid pair style is needed here.

And in my data production, I will need to calculate the potential energy of
A-A, B-B, and A-B. I searched the manual and find that 'compute
group/group' is the right command I should use, and then I got the error
message as follows:
" Pair hybrid sub-style does not support single call
(../pair_hybrid.cpp:686)"

Does this mean the hybird pair style is not compatible with the compute
group/group? If this is true, what alternatives do i have to calculate PE

it is not pair style hybrid that has the problem, but
lj/cut/tip4p/long. it is missing the implementation of the
Pair::single() method, which is essential for compute group/group,
since all of those group-group interactions have to be computed
separately.

for a certain group? I cannot use compute pe/atom, because I don't want the
PE contribution from interactions of atoms outside the group.

Any help will be appreciated and thank you all for your attention.

you have a number of options. which one is best depends on your
requirements and your willingness and ability to modify the code.

1) the only solution that doesn't require changing code is to use
lj/cut/coul/long and implement tip4p as a real 4-site model using fix
rigid as an integrator. you have to assign a tiny mass to the massless
site M to make this work, but it does work. that requires a shorter
time step and you have more pair interactions to compute. compute
group/group will work well with this.

2) you implement the single() method into the tip4p pair styles (no
idea how complicated that may be. could be easy, could be difficult).

3) you implement a variant of the lj/cut/tip4p/long pair style that
automatically keeps track of those 3 types of energies (tip4p-tip4p,
tip4p-other, other-other). that information can be extracted similar
to how the dreiding hbond pair styles communicate the hydrogen bond
statistics. this option would be significantly more efficient than the
others, but also requires the most knowledge of how to modify LAMMPS.

axel.

it is not pair style hybrid that has the problem, but
lj/cut/tip4p/long. it is missing the implementation of the
Pair::single() method, which is essential for compute group/group,

It is “missing”, b/c that pair style does complex things
to essentially compute non-pairwise interactions between

2 entire waters, including the fictitious mass points. Thus

it doesn’t really make sense to pass it an I,J pair of atoms
and expect the force between them as output. Force is
actually computed on all the atoms in both waters.

Steve

it is not pair style hybrid that has the problem, but
lj/cut/tip4p/long. it is missing the implementation of the
Pair::single() method, which is essential for compute group/group,

It is "missing", b/c that pair style does complex things
to essentially compute non-pairwise interactions between
2 entire waters, including the fictitious mass points. Thus
it doesn't really make sense to pass it an I,J pair of atoms

well, since for the rest of the code it is assumed that the forces of
the M point projected on O and H are adequate, it should be adequate
to have this for the single() method, too. since the tip4p styles
require a specific data layout, it would be very inefficient but not
impossible to do this, IMO.

axel.