Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a GNEB implementation in the SPIN package #1421

merged 40 commits into from Apr 29, 2019


Copy link

commented Apr 8, 2019


This pull request adds an implementation of the Geodesic Nudged Elastic Band (GNEB) methodology into LAMMPS.
It adds the neb_spin.cpp and fix_neb_spin.cpp files in the SPIN repository.
Those options were documented.
Examples are provided in examples/SPIN/gneb/.

Related Issues

Improvement of the SPIN package.


Julien Tranchida, Sandia Nat. Labs,


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).

Backward Compatibility


Implementation Notes

  • documentation was built and checked with make spelling
  • the code was built with the -Wall -Wextra and unused variables were removed
  • the code was succesfully compiled and tested with the files provided in examples (iron and skyrmion calculations) and the results were interpolated with the routine provided in examples/SPIN/gneb/interpolate/

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

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • A package specific README file has been included or updated
  • One or more example input decks are included

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)

julient31 added some commits Jan 29, 2019

Commit JT 012919
- commit tuesday evening, second day imp.
- dev. fix_neb_spin
Commit JT 020419
- neb/spin implemneted
- rotational initial states to be implemented
- climbing image to be implemented
Commit JT 020619
- correction gneb/spin
- run but do not converge yet
- check forces
Commit JT 030419
- added minspin
- modifs before co
Commit JT 031119
- first working version of spinmin
Commit 2 JT 031119
- new input files gneb and spinmin
Commit JT 031119
- add min_post_force in precession
Commit JT 031219
- correct errors in fix_prec_spin
- clean version of spinmin
Commit 2 JT 031219
- modified examples (gneb and spinmin now distinct)
- started documention for spinmin
Commit JT 031319
- improved gneb functions
- correct name in fix_neb (Weinan)
Commit JT 031419
- cleaned fix_neb_spin
- first working version
Commit2 JT 031419
- commit before solo tests
Commit JT 031919
- bug with sk sim
- commit/push before pull up-to-date SPIN from master
Commit JT 032019
- moved gneb files from src/REPLICA to src/SPIN
- changed name of min/spin
- implemented read_param in min.cpp and min_spin.cpp
- set sp_flag tests in min_spin.cpp and neb_spin.cpp
Commit JT 032219
- fixed bug 1: precession_spin had no min_setup
- fixed bug 2: incorrect init of spins in neb/spin
- improved doc min_spin.txt (added eqs, and connected to related
Commit JT 032619
- added citeme in neb/spin
- started work on distance output
Merge branch 'clean-master2' of into gneb…

Commit JT 032619
- finish merge of min_spin.cpp
- test output
Commit JT 032719
- commit before wok output
Commit JT 040119
- corrected tangent vector projection
- output verbose (Gradidottan)
Commit2 JT 040119
- improved verbose output
- work on examples
Commit JT 040319
- improved examples
- start rework gneb init. (Rodrigues' formula)
Commit JT 040519
- initial rotation with Rodrigues' formula + exception
- worked on neb_spin documentation
- removed pair/spin warning for neb/spin
Commit2 JT 040519
- added angle in doc
- improved doc neb/spin
Commit JT 040819
- improved documentation neb/spin
Commit2 JT 040819
- finished doc (compiled and spell check)
- compiled with -Wall -Wextra, unused var. removed
Commit3 JT 040819
- README and interpolate.c for in examples/SPIN/gneb/interpolate/

julient31 added some commits Apr 8, 2019

Commit4 JT 040819
- added unknown names/acronyms in doc/utils/sphinx-config/false_positives.txt

@julient31 julient31 requested a review from rbberger as a code owner Apr 8, 2019

@akohlmey akohlmey requested review from sjplimp and athomps Apr 24, 2019

@akohlmey akohlmey self-assigned this Apr 24, 2019

@akohlmey akohlmey added this to the Stable Release Spring 2019 milestone Apr 24, 2019

Copy link

left a comment

This is a nice addition and changes are restricted to src/SPIN plus docs and examples. I think the interpolate directory is not an actual LAMMPS example and so does not belong here. Maybe it does not belong here. Maybe it should go in a new directory called tools/spin?

Copy link

left a comment

To add a new command (neb_spin), I think
there are other files in doc/src that need to
be edited as well?

Commit JT 042519
- moved examples/SPIN/gneb/interpolate/ toward
- added gneb in the command files in doc/src
- modified the error messages in neb_spin.h/cpp

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 25, 2019

Thanks a lot for the revisions.

  • I transferred the interpolation tool toward a new directory called tools/spin/interpolate_gneb. I modified doc/src/neb_spin.txt to account for this change.
  • I added the neb/spin command in all the Command*.txt files in doc/src (and also in Howto_replica.txt, Packages_details.txt, fixes.txt).
  • I also slightly modified the error messages in neb_spin.cpp to make them more explicit.

julient31 and others added some commits Apr 25, 2019

Commit2 JT 042519
- slight correction in doc/src/command_list.txt

This comment has been minimized.

Copy link

commented Apr 27, 2019

@julient31 Made some cosmetic changes and removed the unused special copy constructor, which was likely carried over from the neb.cpp code. thus please first pull before adding/committing/pushing new changes.

Copy link

left a comment

Looks like this needs a little more work.

examples/SPIN/gneb/iron/in.gneb.iron Show resolved Hide resolved
src/SPIN/fix_neb_spin.cpp Outdated Show resolved Hide resolved

@akohlmey akohlmey requested a review from sjplimp Apr 29, 2019

Copy link

left a comment

ok by me

julient31 added some commits Apr 29, 2019

Commit JT 042919
- corrections Axel 1
Commit2 JT 042919
- modified energy/torque tolerance for faster convergence in

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 29, 2019

Thanks a lot for the revisions Axel.

  • the first one was a silly mistake from me. The loop starting line 31 of neb_spin.cpp is used in case knormsq is equal to zero (which should never be the case). Thus, knormsq needs to be re-evaluated within this loop.
  • good catch for the second one. I created the code from fix_neb.cpp, and forgot to change the braces.

@akohlmey akohlmey merged commit f052509 into lammps:master Apr 29, 2019

6 checks passed

lammps/pull-requests/build-docs-pr head run ended
lammps/pull-requests/cmake/cmake-serial-pr head run ended
lammps/pull-requests/kokkos-omp-pr head run ended
lammps/pull-requests/openmpi-pr head run ended
lammps/pull-requests/serial-pr head run ended
lammps/pull-requests/shlib-pr head run ended
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.