Fix reax/c/species and PBC

Dear Ray,

hi.

I changed fix reax/c/species so that it now takes periodic boundary conditions into account while calculating molecule positions. I also changed the reneighboring resetting procedure to avoid rare reneighboring we talked about previously.

Files are attached.

Best regards,
Oleg Sergeev,
VNIIA.

reaxc_species_pbc.tar.gz (12.7 KB)

Thanks, I will take a look and send this in if it makes reasonable sense.

Ray

Hi Oleg,

Thanks again for sending this modification. I appreciate your taking initiative in fixing the non-trivial PBC problem with the position keyword. I like your re-neighboring idea, and I will take a closer look at it.

However, there are several other problems regarding the modification.

  1. The fix generates a seg fault using the C2 example you posted a while ago.

  2. The fix has memory leaks, particularly from the PBCconmolmap and x0molmap arrays.

  3. With the PETN crystal example attached in this post, the center-of-mass positions of only two PETN molecules in one unitcell does not seem to be correct. To elaborate, please see the attached snapshot of a PETN unitcell with one molecule colored blue and one red. Intuitively, the blue molecule, which does not wrap around the PBC, should have a CoM position of close to 0.5 in x. However, the position output indicates otherwise.

When these problems are fixed, I think it will be ready to be included in the distro.

Thanks,
Ray

petn.png