neigh_modify cluster yes

Hi all,

There seems to be a small bug in neigh_bond.cpp. I get a segmentation fault if I execute the command ‘neigh_modify cluster yes’, namely in
LAMMPS_NS::Neighbor::angle_check() at neigh_bond.cpp:250

It is in a loop over all angles, but it ranges till nbondlist. The fault doesn’t occur any more when I replace nbondlist by nanglelist. Also I think that the number 1 in line 252 should be replaced by 2. Although I don’t use dihedrals, an equivalent situation seems to happen in dihedral_check().

I thought I better let you know, as other people might experience similar problems in the future.

Thanks,
Bart

Hi all,

hi bart,

There seems to be a small bug in neigh_bond.cpp. I get a segmentation fault
if I execute the command 'neigh_modify cluster yes', namely in
LAMMPS_NS::Neighbor::angle_check() at neigh_bond.cpp:250

It is in a loop over all angles, but it ranges till nbondlist. The fault
doesn't occur any more when I replace nbondlist by nanglelist. Also I think
that the number 1 in line 252 should be replaced by 2. Although I don't use
dihedrals, an equivalent situation seems to happen in dihedral_check().

yes. you are right. these are all rather obvious bugs. also not all
tests that are advertised in the documentation are done.
i'm including these bugfixes in my lammps-icms tree and will feed them
to steve with the next batch of my own bugfixes and tweaks tomorrow.

I thought I better let you know, as other people might experience similar
problems in the future.

thanks. this is much appreciated,
      axel.

please find attached the total changes (so far). they affect angles, too.

good luck,
     axel.

neigh_bond.cpp (18 KB)

neighbor.h (15.4 KB)

yes - these were bugs - will be fixed in a patch today

Thanks,
Steve