[lammps-users] On the pair hybrid style

Dear all,

I’m trying to simulate water transport inside a carbon nanotube (CNT). I use the Tersoff for CNT and lj/cut/coul/long for H2O. The input file looks like

Can you send me your input script and data file - I'll
see if I can reproduce the problem.


Dear Steve,

I finally found that this problem is NOT due to the compatibility between pairs tersoff and lj/cut/coul/long.
I have attached the input and configuration files in this email.

Based on this input, if I set

pair_style hybrid lj/cut/coul/long 10.0 10.0 tersoff

it worked fine. But if I set

pair_style hybrid lj/cut/coul/long 10.0 20.0 tersoff

the previous problem arised.

I ‘googled’ this problem and found that it might be cause by small memory size. However, I have 1GB mem, which should be OK for the test.

Any suggestion?

c.tersoff.real (578 Bytes)

WaterCNT.dat (227 KB)

WaterCNT.in (2.49 KB)

Dear Steve,

I found the LAMMPS stoped at neigh_derive.cpp:139, i.e., the index j exceeded the array bound.
This problem might be arised from the special_flag for kspace, see

neighbour.cpp Neighbor::init() line 256-282
neigh_full.cpp Neighbor::full_bin() line 168-172

Best regards,

Yonggang Zheng
Dalian University of Technology

在2007-11-01,“Steve Plimpton” <[email protected]…24…> 写道:

Just posted a patch that fixes this. I think if you run
with a really long cutoff on the lj/cut/coul/long you will
run slow since the Tersoff potential will also have a long
cutoff. This is an example where LAMMPS isn't as smart
as it should be about building multiple neighbor lists
with widely varying cutoffs. But in your case, there is
no need for a long Coulomb cutoff since you are running
kspace anyway.

Thanks for the scripts,