[lammps-users] how to calculate vdw interaction energy between different CNT molecules?

Hi,all

I use AIREBO potential(E_REBO, LJ_flag=0,TORSION_flag=0) to describe the bond interaction in CNT molecules,
LJ potential to describe interaction between different CNT molecules (pair_style hybrid lj/cut 10 airebo 3.0 0.0 0.0)

I hope to obtain the vdw interaction energy between diffenerent CNT molecules. From manual, I see command “compute group/group” can’t work with
AIREBO.How should I do?

Thank you!

Cun Zhang

Dear Cun

As Zhun-Yong has said before :

If you want to compute the energy contribution from the lj/cut
interaction only, then you can just go to compute_group_group.cpp and
comment out the first four lines of ComputeGroupAtom::init() and
recompile the source code. That is of course assuming that the energy
contribution is from the lj/cut only and not from the airebo or
lj/coul. It won’t work if it were the latter case.

Here it is.

Farrokh

compute_group_group.cpp (5.68 KB)

A small correction should be in order. What I'd said was not quite
correct. It should be the first four lines of
ComputeGroupGroup::init() that gets commented out. ComputeGroupAtom is
a per-atom class that I wrote for my own private use.

The .cpp file supplied by farrokh is still correct though.

Zhun-Yong

Dear Farrokh and Zhun-Yong,

Thank you!
I have modified compute_group_group.cpp and recompile it. And it works now!

Chears

Cun Zhang

I posted a 25Aug patch that has compute group/group
and pair hybrid make a more careful check of whether to
allow the pairwise interactions to be computed. So it
should just work now w/out you changing the src code.
You still can't use compute group/group between atoms
interacting with a AIREBO potential, but that's b/c it
is ill-defined.

Steve