possible bug in fix_srd.cpp

Hi Steve,

I have been simulating a big rigid molecule in a srd solvent. I was getting the error - Fix SRD: too many big particles in bin.
In the debugging process I disabled the line - error->one(FLERR,“Fix SRD: too many big particles in bin”); and rerun the simulation. My simulation run fine and at the end I visualize my big molecule in VMD.
It didn’t collapse or nothing like that happened. So I am sure, I never have more than 30 big particles in any srd bin.

I checked the LAMMPS mailing list, some one also had a similar problem when simulating a wall. They argued that they also don’t have more than 30 particles in the SRD bin.

Then, I have added these two lines to the fix_srd.cpp file -

if (nbinbig[jbin] > 0)
printf("\n%d %d %d \n", nbinbig[jbin]);

I have just 500 big particles in my system, but this line printed to the output much more than 500 times with each bin having only 1 big particle at the first step of my simulation …

So I think, something is wrong in the nbinbig[jbin] counting which is giving the error - Fix SRD: too many big particles in bin.

Increasing the ATOMPERBIN value from 30 to a higher value (even 200) only delaying the error by few thousand steps more.

Could you please look in to it …

Thank you very much.

Can you post a simple input script that has the problem?
Preferably on 1 proc.

I see no problem with examples/srd/in.srd.mixture. The
max is 3 per bin over the entire run.

Note that this is an error for search bins, not SRD bins.
They do not have to be the same size, depending on
what you specified in the fix srd command. Also, if
the error message is triggered, you are certainly going
out of bounds in the array that stores the list of big particles
per bin, so I can't imagine you are not getting memory errors,
even if the simulation runs correctly.

Steve