Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
A partial fix for ReaxFF failure when the number of atoms increases during a simulation #1352
This pull request fixes partially a long-standing issue of ReaxFF and increasing number of atoms. Briefly, if the number of atoms increase too much during a simulation, LAMMPS exits with an error similar to the one below:
Michał Kański, Jagiellonian University
By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).
Two arrays (num_bonds and num_hbonds) in fix_reaxc.cpp are used for selecting space for bonds of a given atom. At the beginning the arrays are not fully initialized, which leads to problems when the number of atoms increases. The fix is to initialize the entire arrays.
This is only a partial fix, because "mincap" keyword has to be used as in the attached example. There is also a corner case which remains unaddressed - the simulation will fail if there is at least one MPI thread without any ReaxFF bonds/hbonds. However, I think that this pull request can be merged as-is since it solves most of the problems.
Post Submission Checklist
Please check the fields below as they are completed after the pull request has been submitted
Further Information, Files, and Links
input.in.txt - It creates a water molecule file and uses it with fix deposit and ReaxFF.
sjplimp left a comment
This looks fine. However, is it also important that when
If so, the local nmax can be stored (and updated in grow_arrays),