From 35be1724e39ffe2877fae7ddee67bbabe17e4214 Mon Sep 17 00:00:00 2001 From: julient31 Date: Tue, 28 May 2019 15:31:03 -0600 Subject: [PATCH] Commit JT 052819 - corrected examples in examples/SPIN/dipole_spin - modified warning message in src/SPIN/pair_spin_dipole_*.cpp --- examples/SPIN/dipole_spin/in.spin.iron_dipole_cut | 2 +- examples/SPIN/dipole_spin/in.spin.iron_dipole_ewald | 2 +- examples/SPIN/dipole_spin/in.spin.iron_dipole_pppm | 5 +---- src/SPIN/pair_spin_dipole_cut.cpp | 7 ++++--- src/SPIN/pair_spin_dipole_long.cpp | 7 ++++--- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/examples/SPIN/dipole_spin/in.spin.iron_dipole_cut b/examples/SPIN/dipole_spin/in.spin.iron_dipole_cut index 55bda10b3e..a409fe0563 100644 --- a/examples/SPIN/dipole_spin/in.spin.iron_dipole_cut +++ b/examples/SPIN/dipole_spin/in.spin.iron_dipole_cut @@ -54,6 +54,6 @@ thermo_style custom step time v_magx v_magy v_magz v_magnorm v_tmag v_emag pe thermo 50 compute outsp all property/atom spx spy spz sp fmx fmy fmz -dump 100 all custom 1 dump_iron.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] +dump 1 all custom 100 dump_iron.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] run 2000 diff --git a/examples/SPIN/dipole_spin/in.spin.iron_dipole_ewald b/examples/SPIN/dipole_spin/in.spin.iron_dipole_ewald index 75e202d61c..58b44b55fe 100644 --- a/examples/SPIN/dipole_spin/in.spin.iron_dipole_ewald +++ b/examples/SPIN/dipole_spin/in.spin.iron_dipole_ewald @@ -56,6 +56,6 @@ thermo_style custom step time v_magx v_magy v_magz v_magnorm v_tmag v_emag pe thermo 50 compute outsp all property/atom spx spy spz sp fmx fmy fmz -dump 100 all custom 1 dump_iron.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] +dump 1 all custom 100 dump_iron.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] run 2000 diff --git a/examples/SPIN/dipole_spin/in.spin.iron_dipole_pppm b/examples/SPIN/dipole_spin/in.spin.iron_dipole_pppm index ea88b518f3..28d7e4a4bc 100644 --- a/examples/SPIN/dipole_spin/in.spin.iron_dipole_pppm +++ b/examples/SPIN/dipole_spin/in.spin.iron_dipole_pppm @@ -57,9 +57,6 @@ thermo_style custom step time v_magx v_magy v_magz v_magnorm v_tmag v_emag pe thermo 50 compute outsp all property/atom spx spy spz sp fmx fmy fmz -dump 100 all custom 1 dump_iron.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] +dump 1 all custom 100 dump_iron.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] run 2000 -# min_style spin -# min_modify alpha_damp 1.0 discrete_factor 10 -# minimize 1.0e-16 1.0e-16 10000 10000 diff --git a/src/SPIN/pair_spin_dipole_cut.cpp b/src/SPIN/pair_spin_dipole_cut.cpp index 405657ccbf..4ff198488a 100644 --- a/src/SPIN/pair_spin_dipole_cut.cpp +++ b/src/SPIN/pair_spin_dipole_cut.cpp @@ -152,15 +152,16 @@ void PairSpinDipoleCut::init_style() neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; - // checking if nve/spin is a listed fix + // checking if nve/spin or neb/spin are a listed fix int ifix = 0; while (ifix < modify->nfix) { if (strcmp(modify->fix[ifix]->style,"nve/spin") == 0) break; + if (strcmp(modify->fix[ifix]->style,"neb/spin") == 0) break; ifix++; } - if (ifix == modify->nfix) - error->all(FLERR,"pair/spin style requires nve/spin"); + if ((ifix == modify->nfix) && (comm->me == 0)) + error->warning(FLERR,"Using pair/spin style without nve/spin or neb/spin"); // get the lattice_flag from nve/spin diff --git a/src/SPIN/pair_spin_dipole_long.cpp b/src/SPIN/pair_spin_dipole_long.cpp index bf9bdeb91b..e3575a6a07 100644 --- a/src/SPIN/pair_spin_dipole_long.cpp +++ b/src/SPIN/pair_spin_dipole_long.cpp @@ -154,15 +154,16 @@ void PairSpinDipoleLong::init_style() neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; - // checking if nve/spin is a listed fix + // checking if nve/spin or neb/spin are a listed fix int ifix = 0; while (ifix < modify->nfix) { if (strcmp(modify->fix[ifix]->style,"nve/spin") == 0) break; + if (strcmp(modify->fix[ifix]->style,"neb/spin") == 0) break; ifix++; } - if (ifix == modify->nfix) - error->all(FLERR,"pair/spin style requires nve/spin"); + if ((ifix == modify->nfix) && (comm->me == 0)) + error->warning(FLERR,"Using pair/spin style without nve/spin or neb/spin"); // get the lattice_flag from nve/spin