forked from lijiext/lammps
Merge pull request #991 from akohlmey/collected-small-updates
Collected small updates for the next patch release
This commit is contained in:
commit
69baaaec16
|
@ -96,16 +96,17 @@ USER-MISC package. See the "Making LAMMPS"_Section_start.html#start_2_3
|
|||
section for more info on packages.
|
||||
|
||||
NOTE: In the "Angles" section of the data file, the atom ID 'j'
|
||||
corresponding to the dipole to restrain must come before the atom ID
|
||||
of the reference atom 'i'. A third atom ID 'k' must also be provided,
|
||||
although 'k' is just a 'dummy' atom which can be any atom; it may be
|
||||
useful to choose a convention (e.g., 'k'='i') and adhere to it. For
|
||||
example, if ID=1 for the dipolar atom to restrain, and ID=2 for the
|
||||
reference atom, the corresponding line in the "Angles" section of the
|
||||
data file would read: X X 1 2 2
|
||||
defining the direction of the dipole vector to restrain must come
|
||||
before the atom ID of the reference atom 'i'. A third atom ID 'k' must
|
||||
also be provided to comply with the requirement of a valid angle
|
||||
definition. This atom ID k should be chosen to be that of an atom
|
||||
bonded to atom 'i' to avoid errors with "lost angle atoms" when running
|
||||
in parallel. Since the LAMMPS code checks for valid angle definitions,
|
||||
cannot use the same atom ID of either 'i' or 'j' (this was allowed
|
||||
and recommended with older LAMMPS versions).
|
||||
|
||||
The "newton" command for intramolecular interactions must be "on"
|
||||
(which is the default).
|
||||
(which is the default except when using some accelerator packages).
|
||||
|
||||
This angle style should not be used with SHAKE.
|
||||
|
||||
|
|
|
@ -98,5 +98,5 @@ integration fix (e.g. {fix nve/spin}).
|
|||
[(Mayergoyz)] I.D. Mayergoyz, G. Bertotti, C. Serpico (2009). Elsevier (2009)
|
||||
|
||||
:link(Tranchida2)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
Journal of Computational Physics, (2018).
|
||||
|
|
|
@ -73,4 +73,4 @@ instead of "array" is also valid.
|
|||
|
||||
:link(Tranchida1)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
Journal of Computational Physics, (2018).
|
||||
|
|
|
@ -63,4 +63,4 @@ See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
|||
|
||||
:link(Tranchida5)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
Journal of Computational Physics, (2018).
|
||||
|
|
|
@ -79,4 +79,4 @@ See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
|||
|
||||
:link(Tranchida3)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
Journal of Computational Physics, (2018).
|
||||
|
|
|
@ -70,4 +70,4 @@ See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
|||
|
||||
:link(Tranchida4)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau, and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
Journal of Computational Physics, (2018).
|
||||
|
|
|
@ -78,4 +78,4 @@ See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
|||
|
||||
:link(Tranchida6)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
Journal of Computational Physics, (2018).
|
||||
|
|
|
@ -17,6 +17,7 @@ ID = atom ID range or type range or mol ID range or group ID or region ID :l
|
|||
one or more keyword/value pairs may be appended :l
|
||||
keyword = {type} or {type/fraction} or {mol} or {x} or {y} or {z} or \
|
||||
{charge} or {dipole} or {dipole/random} or {quat} or \
|
||||
{spin} or {spin/random} or {quat} or \
|
||||
{quat/random} or {diameter} or {shape} or \
|
||||
{length} or {tri} or {theta} or {theta/random} or \
|
||||
{angmom} or {omega} or \
|
||||
|
@ -43,6 +44,13 @@ keyword = {type} or {type/fraction} or {mol} or {x} or {y} or {z} or \
|
|||
{dipole/random} value = seed Dlen
|
||||
seed = random # seed (positive integer) for dipole moment orientations
|
||||
Dlen = magnitude of dipole moment (dipole units)
|
||||
{spin} values = g x y z
|
||||
g = magnitude of magnetic spin vector (in Bohr magneton's unit)
|
||||
x,y,z = orientation of magnetic spin vector
|
||||
any of x,y,z can be an atom-style variable (see below)
|
||||
{spin/random} value = seed Dlen
|
||||
seed = random # seed (positive integer) for magnetic spin orientations
|
||||
Dlen = magnitude of magnetic spin vector (in Bohr magneton's unit)
|
||||
{quat} values = a b c theta
|
||||
a,b,c = unit vector to rotate particle around via right-hand rule
|
||||
theta = rotation angle (degrees)
|
||||
|
@ -232,6 +240,15 @@ the orientation of a particular atom is the same, regardless of how
|
|||
many processors are being used. This keyword does not allow use of an
|
||||
atom-style variable.
|
||||
|
||||
Keyword {spin} uses the specified g value to set the magnitude of the
|
||||
magnetic spin vectors, and the x,y,z values as components of a vector
|
||||
to set as the orientation of the magnetic spin vectors of the selected
|
||||
atoms.
|
||||
|
||||
Keyword {spin/random} randomizes the orientation of the magnetic spin
|
||||
vectors for the selected atoms and sets the magnitude of each to the
|
||||
specified {Dlen} value.
|
||||
|
||||
Keyword {quat} uses the specified values to create a quaternion
|
||||
(4-vector) that represents the orientation of the selected atoms. The
|
||||
particles must define a quaternion for their orientation
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
This directory contains examples and applications of the SPIN package
|
||||
=====================================================================
|
||||
|
||||
- the iron, cobalt_hcp, cobalt_fcc and nickel directories provide
|
||||
examples of spin-lattice calculations.
|
||||
|
||||
- the bfo repository provides an example of spin dynamics calculation
|
||||
performed on a fixed lattice, and applied to the multiferroic
|
||||
material bismuth-oxide.
|
||||
|
||||
- the read_restart directory provides examples allowing to write or
|
||||
read data files, and restart magneto-mechanical simulations.
|
||||
|
||||
- vizualization of the dump files can be achieved using Ovito or
|
||||
VMD. See the vmd repository for help vizualizing results with VMD.
|
||||
|
||||
** Note, the aim of this repository is mainly to provide users with
|
||||
examples. Better values and tuning of the magnetic and mechanical
|
||||
interactions can be achieved for more accurate materials
|
||||
simulations. **
|
|
@ -79,7 +79,10 @@ OBJS = $(OBJ_DIR)/lal_atom.o $(OBJ_DIR)/lal_ans.o \
|
|||
$(OBJ_DIR)/lal_lj_cubic.o $(OBJ_DIR)/lal_lj_cubic_ext.o \
|
||||
$(OBJ_DIR)/lal_ufm.o $(OBJ_DIR)/lal_ufm_ext.o \
|
||||
$(OBJ_DIR)/lal_dipole_long_lj.o $(OBJ_DIR)/lal_dipole_long_lj_ext.o \
|
||||
$(OBJ_DIR)/lal_lj_expand_coul_long.o $(OBJ_DIR)/lal_lj_expand_coul_long_ext.o
|
||||
$(OBJ_DIR)/lal_lj_expand_coul_long.o $(OBJ_DIR)/lal_lj_expand_coul_long_ext.o \
|
||||
$(OBJ_DIR)/lal_coul_long_cs.o $(OBJ_DIR)/lal_coul_long_cs_ext.o \
|
||||
$(OBJ_DIR)/lal_born_coul_long_cs.o $(OBJ_DIR)/lal_born_coul_long_cs_ext.o \
|
||||
$(OBJ_DIR)/lal_born_coul_wolf_cs.o $(OBJ_DIR)/lal_born_coul_wolf_cs_ext.o
|
||||
|
||||
CBNS = $(OBJ_DIR)/device.cubin $(OBJ_DIR)/device_cubin.h \
|
||||
$(OBJ_DIR)/atom.cubin $(OBJ_DIR)/atom_cubin.h \
|
||||
|
@ -137,7 +140,10 @@ CBNS = $(OBJ_DIR)/device.cubin $(OBJ_DIR)/device_cubin.h \
|
|||
$(OBJ_DIR)/lj_cubic.cubin $(OBJ_DIR)/lj_cubic_cubin.h \
|
||||
$(OBJ_DIR)/ufm.cubin $(OBJ_DIR)/ufm_cubin.h \
|
||||
$(OBJ_DIR)/dipole_long_lj.cubin $(OBJ_DIR)/dipole_long_lj_cubin.h \
|
||||
$(OBJ_DIR)/lj_expand_coul_long.cubin $(OBJ_DIR)/lj_expand_coul_long_cubin.h
|
||||
$(OBJ_DIR)/lj_expand_coul_long.cubin $(OBJ_DIR)/lj_expand_coul_long_cubin.h \
|
||||
$(OBJ_DIR)/coul_long_cs.cubin $(OBJ_DIR)/coul_long_cs_cubin.h \
|
||||
$(OBJ_DIR)/born_coul_long_cs.cubin $(OBJ_DIR)/born_coul_long_cs_cubin.h \
|
||||
$(OBJ_DIR)/born_coul_wolf_cs.cubin $(OBJ_DIR)/born_coul_wolf_cs_cubin.h
|
||||
|
||||
all: $(OBJ_DIR) $(GPU_LIB) $(EXECS)
|
||||
|
||||
|
@ -837,6 +843,42 @@ $(OBJ_DIR)/lal_lj_expand_coul_long.o: $(ALL_H) lal_lj_expand_coul_long.h lal_lj_
|
|||
$(OBJ_DIR)/lal_lj_expand_coul_long_ext.o: $(ALL_H) lal_lj_expand_coul_long.h lal_lj_expand_coul_long_ext.cpp lal_base_charge.h
|
||||
$(CUDR) -o $@ -c lal_lj_expand_coul_long_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/coul_long_cs.cubin: lal_coul_long_cs.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --fatbin -DNV_KERNEL -o $@ lal_coul_long_cs.cu
|
||||
|
||||
$(OBJ_DIR)/coul_long_cs_cubin.h: $(OBJ_DIR)/coul_long_cs.cubin $(OBJ_DIR)/coul_long_cs.cubin
|
||||
$(BIN2C) -c -n coul_long_cs $(OBJ_DIR)/coul_long_cs.cubin > $(OBJ_DIR)/coul_long_cs_cubin.h
|
||||
|
||||
$(OBJ_DIR)/lal_coul_long_cs.o: $(ALL_H) lal_coul_long_cs.h lal_coul_long_cs.cpp $(OBJ_DIR)/coul_long_cs_cubin.h $(OBJ_DIR)/lal_base_charge.o $(OBJ_DIR)/lal_coul_long.o
|
||||
$(CUDR) -o $@ -c lal_coul_long_cs.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_coul_long_cs_ext.o: $(ALL_H) lal_coul_long_cs.h lal_coul_long_cs_ext.cpp lal_coul_long.h
|
||||
$(CUDR) -o $@ -c lal_coul_long_cs_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/born_coul_long_cs.cubin: lal_born_coul_long_cs.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --fatbin -DNV_KERNEL -o $@ lal_born_coul_long_cs.cu
|
||||
|
||||
$(OBJ_DIR)/born_coul_long_cs_cubin.h: $(OBJ_DIR)/born_coul_long_cs.cubin $(OBJ_DIR)/born_coul_long_cs.cubin
|
||||
$(BIN2C) -c -n born_coul_long_cs $(OBJ_DIR)/born_coul_long_cs.cubin > $(OBJ_DIR)/born_coul_long_cs_cubin.h
|
||||
|
||||
$(OBJ_DIR)/lal_born_coul_long_cs.o: $(ALL_H) lal_born_coul_long_cs.h lal_born_coul_long_cs.cpp $(OBJ_DIR)/born_coul_long_cs_cubin.h $(OBJ_DIR)/lal_base_charge.o $(OBJ_DIR)/lal_born_coul_long.o
|
||||
$(CUDR) -o $@ -c lal_born_coul_long_cs.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_born_coul_long_cs_ext.o: $(ALL_H) lal_born_coul_long_cs.h lal_born_coul_long_cs_ext.cpp lal_born_coul_long.h
|
||||
$(CUDR) -o $@ -c lal_born_coul_long_cs_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/born_coul_wolf_cs.cubin: lal_born_coul_wolf_cs.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --fatbin -DNV_KERNEL -o $@ lal_born_coul_wolf_cs.cu
|
||||
|
||||
$(OBJ_DIR)/born_coul_wolf_cs_cubin.h: $(OBJ_DIR)/born_coul_wolf_cs.cubin $(OBJ_DIR)/born_coul_wolf_cs.cubin
|
||||
$(BIN2C) -c -n born_coul_wolf_cs $(OBJ_DIR)/born_coul_wolf_cs.cubin > $(OBJ_DIR)/born_coul_wolf_cs_cubin.h
|
||||
|
||||
$(OBJ_DIR)/lal_born_coul_wolf_cs.o: $(ALL_H) lal_born_coul_wolf_cs.h lal_born_coul_wolf_cs.cpp $(OBJ_DIR)/born_coul_wolf_cs_cubin.h $(OBJ_DIR)/lal_base_charge.o $(OBJ_DIR)/lal_born_coul_wolf.o
|
||||
$(CUDR) -o $@ -c lal_born_coul_wolf_cs.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_born_coul_wolf_cs_ext.o: $(ALL_H) lal_born_coul_wolf_cs.h lal_born_coul_wolf_cs_ext.cpp lal_born_coul_wolf.h
|
||||
$(CUDR) -o $@ -c lal_born_coul_wolf_cs_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(BIN_DIR)/nvc_get_devices: ./geryon/ucl_get_devices.cpp $(NVD_H)
|
||||
$(CUDR) -o $@ ./geryon/ucl_get_devices.cpp -DUCL_CUDADR $(CUDA_LIB) -lcuda
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "atom.h"
|
||||
#include "atom_vec_spin.h"
|
||||
#include "comm.h"
|
||||
|
@ -54,7 +54,7 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp)
|
|||
size_data_atom = 9;
|
||||
size_data_vel = 4;
|
||||
xcol_data = 4;
|
||||
|
||||
|
||||
atom->sp_flag = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <mpi.h>
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
#include "atom.h"
|
||||
#include "compute_spin.h"
|
||||
#include "domain.h"
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <mpi.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec.h"
|
||||
|
@ -59,8 +59,9 @@ static const char cite_fix_nve_spin[] =
|
|||
"title={Massively parallel symplectic algorithm for coupled magnetic spin "
|
||||
"dynamics and molecular dynamics},\n"
|
||||
"author={Tranchida, J and Plimpton, SJ and Thibaudeau, P and Thompson, AP},\n"
|
||||
"journal={arXiv preprint arXiv:1801.10233},\n"
|
||||
"year={2018}\n"
|
||||
"journal={Journal of Computational Physics},\n"
|
||||
"year={2018},\n"
|
||||
"publisher={Elsevier}\n"
|
||||
"}\n\n";
|
||||
|
||||
enum{NONE};
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "domain.h"
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
@ -436,9 +436,9 @@ void PairSpinMagelec::compute_magelec_mech(int i, int j, double fi[3], double sp
|
|||
meiy *= ME_mech[itype][jtype];
|
||||
meiz *= ME_mech[itype][jtype];
|
||||
|
||||
fi[0] = meiy*vz - meiz*vy;
|
||||
fi[1] = meiz*vx - meix*vz;
|
||||
fi[2] = meix*vy - meiy*vx;
|
||||
fi[0] += meiy*vz - meiz*vy;
|
||||
fi[1] += meiz*vx - meix*vz;
|
||||
fi[2] += meix*vy - meiy*vx;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
Please cite the related publication:
|
||||
Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018).
|
||||
Massively parallel symplectic algorithm for coupled magnetic spin dynamics
|
||||
and molecular dynamics. arXiv preprint arXiv:1801.10233.
|
||||
and molecular dynamics. Journal of Computational Physics.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "atom_vec.h"
|
||||
#include "domain.h"
|
||||
#include "comm.h"
|
||||
#include "special.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
|
@ -44,7 +45,7 @@ void ResetIDs::command(int narg, char **arg)
|
|||
}
|
||||
|
||||
// create an atom map if one doesn't exist already
|
||||
|
||||
|
||||
int mapflag = 0;
|
||||
if (atom->map_style == 0) {
|
||||
mapflag = 1;
|
||||
|
@ -93,7 +94,7 @@ void ResetIDs::command(int narg, char **arg)
|
|||
// forward_comm_array acquires new IDs for ghost atoms
|
||||
|
||||
double **newIDs;
|
||||
memory->create(newIDs,nall,1,"reset_ids:newIDs");
|
||||
memory->create(newIDs,nall,1,"reset_ids:newIDs");
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
newIDs[i][0] = tag[i];
|
||||
|
@ -105,7 +106,7 @@ void ResetIDs::command(int narg, char **arg)
|
|||
// loop over bonds, angles, etc and reset IDs in stored topology arrays
|
||||
// only necessary for molecular = 1, not molecular = 2
|
||||
// badcount = atom IDs that could not be found
|
||||
|
||||
|
||||
int badcount = 0;
|
||||
|
||||
if (atom->molecular == 1) {
|
||||
|
@ -232,8 +233,15 @@ void ResetIDs::command(int narg, char **arg)
|
|||
atom->map_init();
|
||||
atom->map_set();
|
||||
|
||||
// need to update exclusions with new atom IDs
|
||||
|
||||
if (atom->molecular == 1) {
|
||||
Special special(lmp);
|
||||
special.build();
|
||||
}
|
||||
|
||||
// delete temporary atom map
|
||||
|
||||
|
||||
if (mapflag) {
|
||||
atom->map_delete();
|
||||
atom->map_style = 0;
|
||||
|
|
Loading…
Reference in New Issue