compute group/group and hbond/dreiding/lj , coul/long and kspace

Dear all,

  1. When I use “compute group/group”, it doesn’t include the interaction from “hbond/dreiding/lj”, but “compute 1 all pe pair” includes it. Is it right? Is the “hbond/dreiding/lj” a pairwise potential? Is the energy assigned to Acceptor and Donor except Hydrogen?

  2. pair_coeff 1 2 lj/cut
    pair_coeff 3 4 lj/cut/coul/long
    If the kspace is defined, the long-range Coulombic interaction between 1 and 2 will be calculated, but the Coulombic interaction inside the cutoff won’t. Is that right?
    Thanks,

Erchia

Dear all,
1. When I use "compute group/group", it doesn't include the interaction from
"hbond/dreiding/lj", but "compute 1 all pe pair" includes it. Is it right?

no.

Is the "hbond/dreiding/lj" a pairwise potential?

it computes an interaction based on 3 atom positions as described in the manual

Is the energy assigned to Acceptor and Donor except Hydrogen?

no.

2. pair_coeff 1 2 lj/cut
    pair_coeff 3 4 lj/cut/coul/long
If the kspace is defined, the long-range Coulombic interaction between 1 and
2 will be calculated, but the Coulombic interaction inside the cutoff won't.
Is that right?

no. it is impossible to make any definite statement based on such a
limited data.

the long range interaction is not a pairwise additive interaction and
not computed in a pairwise fashion. kspace operates on the total
charge distribution, i.e. all atoms, all charges. coul/long plus ewald
or pppm doesn't work like this. there is not a hard switch between
real space and reciprocal space, but the real-space interaction is
damped and that is compensated in the reciprocal space calculation.
for more details please look at the corresponding text book
literature.

axel.

Thank you very much.

I have made some tests. The input files and data file are in the attachment. I use the oh.in for a initial run and rerun with the ohre.in.

1.
The group1 includes atoms of type 1,3,5.The group2 includes atoms of type 2,4,6.

The interaction in rerun is set as follows:

bond_style    harmonic
bond_coeff    1 13.878 1.410
bond_coeff    2 23.983 0.96
bond_coeff    3 13.878 1.410
bond_coeff    4 23.983 0.96
angle_style     harmonic
angle_coeff    1 2.1684 109.5
angle_coeff    2 2.3853 108.5
angle_coeff    3 2.1684 109.5
angle_coeff    4 2.3853 108.5
dihedral_style  opls
dihedral_coeff  1 0.1160 -0.1250 0.0445 0.0
dihedral_coeff  2 0.1160 -0.1250 0.0445 0.0
dielectric  1.0
kspace_style  pppm 1.0e-6

pair_style    hybrid/overlay airebo 2.5 1 1 hbond/dreiding/lj 4 3.3 3.5 150 lj/cut 10.0

pair_coeff    * * airebo CH.airebo C C NULL NULL NULL NULL
pair_coeff    1 2 none

pair_coeff    1 2 lj/cut 0 3.50

pair_coeff    1 3 lj/cut  0.0046 3.31
pair_coeff    1 4 lj/cut  0 3.31
pair_coeff    2 3 lj/cut  0 3.31
pair_coeff    2 4 lj/cut  0.0046 3.31

pair_coeff    1 5 lj/cut  0.0016 2.1954
pair_coeff    1 6 lj/cut  0 2.1954
pair_coeff    2 5 lj/cut  0 2.1954
pair_coeff    2 6 lj/cut  0.0016 2.1954

pair_coeff    3 3   lj/cut  0.0074 3.12
pair_coeff    4 4   lj/cut  0.0074 3.12
pair_coeff    3 4   lj/cut  0 3.12

pair_coeff    3 5  lj/cut 0.0025 2.0054
pair_coeff    3 6  lj/cut 0 2.0054
pair_coeff    4 5  lj/cut 0 2.0054
pair_coeff    4 6  lj/cut 0.0025 2.0054

pair_coeff    5 5 lj/cut  8.6738e-4 0.8909
pair_coeff    6 6 lj/cut  8.6738e-4 0.8909
pair_coeff    5 6 lj/cut  0 0.8909

pair_coeff    3   4 hbond/dreiding/lj 5 i 0.412 2.75 4 3.3 3.5 150
pair_coeff    3   4 hbond/dreiding/lj 6 j 0.412 2.75 4 3.3 3.5 150

2.
The bond/angle/dihedral is set within group1 or within group2. I think that the interactions between group1 and group2 include only hbond/dreiding/lj. 

variable fg1x  equal fcm(group1,x)
compute  gg2 group1 group/group group2 

Then I expect v_fg1x to be equal to c_gg2[1], but it is not. 

    fg1x               gg2[1]             hb[2]              gg2 
   1.2187068    0.44653855    -1.4602679    -0.70706156 
   1.2879289    0.49925357    -1.4481451    -0.69744661 
    3.455403     1.7042583      -1.4807506    -0.73413389 
   3.5109074    1.8085313      -1.4843104    -0.74254899 
   3.5116601    1.8692051      -1.4942932    -0.7569392 

3.
compute   hb all pair hbond/dreiding/lj

Is the hydrogen bond energy assigned in equal portions to each of the 3 atoms? What is the relation between c_hb[2] and c_gg2?

If hbond/dreiding/lj coefficient definition only holds the second sentence, c_hb[2] will be 0, while c_gg2 not.

     fg1x                gg2[1]     hb[2]                   gg2 
  0.47418177            0    -0.7532063              0 
  0.48747617            0    -0.75069852            0 
  0.49990658            0    -0.7466167              0 
  0.51103966            0    -0.74176143            0 
   0.5204707             0   -0.73735401             0 

Any suggestion would be appreciated.

Thanks,
Erchia

[oh.in|attachment](upload://jWY1buNgmv8Tp0LHwmpcvBtQsKg.in) (2.38 KB)



[ohre.in|attachment](upload://mOw8OYwG6L2AJadbgODBAkOB2fg.in) (2.05 KB)



[coh.data|attachment](upload://bZjNT7hke0HkEWnVp6Lfoh38DEn.data) (404 KB)



[CH.airebo|attachment](upload://UXeXev7hmzokxXiKzLL0Q2dxIL.airebo) (905 KB)
Thank you very much.

I have made some tests. The input files and data file are in the attachment. I use the oh.in for a initial run and rerun with the ohre.in.

1.
The group1 includes atoms of type 1,3,5.The group2 includes atoms of type 2,4,6.

The interaction in rerun is set as follows:

bond_style    harmonic
bond_coeff    1 13.878 1.410
bond_coeff    2 23.983 0.96
bond_coeff    3 13.878 1.410
bond_coeff    4 23.983 0.96
angle_style     harmonic
angle_coeff    1 2.1684 109.5
angle_coeff    2 2.3853 108.5
angle_coeff    3 2.1684 109.5
angle_coeff    4 2.3853 108.5
dihedral_style  opls
dihedral_coeff  1 0.1160 -0.1250 0.0445 0.0
dihedral_coeff  2 0.1160 -0.1250 0.0445 0.0
dielectric  1.0
kspace_style  pppm 1.0e-6

pair_style    hybrid/overlay airebo 2.5 1 1 hbond/dreiding/lj 4 3.3 3.5 150 lj/cut 10.0

pair_coeff    * * airebo CH.airebo C C NULL NULL NULL NULL
pair_coeff    1 2 none

pair_coeff    1 2 lj/cut 0 3.50

pair_coeff    1 3 lj/cut  0.0046 3.31
pair_coeff    1 4 lj/cut  0 3.31
pair_coeff    2 3 lj/cut  0 3.31
pair_coeff    2 4 lj/cut  0.0046 3.31

pair_coeff    1 5 lj/cut  0.0016 2.1954
pair_coeff    1 6 lj/cut  0 2.1954
pair_coeff    2 5 lj/cut  0 2.1954
pair_coeff    2 6 lj/cut  0.0016 2.1954

pair_coeff    3 3   lj/cut  0.0074 3.12
pair_coeff    4 4   lj/cut  0.0074 3.12
pair_coeff    3 4   lj/cut  0 3.12

pair_coeff    3 5  lj/cut 0.0025 2.0054
pair_coeff    3 6  lj/cut 0 2.0054
pair_coeff    4 5  lj/cut 0 2.0054
pair_coeff    4 6  lj/cut 0.0025 2.0054

pair_coeff    5 5 lj/cut  8.6738e-4 0.8909
pair_coeff    6 6 lj/cut  8.6738e-4 0.8909
pair_coeff    5 6 lj/cut  0 0.8909

pair_coeff    3   4 hbond/dreiding/lj 5 i 0.412 2.75 4 3.3 3.5 150
pair_coeff    3   4 hbond/dreiding/lj 6 j 0.412 2.75 4 3.3 3.5 150

2.
The bond/angle/dihedral is set within group1 or within group2. I think that the interactions between group1 and group2 include only hbond/dreiding/lj. 

variable fg1x  equal fcm(group1,x)
compute  gg2 group1 group/group group2 

Then I expect v_fg1x to be equal to c_gg2[1], but it is not. 

    fg1x               gg2[1]             hb[2]              gg2 
   1.2187068    0.44653855    -1.4602679    -0.70706156 
   1.2879289    0.49925357    -1.4481451    -0.69744661 
    3.455403     1.7042583      -1.4807506    -0.73413389 
   3.5109074    1.8085313      -1.4843104    -0.74254899 
   3.5116601    1.8692051      -1.4942932    -0.7569392 

3.
compute   hb all pair hbond/dreiding/lj

Is the hydrogen bond energy assigned in equal portions to each of the 3 atoms? What is the relation between c_hb[2] and c_gg2?

If hbond/dreiding/lj coefficient definition only holds the second sentence, c_hb[2] will be 0, while c_gg2 not.

     fg1x                gg2[1]     hb[2]                   gg2 
  0.47418177            0    -0.7532063              0 
  0.48747617            0    -0.75069852            0 
  0.49990658            0    -0.7466167              0 
  0.51103966            0    -0.74176143            0 
   0.5204707             0   -0.73735401             0 

Any suggestion would be appreciated.

Thanks,
Erchia

[oh.in|attachment](upload://jWY1buNgmv8Tp0LHwmpcvBtQsKg.in) (2.38 KB)



[ohre.in|attachment](upload://mOw8OYwG6L2AJadbgODBAkOB2fg.in) (2.05 KB)



[coh.data|attachment](upload://bZjNT7hke0HkEWnVp6Lfoh38DEn.data) (404 KB)
The previous submission doesn't show the text in the mailing list. I guess that it is because of the attachment. Then  I delete them and try another mail.
I have made some tests. The input files and data file are in the previous attachment. I use the oh.in for a initial run and rerun with the ohre.in.
1.
The group1 includes atoms of type 1,3,5.The group2 includes atoms of type 2,4,6.

The interaction in rerun is set as follows:

bond_style    harmonic
bond_coeff    1 13.878 1.410
bond_coeff    2 23.983 0.96
bond_coeff    3 13.878 1.410
bond_coeff    4 23.983 0.96
angle_style     harmonic
angle_coeff    1 2.1684 109.5
angle_coeff    2 2.3853 108.5
angle_coeff    3 2.1684 109.5
angle_coeff    4 2.3853 108.5
dihedral_style  opls
dihedral_coeff  1 0.1160 -0.1250 0.0445 0.0
dihedral_coeff  2 0.1160 -0.1250 0.0445 0.0
dielectric  1.0
kspace_style  pppm 1.0e-6

pair_style    hybrid/overlay airebo 2.5 1 1 hbond/dreiding/lj 4 3.3 3.5 150 lj/cut 10.0

pair_coeff    * * airebo CH.airebo C C NULL NULL NULL NULL
pair_coeff    1 2 none

pair_coeff    1 2 lj/cut 0 3.50

pair_coeff    1 3 lj/cut  0.0046 3.31
pair_coeff    1 4 lj/cut  0 3.31
pair_coeff    2 3 lj/cut  0 3.31
pair_coeff    2 4 lj/cut  0.0046 3.31

pair_coeff    1 5 lj/cut  0.0016 2.1954
pair_coeff    1 6 lj/cut  0 2.1954
pair_coeff    2 5 lj/cut  0 2.1954
pair_coeff    2 6 lj/cut  0.0016 2.1954

pair_coeff    3 3   lj/cut  0.0074 3.12
pair_coeff    4 4   lj/cut  0.0074 3.12
pair_coeff    3 4   lj/cut  0 3.12

pair_coeff    3 5  lj/cut 0.0025 2.0054
pair_coeff    3 6  lj/cut 0 2.0054
pair_coeff    4 5  lj/cut 0 2.0054
pair_coeff    4 6  lj/cut 0.0025 2.0054

pair_coeff    5 5 lj/cut  8.6738e-4 0.8909
pair_coeff    6 6 lj/cut  8.6738e-4 0.8909
pair_coeff    5 6 lj/cut  0 0.8909

pair_coeff    3   4 hbond/dreiding/lj 5 i 0.412 2.75 4 3.3 3.5 150
pair_coeff    3   4 hbond/dreiding/lj 6 j 0.412 2.75 4 3.3 3.5 150

2.
The bond/angle/dihedral is set within group1 or within group2. I think that the interactions between group1 and group2 include only hbond/dreiding/lj. 

variable fg1x  equal fcm(group1,x)
compute  gg2 group1 group/group group2 

Then I expect v_fg1x to be equal to c_gg2[1], but it is not. 

    fg1x               gg2[1]             hb[2]              gg2 
   1.2187068    0.44653855    -1.4602679    -0.70706156 
   1.2879289    0.49925357    -1.4481451    -0.69744661 
    3.455403     1.7042583      -1.4807506    -0.73413389 
   3.5109074    1.8085313      -1.4843104    -0.74254899 
   3.5116601    1.8692051      -1.4942932    -0.7569392 

3.
compute   hb all pair hbond/dreiding/lj

Is the hydrogen bond energy assigned in equal portions to each of the 3 atoms? What is the relation between c_hb[2] and c_gg2?

If hbond/dreiding/lj coefficient definition only holds the second sentence, c_hb[2] will be 0, while c_gg2 not.

     fg1x                gg2[1]     hb[2]                   gg2 
  0.47418177            0    -0.7532063              0 
  0.48747617            0    -0.75069852            0 
  0.49990658            0    -0.7466167              0 
  0.51103966            0    -0.74176143            0 
   0.5204707             0   -0.73735401             0 

Any suggestion would be appreciated.

Thanks,
Erchia

The previous submission doesn't show the text in the mailing list. I guess
that it is because of the attachment. Then I delete them and try another
mail.

what you are asking for is basically to debug a very complex input file.
nobody will do that for you. my suggestion is to follow the general
advice that we always give in such cases: build a very(!) small test
case and then add the individual components to your system in small
steps and verify at each step, that everything is working according to
your expectations. if not, please try to isolate the feature that
doesn't work and build a test case that contains only the misbehaving
component and as few other features as possible.
what you currently have is one big maze and it would take somebody
external a long time to analyze and take apart.

axel.

Thank you for your suggestion.

This data file contains fewer atoms. I hope i would be easier to check their coordinates.
If the group1 includes atoms of type 1,3,5, and the group2 includes atoms of type 2,4,6 as expected,
the interactions between group1 and group2 includes:
pair_coeff * * airebo CH.airebo C C NULL NULL NULL NULL
pair_coeff 1 2 none

pair_coeff 1 4 lj/cut 0 3.31
pair_coeff 2 3 lj/cut 0 3.31

pair_coeff 1 6 lj/cut 0 2.1954
pair_coeff 2 5 lj/cut 0 2.1954

pair_coeff 3 4 lj/cut 0 3.12

pair_coeff 3 6 lj/cut 0 2.0054
pair_coeff 4 5 lj/cut 0 2.0054

pair_coeff 5 6 lj/cut 0 0.8909

pair_coeff 3 4 hbond/dreiding/lj 5 i 0.412 2.75 4 3.3 3.5 150
pair_coeff 3 4 hbond/dreiding/lj 6 j 0.412 2.75 4 3.3 3.5 150
Then the interaction between group1 and group2 is only hbond/dreiding/lj.

variable fg1x equal fcm(group1,x)
compute gg2 group1 group/group group2
I think v_fg1x will be equal to c_gg2[1], but it is not.

Any suggestion would be appreciated.

Thanks,
Erchia


coh.data (12.8 KB)

Thank you for your suggestion.

This data file contains fewer atoms. I hope i would be easier to check their
coordinates.

it is not the data file that is the problem. you should also simplify
the input and provide a complete one.

If the group1 includes atoms of type 1,3,5, and the group2 includes atoms of
type 2,4,6 as expected,
the interactions between group1 and group2 includes:

pair_coeff * * airebo CH.airebo C C NULL NULL NULL NULL
pair_coeff 1 2 none

this section worries me. i don't think this can work as expected. if i
understand what you want to do correctly, you have to specify airebo
on the pair style line twice and have two pair_coeff statements.
please also note that airebo does not support group/group computes.

pair_coeff 1 4 lj/cut 0 3.31
pair_coeff 2 3 lj/cut 0 3.31
pair_coeff 1 6 lj/cut 0 2.1954
pair_coeff 2 5 lj/cut 0 2.1954
pair_coeff 3 4 lj/cut 0 3.12
pair_coeff 3 6 lj/cut 0 2.0054
pair_coeff 4 5 lj/cut 0 2.0054
pair_coeff 5 6 lj/cut 0 0.8909
pair_coeff 3 4 hbond/dreiding/lj 5 i 0.412 2.75 4 3.3 3.5 150
pair_coeff 3 4 hbond/dreiding/lj 6 j 0.412 2.75 4 3.3 3.5 150
Then the interaction between group1 and group2 is only hbond/dreiding/lj.

variable fg1x equal fcm(group1,x)
compute gg2 group1 group/group group2
I think v_fg1x will be equal to c_gg2[1], but it is not.

have you tried using a simpler potential for the carbons?

Thank you very much.
1、
pair_style hybrid/overlay airebo 2.5 1 1 lj/cut 10.0 hbond/dreiding/lj 4 3.3 3.5 150 airebo 2.5 1 1
pair_coeff * * airebo 1 CH.airebo C NULL NULL NULL NULL NULL
pair_coeff * * airebo 2 CH.airebo NULL C NULL NULL NULL NULL
2、
pair_coeff * * airebo CH.airebo C C NULL NULL NULL NULL
pair_coeff 1 2 none
The results with the first setting and second setting seem to be the same.
The airebo acts within atom type 1 and atom type 2, but not between atom type 1 and atom type 2.
Should I try the DREIDING force field for the carbons?
If I don’t define the hbond/dreiding/lj pairwise interaction,
variable fg1x equal fcm(group1,x)
compute gg2 group1 group/group group2
v_fg1x and c_gg2[1] will give the same results.
I would doubt that I have made some mistakes about hbond/dreiding/lj.

Thanks,
Erchia

Thank you very much.
1、
pair_style hybrid/overlay airebo 2.5 1 1 lj/cut 10.0 hbond/dreiding/lj 4
3.3 3.5 150 airebo 2.5 1 1
pair_coeff * * airebo 1 CH.airebo C NULL NULL NULL NULL NULL
pair_coeff * * airebo 2 CH.airebo NULL C NULL NULL NULL NULL
2、
pair_coeff * * airebo CH.airebo C C NULL NULL NULL NULL
pair_coeff 1 2 none
The results with the first setting and second setting seem to be the same.
The airebo acts within atom type 1 and atom type 2, but not between atom
type 1 and atom type 2.

i would still strongly favor the first solution, as that works by
design. the second option by chance.

Should I try the DREIDING force field for the carbons?

no. i think you have conclusively proven that this part of the setup
is working as expected.

If I don't define the hbond/dreiding/lj pairwise interaction,
variable fg1x equal fcm(group1,x)
compute gg2 group1 group/group group2
v_fg1x and c_gg2[1] will give the same results.
I would doubt that I have made some mistakes about hbond/dreiding/lj.

this observation - in combination with the check from above -
suggests, that there may be an inconsistency between the ::compute()
method and the ::single() method in the dreiding pair style. i would
suggest to build a test case that has only three atoms in a large box
and one dreiding/hbond style defined and nothing else. then the
regular computed energy and forces should be identical with those from
compute group/group. if not, i would move atoms around a bit, so you
can see whether this is distance or angle dependent and then compare
the source code. perhaps there is a factor missing or a prefactor has
the wrong sign or atoms are considered in the wrong order.

axel.

Thanks for answering my email so quickly.

I build a test case that has four atoms. The group1 includes atoms of type 1,2, and the group2 includes atoms of type 3,4.

input file:

dimension 3
units metal
boundary p p p

atom_style full
neighbor 3.0 bin
neigh_modify delay 0 every 1 check yes
read_data coh5.data

bond_style harmonic
bond_coeff 1 23.983 0.96

pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/lj 4 3.3 3.5 150

pair_coeff 1 1 lj/cut 0.0074 3.12
pair_coeff 3 3 lj/cut 0.0074 3.12
pair_coeff 1 3 lj/cut 0 3.12

pair_coeff 1 2 lj/cut 0.0025 2.0054
pair_coeff 1 4 lj/cut 0 2.0054
pair_coeff 2 3 lj/cut 0 2.0054
pair_coeff 3 4 lj/cut 0.0025 2.0054

pair_coeff 2 2 lj/cut 8.6738e-4 0.8909
pair_coeff 4 4 lj/cut 8.6738e-4 0.8909
pair_coeff 2 4 lj/cut 0 0.8909

pair_coeff 1 3 hbond/dreiding/lj 2 i 0.412 2.75 4 3.3 3.5 150
pair_coeff 1 3 hbond/dreiding/lj 4 j 0.412 2.75 4 3.3 3.5 150

region r1 block INF INF INF INF INF 0.3 units box
region rt block INF INF INF INF 0.3 INF units box

group group2 region r1
group group1 region rt

variable fg1x equal fcm(group1,x)

compute hb all pair hbond/dreiding/lj
variable nhb equal c_hb[1]
variable ehb equal c_hb[2]

compute gg2 group1 group/group group2

timestep 0.001

thermo_style custom v_fg1x c_gg2[1] c_hb[2] c_hb[1] c_gg2

thermo 1

run 1

Results:

fg1x gg2[1] hb[2] hb[1] gg2
1.7759315 0.003058996 -0.72879179 2 -0.40814027
1.7759315 0.003058996 -0.72879179 2 -0.40814027

The v_fg1x is not equal to c_gg2[1] while I expect that interaction between group1 and group2 is only hbond/dreiding/lj.

1、
pair_coeff 1 3 hbond/dreiding/lj 2 i 0.412 2.75 4 3.3 3.5 150
#pair_coeff 1 3 hbond/dreiding/lj 4 j 0.412 2.75 4 3.3 3.5 150

Results:

fg1x gg2[1] hb[2] hb[1] gg2
1.7990464 0.003058996 -0.40814027 1 -0.40814027
1.7990464 0.003058996 -0.40814027 1 -0.40814027

The v_fg1x is not equal to c_gg2[1] even if c_hb[2] is equal to c_gg2. The group/group includes all the energy from hbond/dreiding/lj?

2、
#pair_coeff 1 3 hbond/dreiding/lj 2 i 0.412 2.75 4 3.3 3.5 150
pair_coeff 1 3 hbond/dreiding/lj 4 j 0.412 2.75 4 3.3 3.5 150

Results:

fg1x gg2[1] hb[2] hb[1] gg2
1.8134486 0 -0.32065152 1 0
1.8134486 0 -0.32065152 1 0

Now the group/group doesn’t include the energy from hbond/dreiding/lj. Maybe there is something different between donor flag i and j.

3、
#pair_coeff 1 3 hbond/dreiding/lj 2 i 0.412 2.75 4 3.3 3.5 150
#pair_coeff 1 3 hbond/dreiding/lj 4 j 0.412 2.75 4 3.3 3.5 150

Results:

fg1x gg2[1] gg2
1.8365636 0 0
1.8365636 0 0

I can’t find what results in the force v_fg1x. Does the force in the group has any effect?

4、
bond_style harmonic
bond_coeff 1 0 0.96

pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/lj 4 3.3 3.5 150

pair_coeff 1 1 lj/cut 0 3.12
pair_coeff 3 3 lj/cut 0 3.12
pair_coeff 1 3 lj/cut 0 3.12

pair_coeff 1 2 lj/cut 0 2.0054
pair_coeff 1 4 lj/cut 0 2.0054
pair_coeff 2 3 lj/cut 0 2.0054
pair_coeff 3 4 lj/cut 0 2.0054

pair_coeff 2 2 lj/cut 0 0.8909
pair_coeff 4 4 lj/cut 0 0.8909
pair_coeff 2 4 lj/cut 0 0.8909

pair_coeff 1 3 hbond/dreiding/lj 2 i 0.412 2.75 4 3.3 3.5 150
pair_coeff 1 3 hbond/dreiding/lj 4 j 0.412 2.75 4 3.3 3.5 150

results:

fg1x gg2[1] hb[2] hb[1] gg2
-0.060632104 0.003058996 -0.72879179 2 -0.40814027
-0.060632104 0.003058996 -0.72879179 2 -0.40814027

I think there is interaction of only hbond/dreiding/lj style. The inconsistency still exists, and the v_fg1x is quite different from that in the previous results.

Thanks,
Erchia

oh4.in (1.32 KB)

coh5.data (455 Bytes)

now you have all the clues and details and can track down in the
source code, where the problem originates. as i mentioned the
::compute() method is invoked by the regular force compute and the
single() method as part for compute group/group, thus both have to be
consistent with this.

axel.