diff --git a/src/OPT/pair_lj_long_coul_long_opt.cpp b/src/OPT/pair_lj_long_coul_long_opt.cpp index 243b64391f..03853057f4 100644 --- a/src/OPT/pair_lj_long_coul_long_opt.cpp +++ b/src/OPT/pair_lj_long_coul_long_opt.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include +#include #include "pair_lj_long_coul_long_opt.h" #include "atom.h" #include "force.h" diff --git a/src/PYTHON/fix_python_invoke.cpp b/src/PYTHON/fix_python_invoke.cpp index f704bd9741..7fa9861c3f 100644 --- a/src/PYTHON/fix_python_invoke.cpp +++ b/src/PYTHON/fix_python_invoke.cpp @@ -15,7 +15,7 @@ Contributing author: Richard Berger (Temple U) ------------------------------------------------------------------------- */ -#include +#include // IWYU pragma: keep #include #include "fix_python_invoke.h" #include "force.h" diff --git a/src/PYTHON/fix_python_move.cpp b/src/PYTHON/fix_python_move.cpp index 56b7768669..b253df6828 100644 --- a/src/PYTHON/fix_python_move.cpp +++ b/src/PYTHON/fix_python_move.cpp @@ -15,7 +15,7 @@ Contributing author: Richard Berger (Temple U) ------------------------------------------------------------------------- */ -#include +#include // IWYU pragma: keep #include #include "fix_python_move.h" #include "lmppython.h" diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 638077da48..5b8f23400b 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -15,7 +15,7 @@ Contributing authors: Axel Kohlmeyer and Richard Berger (Temple U) ------------------------------------------------------------------------- */ -#include +#include // IWYU pragma: keep #include #include #include "pair_python.h" diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 249d4f7bb1..7456021675 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include // IWYU pragma: keep #include "python_impl.h" #include "force.h" #include "input.h" diff --git a/src/RIGID/fix_ehex.cpp b/src/RIGID/fix_ehex.cpp index 1476c71d3f..0bbdea51c6 100644 --- a/src/RIGID/fix_ehex.cpp +++ b/src/RIGID/fix_ehex.cpp @@ -22,8 +22,8 @@ which implements the heat exchange (HEX) algorithm. ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_ehex.h" #include "atom.h" @@ -33,14 +33,9 @@ #include "force.h" #include "update.h" #include "modify.h" -#include "input.h" -#include "variable.h" #include "memory.h" #include "error.h" #include "fix_shake.h" -#include "neighbor.h" -#include "comm.h" -#include "timer.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/RIGID/fix_ehex.h b/src/RIGID/fix_ehex.h index e29ddac135..860ed3d1f3 100644 --- a/src/RIGID/fix_ehex.h +++ b/src/RIGID/fix_ehex.h @@ -22,8 +22,6 @@ FixStyle(ehex,FixEHEX) #define LMP_FIX_EHEX_H #include "fix.h" -#include "fix_shake.h" -#include "region.h" #define EHEX_DEBUG 0 namespace LAMMPS_NS { @@ -41,9 +39,9 @@ class FixEHEX : public Fix { double memory_usage(); void update_scalingmask(); void com_properties(double *, double *, double *, double*, double *, double*); - bool rescale_atom(int i, Region*region); + bool rescale_atom(int i, class Region *region); virtual void grow_arrays(int nmax); - bool check_cluster(tagint *shake_atom, int n, Region * region); + bool check_cluster(tagint *shake_atom, int n, class Region *region); private: int iregion; @@ -53,14 +51,14 @@ class FixEHEX : public Fix { char *idregion; int me; - double **x; // coordinates - double **f; // forces - double **v; // velocities - double *mass; // masses - double *rmass; // reduced masses - int *type; // atom types + double **x; // coordinates + double **f; // forces + double **v; // velocities + double *mass; // masses + double *rmass; // reduced masses + int *type; // atom types int nlocal; // number of local atoms - FixShake * fshake; // pointer to fix_shake/fix_rattle + class FixShake * fshake; // pointer to fix_shake/fix_rattle int constraints; // constraints (0/1) int cluster; // rescaling entire clusters (0/1) int hex; // HEX mode (0/1) diff --git a/src/RIGID/fix_rattle.cpp b/src/RIGID/fix_rattle.cpp index 403f3091c6..db43b9e82d 100644 --- a/src/RIGID/fix_rattle.cpp +++ b/src/RIGID/fix_rattle.cpp @@ -17,31 +17,20 @@ #include #include -#include #include -#include #include "fix_rattle.h" #include "atom.h" -#include "atom_vec.h" -#include "molecule.h" #include "update.h" -#include "respa.h" #include "modify.h" #include "domain.h" #include "force.h" -#include "bond.h" -#include "angle.h" #include "comm.h" -#include "group.h" -#include "fix_respa.h" -#include "math_const.h" #include "math_extra.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace FixConst; -using namespace MathConst; using namespace MathExtra; // set RATTLE_DEBUG 1 to check constraints at end of timestep diff --git a/src/RIGID/fix_rattle.h b/src/RIGID/fix_rattle.h index 48edaef379..cab148f10c 100644 --- a/src/RIGID/fix_rattle.h +++ b/src/RIGID/fix_rattle.h @@ -20,7 +20,6 @@ FixStyle(rattle,FixRattle) #ifndef LMP_FIX_RATTLE_H #define LMP_FIX_RATTLE_H -#include "fix.h" #include "fix_shake.h" namespace LAMMPS_NS { diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index abb669bc02..19eb22a7fa 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include #include #include "fix_rigid.h" @@ -31,7 +31,6 @@ #include "force.h" #include "input.h" #include "variable.h" -#include "output.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 4acc8d3411..2e1090ec88 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -17,7 +17,6 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include #include #include #include "fix_rigid_nh.h" diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp index 5016d3f168..8de588bd9b 100644 --- a/src/RIGID/fix_rigid_nh_small.cpp +++ b/src/RIGID/fix_rigid_nh_small.cpp @@ -17,8 +17,8 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_rigid_nh_small.h" #include "math_extra.h" @@ -32,7 +32,6 @@ #include "comm.h" #include "force.h" #include "kspace.h" -#include "output.h" #include "memory.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_nph.cpp b/src/RIGID/fix_rigid_nph.cpp index 45a4a8d09c..6080fb05af 100644 --- a/src/RIGID/fix_rigid_nph.cpp +++ b/src/RIGID/fix_rigid_nph.cpp @@ -19,7 +19,6 @@ #include #include "fix_rigid_nph.h" -#include "domain.h" #include "modify.h" #include "error.h" diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index 2e515839c5..5e81b75c0d 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include -#include #include "fix_append_atoms.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index c800e8a85d..15ee4d370f 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -17,22 +17,19 @@ see Reed, Fried, Joannopoulos, Phys Rev Lett, 90, 235503 (2003) ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_msst.h" #include "atom.h" #include "force.h" #include "comm.h" -#include "output.h" #include "modify.h" #include "fix_external.h" #include "compute.h" #include "kspace.h" #include "update.h" -#include "respa.h" #include "domain.h" -#include "thermo.h" #include "memory.h" #include "error.h" diff --git a/src/SHOCK/fix_nphug.cpp b/src/SHOCK/fix_nphug.cpp index c6df6646cf..5d5a1642c0 100644 --- a/src/SHOCK/fix_nphug.cpp +++ b/src/SHOCK/fix_nphug.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_nphug.h" #include "modify.h" @@ -22,8 +21,6 @@ #include "force.h" #include "domain.h" #include "group.h" -#include "memory.h" -#include "comm.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/SHOCK/fix_wall_piston.cpp b/src/SHOCK/fix_wall_piston.cpp index eb89e19517..31f70b4174 100644 --- a/src/SHOCK/fix_wall_piston.cpp +++ b/src/SHOCK/fix_wall_piston.cpp @@ -13,10 +13,8 @@ #include #include -#include #include "fix_wall_piston.h" #include "atom.h" -#include "modify.h" #include "domain.h" #include "lattice.h" #include "update.h" diff --git a/src/SNAP/compute_snav_atom.cpp b/src/SNAP/compute_snav_atom.cpp index 1f702496ed..5faf7a1872 100644 --- a/src/SNAP/compute_snav_atom.cpp +++ b/src/SNAP/compute_snav_atom.cpp @@ -10,10 +10,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "sna.h" #include #include #include "compute_snav_atom.h" +#include "sna.h" #include "atom.h" #include "update.h" #include "modify.h" @@ -21,7 +21,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "force.h" -#include "pair.h" #include "comm.h" #include "memory.h" #include "error.h" diff --git a/src/SNAP/pair_snap.cpp b/src/SNAP/pair_snap.cpp index f9ba8922a0..f0f3ef72c6 100644 --- a/src/SNAP/pair_snap.cpp +++ b/src/SNAP/pair_snap.cpp @@ -11,24 +11,21 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include #include #include "pair_snap.h" #include "atom.h" -#include "atom_vec.h" #include "force.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "sna.h" -#include "domain.h" #include "memory.h" #include "error.h" -#include - using namespace LAMMPS_NS; #define MAXLINE 1024 diff --git a/src/SNAP/sna.cpp b/src/SNAP/sna.cpp index ec545c51b2..d7d9b5163d 100644 --- a/src/SNAP/sna.cpp +++ b/src/SNAP/sna.cpp @@ -15,17 +15,11 @@ Contributing authors: Aidan Thompson, Christian Trott, SNL ------------------------------------------------------------------------- */ -#include "sna.h" #include +#include "sna.h" #include "math_const.h" -#include "math_extra.h" -#include -#include - #include "memory.h" #include "error.h" -#include "comm.h" -#include "atom.h" using namespace std; using namespace LAMMPS_NS; diff --git a/src/SPIN/compute_spin.cpp b/src/SPIN/compute_spin.cpp index 0a881e1de6..ec11bc68f2 100644 --- a/src/SPIN/compute_spin.cpp +++ b/src/SPIN/compute_spin.cpp @@ -22,20 +22,16 @@ ------------------------------------------------------------------------- */ #include -#include -#include "atom.h" +#include #include "compute_spin.h" -#include "domain.h" +#include "atom.h" #include "error.h" #include "force.h" -#include "math_special.h" #include "math_const.h" #include "memory.h" -#include "modify.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathSpecial; using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/fix_langevin_spin.cpp b/src/SPIN/fix_langevin_spin.cpp index ec6f719a77..6936c701c6 100644 --- a/src/SPIN/fix_langevin_spin.cpp +++ b/src/SPIN/fix_langevin_spin.cpp @@ -21,31 +21,19 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include #include #include -#include - -#include "atom.h" -#include "atom_vec_ellipsoid.h" -#include "comm.h" -#include "compute.h" -#include "domain.h" -#include "error.h" #include "fix_langevin_spin.h" +#include "comm.h" +#include "error.h" #include "force.h" -#include "group.h" -#include "input.h" #include "math_const.h" -#include "math_extra.h" #include "memory.h" #include "modify.h" -#include "random_mars.h" #include "random_park.h" -#include "region.h" #include "respa.h" #include "update.h" -#include "variable.h" +#include "utils.h" using namespace LAMMPS_NS; using namespace FixConst; @@ -142,13 +130,11 @@ void FixLangevinSpin::init() void FixLangevinSpin::setup(int vflag) { - if (strstr(update->integrate_style,"verlet")) - post_force(vflag); - else { + if (utils::strmatch(update->integrate_style,"^respa")) { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); - } + } else post_force(vflag); } /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index a8cb0cd2ca..7ed8967a24 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -23,13 +23,11 @@ #include #include -#include #include #include "fix_neb_spin.h" #include "universe.h" #include "update.h" #include "atom.h" -#include "domain.h" #include "comm.h" #include "modify.h" #include "compute.h" @@ -37,11 +35,9 @@ #include "memory.h" #include "error.h" #include "force.h" -#include "math_const.h" using namespace LAMMPS_NS; using namespace FixConst; -using namespace MathConst; enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; diff --git a/src/SPIN/fix_nve_spin.cpp b/src/SPIN/fix_nve_spin.cpp index 595ddb0cc2..d35585c7a6 100644 --- a/src/SPIN/fix_nve_spin.cpp +++ b/src/SPIN/fix_nve_spin.cpp @@ -21,38 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include -#include #include - +#include "fix_nve_spin.h" #include "atom.h" -#include "atom_vec.h" #include "citeme.h" #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_nve_spin.h" #include "fix_precession_spin.h" #include "fix_langevin_spin.h" #include "fix_setforce_spin.h" #include "force.h" -#include "math_vector.h" -#include "math_extra.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "pair.h" -#include "pair_hybrid.h" #include "pair_spin.h" -#include "respa.h" #include "update.h" using namespace LAMMPS_NS; using namespace FixConst; -using namespace MathConst; -using namespace MathExtra; static const char cite_fix_nve_spin[] = "fix nve/spin command:\n\n" diff --git a/src/SPIN/fix_nve_spin.h b/src/SPIN/fix_nve_spin.h index 4800575c06..1e3b87c1fb 100644 --- a/src/SPIN/fix_nve_spin.h +++ b/src/SPIN/fix_nve_spin.h @@ -21,8 +21,6 @@ FixStyle(nve/spin,FixNVESpin) #define LMP_FIX_NVE_SPIN_H #include "fix.h" -#include "pair.h" -#include "pair_spin.h" namespace LAMMPS_NS { diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 1ea134d367..7764bb0438 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -21,21 +21,16 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include +#include "fix_precession_spin.h" #include "atom.h" #include "error.h" -#include "domain.h" -#include "error.h" -#include "fix_precession_spin.h" #include "force.h" #include "input.h" #include "math_const.h" -#include "memory.h" #include "modify.h" -#include "neigh_list.h" #include "respa.h" #include "update.h" #include "variable.h" diff --git a/src/SPIN/fix_setforce_spin.cpp b/src/SPIN/fix_setforce_spin.cpp index c2807418ec..1ab35c9663 100644 --- a/src/SPIN/fix_setforce_spin.cpp +++ b/src/SPIN/fix_setforce_spin.cpp @@ -21,7 +21,6 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include #include #include "fix_setforce_spin.h" #include "atom.h" @@ -29,12 +28,9 @@ #include "modify.h" #include "domain.h" #include "region.h" -#include "respa.h" #include "input.h" #include "variable.h" #include "memory.h" -#include "error.h" -#include "force.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/SPIN/min_spin.cpp b/src/SPIN/min_spin.cpp index 2bddc110e7..3a330f448a 100644 --- a/src/SPIN/min_spin.cpp +++ b/src/SPIN/min_spin.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include "min_spin.h" #include "universe.h" @@ -29,8 +28,6 @@ #include "output.h" #include "timer.h" #include "error.h" -#include "modify.h" -#include "math_special.h" #include "math_const.h" using namespace LAMMPS_NS; diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 46a0541488..400ce3d363 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -21,18 +21,12 @@ Computer Physics Communications, 196, 335-347. ------------------------------------------------------------------------- */ -// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h -// due to OpenMPI bug which sets INT64_MAX via its mpi.h -// before lmptype.h can set flags to insure it is done correctly - -#include "lmptype.h" #include #include #include #include #include "neb_spin.h" #include "citeme.h" -#include "compute.h" #include "force.h" #include "universe.h" #include "atom.h" @@ -49,10 +43,8 @@ #include "timer.h" #include "memory.h" #include "error.h" -#include "math_const.h" using namespace LAMMPS_NS; -using namespace MathConst; static const char cite_neb_spin[] = "neb/spin command:\n\n" diff --git a/src/SPIN/pair_spin.cpp b/src/SPIN/pair_spin.cpp index 929b79bef3..93d9a1e127 100644 --- a/src/SPIN/pair_spin.cpp +++ b/src/SPIN/pair_spin.cpp @@ -21,26 +21,15 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include -#include #include - +#include "pair_spin.h" #include "atom.h" -#include "comm.h" #include "error.h" #include "fix.h" -#include "fix_nve_spin.h" #include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "math_const.h" -#include "memory.h" #include "modify.h" #include "pair.h" -#include "pair_hybrid.h" -#include "pair_hybrid_overlay.h" -#include "pair_spin.h" #include "update.h" using namespace LAMMPS_NS; diff --git a/src/SPIN/pair_spin.h b/src/SPIN/pair_spin.h index 1be8550c65..3a909e1d13 100644 --- a/src/SPIN/pair_spin.h +++ b/src/SPIN/pair_spin.h @@ -14,7 +14,7 @@ #ifndef LMP_PAIR_SPIN_H #define LMP_PAIR_SPIN_H -#include "pair.h" +#include "pair.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/SPIN/pair_spin_dipole_cut.cpp b/src/SPIN/pair_spin_dipole_cut.cpp index 4ff198488a..8d9b5b8f2b 100644 --- a/src/SPIN/pair_spin_dipole_cut.cpp +++ b/src/SPIN/pair_spin_dipole_cut.cpp @@ -21,9 +21,8 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_spin_dipole_cut.h" #include "atom.h" @@ -31,6 +30,7 @@ #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" +#include "fix.h" #include "fix_nve_spin.h" #include "force.h" #include "math_const.h" diff --git a/src/SPIN/pair_spin_dipole_long.cpp b/src/SPIN/pair_spin_dipole_long.cpp index e3575a6a07..84c55a8c3c 100644 --- a/src/SPIN/pair_spin_dipole_long.cpp +++ b/src/SPIN/pair_spin_dipole_long.cpp @@ -13,20 +13,19 @@ /* ------------------------------------------------------------------------ Contributing authors: Julien Tranchida (SNL) - Stan Moore (SNL) + Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include - #include "pair_spin_dipole_long.h" #include "atom.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" +#include "fix.h" #include "fix_nve_spin.h" #include "force.h" #include "kspace.h" @@ -59,12 +58,12 @@ lockfixnvespin(NULL) no_virial_fdotr_compute = 1; lattice_flag = 0; - hbar = force->hplanck/MY_2PI; // eV/(rad.THz) + hbar = force->hplanck/MY_2PI; // eV/(rad.THz) mub = 9.274e-4; // in A.Ang^2 mu_0 = 785.15; // in eV/Ang/A^2 mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV.Ang^3 - //mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV - mub2mu0hbinv = mub2mu0 / hbar; // in rad.THz + //mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV + mub2mu0hbinv = mub2mu0 / hbar; // in rad.THz } @@ -243,7 +242,7 @@ void PairSpinDipoleLong::compute(int eflag, int vflag) double **x = atom->x; double **f = atom->f; double **fm = atom->fm; - double **sp = atom->sp; + double **sp = atom->sp; int *type = atom->type; int nlocal = atom->nlocal; int newton_pair = force->newton_pair; @@ -314,36 +313,36 @@ void PairSpinDipoleLong::compute(int eflag, int vflag) bij[2] = (3.0*bij[1] + pre2*expm2) * r2inv; bij[3] = (5.0*bij[2] + pre3*expm2) * r2inv; - compute_long(i,j,eij,bij,fmi,spi,spj); - compute_long_mech(i,j,eij,bij,fmi,spi,spj); + compute_long(i,j,eij,bij,fmi,spi,spj); + compute_long_mech(i,j,eij,bij,fmi,spi,spj); } // force accumulation - f[i][0] += fi[0]; - f[i][1] += fi[1]; + f[i][0] += fi[0]; + f[i][1] += fi[1]; f[i][2] += fi[2]; - fm[i][0] += fmi[0]; - fm[i][1] += fmi[1]; + fm[i][0] += fmi[0]; + fm[i][1] += fmi[1]; fm[i][2] += fmi[2]; if (newton_pair || j < nlocal) { - f[j][0] -= fi[0]; - f[j][1] -= fi[1]; + f[j][0] -= fi[0]; + f[j][1] -= fi[1]; f[j][2] -= fi[2]; } if (eflag) { - if (rsq <= local_cut2) { - evdwl -= spi[0]*fmi[0] + spi[1]*fmi[1] + - spi[2]*fmi[2]; - evdwl *= hbar; - } + if (rsq <= local_cut2) { + evdwl -= spi[0]*fmi[0] + spi[1]*fmi[1] + + spi[2]*fmi[2]; + evdwl *= hbar; + } } else evdwl = 0.0; if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair, - evdwl,ecoul,fi[0],fi[1],fi[2],rij[0],rij[1],rij[2]); + evdwl,ecoul,fi[0],fi[1],fi[2],rij[0],rij[1],rij[2]); } } @@ -365,7 +364,7 @@ void PairSpinDipoleLong::compute_single_pair(int ii, double fmi[3]) int *type = atom->type; double **x = atom->x; - double **sp = atom->sp; + double **sp = atom->sp; double **fm_long = atom->fm_long; ilist = list->ilist; @@ -550,7 +549,7 @@ void PairSpinDipoleLong::write_restart(FILE *fp) for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { - fwrite(&cut_spin_long[i][j],sizeof(int),1,fp); + fwrite(&cut_spin_long[i][j],sizeof(int),1,fp); } } } @@ -573,10 +572,10 @@ void PairSpinDipoleLong::read_restart(FILE *fp) if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { - if (me == 0) { - fread(&cut_spin_long[i][j],sizeof(int),1,fp); - } - MPI_Bcast(&cut_spin_long[i][j],1,MPI_INT,0,world); + if (me == 0) { + fread(&cut_spin_long[i][j],sizeof(int),1,fp); + } + MPI_Bcast(&cut_spin_long[i][j],1,MPI_INT,0,world); } } } diff --git a/src/SPIN/pair_spin_dmi.cpp b/src/SPIN/pair_spin_dmi.cpp index 41430d230f..651f4397bd 100644 --- a/src/SPIN/pair_spin_dmi.cpp +++ b/src/SPIN/pair_spin_dmi.cpp @@ -21,28 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include #include - +#include "pair_spin_dmi.h" #include "atom.h" #include "comm.h" #include "error.h" #include "force.h" #include "fix.h" #include "fix_nve_spin.h" -#include "pair_hybrid.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "pair_spin_dmi.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin_exchange.cpp b/src/SPIN/pair_spin_exchange.cpp index 93b6d9501e..059a8f5f34 100644 --- a/src/SPIN/pair_spin_exchange.cpp +++ b/src/SPIN/pair_spin_exchange.cpp @@ -21,28 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include #include - +#include "pair_spin_exchange.h" #include "atom.h" #include "comm.h" #include "error.h" #include "fix.h" #include "fix_nve_spin.h" #include "force.h" -#include "pair_hybrid.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "pair_spin_exchange.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin_magelec.cpp b/src/SPIN/pair_spin_magelec.cpp index 1f1488b93c..55b96582c8 100644 --- a/src/SPIN/pair_spin_magelec.cpp +++ b/src/SPIN/pair_spin_magelec.cpp @@ -21,28 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include #include - +#include "pair_spin_magelec.h" #include "atom.h" #include "comm.h" #include "error.h" #include "fix.h" #include "fix_nve_spin.h" #include "force.h" -#include "pair_hybrid.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "pair_spin_magelec.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin_neel.cpp b/src/SPIN/pair_spin_neel.cpp index 03041da17f..4d68dbdc22 100644 --- a/src/SPIN/pair_spin_neel.cpp +++ b/src/SPIN/pair_spin_neel.cpp @@ -21,29 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include #include - +#include "pair_spin_neel.h" #include "atom.h" #include "comm.h" #include "error.h" -#include "force.h" #include "fix.h" #include "fix_nve_spin.h" #include "force.h" -#include "pair_hybrid.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "pair_spin_neel.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index d87d2b5e56..a20ec212fd 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -15,9 +15,9 @@ Contributing authors: Jeremy Lechman (SNL), Pieter in 't Veld (BASF) ------------------------------------------------------------------------- */ +#include #include #include -#include #include "fix_srd.h" #include "math_extra.h" #include "atom.h" @@ -27,7 +27,6 @@ #include "group.h" #include "update.h" #include "force.h" -#include "pair.h" #include "domain.h" #include "neighbor.h" #include "comm.h" diff --git a/src/SRD/fix_wall_srd.cpp b/src/SRD/fix_wall_srd.cpp index 24b0c3cec5..cb0f023640 100644 --- a/src/SRD/fix_wall_srd.cpp +++ b/src/SRD/fix_wall_srd.cpp @@ -11,11 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include #include "fix_wall_srd.h" -#include "atom.h" -#include "modify.h" #include "fix.h" #include "domain.h" #include "lattice.h" diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index 1bc5387c9e..5de78f7510 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -15,7 +15,6 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include #include #include #include "atom_vec_electron.h" @@ -23,7 +22,6 @@ #include "comm.h" #include "domain.h" #include "modify.h" -#include "force.h" #include "fix.h" #include "citeme.h" #include "memory.h" diff --git a/src/USER-EFF/compute_ke_atom_eff.cpp b/src/USER-EFF/compute_ke_atom_eff.cpp index b1b87cd3df..c943366f1b 100644 --- a/src/USER-EFF/compute_ke_atom_eff.cpp +++ b/src/USER-EFF/compute_ke_atom_eff.cpp @@ -15,7 +15,6 @@ Contributing author: Andres Jaramillo-Botero ------------------------------------------------------------------------- */ -#include #include #include #include "compute_ke_atom_eff.h" diff --git a/src/USER-EFF/compute_ke_eff.cpp b/src/USER-EFF/compute_ke_eff.cpp index b4f571cb63..3e277fc66c 100644 --- a/src/USER-EFF/compute_ke_eff.cpp +++ b/src/USER-EFF/compute_ke_eff.cpp @@ -16,14 +16,12 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "compute_ke_eff.h" #include "atom.h" #include "update.h" #include "force.h" #include "domain.h" -#include "group.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-EFF/compute_temp_deform_eff.cpp b/src/USER-EFF/compute_temp_deform_eff.cpp index 23abb4f99d..7a12a69982 100644 --- a/src/USER-EFF/compute_temp_deform_eff.cpp +++ b/src/USER-EFF/compute_temp_deform_eff.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include #include "compute_temp_deform_eff.h" diff --git a/src/USER-EFF/compute_temp_eff.cpp b/src/USER-EFF/compute_temp_eff.cpp index 956461adf1..d745269ff5 100644 --- a/src/USER-EFF/compute_temp_eff.cpp +++ b/src/USER-EFF/compute_temp_eff.cpp @@ -17,8 +17,6 @@ #include #include -#include -#include #include "compute_temp_eff.h" #include "atom.h" #include "update.h" diff --git a/src/USER-EFF/compute_temp_region_eff.cpp b/src/USER-EFF/compute_temp_region_eff.cpp index 659bdfca5e..cec87b29ab 100644 --- a/src/USER-EFF/compute_temp_region_eff.cpp +++ b/src/USER-EFF/compute_temp_region_eff.cpp @@ -16,14 +16,12 @@ ------------------------------------------------------------------------- */ #include -#include #include #include #include "compute_temp_region_eff.h" #include "atom.h" #include "update.h" #include "force.h" -#include "modify.h" #include "domain.h" #include "region.h" #include "group.h" diff --git a/src/USER-EFF/fix_langevin_eff.cpp b/src/USER-EFF/fix_langevin_eff.cpp index d362113997..5158d7c681 100644 --- a/src/USER-EFF/fix_langevin_eff.cpp +++ b/src/USER-EFF/fix_langevin_eff.cpp @@ -17,19 +17,13 @@ #include #include -#include #include #include "fix_langevin_eff.h" -#include "math_extra.h" #include "atom.h" -#include "force.h" #include "update.h" #include "modify.h" #include "compute.h" #include "domain.h" -#include "region.h" -#include "respa.h" -#include "comm.h" #include "input.h" #include "variable.h" #include "random_mars.h" diff --git a/src/USER-EFF/fix_nh_eff.cpp b/src/USER-EFF/fix_nh_eff.cpp index 3e0a59612c..034233732e 100644 --- a/src/USER-EFF/fix_nh_eff.cpp +++ b/src/USER-EFF/fix_nh_eff.cpp @@ -15,12 +15,10 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include #include #include "fix_nh_eff.h" #include "atom.h" #include "atom_vec.h" -#include "group.h" #include "error.h" #include "domain.h" diff --git a/src/USER-EFF/fix_nve_eff.cpp b/src/USER-EFF/fix_nve_eff.cpp index 699dd9f949..ea719c91c0 100644 --- a/src/USER-EFF/fix_nve_eff.cpp +++ b/src/USER-EFF/fix_nve_eff.cpp @@ -15,8 +15,6 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include -#include #include #include #include "fix_nve_eff.h" diff --git a/src/USER-EFF/fix_nvt_eff.cpp b/src/USER-EFF/fix_nvt_eff.cpp index 9e23ee023b..8516accd31 100644 --- a/src/USER-EFF/fix_nvt_eff.cpp +++ b/src/USER-EFF/fix_nvt_eff.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include "fix_nvt_eff.h" #include "group.h" #include "modify.h" diff --git a/src/USER-EFF/fix_temp_rescale_eff.cpp b/src/USER-EFF/fix_temp_rescale_eff.cpp index 37f45b3c28..4a8f4b0372 100644 --- a/src/USER-EFF/fix_temp_rescale_eff.cpp +++ b/src/USER-EFF/fix_temp_rescale_eff.cpp @@ -23,8 +23,6 @@ #include "force.h" #include "group.h" #include "update.h" -#include "domain.h" -#include "region.h" #include "comm.h" #include "modify.h" #include "compute.h" diff --git a/src/USER-EFF/pair_eff_cut.cpp b/src/USER-EFF/pair_eff_cut.cpp index f566922ef7..a4c0557620 100644 --- a/src/USER-EFF/pair_eff_cut.cpp +++ b/src/USER-EFF/pair_eff_cut.cpp @@ -15,8 +15,8 @@ Contributing author: Andres Jaramillo-Botero ------------------------------------------------------------------------- */ +#include #include -#include #include #include #include "pair_eff_cut.h" @@ -31,7 +31,6 @@ #include "neigh_list.h" #include "memory.h" #include "error.h" -#include "atom_vec_electron.h" using namespace LAMMPS_NS; diff --git a/src/USER-PHONON/fix_phonon.cpp b/src/USER-PHONON/fix_phonon.cpp index cdbe4068bc..9b663ce383 100644 --- a/src/USER-PHONON/fix_phonon.cpp +++ b/src/USER-PHONON/fix_phonon.cpp @@ -23,8 +23,8 @@ konglt@sjtu.edu.cn; konglt@gmail.com ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include #include "fix_phonon.h" #include "fft3d_wrap.h" @@ -33,7 +33,6 @@ #include "domain.h" #include "force.h" #include "group.h" -#include "lattice.h" #include "modify.h" #include "update.h" #include "citeme.h"