Using moltemplate for ReaxFF simulation

Dear Andrew,

I am using lammps-daily executable on a Linux machine, and I updated it as per directions on LAMMPS website. I still get the segmentation fault. I have simplified my structure and uploaded relevant files which should be able to help anyone reproduce the segfault. The link is: https://uofi.box.com/s/ac1q4uv9xcugh9ljcq8gzytku5vwu8a9

The file pmmaReax.data currently has the data which produces segmentation fault. It does run for a few time steps though, and the trajectory data can be visualized to see the same.

I get the segfault when I simulate 1 or 3 chains, but the simulation runs fine for 2 chains. You can try this by executing runMoltemplate_2.sh (it simply changes the number of polymer chains in system.lt to 2 from 1 or 3; this may be done manually to check for other cases as well). I have not yet verified suitability of the chosen force field parameters to the polymer I am simulating, this was only for practicing the use of reaxFF. So the numbers may not be correct, and the simulation does not correctly show all the bonds that should be there in a PMMA chain. Please let me know if I can provide any additional information/data that might be of help.

Small note: after running the moltemplate script, you would need to manually delete 4 lines in the beginning of the data file which say 0 bonds, 0 angles, 0 dihedrals and 0 impropers, before running lammps.

Thank you,

Ankit

I took a look at the example and it does indeed generate a segmentation fault. However, it has nothing to do with ReaxFF and not much to do with LAMMPS, because the segmentation fault occurs in the neighbor list binning algorithm and is caused by non-numerical data.

Ankit, you should have mentioned the fact that before the seg-fault, you saw non-numerical output:

Step Temp E_pair E_mol TotEng Press
0 0 nan 0 nan nan

This is caused by many atom pairs in the initial structure having the same position, so rij = 0.0. The same initial data also causes a segfault with pair lj/cut.

Aidan

Just to be clear. If the periodic box is 50 A in y, and you give LAMMPS these atom positions:

7 3 17.532 13.991 5.838
311 3 17.532 63.991 5.838

you will see nan and maybe a segmentation fault. We could put code in LAMMPS to catch this, but some things are better left to the user.

Aidan

Another suggestion to users. Always report the first indication of an error, not the last one.