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 PPPM and Ewald solvers for electric dipoles and magnetic spins #1469

Merged
merged 40 commits into from Jun 12, 2019

Conversation

@julient31
Copy link
Collaborator

commented May 21, 2019

Summary

The PR adds two solvers, PPPM and Ewald sums, for long-range dipole-dipole interactions. Those solvers apply to electric dipoles and magnetic spins.
In addition, the corresponding short-range components were added in the SPIN package (pair_spin_dipole_cut.cpp/h and pair_spin_dipole_long.cpp/h, similar to dipole/cut and dipole/long for electric charges).
The documentations was updated to account for those changes in:

  • doc/src/pair_spin_dipole.txt
  • doc/src/kspace_style.txt

Examples were provided in: examples/SPIN/dipole_spin/

Related Issues

This PR is an improvement of the KSPACE and SPIN packages.

Author(s)

Stan Moore (stamoor@sandia.gov)
Julien Tranchida (jtranch@sandia.gov)

Licensing

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

N/R

Implementation Notes

The results were checked by comparison to the ewald/disp method for dipoles.
Very good agreement was found for all quantities, except the per-atom virial components obtained from the P3M solver (although the total pressure is in very good agreement). This point will later receive further investigation.

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
  • The feature has been verified to work with the CMake based 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

julient31 and others added some commits Aug 14, 2018

Commit JT 081418
- initial commit pppm_spin branch
- copied short_range spin files (src/SPIN)
- copied/renamed Stan's file (from pppm_dipole branch)
Commit2 JT 081418
- converted pppm_dipole toward spin quantities
- need to check if can handle ferrimagnets
Commit1 JT 081618
- converted pppm_spin for long range spin-spin interactions
- modified kspace, pair,and pair_hybrid to add spinflag
Commit1 JT 082118
- created pppm_dipole_spin.h/cpp (child-class of pppm_dipole)
- improved pair_spin_long.h/cpp
- created documentation for pair_spin_long
- new 3xN fm_long vector in atom_vec_spin (with associated comm)
Commit JT 082318
- corrected memory errors in pppm_dipole and pppm_dipole_spin
- created fm_long in atom_vec_spin
- fm_long added to fm in initial_integrate (in ComputeInteractionsSpin)
Commit1 JT 083018
- started to work on ewald_dipole (not yet triclinic)
- compiles and runs (no memory issue)
- check the energy accuracy
Commit JT 091418
- created pair_spin_long_qsymp
- modified ewald_dipole
Commit JT 091618
- merge with modifs Stan 1
- energy correction

Merge branch 'pppm_spin' of github.com:julient31/lammps into pppm_spin

Conflicts:
	src/KSPACE/ewald_dipole.cpp
Commit JT 092118
- ewald_dipole with virial, torque and slabcorr
- run and valgrind test ok

Merge branch 'pppm_spin' of github.com:julient31/lammps into pppm_spin

Conflicts:
	src/KSPACE/ewald_dipole.cpp
Commit2 JT 092118
- created pair_spin_dipolar_cut
- real-space short-range calc of the spin dipolar interaction
- run and check valgrind ok
Commit JT 092418
- ewald_dipole_spin added
- accuracy problem (with eval of gewald and Newton solver)
Commit2 JT 092418
- initialized g_ewald before Newton solver
- mu2 is now adim in ewald_dipole_spin
Commit JT 092718
- renamed pair/spin/long functions
- started to work on debugging ewald_dipole (force errors)
Commit JT 100318
- correction forces ewald_dipole
- correction mag. dipolar energy
Commit JT 100518
- correction torque ewald_dipole
- idem ewald_dipole_spin to check
Commit JT 110818
- correct bug (match ewald/disp results for vir)
- started correct mag. part
Commit JT 111318
- corrections pair/spin/dipolar/long
Commit JT 111418
- removed muk table (size kmax3d, mem fault)
Commit JT 010819
- commit before co
Merge branch 'clean-master2' of github.com:julient31/lammps into pppm…
…_spin

Conflicts:
	src/SPIN/pair_spin_exchange.cpp
	src/atom.cpp
	src/pair.cpp
Commit JT 042219
- change ntot -> nlocal
Commit JT 051419
- added beginning doc
- removed a remaining dipolar
Commit JT 051519
- start doc pair_spin_dipole
Commit2 JT 051519
- started doc pair_spin_dipole.txt
- renamed all pair/spin/dipole
- created and tested example pair/spin/dipole/cut
Commit JT 051719
- removed qsymp pair style
- cleaned doc (pair/spin/diole and kspace_style)
- cleaned kspace .cpp/h files

@julient31 julient31 requested a review from sjplimp as a code owner May 21, 2019

Commit2 JT 052019
- some corrections in the examples
- deleted an old doc files (now redundant)

@stanmoore1 stanmoore1 assigned akohlmey and unassigned stanmoore1 May 21, 2019

@stanmoore1 stanmoore1 requested a review from akohlmey May 21, 2019

@julient31 julient31 requested a review from rbberger as a code owner May 21, 2019

@stanmoore1

This comment has been minimized.

Copy link
Contributor

commented May 21, 2019

@akohlmey @julient31 I believe this is ready to merge.

@akohlmey

This comment has been minimized.

Copy link
Member

commented May 21, 2019

@akohlmey @julient31 I believe this is ready to merge.

@stanmoore1 better to wait until after the upcoming stable release, though.

Commit JT 052819
- corrected examples in examples/SPIN/dipole_spin
- modified warning message in src/SPIN/pair_spin_dipole_*.cpp

@akohlmey akohlmey requested a review from athomps Jun 6, 2019

@stanmoore1 stanmoore1 self-requested a review Jun 10, 2019

@akohlmey
Copy link
Member

left a comment

There are a few minor nitpicks and things that could be cleaned up or need clarification

Show resolved Hide resolved src/SPIN/fix_nve_spin.cpp Outdated
Show resolved Hide resolved src/SPIN/fix_nve_spin.cpp Outdated
Show resolved Hide resolved src/KSPACE/pppm_dipole_spin.cpp Outdated
Show resolved Hide resolved src/KSPACE/pppm_dipole_spin.cpp Outdated
Show resolved Hide resolved src/KSPACE/ewald_dipole_spin.cpp Outdated
@stanmoore1

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

@akohlmey good feedback, we'll work on this. Thanks.

@stanmoore1

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2019

Closes #70

@stanmoore1 stanmoore1 requested a review from akohlmey Jun 12, 2019

@stanmoore1

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2019

@akohlmey I addressed your feedback, this PR is ready for merge.

@akohlmey akohlmey merged commit daa53e3 into lammps:master Jun 12, 2019

6 checks passed

lammps/pull-requests/build-docs-pr head run ended
Details
lammps/pull-requests/cmake/cmake-serial-pr head run ended
Details
lammps/pull-requests/kokkos-omp-pr head run ended
Details
lammps/pull-requests/openmpi-pr head run ended
Details
lammps/pull-requests/serial-pr head run ended
Details
lammps/pull-requests/shlib-pr head run ended
Details
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.