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 fix setforce/spin to the SPIN package #1424

merged 4 commits into from Apr 25, 2019


Copy link

commented Apr 10, 2019


  • adding a fix setforce/spin to the SPIN package
  • correcting a small bug in fix nve/spin
  • updated the Howto_spin file in the documentation

Related Issues

  • improvement of the spin package
  • correction of a small bug in fix/nve/spin related to the way the grow() functions were used.


Julien Tranchida, Sandia National 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

  • the fix setforce/spin was created as a child class of setforce. It just needed the redefinition of two methods, and the creation of one method (called from fix/nve/spin).

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
  • One or more example input decks are included

Further Information, Files, and Links

julient31 added some commits Apr 8, 2019

Commit JT 040819
- corrected bug in fix nve/spin (init tables with grow)
- start work for fix setforce/spin
Commit JT 040919
- first working version of setforce
- modified fix nve/spin to account for it
Commit JT 041019
- corrected setforce/spin
- added an example
- added the documentation (in setforce)
- updated the Howto_spin documentation
Commit2 JT 041019
- correct spelling in Howto_spin.txt

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 10, 2019

I did not create a full documentation page for the new fix, but only updated the setforce doc page (as it is almost the same function, it just sets the magnetic forces instead of the mechanical ones). Let me know if you would like me to create a distinct doc page instead.
I also added this fix in the Howto_spin doc page.

@akohlmey akohlmey requested review from athomps and sjplimp 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

All of these changes are fairly minor and are limited to src/SPIN files.

Copy link

left a comment


@akohlmey akohlmey merged commit c55174a into lammps:master Apr 25, 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
None yet
4 participants
You can’t perform that action at this time.