Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Patch of class2 dihedral #1767
Fix the NAN problem when any two bonds are nearly parallel
When any two bonds of the dihedral are nearly parallel, the costh12 costh13 costh23 will exceed the limit of [-1,1] slightly because of cut-off error, leading acos(costh12), acos(costh13) or acos(costh23) to be NAN.
If this addresses an open GitHub issue for this project, please mention the issue number here, and describe the relation. Use the phrases
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).
This fix is backward compatibility
Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected
Post Submission Checklist
Please check the fields below as they are completed after the pull request has been submitted. Delete lines that don't apply
Further Information, Files, and Links
Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)