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

Add a spin minimizer in the SPIN package #1380

merged 8 commits into from Mar 26, 2019


None yet
3 participants
Copy link

julient31 commented Mar 25, 2019


This pull request adds a spin minimizer in the SPIN package. This spin minimizer works similarly as the "fire" min_style, but only relaxes the spin configuration.
The pull request also contains some code modifications to allow this minimizer to work properly.

Related Issues

Implement new capabilities for the SPIN package.


Julien Tranchida, Sandia National Laboratories (


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

  • src/SPIN/min_spin.cpp/h contain the spin minimizer
  • src/SPIN/pair_spin_exchange/dmi/neel/magelec were modified to work with min_spin
  • doc/src/min_spin.txt contains a documentation for the spin minimizer. doc/src/minimize.txt, min_modify.txt, and min_style.txt were modified to account for the added min style.
  • example/SPIN/spinmin contains two examples using the spin minimizer.

Post Submission Checklist

  • 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

julient31 added some commits Mar 25, 2019

Commit JT 032519
- adding all min files into new branch
- preparing branch for pull request of spin minimizer
Commit2 JT 032519
- added equations for documentation
- updated examples (not calling fix nve/spin)
- replaced error message by warning in all pair/spin
Commit3 JT 032519
- updated the README file
- updated examples/SPIN/spinmin/
Commit4 JT 032519
- corrected documentation (errors in min_spin.txt and
- changed the code accordingly
Copy link

sjplimp left a comment

looks ok

akohlmey added some commits Mar 26, 2019

@akohlmey akohlmey requested a review from sjplimp Mar 26, 2019


This comment has been minimized.

Copy link

akohlmey commented Mar 26, 2019

@julient31 @sjplimp needed to make some more, mostly cosmetic changes to stick closer to the LAMMPS style and have full documentation integration. Also restricted output from error->warning() to MPI rank 0.
Please have another look.


This comment has been minimized.

Copy link
Collaborator Author

julient31 commented Mar 26, 2019

Looks good to me. Thanks for adding the flag restriction to MPI rank 0 Axel.

Copy link

sjplimp left a comment

ok - good catches

@akohlmey akohlmey merged commit e2e4fe2 into lammps:master Mar 26, 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.