lammps crashes on special bond command

Hi,

when I use “special_bonds” with “angle yes”, the last line on the screen while setting up the run is: "# of 1-3 neighbors before angle trim" and then LAMMPS crashes.
this doesn’t happen with “dihedral yes” or default values.

I have N atoms all bonded after each other making a one single chain(without any branch). there are 2 atom types alternating every 3 atoms(111222111222). lj and a 180 degree angle potential is applied to type 1 and shifted truncated lj with no angle potential applied to type 2. and I use NVT for time integration.

I appreciate if anyone had similar experience and knows how to fix this. as far as I went through manual, there is no restriction to use angle yes and angle atoms definition in my data file is as described in manual.

Best,

Hamed.

Hi,

when I use "special_bonds" with "angle yes", the last line on the screen
while setting up the run is: "# of 1-3 neighbors before angle trim" and then
LAMMPS crashes.
this doesn't happen with "dihedral yes" or default values.

I have N atoms all bonded after each other making a one single chain(without
any branch). there are 2 atom types alternating every 3 atoms(111222111222).
lj and a 180 degree angle potential is applied to type 1 and shifted
truncated lj with no angle potential applied to type 2. and I use NVT for
time integration.

this description is useless. please provide a (small) input example.

I appreciate if anyone had similar experience and knows how to fix this. as
far as I went through manual, there is no restriction to use angle yes and
angle atoms definition in my data file is as described in manual.

segmentation faults should not happen. it means that either you are
doing something that is extremely careless or you run into a bug.
either way, it can only be investigated through having an input.

axel.

Thanks for quick reply,
here is input, it’s appreciated if you have a look.

Cheers,

Hamed.

Thanks for quick reply,
here is input, it's appreciated if you have a look.

Cheers,

Hamed.

units lj
dimension 3
boundary p p p
atom_style angle

read_data data_long.dat

where is data_long.dat ?

a.

appended:

this is incomplete and thus useless.

axel.

sorry, I attach both the file here.

Cheers,

Hamed.

data_long.dat (644 KB)

in_strain.dat (671 Bytes)

thanks.

it looks like you have found a bug. LAMMPS was making some
assumptions, that are not valid for your input.

please extract and unzip the attached file, replace the one in your
LAMMPS distribution with it and recompile.
note, this is taken from the current version of LAMMPS, so it may not
work with older versions.

axel.

special.cpp.gz (4.87 KB)

great! thanks for help.

I use 30 Sep 2013, windows package. but I couldn’t locate special.cpp
is it hidden or some where different than LAMMPS folder?

Hamed.

Look in lammps/src/ folder.

great! thanks for help.

I use 30 Sep 2013, windows package. but I couldn't locate special.cpp
is it hidden or some where different than LAMMPS folder?

neither. the windows package is a pre-compiled binary and does not
contain any source code.

but you got (very) lucky since i just updated the pre-compiled
binaries and thus you can uninstall your current version and download
and install the latest version, which has the datestamp 20131025.

axel.

good timing! :slight_smile:

cheers,

Hamed.

This will also be included in today’s patch.
Thanks for the fix Axel

Steve

I also had some problems with crashes, even after the fix in special.cpp. The patch seems to have introduced a new small bug in line 689. It can be resolved by changing

if (num_dihedral && atom->ndihedrals) nbuf + 22num_dihedral[i];

to:

if (num_dihedral && atom->ndihedrals) nbuf += 22num_dihedral[i];

Note the extra equality sign.

Thanks,
Bart

I also had some problems with crashes, even after the fix in special.cpp.
The patch seems to have introduced a new small bug in line 689. It can be
resolved by changing

thanks. that is a nasty one. i've added it to LAMMPS-ICMS and
(re-)send it to steve, in case he doesn't notice your mail. :wink:

axel.

got it - wiil be in next patch …

thanks,
Steve