From 08b1728a963aac4361fcb5031f29f0640b0303e4 Mon Sep 17 00:00:00 2001 From: julient31 Date: Tue, 29 Jan 2019 13:05:03 -0700 Subject: [PATCH 01/35] Commit JT 012919 - commit tuesday evening, second day imp. - dev. fix_neb_spin --- examples/SPIN/gneb_bfo/README | 5 + examples/SPIN/gneb_bfo/Si.sw | 18 + examples/SPIN/gneb_bfo/final.hop1 | 2 + examples/SPIN/gneb_bfo/final.iron_spin | 68 + examples/SPIN/gneb_bfo/final.iron_spin_data | 82 ++ examples/SPIN/gneb_bfo/in.neb.hop1 | 66 + examples/SPIN/gneb_bfo/in.neb.spin_iron | 100 ++ examples/SPIN/gneb_bfo/in.spin.bfo | 56 + examples/SPIN/gneb_bfo/in.spin.iron | 56 + examples/SPIN/gneb_bfo/in.spin.single_spin | 57 + examples/SPIN/gneb_bfo/in.tad | 110 ++ examples/SPIN/gneb_bfo/initial.hop1 | 860 +++++++++++++ examples/SPIN/gneb_bfo/initial.iron_spin | 82 ++ src/REPLICA/fix_neb_spin.cpp | 1226 +++++++++++++++++++ src/REPLICA/fix_neb_spin.h | 115 ++ src/REPLICA/neb_spin.cpp | 722 +++++++++++ src/REPLICA/neb_spin.h | 137 +++ 17 files changed, 3762 insertions(+) create mode 100644 examples/SPIN/gneb_bfo/README create mode 100644 examples/SPIN/gneb_bfo/Si.sw create mode 100644 examples/SPIN/gneb_bfo/final.hop1 create mode 100644 examples/SPIN/gneb_bfo/final.iron_spin create mode 100644 examples/SPIN/gneb_bfo/final.iron_spin_data create mode 100644 examples/SPIN/gneb_bfo/in.neb.hop1 create mode 100644 examples/SPIN/gneb_bfo/in.neb.spin_iron create mode 100644 examples/SPIN/gneb_bfo/in.spin.bfo create mode 100644 examples/SPIN/gneb_bfo/in.spin.iron create mode 100644 examples/SPIN/gneb_bfo/in.spin.single_spin create mode 100644 examples/SPIN/gneb_bfo/in.tad create mode 100644 examples/SPIN/gneb_bfo/initial.hop1 create mode 100644 examples/SPIN/gneb_bfo/initial.iron_spin create mode 100644 src/REPLICA/fix_neb_spin.cpp create mode 100644 src/REPLICA/fix_neb_spin.h create mode 100644 src/REPLICA/neb_spin.cpp create mode 100644 src/REPLICA/neb_spin.h diff --git a/examples/SPIN/gneb_bfo/README b/examples/SPIN/gneb_bfo/README new file mode 100644 index 0000000000..eeb4aa4692 --- /dev/null +++ b/examples/SPIN/gneb_bfo/README @@ -0,0 +1,5 @@ +Run this example as: + +mpirun -np 3 lmp_g++ -partition 3x1 -in in.tad + +You should be able to use any number of replicas >= 3. diff --git a/examples/SPIN/gneb_bfo/Si.sw b/examples/SPIN/gneb_bfo/Si.sw new file mode 100644 index 0000000000..db4be100ef --- /dev/null +++ b/examples/SPIN/gneb_bfo/Si.sw @@ -0,0 +1,18 @@ +# DATE: 2007-06-11 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: Stillinger and Weber, Phys Rev B, 31, 5262, (1985) +# Stillinger-Weber parameters for various elements and mixtures +# multiple entries can be added to this file, LAMMPS reads the ones it needs +# these entries are in LAMMPS "metal" units: +# epsilon = eV; sigma = Angstroms +# other quantities are unitless + +# format of a single entry (one or more lines): +# element 1, element 2, element 3, +# epsilon, sigma, a, lambda, gamma, costheta0, A, B, p, q, tol + +# Here are the original parameters in metal units, for Silicon from: +# +# Stillinger and Weber, Phys. Rev. B, v. 31, p. 5262, (1985) +# + +Si Si Si 2.1683 2.0951 1.80 21.0 1.20 -0.333333333333 + 7.049556277 0.6022245584 4.0 0.0 0.0 diff --git a/examples/SPIN/gneb_bfo/final.hop1 b/examples/SPIN/gneb_bfo/final.hop1 new file mode 100644 index 0000000000..338e674a9c --- /dev/null +++ b/examples/SPIN/gneb_bfo/final.hop1 @@ -0,0 +1,2 @@ +1 +412 14.0 20.5 0 diff --git a/examples/SPIN/gneb_bfo/final.iron_spin b/examples/SPIN/gneb_bfo/final.iron_spin new file mode 100644 index 0000000000..a921287ccb --- /dev/null +++ b/examples/SPIN/gneb_bfo/final.iron_spin @@ -0,0 +1,68 @@ +32 +2.2000000000000002e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 1.4332499999999999e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 2.8664999999999998e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 4.2997499999999995e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 5.7329999999999997e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 7.1662499999999998e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 8.5994999999999990e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 1.0032750000000000e+01 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 0.0000000000000000e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 2.8664999999999998e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 5.7329999999999997e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 8.5994999999999990e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 1.4332499999999999e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 4.2997499999999995e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 7.1662499999999998e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 1.0032750000000000e+01 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 0.0000000000000000e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 1.4332499999999999e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 2.8664999999999998e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 4.2997499999999995e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 5.7329999999999997e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 7.1662499999999998e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 8.5994999999999990e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 1.0032750000000000e+01 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 0.0000000000000000e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 2.8664999999999998e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 5.7329999999999997e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 8.5994999999999990e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 1.4332499999999999e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 4.2997499999999995e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 7.1662499999999998e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2.2000000000000002e+00 1.0032750000000000e+01 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SPIN/gneb_bfo/final.iron_spin_data b/examples/SPIN/gneb_bfo/final.iron_spin_data new file mode 100644 index 0000000000..b337bac188 --- /dev/null +++ b/examples/SPIN/gneb_bfo/final.iron_spin_data @@ -0,0 +1,82 @@ +LAMMPS data file via write_data, version 4 Jan 2019, timestep = 0 + +32 atoms +1 atom types + +0.0000000000000000e+00 1.1465999999999999e+01 xlo xhi +0.0000000000000000e+00 1.1465999999999999e+01 ylo yhi +0.0000000000000000e+00 2.8664999999999998e+00 zlo zhi + +Masses + +1 55.845 + +Atoms # spin + +1 1 2.2000000000000002e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +2 1 2.2000000000000002e+00 1.4332499999999999e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +3 1 2.2000000000000002e+00 2.8664999999999998e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +4 1 2.2000000000000002e+00 4.2997499999999995e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +5 1 2.2000000000000002e+00 5.7329999999999997e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +6 1 2.2000000000000002e+00 7.1662499999999998e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +7 1 2.2000000000000002e+00 8.5994999999999990e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +8 1 2.2000000000000002e+00 1.0032750000000000e+01 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +9 1 2.2000000000000002e+00 0.0000000000000000e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +11 1 2.2000000000000002e+00 2.8664999999999998e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +13 1 2.2000000000000002e+00 5.7329999999999997e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +15 1 2.2000000000000002e+00 8.5994999999999990e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +10 1 2.2000000000000002e+00 1.4332499999999999e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +12 1 2.2000000000000002e+00 4.2997499999999995e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +14 1 2.2000000000000002e+00 7.1662499999999998e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +16 1 2.2000000000000002e+00 1.0032750000000000e+01 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +17 1 2.2000000000000002e+00 0.0000000000000000e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +18 1 2.2000000000000002e+00 1.4332499999999999e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +19 1 2.2000000000000002e+00 2.8664999999999998e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +20 1 2.2000000000000002e+00 4.2997499999999995e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +21 1 2.2000000000000002e+00 5.7329999999999997e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +22 1 2.2000000000000002e+00 7.1662499999999998e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +23 1 2.2000000000000002e+00 8.5994999999999990e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +24 1 2.2000000000000002e+00 1.0032750000000000e+01 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +25 1 2.2000000000000002e+00 0.0000000000000000e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +27 1 2.2000000000000002e+00 2.8664999999999998e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +29 1 2.2000000000000002e+00 5.7329999999999997e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +31 1 2.2000000000000002e+00 8.5994999999999990e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +26 1 2.2000000000000002e+00 1.4332499999999999e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +28 1 2.2000000000000002e+00 4.2997499999999995e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +30 1 2.2000000000000002e+00 7.1662499999999998e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +32 1 2.2000000000000002e+00 1.0032750000000000e+01 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 + +Velocities + +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +31 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +30 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +32 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 diff --git a/examples/SPIN/gneb_bfo/in.neb.hop1 b/examples/SPIN/gneb_bfo/in.neb.hop1 new file mode 100644 index 0000000000..4e203afd82 --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.neb.hop1 @@ -0,0 +1,66 @@ +# 2d NEB surface simulation, hop from surface to become adatom + +dimension 2 +boundary p s p + +atom_style atomic +neighbor 0.3 bin +neigh_modify delay 5 +atom_modify map array sort 0 0.0 + +variable u uloop 20 + +# create geometry with flat surface + +lattice hex 0.9 +region box block 0 20 0 10 -0.25 0.25 + +#create_box 3 box +#create_atoms 1 box +#mass * 1.0 +#write_data initial.hop1 + +read_data ../examples/SPIN/gneb_bfo/initial.hop1 + +# LJ potentials + +pair_style lj/cut 2.5 +pair_coeff * * 1.0 1.0 2.5 +pair_modify shift yes + +# initial minimization to relax surface + +minimize 1.0e-6 1.0e-4 1000 10000 +reset_timestep 0 + +# define groups + +region 1 block INF INF INF 1.25 INF INF +group lower region 1 +group mobile subtract all lower +set group lower type 2 + +timestep 0.05 + +# group of NEB atoms - either block or single atom ID 412 + +region surround block 10 18 17 20 0 0 units box +group nebatoms region surround +#group nebatoms id 412 +set group nebatoms type 3 +group nonneb subtract all nebatoms + +fix 1 lower setforce 0.0 0.0 0.0 +fix 2 nebatoms neb 1.0 parallel ideal +fix 3 all enforce2d + +thermo 100 + +#dump 1 nebatoms atom 10 dump.neb.$u +#dump 2 nonneb atom 10 dump.nonneb.$u + +# run NEB for 2000 steps or to force tolerance + +min_style quickmin + +neb 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.hop1 diff --git a/examples/SPIN/gneb_bfo/in.neb.spin_iron b/examples/SPIN/gneb_bfo/in.neb.spin_iron new file mode 100644 index 0000000000..6b99cd4639 --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.neb.spin_iron @@ -0,0 +1,100 @@ +# bcc iron in a 3d periodic box + +clear +units metal +atom_style spin + +dimension 3 +boundary p p f + +# necessary for the serial algorithm (sametag) +atom_modify map array + +lattice bcc 2.8665 +region box block 0.0 4.0 0.0 4.0 0.0 1.0 +#create_box 1 box +#create_atoms 1 box + +read_data ../examples/SPIN/gneb_bfo/initial.iron_spin + +# setting mass, mag. moments, and interactions for bcc iron + +mass 1 55.845 +set group all spin 2.2 -1.0 0.0 0.0 + +pair_style spin/exchange 3.5 +pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 + +neighbor 0.1 bin +neigh_modify every 10 check yes delay 20 + +fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 +fix 2 all langevin/spin 0.0 0.0 21 +fix 2 nebatoms neb_spin 1.0 +#parallel ideal + +min_style quickmin +neb 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin + + +############################################################# + +# 2d NEB surface simulation, hop from surface to become adatom + + +variable u uloop 20 + +# create geometry with flat surface + +lattice hex 0.9 +region box block 0 20 0 10 -0.25 0.25 + +#create_box 3 box +#create_atoms 1 box +#mass * 1.0 +#write_data initial.hop1 + +read_data ../examples/SPIN/gneb_bfo/initial.hop1 + +# LJ potentials + +pair_style lj/cut 2.5 +pair_coeff * * 1.0 1.0 2.5 +pair_modify shift yes + +# initial minimization to relax surface + +minimize 1.0e-6 1.0e-4 1000 10000 +reset_timestep 0 + +# define groups + +region 1 block INF INF INF 1.25 INF INF +group lower region 1 +group mobile subtract all lower +set group lower type 2 + +timestep 0.05 + +# group of NEB atoms - either block or single atom ID 412 + +region surround block 10 18 17 20 0 0 units box +group nebatoms region surround +#group nebatoms id 412 +set group nebatoms type 3 +group nonneb subtract all nebatoms + +fix 1 lower setforce 0.0 0.0 0.0 +fix 2 nebatoms neb 1.0 parallel ideal +fix 3 all enforce2d + +thermo 100 + +#dump 1 nebatoms atom 10 dump.neb.$u +#dump 2 nonneb atom 10 dump.nonneb.$u + +# run NEB for 2000 steps or to force tolerance + +min_style quickmin + +neb 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.hop1 diff --git a/examples/SPIN/gneb_bfo/in.spin.bfo b/examples/SPIN/gneb_bfo/in.spin.bfo new file mode 100644 index 0000000000..e3c88b0f06 --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.spin.bfo @@ -0,0 +1,56 @@ +# layer sc iron atoms (in the [001] plane) in bismuth oxide + +clear +units metal +atom_style spin + +dimension 3 +boundary p p f + +# necessary for the serial algorithm (sametag) +atom_modify map array + +lattice sc 3.96 +region box block 0.0 34.0 0.0 34.0 0.0 5.0 +create_box 1 box +create_atoms 1 box + +# setting mass, mag. moments, and interactions for bfo + +mass 1 1.0 + +set group all spin/random 11 2.50 + +#pair_style hybrid/overlay spin/exchange 6.0 spin/magelec 4.5 +pair_style hybrid/overlay spin/exchange 6.0 spin/magelec 4.5 spin/dmi 4.5 +pair_coeff * * spin/exchange exchange 6.0 -0.01575 0.0 1.965 +pair_coeff * * spin/magelec magelec 4.5 0.000109 1.0 1.0 1.0 +pair_coeff * * spin/dmi dmi 4.5 0.00005 1.0 1.0 1.0 + +neighbor 0.1 bin +neigh_modify every 10 check yes delay 20 + +fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0 +fix 2 all langevin/spin 0.0 0.1 21 +fix 3 all nve/spin lattice no + +timestep 0.0002 + +compute out_mag all spin +compute out_pe all pe +compute out_ke all ke +compute out_temp all temp + +variable magz equal c_out_mag[3] +variable magnorm equal c_out_mag[4] +variable emag equal c_out_mag[5] +variable tmag equal c_out_mag[6] + +#thermo_style custom step time v_magnorm v_emag temp etotal +thermo_style custom step time v_magnorm pe ke v_emag temp etotal +thermo 10 + +compute outsp all property/atom spx spy spz sp fmx fmy fmz +dump 100 all custom 1 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] + +run 2000 diff --git a/examples/SPIN/gneb_bfo/in.spin.iron b/examples/SPIN/gneb_bfo/in.spin.iron new file mode 100644 index 0000000000..6d291c633b --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.spin.iron @@ -0,0 +1,56 @@ +# bcc iron in a 3d periodic box + +clear +units metal +atom_style spin + +dimension 3 +boundary p p p + +# necessary for the serial algorithm (sametag) +atom_modify map array + +lattice bcc 2.8665 +region box block 0.0 4.0 0.0 4.0 0.0 1.0 +create_box 1 box +create_atoms 1 box + +# setting mass, mag. moments, and interactions for bcc iron + +mass 1 55.845 + +set group all spin 2.2 -1.0 0.0 0.0 +#velocity all create 100 4928459 rot yes dist gaussian + +pair_style spin/exchange 3.5 +pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 + +neighbor 0.1 bin +neigh_modify every 10 check yes delay 20 + +fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 +fix 2 all langevin/spin 0.0 0.0 21 + +fix 3 all nve/spin lattice yes +timestep 0.0001 + +# compute and output options + +compute out_mag all spin +compute out_pe all pe +compute out_ke all ke +compute out_temp all temp + +variable magz equal c_out_mag[3] +variable magnorm equal c_out_mag[4] +variable emag equal c_out_mag[5] +variable tmag equal c_out_mag[6] + +thermo_style custom step time v_magnorm v_tmag temp v_emag ke pe etotal +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] + +run 0 +write_data final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.spin.single_spin b/examples/SPIN/gneb_bfo/in.spin.single_spin new file mode 100644 index 0000000000..3a63c87b8c --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.spin.single_spin @@ -0,0 +1,57 @@ +# bcc iron in a 3d periodic box + +clear +units metal +atom_style spin + +dimension 3 +boundary f f f +#boundary p p p + +# necessary for the serial algorithm (sametag) +atom_modify map array + +lattice sc 2.8665 +region box block 0.0 1.0 0.0 1.0 0.0 1.0 +create_box 1 box +create_atoms 1 box + +# setting mass, mag. moments, and interactions for bcc iron + +mass 1 55.845 + +set group all spin 2.2 0.0 0.0 1.0 +#velocity all create 100 4928459 rot yes dist gaussian + +pair_style spin/exchange 3.5 +pair_coeff * * exchange 3.4 0.0 0.2171 1.841 + +neighbor 0.1 bin +neigh_modify every 10 check yes delay 20 + +fix 1 all precession/spin zeeman 0.01 0.0 1.0 0.0 anisotropy 0.005 0.0 0.0 1.0 +fix 2 all langevin/spin 50.0 0.1 21 + +fix 3 all nve/spin lattice no +timestep 0.0001 + +# compute and output options + +compute out_mag all spin +compute out_pe all pe +compute out_ke all ke +compute out_temp all temp + +variable magz equal c_out_mag[3] +variable magnorm equal c_out_mag[4] +variable emag equal c_out_mag[5] +variable tmag equal c_out_mag[6] + +thermo_style custom step time v_magz v_magnorm v_tmag temp v_emag ke pe etotal +thermo 100 + +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] + +run 50000 +write_data final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.tad b/examples/SPIN/gneb_bfo/in.tad new file mode 100644 index 0000000000..674fdc8172 --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.tad @@ -0,0 +1,110 @@ +# temperature accelerated dynamics model for a single vacancy in bulk Si +# events occur when a neighboring atom diffuses to the vacant site +# run this on multiple partitions as +# mpirun -np 3 lmp_g++ -partition 3x1 -in in.tad + +units metal + +atom_style atomic +atom_modify map array +boundary p p p +atom_modify sort 0 0.0 + +# temperatures +variable tlo equal 1800.0 +variable thi equal 2400.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a & + a1 1.0 0.0 0.0 & + a2 0.0 1.0 0.0 & + a3 0.0 0.0 1.0 & + basis 0.0 0.0 0.0 & + basis 0.0 0.5 0.5 & + basis 0.5 0.0 0.5 & + basis 0.5 0.5 0.0 & + basis 0.25 0.25 0.25 & + basis 0.25 0.75 0.75 & + basis 0.75 0.25 0.75 & + basis 0.75 0.75 0.25 + +region myreg block 0 4 & + 0 4 & + 0 4 +create_box 1 myreg +create_atoms 1 region myreg + +mass 1 28.06 + +group Si type 1 + +velocity all create ${thi} 5287286 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +delete_atoms group del + +pair_style sw +pair_coeff * * ../examples/SPIN/gneb_bfo/Si.sw Si + +thermo 10 + +fix 1 all nve +fix 2 all langevin ${thi} ${thi} 0.1 48278 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +# equilibrate + +run 1000 + +# Eliminate COM motion +velocity all zero linear + +# only output atoms near vacancy + +compute coord all coord/atom cutoff $r + +#dump events all custom 1 dump.prd id type x y z +#dump_modify events thresh c_coord != 4 + +compute patom all pe/atom +compute pe all reduce sum c_patom +compute satom all stress/atom NULL +compute str all reduce sum c_satom[1] c_satom[2] c_satom[3] +variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol) + +thermo_style custom step temp pe c_pe press v_press + +compute event all event/displace 1.0 + +unfix 1 +unfix 2 +fix 1 all nvt temp ${thi} ${thi} 0.1 + +# tad nsteps nevent tlo thi delta_conf tmax compute +# [min etol ftol niter neval] +# [neb etol_neb ftol_neb n1steps n2steps nevery] +# [neb_style min_style] +# [neb_log logfile] + +tad 2000 50 ${tlo} ${thi} 0.05 1.0 event & + min ${etol} ${ftol} ${maxiter} ${maxeval} & + neb 0.0 0.01 200 200 20 neb_style fire neb_log log.neb diff --git a/examples/SPIN/gneb_bfo/initial.hop1 b/examples/SPIN/gneb_bfo/initial.hop1 new file mode 100644 index 0000000000..228708c314 --- /dev/null +++ b/examples/SPIN/gneb_bfo/initial.hop1 @@ -0,0 +1,860 @@ +LAMMPS data file via write_data, version 27 Sep 2016, timestep = 0 + +420 atoms +3 atom types + +0.0000000000000000e+00 2.2653923264628304e+01 xlo xhi +-1.9618873042551413e-03 1.9620834929855668e+01 ylo yhi +-2.8317404080785380e-01 2.8317404080785380e-01 zlo zhi + +Masses + +1 1 +2 1 +3 1 + +Atoms # atomic + +1 1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +2 1 5.6634808161570760e-01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +3 1 1.1326961632314152e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +4 1 1.6990442448471228e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +5 1 2.2653923264628304e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +6 1 2.8317404080785380e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +7 1 3.3980884896942456e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +8 1 3.9644365713099532e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +9 1 4.5307846529256608e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +10 1 5.0971327345413684e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +11 1 5.6634808161570760e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +12 1 6.2298288977727836e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +13 1 6.7961769793884912e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +14 1 7.3625250610041988e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +15 1 7.9288731426199064e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +16 1 8.4952212242356140e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +17 1 9.0615693058513216e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +18 1 9.6279173874670292e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +19 1 1.0194265469082737e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +20 1 1.0760613550698444e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +21 1 1.1326961632314152e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +22 1 1.1893309713929860e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +23 1 1.2459657795545567e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +24 1 1.3026005877161275e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +25 1 1.3592353958776982e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +26 1 1.4158702040392690e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +27 1 1.4725050122008398e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +28 1 1.5291398203624105e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +29 1 1.5857746285239813e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +30 1 1.6424094366855520e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +31 1 1.6990442448471228e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +32 1 1.7556790530086936e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +33 1 1.8123138611702643e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +34 1 1.8689486693318351e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +35 1 1.9255834774934058e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +36 1 1.9822182856549766e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +37 1 2.0388530938165474e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +38 1 2.0954879019781181e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +39 1 2.1521227101396889e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +40 1 2.2087575183012596e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 +41 1 0.0000000000000000e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +42 1 5.6634808161570760e-01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +43 1 1.1326961632314152e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +44 1 1.6990442448471228e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +45 1 2.2653923264628304e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +46 1 2.8317404080785380e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +47 1 3.3980884896942456e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +48 1 3.9644365713099532e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +49 1 4.5307846529256608e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +50 1 5.0971327345413684e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +51 1 5.6634808161570760e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +52 1 6.2298288977727836e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +53 1 6.7961769793884912e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +54 1 7.3625250610041988e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +55 1 7.9288731426199064e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +56 1 8.4952212242356140e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +57 1 9.0615693058513216e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +58 1 9.6279173874670292e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +59 1 1.0194265469082737e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +60 1 1.0760613550698444e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +61 1 1.1326961632314152e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +62 1 1.1893309713929860e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +63 1 1.2459657795545567e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +64 1 1.3026005877161275e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +65 1 1.3592353958776982e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +66 1 1.4158702040392690e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +67 1 1.4725050122008398e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +68 1 1.5291398203624105e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +69 1 1.5857746285239813e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +70 1 1.6424094366855520e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +71 1 1.6990442448471228e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +72 1 1.7556790530086936e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +73 1 1.8123138611702643e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +74 1 1.8689486693318351e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +75 1 1.9255834774934058e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +76 1 1.9822182856549766e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +77 1 2.0388530938165474e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +78 1 2.0954879019781181e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +79 1 2.1521227101396889e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 +80 1 2.2087575183012596e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 +81 1 0.0000000000000000e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +82 1 5.6634808161570760e-01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +83 1 1.1326961632314152e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +84 1 1.6990442448471228e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +85 1 2.2653923264628304e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +86 1 2.8317404080785380e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +87 1 3.3980884896942456e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +88 1 3.9644365713099532e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +89 1 4.5307846529256608e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +90 1 5.0971327345413684e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +91 1 5.6634808161570760e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +92 1 6.2298288977727836e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +93 1 6.7961769793884912e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +94 1 7.3625250610041988e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +95 1 7.9288731426199064e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +96 1 8.4952212242356140e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +97 1 9.0615693058513216e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +98 1 9.6279173874670292e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +99 1 1.0194265469082737e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +100 1 1.0760613550698444e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +101 1 1.1326961632314152e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +102 1 1.1893309713929860e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +103 1 1.2459657795545567e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +104 1 1.3026005877161275e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +105 1 1.3592353958776982e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +106 1 1.4158702040392690e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +107 1 1.4725050122008398e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +108 1 1.5291398203624105e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +109 1 1.5857746285239813e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +110 1 1.6424094366855520e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +111 1 1.6990442448471228e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +112 1 1.7556790530086936e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +113 1 1.8123138611702643e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +114 1 1.8689486693318351e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +115 1 1.9255834774934058e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +116 1 1.9822182856549766e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +117 1 2.0388530938165474e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +118 1 2.0954879019781181e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +119 1 2.1521227101396889e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 +120 1 2.2087575183012596e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 +121 1 0.0000000000000000e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +122 1 5.6634808161570760e-01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +123 1 1.1326961632314152e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +124 1 1.6990442448471228e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +125 1 2.2653923264628304e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +126 1 2.8317404080785380e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +127 1 3.3980884896942456e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +128 1 3.9644365713099532e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +129 1 4.5307846529256608e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +130 1 5.0971327345413684e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +131 1 5.6634808161570760e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +132 1 6.2298288977727836e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +133 1 6.7961769793884912e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +134 1 7.3625250610041988e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +135 1 7.9288731426199064e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +136 1 8.4952212242356140e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +137 1 9.0615693058513216e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +138 1 9.6279173874670292e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +139 1 1.0194265469082737e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +140 1 1.0760613550698444e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +141 1 1.1326961632314152e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +142 1 1.1893309713929860e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +143 1 1.2459657795545567e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +144 1 1.3026005877161275e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +145 1 1.3592353958776982e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +146 1 1.4158702040392690e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +147 1 1.4725050122008398e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +148 1 1.5291398203624105e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +149 1 1.5857746285239813e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +150 1 1.6424094366855520e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +151 1 1.6990442448471228e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +152 1 1.7556790530086936e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +153 1 1.8123138611702643e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +154 1 1.8689486693318351e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +155 1 1.9255834774934058e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +156 1 1.9822182856549766e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +157 1 2.0388530938165474e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +158 1 2.0954879019781181e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +159 1 2.1521227101396889e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 +160 1 2.2087575183012596e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 +161 1 0.0000000000000000e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +162 1 5.6634808161570760e-01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +163 1 1.1326961632314152e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +164 1 1.6990442448471228e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +165 1 2.2653923264628304e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +166 1 2.8317404080785380e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +167 1 3.3980884896942456e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +168 1 3.9644365713099532e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +169 1 4.5307846529256608e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +170 1 5.0971327345413684e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +171 1 5.6634808161570760e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +172 1 6.2298288977727836e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +173 1 6.7961769793884912e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +174 1 7.3625250610041988e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +175 1 7.9288731426199064e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +176 1 8.4952212242356140e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +177 1 9.0615693058513216e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +178 1 9.6279173874670292e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +179 1 1.0194265469082737e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +180 1 1.0760613550698444e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +181 1 1.1326961632314152e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +182 1 1.1893309713929860e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +183 1 1.2459657795545567e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +184 1 1.3026005877161275e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +185 1 1.3592353958776982e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +186 1 1.4158702040392690e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +187 1 1.4725050122008398e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +188 1 1.5291398203624105e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +189 1 1.5857746285239813e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +190 1 1.6424094366855520e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +191 1 1.6990442448471228e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +192 1 1.7556790530086936e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +193 1 1.8123138611702643e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +194 1 1.8689486693318351e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +195 1 1.9255834774934058e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +196 1 1.9822182856549766e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +197 1 2.0388530938165474e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +198 1 2.0954879019781181e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +199 1 2.1521227101396889e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 +200 1 2.2087575183012596e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 +201 1 0.0000000000000000e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +202 1 5.6634808161570760e-01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +203 1 1.1326961632314152e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +204 1 1.6990442448471228e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +205 1 2.2653923264628304e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +206 1 2.8317404080785380e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +207 1 3.3980884896942456e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +208 1 3.9644365713099532e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +209 1 4.5307846529256608e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +210 1 5.0971327345413684e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +211 1 5.6634808161570760e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +212 1 6.2298288977727836e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +213 1 6.7961769793884912e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +214 1 7.3625250610041988e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +215 1 7.9288731426199064e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +216 1 8.4952212242356140e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +217 1 9.0615693058513216e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +218 1 9.6279173874670292e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +219 1 1.0194265469082737e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +220 1 1.0760613550698444e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +221 1 1.1326961632314152e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +222 1 1.1893309713929860e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +223 1 1.2459657795545567e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +224 1 1.3026005877161275e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +225 1 1.3592353958776982e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +226 1 1.4158702040392690e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +227 1 1.4725050122008398e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +228 1 1.5291398203624105e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +229 1 1.5857746285239813e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +230 1 1.6424094366855520e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +231 1 1.6990442448471228e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +232 1 1.7556790530086936e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +233 1 1.8123138611702643e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +234 1 1.8689486693318351e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +235 1 1.9255834774934058e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +236 1 1.9822182856549766e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +237 1 2.0388530938165474e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +238 1 2.0954879019781181e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +239 1 2.1521227101396889e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 +240 1 2.2087575183012596e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 +241 1 0.0000000000000000e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +242 1 5.6634808161570760e-01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +243 1 1.1326961632314152e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +244 1 1.6990442448471228e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +245 1 2.2653923264628304e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +246 1 2.8317404080785380e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +247 1 3.3980884896942456e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +248 1 3.9644365713099532e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +249 1 4.5307846529256608e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +250 1 5.0971327345413684e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +251 1 5.6634808161570760e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +252 1 6.2298288977727836e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +253 1 6.7961769793884912e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +254 1 7.3625250610041988e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +255 1 7.9288731426199064e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +256 1 8.4952212242356140e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +257 1 9.0615693058513216e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +258 1 9.6279173874670292e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +259 1 1.0194265469082737e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +260 1 1.0760613550698444e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +261 1 1.1326961632314152e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +262 1 1.1893309713929860e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +263 1 1.2459657795545567e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +264 1 1.3026005877161275e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +265 1 1.3592353958776982e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +266 1 1.4158702040392690e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +267 1 1.4725050122008398e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +268 1 1.5291398203624105e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +269 1 1.5857746285239813e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +270 1 1.6424094366855520e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +271 1 1.6990442448471228e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +272 1 1.7556790530086936e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +273 1 1.8123138611702643e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +274 1 1.8689486693318351e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +275 1 1.9255834774934058e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +276 1 1.9822182856549766e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +277 1 2.0388530938165474e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +278 1 2.0954879019781181e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +279 1 2.1521227101396889e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 +280 1 2.2087575183012596e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 +281 1 0.0000000000000000e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +282 1 5.6634808161570760e-01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +283 1 1.1326961632314152e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +284 1 1.6990442448471228e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +285 1 2.2653923264628304e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +286 1 2.8317404080785380e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +287 1 3.3980884896942456e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +288 1 3.9644365713099532e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +289 1 4.5307846529256608e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +290 1 5.0971327345413684e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +291 1 5.6634808161570760e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +292 1 6.2298288977727836e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +293 1 6.7961769793884912e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +294 1 7.3625250610041988e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +295 1 7.9288731426199064e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +296 1 8.4952212242356140e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +297 1 9.0615693058513216e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +298 1 9.6279173874670292e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +299 1 1.0194265469082737e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +300 1 1.0760613550698444e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +301 1 1.1326961632314152e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +302 1 1.1893309713929860e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +303 1 1.2459657795545567e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +304 1 1.3026005877161275e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +305 1 1.3592353958776982e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +306 1 1.4158702040392690e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +307 1 1.4725050122008398e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +308 1 1.5291398203624105e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +309 1 1.5857746285239813e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +310 1 1.6424094366855520e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +311 1 1.6990442448471228e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +312 1 1.7556790530086936e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +313 1 1.8123138611702643e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +314 1 1.8689486693318351e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +315 1 1.9255834774934058e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +316 1 1.9822182856549766e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +317 1 2.0388530938165474e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +318 1 2.0954879019781181e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +319 1 2.1521227101396889e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 +320 1 2.2087575183012596e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 +321 1 0.0000000000000000e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +322 1 5.6634808161570760e-01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +323 1 1.1326961632314152e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +324 1 1.6990442448471228e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +325 1 2.2653923264628304e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +326 1 2.8317404080785380e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +327 1 3.3980884896942456e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +328 1 3.9644365713099532e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +329 1 4.5307846529256608e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +330 1 5.0971327345413684e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +331 1 5.6634808161570760e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +332 1 6.2298288977727836e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +333 1 6.7961769793884912e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +334 1 7.3625250610041988e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +335 1 7.9288731426199064e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +336 1 8.4952212242356140e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +337 1 9.0615693058513216e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +338 1 9.6279173874670292e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +339 1 1.0194265469082737e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +340 1 1.0760613550698444e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +341 1 1.1326961632314152e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +342 1 1.1893309713929860e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +343 1 1.2459657795545567e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +344 1 1.3026005877161275e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +345 1 1.3592353958776982e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +346 1 1.4158702040392690e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +347 1 1.4725050122008398e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +348 1 1.5291398203624105e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +349 1 1.5857746285239813e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +350 1 1.6424094366855520e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +351 1 1.6990442448471228e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +352 1 1.7556790530086936e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +353 1 1.8123138611702643e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +354 1 1.8689486693318351e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +355 1 1.9255834774934058e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +356 1 1.9822182856549766e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +357 1 2.0388530938165474e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +358 1 2.0954879019781181e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +359 1 2.1521227101396889e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 +360 1 2.2087575183012596e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 +361 1 0.0000000000000000e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +362 1 5.6634808161570760e-01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +363 1 1.1326961632314152e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +364 1 1.6990442448471228e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +365 1 2.2653923264628304e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +366 1 2.8317404080785380e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +367 1 3.3980884896942456e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +368 1 3.9644365713099532e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +369 1 4.5307846529256608e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +370 1 5.0971327345413684e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +371 1 5.6634808161570760e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +372 1 6.2298288977727836e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +373 1 6.7961769793884912e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +374 1 7.3625250610041988e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +375 1 7.9288731426199064e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +376 1 8.4952212242356140e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +377 1 9.0615693058513216e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +378 1 9.6279173874670292e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +379 1 1.0194265469082737e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +380 1 1.0760613550698444e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +381 1 1.1326961632314152e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +382 1 1.1893309713929860e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +383 1 1.2459657795545567e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +384 1 1.3026005877161275e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +385 1 1.3592353958776982e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +386 1 1.4158702040392690e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +387 1 1.4725050122008398e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +388 1 1.5291398203624105e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +389 1 1.5857746285239813e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +390 1 1.6424094366855520e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +391 1 1.6990442448471228e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +392 1 1.7556790530086936e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +393 1 1.8123138611702643e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +394 1 1.8689486693318351e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +395 1 1.9255834774934058e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +396 1 1.9822182856549766e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +397 1 2.0388530938165474e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +398 1 2.0954879019781181e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +399 1 2.1521227101396889e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 +400 1 2.2087575183012596e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 +401 1 0.0000000000000000e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +402 1 1.1326961632314152e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +403 1 2.2653923264628304e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +404 1 3.3980884896942456e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +405 1 4.5307846529256608e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +406 1 5.6634808161570760e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +407 1 6.7961769793884912e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +408 1 7.9288731426199064e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +409 1 9.0615693058513216e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +410 1 1.0194265469082737e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +411 1 1.1326961632314152e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +412 1 1.2459657795545567e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +413 1 1.3592353958776982e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +414 1 1.4725050122008398e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +415 1 1.5857746285239813e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +416 1 1.6990442448471228e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +417 1 1.8123138611702643e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +418 1 1.9255834774934058e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +419 1 2.0388530938165474e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 +420 1 2.1521227101396889e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 + +Velocities + +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +30 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +31 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +32 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +33 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +34 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +35 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +36 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +37 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +38 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +39 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +40 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +41 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +42 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +43 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +44 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +45 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +46 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +47 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +48 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +49 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +50 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +51 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +52 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +53 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +54 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +55 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +56 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +57 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +58 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +59 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +60 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +61 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +62 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +63 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +64 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +65 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +66 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +67 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +68 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +69 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +70 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +71 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +72 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +73 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +74 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +75 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +76 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +77 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +78 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +79 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +80 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +81 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +82 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +83 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +84 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +85 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +86 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +87 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +88 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +89 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +90 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +91 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +92 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +93 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +94 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +95 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +96 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +97 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +98 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +99 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +100 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +101 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +102 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +103 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +104 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +105 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +106 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +107 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +108 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +109 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +110 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +111 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +112 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +113 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +114 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +115 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +116 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +117 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +118 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +119 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +120 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +121 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +122 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +123 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +124 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +125 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +126 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +127 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +128 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +129 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +130 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +131 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +132 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +133 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +134 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +135 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +136 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +137 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +138 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +139 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +140 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +141 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +142 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +143 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +144 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +145 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +146 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +147 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +148 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +149 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +150 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +151 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +152 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +153 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +154 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +155 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +156 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +157 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +158 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +159 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +160 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +161 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +162 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +163 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +164 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +165 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +166 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +167 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +168 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +169 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +170 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +171 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +172 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +173 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +174 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +175 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +176 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +177 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +178 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +179 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +180 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +181 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +182 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +183 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +184 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +185 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +186 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +187 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +188 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +189 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +190 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +191 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +192 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +193 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +194 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +195 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +196 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +197 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +198 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +199 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +200 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +201 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +202 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +203 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +204 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +205 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +206 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +207 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +208 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +209 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +210 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +211 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +213 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +214 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +215 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +216 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +217 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +218 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +219 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +220 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +221 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +222 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +223 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +224 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +225 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +226 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +227 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +228 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +229 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +230 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +231 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +232 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +233 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +234 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +235 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +236 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +237 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +238 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +239 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +240 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +241 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +242 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +243 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +244 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +245 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +246 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +247 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +248 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +249 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +250 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +251 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +252 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +253 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +254 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +255 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +256 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +257 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +258 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +259 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +260 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +261 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +262 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +263 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +264 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +265 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +266 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +267 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +268 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +269 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +270 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +271 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +272 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +273 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +274 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +275 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +276 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +277 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +278 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +279 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +280 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +281 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +282 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +283 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +284 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +285 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +286 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +287 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +288 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +289 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +290 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +291 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +292 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +293 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +294 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +295 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +296 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +297 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +298 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +299 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +300 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +301 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +302 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +303 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +304 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +305 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +306 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +307 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +308 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +309 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +310 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +311 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +312 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +313 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +314 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +315 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +316 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +317 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +318 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +319 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +320 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +321 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +322 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +323 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +324 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +325 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +326 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +327 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +328 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +329 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +330 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +331 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +332 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +333 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +334 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +335 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +336 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +337 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +338 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +339 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +340 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +341 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +342 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +343 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +344 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +345 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +346 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +347 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +348 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +349 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +350 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +351 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +352 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +353 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +354 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +355 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +356 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +357 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +358 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +359 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +360 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +361 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +362 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +363 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +364 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +365 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +366 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +367 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +368 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +369 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +370 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +371 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +372 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +373 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +374 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +375 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +376 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +377 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +378 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +379 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +380 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +381 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +382 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +383 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +384 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +385 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +386 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +387 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +388 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +389 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +390 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +391 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +392 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +393 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +394 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +395 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +396 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +397 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +398 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +399 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +400 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +401 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +402 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +403 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +404 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +405 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +406 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +407 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +408 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +409 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +410 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +411 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +412 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +413 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +414 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +415 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +416 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +417 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +418 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +419 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +420 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 diff --git a/examples/SPIN/gneb_bfo/initial.iron_spin b/examples/SPIN/gneb_bfo/initial.iron_spin new file mode 100644 index 0000000000..1d28afe400 --- /dev/null +++ b/examples/SPIN/gneb_bfo/initial.iron_spin @@ -0,0 +1,82 @@ +LAMMPS data file via write_data, version 4 Jan 2019, timestep = 0 + +32 atoms +1 atom types + +0.0000000000000000e+00 1.1465999999999999e+01 xlo xhi +0.0000000000000000e+00 1.1465999999999999e+01 ylo yhi +0.0000000000000000e+00 2.8664999999999998e+00 zlo zhi + +Masses + +1 55.845 + +Atoms # spin + +1 1 2.2000000000000002e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +2 1 2.2000000000000002e+00 1.4332499999999999e+00 1.4332499999999999e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +3 1 2.2000000000000002e+00 2.8664999999999998e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +4 1 2.2000000000000002e+00 4.2997499999999995e+00 1.4332499999999999e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +5 1 2.2000000000000002e+00 5.7329999999999997e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +6 1 2.2000000000000002e+00 7.1662499999999998e+00 1.4332499999999999e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +7 1 2.2000000000000002e+00 8.5994999999999990e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +8 1 2.2000000000000002e+00 1.0032750000000000e+01 1.4332499999999999e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +9 1 2.2000000000000002e+00 0.0000000000000000e+00 2.8664999999999998e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +11 1 2.2000000000000002e+00 2.8664999999999998e+00 2.8664999999999998e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +13 1 2.2000000000000002e+00 5.7329999999999997e+00 2.8664999999999998e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +15 1 2.2000000000000002e+00 8.5994999999999990e+00 2.8664999999999998e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +10 1 2.2000000000000002e+00 1.4332499999999999e+00 4.2997499999999995e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +12 1 2.2000000000000002e+00 4.2997499999999995e+00 4.2997499999999995e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +14 1 2.2000000000000002e+00 7.1662499999999998e+00 4.2997499999999995e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +16 1 2.2000000000000002e+00 1.0032750000000000e+01 4.2997499999999995e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +17 1 2.2000000000000002e+00 0.0000000000000000e+00 5.7329999999999997e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +18 1 2.2000000000000002e+00 1.4332499999999999e+00 7.1662499999999998e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +19 1 2.2000000000000002e+00 2.8664999999999998e+00 5.7329999999999997e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +20 1 2.2000000000000002e+00 4.2997499999999995e+00 7.1662499999999998e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +21 1 2.2000000000000002e+00 5.7329999999999997e+00 5.7329999999999997e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +22 1 2.2000000000000002e+00 7.1662499999999998e+00 7.1662499999999998e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +23 1 2.2000000000000002e+00 8.5994999999999990e+00 5.7329999999999997e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +24 1 2.2000000000000002e+00 1.0032750000000000e+01 7.1662499999999998e+00 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +25 1 2.2000000000000002e+00 0.0000000000000000e+00 8.5994999999999990e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +27 1 2.2000000000000002e+00 2.8664999999999998e+00 8.5994999999999990e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +29 1 2.2000000000000002e+00 5.7329999999999997e+00 8.5994999999999990e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +31 1 2.2000000000000002e+00 8.5994999999999990e+00 8.5994999999999990e+00 0.0000000000000000e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +26 1 2.2000000000000002e+00 1.4332499999999999e+00 1.0032750000000000e+01 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +28 1 2.2000000000000002e+00 4.2997499999999995e+00 1.0032750000000000e+01 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +30 1 2.2000000000000002e+00 7.1662499999999998e+00 1.0032750000000000e+01 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 +32 1 2.2000000000000002e+00 1.0032750000000000e+01 1.0032750000000000e+01 1.4332499999999999e+00 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 + +Velocities + +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +31 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +30 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +32 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 diff --git a/src/REPLICA/fix_neb_spin.cpp b/src/REPLICA/fix_neb_spin.cpp new file mode 100644 index 0000000000..a96af45267 --- /dev/null +++ b/src/REPLICA/fix_neb_spin.cpp @@ -0,0 +1,1226 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author for: Emile Maras (CEA, France) + new options for inter-replica forces, first/last replica treatment +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +//#include "fix_neb.h" +#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" +#include "group.h" +#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}; + +#define BUFSIZE 8 + +/* ---------------------------------------------------------------------- */ + +FixNEB_spin::FixNEB_spin(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg), + id_pe(NULL), pe(NULL), nlenall(NULL), xprev(NULL), xnext(NULL), + fnext(NULL), + spprev(NULL), spnext(NULL), fmnext(NULL), + springF(NULL), tangent(NULL), + xsend(NULL), xrecv(NULL), fsend(NULL), frecv(NULL), + spsend(NULL), sprecv(NULL), fmsend(NULL), fmrecv(NULL), + tagsend(NULL), tagrecv(NULL), + xsendall(NULL), xrecvall(NULL), fsendall(NULL), frecvall(NULL), + spsendall(NULL), sprecvall(NULL), fmsendall(NULL), fmrecvall(NULL), + tagsendall(NULL), tagrecvall(NULL), counts(NULL), + displacements(NULL) +{ + + if (narg < 4) error->all(FLERR,"Illegal fix neb_spin command"); + + kspring = force->numeric(FLERR,arg[3]); + if (kspring <= 0.0) error->all(FLERR,"Illegal fix neb command"); + + // optional params + + NEBLongRange = false; // see if needed (comb. with pppm/spin?) + StandardNEB = true; // only option for now + PerpSpring = FreeEndIni = FreeEndFinal = false; + FreeEndFinalWithRespToEIni = FinalAndInterWithRespToEIni = false; + kspringPerp = 0.0; + kspringIni = 1.0; + kspringFinal = 1.0; + // only regular neb for now + SpinLattice = false; + + + + int iarg = 4; + while (iarg < narg) { + if (strcmp(arg[iarg],"lattice") == 0) + error->all(FLERR,"Illegal fix neb command"); + } + + /* + if (strcmp(arg[iarg],"parallel") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix neb command"); + if (strcmp(arg[iarg+1],"ideal") == 0) { + NEBLongRange = true; + StandardNEB = false; + } else if (strcmp(arg[iarg+1],"neigh") == 0) { + NEBLongRange = false; + StandardNEB = true; + } else error->all(FLERR,"Illegal fix neb command"); + iarg += 2; + + } else if (strcmp(arg[iarg],"perp") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix neb command"); + PerpSpring = true; + kspringPerp = force->numeric(FLERR,arg[iarg+1]); + if (kspringPerp == 0.0) PerpSpring = false; + if (kspringPerp < 0.0) error->all(FLERR,"Illegal fix neb command"); + iarg += 2; + + } else if (strcmp (arg[iarg],"end") == 0) { + if (iarg+3 > narg) error->all(FLERR,"Illegal fix neb command"); + if (strcmp(arg[iarg+1],"first") == 0) { + FreeEndIni = true; + kspringIni = force->numeric(FLERR,arg[iarg+2]); + } else if (strcmp(arg[iarg+1],"last") == 0) { + FreeEndFinal = true; + FinalAndInterWithRespToEIni = false; + FreeEndFinalWithRespToEIni = false; + kspringFinal = force->numeric(FLERR,arg[iarg+2]); + } else if (strcmp(arg[iarg+1],"last/efirst") == 0) { + FreeEndFinal = false; + FinalAndInterWithRespToEIni = false; + FreeEndFinalWithRespToEIni = true; + kspringFinal = force->numeric(FLERR,arg[iarg+2]); + } else if (strcmp(arg[iarg+1],"last/efirst/middle") == 0) { + FreeEndFinal = false; + FinalAndInterWithRespToEIni = true; + FreeEndFinalWithRespToEIni = true; + kspringFinal = force->numeric(FLERR,arg[iarg+2]); + } else error->all(FLERR,"Illegal fix neb command"); + + iarg += 3; + + } else error->all(FLERR,"Illegal fix neb command"); + } + */ + + // nreplica = number of partitions + // ireplica = which world I am in universe + // nprocs_universe = # of procs in all replicase + // procprev,procnext = root proc in adjacent replicas + + me = comm->me; + nprocs = comm->nprocs; + + nprocs_universe = universe->nprocs; + nreplica = universe->nworlds; + ireplica = universe->iworld; + + if (ireplica > 0) procprev = universe->root_proc[ireplica-1]; + else procprev = -1; + if (ireplica < nreplica-1) procnext = universe->root_proc[ireplica+1]; + else procnext = -1; + + uworld = universe->uworld; + int *iroots = new int[nreplica]; + MPI_Group uworldgroup,rootgroup; + if (NEBLongRange) { + for (int i=0; iroot_proc[i]; + MPI_Comm_group(uworld, &uworldgroup); + MPI_Group_incl(uworldgroup, nreplica, iroots, &rootgroup); + MPI_Comm_create(uworld, rootgroup, &rootworld); + } + delete [] iroots; + + // create a new compute pe style + // id = fix-ID + pe, compute group = all + + int n = strlen(id) + 4; + id_pe = new char[n]; + strcpy(id_pe,id); + strcat(id_pe,"_pe"); + + char **newarg = new char*[3]; + newarg[0] = id_pe; + newarg[1] = (char *) "all"; + newarg[2] = (char *) "pe"; + modify->add_compute(3,newarg); + delete [] newarg; + + // might need a test + // => check if pe does not compute mech potentials + + + // initialize local storage + + maxlocal = -1; + ntotal = -1; +} + +/* ---------------------------------------------------------------------- */ + +FixNEB_spin::~FixNEB_spin() +{ + modify->delete_compute(id_pe); + delete [] id_pe; + + memory->destroy(xprev); + memory->destroy(xnext); + memory->destroy(tangent); + memory->destroy(fnext); + // spin quantities + memory->destroy(spprev); + memory->destroy(spnext); + memory->destroy(fmnext); + memory->destroy(springF); + memory->destroy(xsend); + memory->destroy(xrecv); + memory->destroy(fsend); + memory->destroy(frecv); + // spin quantities + memory->destroy(spsend); + memory->destroy(sprecv); + memory->destroy(fmsend); + memory->destroy(fmrecv); + memory->destroy(tagsend); + memory->destroy(tagrecv); + + memory->destroy(xsendall); + memory->destroy(xrecvall); + memory->destroy(fsendall); + memory->destroy(frecvall); + // spin quantities + memory->destroy(spsendall); + memory->destroy(sprecvall); + memory->destroy(fmsendall); + memory->destroy(fmrecvall); + memory->destroy(tagsendall); + memory->destroy(tagrecvall); + + memory->destroy(counts); + memory->destroy(displacements); + + if (NEBLongRange) { + if (rootworld != MPI_COMM_NULL) MPI_Comm_free(&rootworld); + memory->destroy(nlenall); + } +} + +/* ---------------------------------------------------------------------- */ + +int FixNEB_spin::setmask() +{ + int mask = 0; + mask |= MIN_POST_FORCE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixNEB_spin::init() +{ + int icompute = modify->find_compute(id_pe); + if (icompute < 0) + error->all(FLERR,"Potential energy ID for fix neb does not exist"); + pe = modify->compute[icompute]; + + // turn off climbing mode, NEB command turns it on after init() + + rclimber = -1; + + // nebatoms = # of atoms in fix group = atoms with inter-replica forces + + bigint count = group->count(igroup); + if (count > MAXSMALLINT) error->all(FLERR,"Too many active NEB atoms"); + nebatoms = count; + + // comm mode for inter-replica exchange of coords + + if (nreplica == nprocs_universe && + nebatoms == atom->natoms && atom->sortfreq == 0) + cmode = SINGLE_PROC_DIRECT; + else if (nreplica == nprocs_universe) cmode = SINGLE_PROC_MAP; + else cmode = MULTI_PROC; + + // ntotal = total # of atoms in system, NEB atoms or not + + if (atom->natoms > MAXSMALLINT) error->all(FLERR,"Too many atoms for NEB"); + ntotal = atom->natoms; + + if (atom->nmax > maxlocal) reallocate(); + + if (MULTI_PROC && counts == NULL) { + memory->create(xsendall,ntotal,3,"neb:xsendall"); + memory->create(xrecvall,ntotal,3,"neb:xrecvall"); + memory->create(fsendall,ntotal,3,"neb:fsendall"); + memory->create(frecvall,ntotal,3,"neb:frecvall"); + memory->create(tagsendall,ntotal,"neb:tagsendall"); + memory->create(tagrecvall,ntotal,"neb:tagrecvall"); + // spin quantities + memory->create(spsendall,ntotal,3,"neb:xsendall"); + memory->create(sprecvall,ntotal,3,"neb:xrecvall"); + memory->create(fmsendall,ntotal,3,"neb:fsendall"); + memory->create(fmrecvall,ntotal,3,"neb:frecvall"); + memory->create(counts,nprocs,"neb:counts"); + memory->create(displacements,nprocs,"neb:displacements"); + } +} + +/* ---------------------------------------------------------------------- */ + +void FixNEB_spin::min_setup(int vflag) +{ + min_post_force(vflag); + + // trigger potential energy computation on next timestep + + pe->addstep(update->ntimestep+1); +} + +/* ---------------------------------------------------------------------- */ + +void FixNEB_spin::min_post_force(int /*vflag*/) +{ + double vprev,vnext; + //double delxp,delyp,delzp,delxn,delyn,delzn; + // spin quantities + double delspxp,delspyp,delspzp; + double delspxn,delspyn,delspzn; + double templen; + double vIni=0.0; + + // local spin values for geo. dist. calc. + double spi[3],spj[3]; + + vprev = vnext = veng = pe->compute_scalar(); + + if (ireplica < nreplica-1 && me == 0) + MPI_Send(&veng,1,MPI_DOUBLE,procnext,0,uworld); + if (ireplica > 0 && me == 0) + MPI_Recv(&vprev,1,MPI_DOUBLE,procprev,0,uworld,MPI_STATUS_IGNORE); + + if (ireplica > 0 && me == 0) + MPI_Send(&veng,1,MPI_DOUBLE,procprev,0,uworld); + if (ireplica < nreplica-1 && me == 0) + MPI_Recv(&vnext,1,MPI_DOUBLE,procnext,0,uworld,MPI_STATUS_IGNORE); + + if (cmode == MULTI_PROC) { + MPI_Bcast(&vprev,1,MPI_DOUBLE,0,world); + MPI_Bcast(&vnext,1,MPI_DOUBLE,0,world); + } + + if (FreeEndFinal && ireplica == nreplica-1 && (update->ntimestep == 0)) EFinalIni = veng; + + if (ireplica == 0) vIni=veng; + + if (FreeEndFinalWithRespToEIni) { + if (cmode == SINGLE_PROC_DIRECT || cmode == SINGLE_PROC_MAP) { + int procFirst; + procFirst=universe->root_proc[0]; + MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld); + } else { + if (me == 0) + MPI_Bcast(&vIni,1,MPI_DOUBLE,0,rootworld); + + MPI_Bcast(&vIni,1,MPI_DOUBLE,0,world); + } + } + + if (FreeEndIni && ireplica == 0 && (update->ntimestep == 0)) EIniIni = veng; + /* if (FreeEndIni && ireplica == 0) { + // if (me == 0 ) + if (update->ntimestep == 0) { + EIniIni = veng; + // if (cmode == MULTI_PROC) + // MPI_Bcast(&EIniIni,1,MPI_DOUBLE,0,world); + } + }*/ + + // communicate atoms to/from adjacent replicas to fill xprev,xnext + + inter_replica_comm(); + + // trigger potential energy computation on next timestep + + pe->addstep(update->ntimestep+1); + + double **x = atom->x; + // spin quantities + double **sp = atom->sp; + int *mask = atom->mask; + double dot = 0.0; + double prefactor = 0.0; + + double **f = atom->f; + // spin quantities + double **fm = atom->fm; + int nlocal = atom->nlocal; + + //calculating separation between images + + plen = 0.0; + nlen = 0.0; + double tlen = 0.0; + double gradnextlen = 0.0; + + dotgrad = gradlen = dotpath = dottangrad = 0.0; + + + // computation of the tangent vector + + // final replica + if (ireplica == nreplica-1) { + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + // tangent vector + delspxp = sp[i][0] - spprev[i][0]; + delspyp = sp[i][1] - spprev[i][1]; + delspzp = sp[i][2] - spprev[i][2]; + domain->minimum_image(delspxp,delspyp,delspzp); // check what it does + delsqp = delspxp*delspxp+delspyp*delspyp+delspzp*delspzp; + + // calc. geodesic length + spi[0]=sp[i][0]; + spi[1]=sp[i][1]; + spi[2]=sp[i][2]; + spj[0]=spprev[i][0]; + spj[1]=spprev[i][1]; + spj[2]=spprev[i][2]; + templen = geodesic_distance(spi, spj); + plen += templen*templen; + dottangrad += delxp*fm[i][0]+ delyp*fm[i][1]+delzp*fm[i][2]; + gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; + + //plen += delxp*delxp + delyp*delyp + delzp*delzp; + //dottangrad += delxp* f[i][0]+ delyp*f[i][1]+delzp*f[i][2]; + //gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + + // final replica, no need for the tangent vector + // (unless FreeEnd option) + if (FreeEndFinal||FreeEndFinalWithRespToEIni) { + error->all(FLERR,"Free End option not yet active"); + tangent[i][0]=delspxp; + tangent[i][1]=delspyp; + tangent[i][2]=delspzp; + // if needed, tlen has to be modified + tlen += tangent[i][0]*tangent[i][0] + + tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + dot += fm[i][0]*tangent[i][0] + fm[i][1]*tangent[i][1] + + fm[i][2]*tangent[i][2]; + } + + + //delxp = x[i][0] - xprev[i][0]; + //delyp = x[i][1] - xprev[i][1]; + //delzp = x[i][2] - xprev[i][2]; + //domain->minimum_image(delxp,delyp,delzp); + + //plen += delxp*delxp + delyp*delyp + delzp*delzp; + //dottangrad += delxp* f[i][0]+ delyp*f[i][1]+delzp*f[i][2]; + //gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + //if (FreeEndFinal||FreeEndFinalWithRespToEIni) { + // tangent[i][0]=delxp; + // tangent[i][1]=delyp; + // tangent[i][2]=delzp; + // tlen += tangent[i][0]*tangent[i][0] + + // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + // dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + + // f[i][2]*tangent[i][2]; + //} + } + + // initial replica + } else if (ireplica == 0) { + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + + // tangent vector + delspxn = spnext[i][0]- sp[i][0]; + delspyn = spnext[i][1]- sp[i][1]; + delspzn = spnext[i][2]- sp[i][2]; + domain->minimum_image(delspxn,delspyn,delspzn); // check what it does + delsqn = delspxn*delspxn+delspyn*delspyn+delspzn*delspzn; + + // calc. geodesic length + spi[0]=sp[i][0]; + spi[1]=sp[i][1]; + spi[2]=sp[i][2]; + spj[0]=spnext[i][0]; + spj[1]=spnext[i][1]; + spj[2]=spnext[i][2]; + templen = geodesic_distance(spi, spj); + nlen += templen*templen; + dottangrad += delspxn*fm[i][0] + delspyn*fm[i][1] + delspzp*fm[i][2]; + gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; + if (FreeEndIni) { + error->all(FLERR,"Free End option not yet active"); + tangent[i][0]=delxn; + tangent[i][1]=delyn; + tangent[i][2]=delzn; + // if needed, tlen has to be modified + tlen += tangent[i][0]*tangent[i][0] + + tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + + f[i][2]*tangent[i][2]; + } + + //delxn = xnext[i][0] - x[i][0]; + //delyn = xnext[i][1] - x[i][1]; + //delzn = xnext[i][2] - x[i][2]; + //domain->minimum_image(delxn,delyn,delzn); + //nlen += delxn*delxn + delyn*delyn + delzn*delzn; + //gradnextlen += fnext[i][0]*fnext[i][0] + // + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + //dotgrad += f[i][0]*fnext[i][0] + // + f[i][1]*fnext[i][1] + f[i][2]*fnext[i][2]; + //dottangrad += delxn*f[i][0]+ delyn*f[i][1] + delzn*f[i][2]; + //gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + //if (FreeEndIni) { + // tangent[i][0]=delxn; + // tangent[i][1]=delyn; + // tangent[i][2]=delzn; + // tlen += tangent[i][0]*tangent[i][0] + + // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + // dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + + // f[i][2]*tangent[i][2]; + //} + } + + // in-between replica + } else { + + // not the first or last replica + + double vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); + double vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); + + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + delspxp = spx[i][0] - spxprev[i][0]; + delspyp = spx[i][1] - spxprev[i][1]; + delspzp = spx[i][2] - spxprev[i][2]; + domain->minimum_image(delspxp,delspyp,delspzp); + + // calc. geodesic length + spi[0]=sp[i][0]; + spi[1]=sp[i][1]; + spi[2]=sp[i][2]; + spj[0]=spprev[i][0]; + spj[1]=spprev[i][1]; + spj[2]=spprev[i][2]; + templen = geodesic_distance(spi, spj); + plen += templen*templen; + + delspxn = spxnext[i][0] - spx[i][0]; + delspyn = spxnext[i][1] - spx[i][1]; + delspzn = spxnext[i][2] - spx[i][2]; + domain->minimum_image(delspxn,delspyn,delspzn); + + if (vnext > veng && veng > vprev) { + tangent[i][0] = delspxn; + tangent[i][1] = delspyn; + tangent[i][2] = delspzn; + } else if (vnext < veng && veng < vprev) { + tangent[i][0] = delspxp; + tangent[i][1] = delspyp; + tangent[i][2] = delspzp; + } else { + if (vnext > vprev) { + tangent[i][0] = vmax*delspxn + vmin*delspxp; + tangent[i][1] = vmax*delspyn + vmin*delspyp; + tangent[i][2] = vmax*delspzn + vmin*delspzp; + } else if (vnext < vprev) { + tangent[i][0] = vmin*delspxn + vmax*delspxp; + tangent[i][1] = vmin*delspyn + vmax*delspyp; + tangent[i][2] = vmin*delspzn + vmax*delspzp; + } else { // vnext == vprev, e.g. for potentials that do not compute an energy + tangent[i][0] = delspxn + delspxp; + tangent[i][1] = delspyn + delspyp; + tangent[i][2] = delspzn + delspzp; + } + } + + // calc. geodesic length + spi[0]=sp[i][0]; + spi[1]=sp[i][1]; + spi[2]=sp[i][2]; + spj[0]=spnext[i][0]; + spj[1]=spnext[i][1]; + spj[2]=spnext[i][2]; + templen = geodesic_distance(spi, spj); + nlen += templen*templen; + //nlen += delxn*delxn + delyn*delyn + delzn*delzn; + tlen += tangent[i][0]*tangent[i][0] + + tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; + dotpath += delspxp*delspxn + delspyp*delspyn + delspzp*delspzn; + dottangrad += tangent[i][0]*fm[i][0] + + tangent[i][1]*fm[i][1] + tangent[i][2]*fm[i][2]; + gradnextlen += fnext[i][0]*fnext[i][0] + + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + dotgrad += fm[i][0]*fnext[i][0] + fm[i][1]*fnext[i][1] + + fm[i][2]*fnext[i][2]; + + // is this a perpandicular spring force? + if (kspringPerp != 0.0) + error->all(FLERR,"Perpendicular nudging force not yet active"); + //springF[i][0] = kspringPerp*(delxn-delxp); + //springF[i][1] = kspringPerp*(delyn-delyp); + //springF[i][2] = kspringPerp*(delzn-delzp); + + //delxp = x[i][0] - xprev[i][0]; + //delyp = x[i][1] - xprev[i][1]; + //delzp = x[i][2] - xprev[i][2]; + //domain->minimum_image(delxp,delyp,delzp); + //plen += delxp*delxp + delyp*delyp + delzp*delzp; + + //delxn = xnext[i][0] - x[i][0]; + //delyn = xnext[i][1] - x[i][1]; + //delzn = xnext[i][2] - x[i][2]; + //domain->minimum_image(delxn,delyn,delzn); + + //if (vnext > veng && veng > vprev) { + // tangent[i][0] = delxn; + // tangent[i][1] = delyn; + // tangent[i][2] = delzn; + //} else if (vnext < veng && veng < vprev) { + // tangent[i][0] = delxp; + // tangent[i][1] = delyp; + // tangent[i][2] = delzp; + //} else { + // if (vnext > vprev) { + // tangent[i][0] = vmax*delxn + vmin*delxp; + // tangent[i][1] = vmax*delyn + vmin*delyp; + // tangent[i][2] = vmax*delzn + vmin*delzp; + // } else if (vnext < vprev) { + // tangent[i][0] = vmin*delxn + vmax*delxp; + // tangent[i][1] = vmin*delyn + vmax*delyp; + // tangent[i][2] = vmin*delzn + vmax*delzp; + // } else { // vnext == vprev, e.g. for potentials that do not compute an energy + // tangent[i][0] = delxn + delxp; + // tangent[i][1] = delyn + delyp; + // tangent[i][2] = delzn + delzp; + // } + //} + + //nlen += delxn*delxn + delyn*delyn + delzn*delzn; + //tlen += tangent[i][0]*tangent[i][0] + + // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + //gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + //dotpath += delxp*delxn + delyp*delyn + delzp*delzn; + //dottangrad += tangent[i][0]*f[i][0] + + // tangent[i][1]*f[i][1] + tangent[i][2]*f[i][2]; + //gradnextlen += fnext[i][0]*fnext[i][0] + + // fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + //dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + + // f[i][2]*fnext[i][2]; + + //springF[i][0] = kspringPerp*(delxn-delxp); + //springF[i][1] = kspringPerp*(delyn-delyp); + //springF[i][2] = kspringPerp*(delzn-delzp); + } + } + + + // MPI reduce if more than one proc for world + + double bufin[BUFSIZE], bufout[BUFSIZE]; + bufin[0] = nlen; + bufin[1] = plen; + bufin[2] = tlen; + bufin[3] = gradlen; + bufin[4] = gradnextlen; + bufin[5] = dotpath; + bufin[6] = dottangrad; + bufin[7] = dotgrad; + MPI_Allreduce(bufin,bufout,BUFSIZE,MPI_DOUBLE,MPI_SUM,world); + nlen = sqrt(bufout[0]); + plen = sqrt(bufout[1]); + tlen = sqrt(bufout[2]); + gradlen = sqrt(bufout[3]); + gradnextlen = sqrt(bufout[4]); + dotpath = bufout[5]; + dottangrad = bufout[6]; + dotgrad = bufout[7]; + + // normalize tangent vector + + if (tlen > 0.0) { + double tleninv = 1.0/tlen; + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + tangent[i][0] *= tleninv; + tangent[i][1] *= tleninv; + tangent[i][2] *= tleninv; + } + } + +//////////////////////////////////////////////////////// + + // first or last replica has no change to forces, just return + + if (ireplica > 0 && ireplica < nreplica-1) + dottangrad = dottangrad/(tlen*gradlen); + if (ireplica == 0) + dottangrad = dottangrad/(nlen*gradlen); + if (ireplica == nreplica-1) + dottangrad = dottangrad/(plen*gradlen); + if (ireplica < nreplica-1) + dotgrad = dotgrad /(gradlen*gradnextlen); + + if (FreeEndIni && ireplica == 0) { + if (tlen > 0.0) { + double dotall; + MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); + dot=dotall/tlen; + + if (dot<0) prefactor = -dot - kspringIni*(veng-EIniIni); + else prefactor = -dot + kspringIni*(veng-EIniIni); + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + f[i][0] += prefactor *tangent[i][0]; + f[i][1] += prefactor *tangent[i][1]; + f[i][2] += prefactor *tangent[i][2]; + } + } + } + + if (FreeEndFinal && ireplica == nreplica -1) { + if (tlen > 0.0) { + double dotall; + MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); + dot=dotall/tlen; + + if (veng 0.0) { + double dotall; + MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); + dot=dotall/tlen; + if (veng0) { + for (int i = 0; i < rclimber; i++) + lenuntilClimber += nlenall[i]; + double meanDistBeforeClimber = lenuntilClimber/rclimber; + double meanDistAfterClimber = + (lentot-lenuntilClimber)/(nreplica-rclimber-1); + if (ireplicanmax > maxlocal) reallocate(); + + double **x = atom->x; + double **f = atom->f; + // spin quantities + double **sp = atom->sp; + double **fm = atom->fm; + tagint *tag = atom->tag; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + // ----------------------------------------------------- + // 3 cases: two for single proc per replica + // one for multiple procs per replica + // ----------------------------------------------------- + + + // case 1 => to be done + + // single proc per replica + // all atoms are NEB atoms and no atom sorting + // direct comm of x -> xprev and x -> xnext + + if (cmode == SINGLE_PROC_DIRECT) { + if (ireplica > 0) + MPI_Irecv(xprev[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld,&request); + if (ireplica < nreplica-1) + MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld); + if (ireplica > 0) MPI_Wait(&request,MPI_STATUS_IGNORE); + if (ireplica < nreplica-1) + MPI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); + if (ireplica > 0) + MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); + if (ireplica < nreplica-1) MPI_Wait(&request,MPI_STATUS_IGNORE); + + if (ireplica < nreplica-1) + MPI_Irecv(fnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); + if (ireplica > 0) + MPI_Send(f[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); + if (ireplica < nreplica-1) MPI_Wait(&request,MPI_STATUS_IGNORE); + + return; + } + + // single proc per replica + // but only some atoms are NEB atoms or atom sorting is enabled + // send atom IDs and coords of only NEB atoms to prev/next proc + // recv procs use atom->map() to match received coords to owned atoms + + if (cmode == SINGLE_PROC_MAP) { + m = 0; + for (i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + tagsend[m] = tag[i]; + xsend[m][0] = x[i][0]; + xsend[m][1] = x[i][1]; + xsend[m][2] = x[i][2]; + fsend[m][0] = f[i][0]; + fsend[m][1] = f[i][1]; + fsend[m][2] = f[i][2]; + // spin quantities + spsend[m][0] = sp[i][0]; + spsend[m][1] = sp[i][1]; + spsend[m][2] = sp[i][2]; + fmsend[m][0] = fm[i][0]; + fmsend[m][1] = fm[i][1]; + fmsend[m][2] = fm[i][2]; + m++; + } + + if (ireplica > 0) { + MPI_Irecv(xrecv[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld,&requests[0]); + // spin quantities + MPI_Irecv(sprecv[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld,&requests[0]); + MPI_Irecv(tagrecv,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld,&requests[1]); + } + if (ireplica < nreplica-1) { + MPI_Send(xsend[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld); + // spin quantities + MPI_Send(spsend[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld); + MPI_Send(tagsend,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld); + } + + if (ireplica > 0) { + MPI_Waitall(2,requests,statuses); + for (i = 0; i < nebatoms; i++) { + m = atom->map(tagrecv[i]); + xprev[m][0] = xrecv[i][0]; + xprev[m][1] = xrecv[i][1]; + xprev[m][2] = xrecv[i][2]; + // spin quantities + spprev[m][0] = sprecv[i][0]; + spprev[m][1] = sprecv[i][1]; + spprev[m][2] = sprecv[i][2]; + } + } + if (ireplica < nreplica-1) { + MPI_Irecv(xrecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + MPI_Irecv(frecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + // spin quantities + MPI_Irecv(sprecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + MPI_Irecv(fmrecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + MPI_Irecv(tagrecv,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld,&requests[1]); + } + if (ireplica > 0) { + MPI_Send(xsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(fsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + // spin quantities + MPI_Send(spsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(fmsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(tagsend,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld); + } + + if (ireplica < nreplica-1) { + MPI_Waitall(2,requests,statuses); + for (i = 0; i < nebatoms; i++) { + m = atom->map(tagrecv[i]); + xnext[m][0] = xrecv[i][0]; + xnext[m][1] = xrecv[i][1]; + xnext[m][2] = xrecv[i][2]; + fnext[m][0] = frecv[i][0]; + fnext[m][1] = frecv[i][1]; + fnext[m][2] = frecv[i][2]; + // spin quantities + spnext[m][0] = sprecv[i][0]; + spnext[m][1] = sprecv[i][1]; + spnext[m][2] = sprecv[i][2]; + fmnext[m][0] = fmrecv[i][0]; + fmnext[m][1] = fmrecv[i][1]; + fmnext[m][2] = fmrecv[i][2]; + } + } + + return; + } + + // multiple procs per replica + // MPI_Gather all coords and atom IDs to root proc of each replica + // send to root of adjacent replicas + // bcast within each replica + // each proc extracts info for atoms it owns via atom->map() + + m = 0; + for (i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + tagsend[m] = tag[i]; + xsend[m][0] = x[i][0]; + xsend[m][1] = x[i][1]; + xsend[m][2] = x[i][2]; + fsend[m][0] = f[i][0]; + fsend[m][1] = f[i][1]; + fsend[m][2] = f[i][2]; + // spin quantities + spsend[m][0] = sp[i][0]; + spsend[m][1] = sp[i][1]; + spsend[m][2] = sp[i][2]; + fmsend[m][0] = fm[i][0]; + fmsend[m][1] = fm[i][1]; + fmsend[m][2] = fm[i][2]; + m++; + } + + MPI_Gather(&m,1,MPI_INT,counts,1,MPI_INT,0,world); + displacements[0] = 0; + for (i = 0; i < nprocs-1; i++) + displacements[i+1] = displacements[i] + counts[i]; + MPI_Gatherv(tagsend,m,MPI_LMP_TAGINT, + tagsendall,counts,displacements,MPI_LMP_TAGINT,0,world); + for (i = 0; i < nprocs; i++) counts[i] *= 3; + for (i = 0; i < nprocs-1; i++) + displacements[i+1] = displacements[i] + counts[i]; + if (xsend) { + MPI_Gatherv(xsend[0],3*m,MPI_DOUBLE, + xsendall[0],counts,displacements,MPI_DOUBLE,0,world); + MPI_Gatherv(fsend[0],3*m,MPI_DOUBLE, + fsendall[0],counts,displacements,MPI_DOUBLE,0,world); + } else { + MPI_Gatherv(NULL,3*m,MPI_DOUBLE, + xsendall[0],counts,displacements,MPI_DOUBLE,0,world); + MPI_Gatherv(NULL,3*m,MPI_DOUBLE, + fsendall[0],counts,displacements,MPI_DOUBLE,0,world); + } + // spin quantities + if (spsend) { + MPI_Gatherv(spsend[0],3*m,MPI_DOUBLE, + spsendall[0],counts,displacements,MPI_DOUBLE,0,world); + MPI_Gatherv(fmsend[0],3*m,MPI_DOUBLE, + fmsendall[0],counts,displacements,MPI_DOUBLE,0,world); + } else { + MPI_Gatherv(NULL,3*m,MPI_DOUBLE, + xsendall[0],counts,displacements,MPI_DOUBLE,0,world); + MPI_Gatherv(NULL,3*m,MPI_DOUBLE, + fmsendall[0],counts,displacements,MPI_DOUBLE,0,world); + } + + if (ireplica > 0 && me == 0) { + MPI_Irecv(xrecvall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld,&requests[0]); + // spin quantities + MPI_Irecv(sprecvall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld,&requests[0]); + MPI_Irecv(tagrecvall,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld, + &requests[1]); + } + if (ireplica < nreplica-1 && me == 0) { + MPI_Send(xsendall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld); + // spin quantities + MPI_Send(spsendall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld); + MPI_Send(tagsendall,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld); + } + + if (ireplica > 0) { + if (me == 0) MPI_Waitall(2,requests,statuses); + + MPI_Bcast(tagrecvall,nebatoms,MPI_INT,0,world); + MPI_Bcast(xrecvall[0],3*nebatoms,MPI_DOUBLE,0,world); + // spin quantities + MPI_Bcast(sprecvall[0],3*nebatoms,MPI_DOUBLE,0,world); + + for (i = 0; i < nebatoms; i++) { + m = atom->map(tagrecvall[i]); + if (m < 0 || m >= nlocal) continue; + xprev[m][0] = xrecvall[i][0]; + xprev[m][1] = xrecvall[i][1]; + xprev[m][2] = xrecvall[i][2]; + // spin quantities + spprev[m][0] = sprecvall[i][0]; + spprev[m][1] = sprecvall[i][1]; + spprev[m][2] = sprecvall[i][2]; + } + } + + if (ireplica < nreplica-1 && me == 0) { + MPI_Irecv(xrecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + MPI_Irecv(frecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + // spin quantities + MPI_Irecv(sprecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + MPI_Irecv(sprecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); + MPI_Irecv(tagrecvall,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld, + &requests[1]); + } + if (ireplica > 0 && me == 0) { + MPI_Send(xsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(fsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + // spin quantities + MPI_Send(spsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(fmsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(tagsendall,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld); + } + + if (ireplica < nreplica-1) { + if (me == 0) MPI_Waitall(2,requests,statuses); + + MPI_Bcast(tagrecvall,nebatoms,MPI_INT,0,world); + MPI_Bcast(xrecvall[0],3*nebatoms,MPI_DOUBLE,0,world); + MPI_Bcast(frecvall[0],3*nebatoms,MPI_DOUBLE,0,world); + // spin quantities + MPI_Bcast(sprecvall[0],3*nebatoms,MPI_DOUBLE,0,world); + MPI_Bcast(fmrecvall[0],3*nebatoms,MPI_DOUBLE,0,world); + + for (i = 0; i < nebatoms; i++) { + m = atom->map(tagrecvall[i]); + if (m < 0 || m >= nlocal) continue; + xnext[m][0] = xrecvall[i][0]; + xnext[m][1] = xrecvall[i][1]; + xnext[m][2] = xrecvall[i][2]; + fnext[m][0] = frecvall[i][0]; + fnext[m][1] = frecvall[i][1]; + fnext[m][2] = frecvall[i][2]; + // spin quantities + spnext[m][0] = sprecvall[i][0]; + spnext[m][1] = sprecvall[i][1]; + spnext[m][2] = sprecvall[i][2]; + fmnext[m][0] = fmrecvall[i][0]; + fmnext[m][1] = fmrecvall[i][1]; + fmnext[m][2] = fmrecvall[i][2]; + } + } +} + +/* ---------------------------------------------------------------------- + reallocate xprev,xnext,tangent arrays if necessary + reallocate communication arrays if necessary +------------------------------------------------------------------------- */ + +void FixNEB_spin::reallocate() +{ + maxlocal = atom->nmax; + + memory->destroy(xprev); + memory->destroy(xnext); + memory->destroy(tangent); + memory->destroy(fnext); + memory->destroy(springF); + // spin quantities + memory->destroy(spprev); + memory->destroy(spnext); + memory->destroy(fmnext); + + memory->create(xprev,maxlocal,3,"neb:xprev"); + memory->create(xnext,maxlocal,3,"neb:xnext"); + memory->create(tangent,maxlocal,3,"neb:tangent"); + memory->create(fnext,maxlocal,3,"neb:fnext"); + memory->create(springF,maxlocal,3,"neb:springF"); + // spin quantities + memory->create(spprev,maxlocal,3,"neb:xprev"); + memory->create(spnext,maxlocal,3,"neb:xnext"); + memory->create(fmnext,maxlocal,3,"neb:fnext"); + + if (cmode != SINGLE_PROC_DIRECT) { + memory->destroy(xsend); + memory->destroy(fsend); + memory->destroy(xrecv); + memory->destroy(frecv); + // spin quantities + memory->destroy(spsend); + memory->destroy(fmsend); + memory->destroy(sprecv); + memory->destroy(fmrecv); + memory->destroy(tagsend); + memory->destroy(tagrecv); + memory->create(xsend,maxlocal,3,"neb:xsend"); + memory->create(fsend,maxlocal,3,"neb:fsend"); + memory->create(xrecv,maxlocal,3,"neb:xrecv"); + memory->create(frecv,maxlocal,3,"neb:frecv"); + // spin quantities + memory->create(spsend,maxlocal,3,"neb:xsend"); + memory->create(fmsend,maxlocal,3,"neb:fsend"); + memory->create(sprecv,maxlocal,3,"neb:xrecv"); + memory->create(fmrecv,maxlocal,3,"neb:frecv"); + memory->create(tagsend,maxlocal,"neb:tagsend"); + memory->create(tagrecv,maxlocal,"neb:tagrecv"); + } + + if (NEBLongRange) { + memory->destroy(nlenall); + memory->create(nlenall,nreplica,"neb:nlenall"); + } +} diff --git a/src/REPLICA/fix_neb_spin.h b/src/REPLICA/fix_neb_spin.h new file mode 100644 index 0000000000..e3bdd6889d --- /dev/null +++ b/src/REPLICA/fix_neb_spin.h @@ -0,0 +1,115 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(neb,FixNEB) +FixStyle(neb_spin,FixNEB_spin) + +#else + +#ifndef LMP_FIX_NEB_SPIN_H +#define LMP_FIX_NEB_SPIN_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixNEB_spin : public Fix { + public: + double veng,plen,nlen,dotpath,dottangrad,gradlen,dotgrad; + int rclimber; + + FixNEB_spin(class LAMMPS *, int, char **); + ~FixNEB_spin(); + int setmask(); + void init(); + void min_setup(int); + void min_post_force(int); + + private: + int me,nprocs,nprocs_universe; + double kspring,kspringIni,kspringFinal,kspringPerp,EIniIni,EFinalIni; + bool StandardNEB,NEBLongRange,PerpSpring,FreeEndIni,FreeEndFinal; + bool FreeEndFinalWithRespToEIni,FinalAndInterWithRespToEIni; + bool SpinLattice; + int ireplica,nreplica; + int procnext,procprev; + int cmode; + MPI_Comm uworld; + MPI_Comm rootworld; + + + char *id_pe; + class Compute *pe; + + int nebatoms; + int ntotal; // total # of atoms, NEB or not + int maxlocal; // size of xprev,xnext,tangent arrays + double *nlenall; + double **xprev,**xnext,**fnext; + // spin quantities + double **spprev,**spnext,**fmnext; + double **springF; + double **tangent; + double **xsend,**xrecv; // coords to send/recv to/from other replica + double **fsend,**frecv; // coords to send/recv to/from other replica + // spin quantities + double **spsend,**sprecv; // sp to send/recv to/from other replica + double **fmsend,**fmrecv; // fm to send/recv to/from other replica + tagint *tagsend,*tagrecv; // ditto for atom IDs + + // info gathered from all procs in my replica + double **xsendall,**xrecvall; // coords to send/recv to/from other replica + double **fsendall,**frecvall; // force to send/recv to/from other replica + // spin quantities + double **spsendall,**sprecvall; // sp to send/recv to/from other replica + double **fmsendall,**fmrecvall; // fm to send/recv to/from other replica + tagint *tagsendall,*tagrecvall; // ditto for atom IDs + + int *counts,*displacements; // used for MPI_Gather + + void inter_replica_comm(); + void reallocate(); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +E: Potential energy ID for fix neb does not exist + +Self-explanatory. + +E: Too many active NEB atoms + +UNDOCUMENTED + +E: Too many atoms for NEB + +UNDOCUMENTED + +U: Atom count changed in fix neb + +This is not allowed in a NEB calculation. + +*/ diff --git a/src/REPLICA/neb_spin.cpp b/src/REPLICA/neb_spin.cpp new file mode 100644 index 0000000000..7860553532 --- /dev/null +++ b/src/REPLICA/neb_spin.cpp @@ -0,0 +1,722 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +// 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.h" +#include "neb_spin.h" +#include "universe.h" +#include "atom.h" +#include "update.h" +#include "domain.h" +#include "comm.h" +#include "min.h" +#include "modify.h" +#include "fix.h" +#include "fix_neb.h" +#include "output.h" +#include "thermo.h" +#include "finish.h" +#include "timer.h" +#include "memory.h" +#include "error.h" +#include "force.h" +#include "math_const.h" + +using namespace LAMMPS_NS; +using namespace MathConst; + +#define MAXLINE 256 +#define CHUNK 1024 +//#define ATTRIBUTE_PERLINE 4 +// 8 attributes: tag number, coords, spin norm, spin dir. +#define ATTRIBUTE_PERLINE 8 + +/* ---------------------------------------------------------------------- */ + +NEB_spin::NEB_spin(LAMMPS *lmp) : Pointers(lmp) {} + +/* ---------------------------------------------------------------------- + internal NEB_spin constructor, called from TAD +------------------------------------------------------------------------- */ + +NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, + int n2steps_in, int nevery_in, double *buf_init, double *buf_final) + : Pointers(lmp) +{ + double delx,dely,delz; + + etol = etol_in; + ftol = ftol_in; + n1steps = n1steps_in; + n2steps = n2steps_in; + nevery = nevery_in; + + // replica info + + nreplica = universe->nworlds; + ireplica = universe->iworld; + me_universe = universe->me; + uworld = universe->uworld; + MPI_Comm_rank(world,&me); + + // generate linear interpolate replica + + double fraction = ireplica/(nreplica-1.0); + + double **x = atom->x; + double **sp = atom->sp; + int nlocal = atom->nlocal; + + // modif interp. + int ii = 0; + for (int i = 0; i < nlocal; i++) { + delx = buf_final[ii] - buf_init[ii]; + dely = buf_final[ii+1] - buf_init[ii+1]; + delz = buf_final[ii+2] - buf_init[ii+2]; + domain->minimum_image(delx,dely,delz); + x[i][0] = buf_init[ii] + fraction*delx; + x[i][1] = buf_init[ii+1] + fraction*dely; + x[i][2] = buf_init[ii+2] + fraction*delz; + ii += 3; + } +} + +/* ---------------------------------------------------------------------- */ + +NEB_spin::~NEB_spin() +{ + MPI_Comm_free(&roots); + memory->destroy(all); + delete [] rdist; +} + +/* ---------------------------------------------------------------------- + perform NEB_spin on multiple replicas +------------------------------------------------------------------------- */ + +void NEB_spin::command(int narg, char **arg) +{ + if (domain->box_exist == 0) + error->all(FLERR,"NEB_spin command before simulation box is defined"); + + if (narg < 6) error->universe_all(FLERR,"Illegal NEB_spin command"); + + etol = force->numeric(FLERR,arg[0]); + ftol = force->numeric(FLERR,arg[1]); + n1steps = force->inumeric(FLERR,arg[2]); + n2steps = force->inumeric(FLERR,arg[3]); + nevery = force->inumeric(FLERR,arg[4]); + + // error checks + + if (etol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); + if (ftol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); + if (nevery <= 0) error->universe_all(FLERR,"Illegal NEB_spin command"); + if (n1steps % nevery || n2steps % nevery) + error->universe_all(FLERR,"Illegal NEB_spin command"); + + // replica info + + nreplica = universe->nworlds; + ireplica = universe->iworld; + me_universe = universe->me; + uworld = universe->uworld; + MPI_Comm_rank(world,&me); + + // error checks + + if (nreplica == 1) error->all(FLERR,"Cannot use NEB_spin with a single replica"); + if (atom->map_style == 0) + error->all(FLERR,"Cannot use NEB_spin unless atom map exists"); + + // process file-style setting to setup initial configs for all replicas + + if (strcmp(arg[5],"final") == 0) { + if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEB_spin command"); + infile = arg[6]; + readfile(infile,0); + } else if (strcmp(arg[5],"each") == 0) { + if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEB_spin command"); + infile = arg[6]; + readfile(infile,1); + } else if (strcmp(arg[5],"none") == 0) { + if (narg != 6 && narg !=7) error->universe_all(FLERR,"Illegal NEB_spin command"); + } else error->universe_all(FLERR,"Illegal NEB_spin command"); + + verbose=false; + if (strcmp(arg[narg-1],"verbose") == 0) verbose=true; + // run the NEB_spin calculation + + run(); +} + +/* ---------------------------------------------------------------------- + run NEB_spin on multiple replicas +------------------------------------------------------------------------- */ + +void NEB_spin::run() +{ + // create MPI communicator for root proc from each world + + int color; + if (me == 0) color = 0; + else color = 1; + MPI_Comm_split(uworld,color,0,&roots); + + int ineb; + for (ineb = 0; ineb < modify->nfix; ineb++) + if (strcmp(modify->fix[ineb]->style,"neb_spin") == 0) break; + if (ineb == modify->nfix) error->all(FLERR,"NEB_spin requires use of fix neb_spin"); + //int ineb; + //for (ineb = 0; ineb < modify->nfix; ineb++) + // if (strcmp(modify->fix[ineb]->style,"neb") == 0) break; + //if (ineb == modify->nfix) error->all(FLERR,"NEB_spin requires use of fix neb"); + + //fneb = (FixNEB_spin *) modify->fix[ineb]; + fneb_spin = (FixNEB_spin *) modify->fix[ineb]; + if (verbose) numall =7; + else numall = 4; + memory->create(all,nreplica,numall,"neb:all"); + rdist = new double[nreplica]; + + // initialize LAMMPS + + update->whichflag = 2; + update->etol = etol; + update->ftol = ftol; + update->multireplica = 1; + + lmp->init(); + + if (update->minimize->searchflag) + error->all(FLERR,"NEB_spin requires damped dynamics minimizer"); + + // setup regular NEB_spin minimization + FILE *uscreen = universe->uscreen; + FILE *ulogfile = universe->ulogfile; + + if (me_universe == 0 && uscreen) + fprintf(uscreen,"Setting up regular NEB_spin ...\n"); + + update->beginstep = update->firststep = update->ntimestep; + update->endstep = update->laststep = update->firststep + n1steps; + update->nsteps = n1steps; + update->max_eval = n1steps; + if (update->laststep < 0) + error->all(FLERR,"Too many timesteps for NEB_spin"); + + update->minimize->setup(); + + if (me_universe == 0) { + if (uscreen) { + if (verbose) { + fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " + "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " + "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " + "... ReplicaForceN MaxAtomForceN\n"); + } else { + fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " + "RDN PEN\n"); + } + } + + if (ulogfile) { + if (verbose) { + fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " + "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " + "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " + "... ReplicaForceN MaxAtomForceN\n"); + } else { + fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " + "RDN PEN\n"); + } + } + } + print_status(); + + // perform regular NEB_spin for n1steps or until replicas converge + // retrieve PE values from fix NEB_spin and print every nevery iterations + // break out of while loop early if converged + // damped dynamic min styles insure all replicas converge together + + timer->init(); + timer->barrier_start(); + + while (update->minimize->niter < n1steps) { + update->minimize->run(nevery); + print_status(); + if (update->minimize->stop_condition) break; + } + + timer->barrier_stop(); + + update->minimize->cleanup(); + + Finish finish(lmp); + finish.end(1); + + // switch fix NEB_spin to climbing mode + // top = replica that becomes hill climber + + double vmax = all[0][0]; + int top = 0; + for (int m = 1; m < nreplica; m++) + if (vmax < all[m][0]) { + vmax = all[m][0]; + top = m; + } + + // setup climbing NEB_spin minimization + // must reinitialize minimizer so it re-creates its fix MINIMIZE + + if (me_universe == 0 && uscreen) + fprintf(uscreen,"Setting up climbing ...\n"); + + if (me_universe == 0) { + if (uscreen) + fprintf(uscreen,"Climbing replica = %d\n",top+1); + if (ulogfile) + fprintf(ulogfile,"Climbing replica = %d\n",top+1); + } + + update->beginstep = update->firststep = update->ntimestep; + update->endstep = update->laststep = update->firststep + n2steps; + update->nsteps = n2steps; + update->max_eval = n2steps; + if (update->laststep < 0) + error->all(FLERR,"Too many timesteps"); + + update->minimize->init(); + //fneb->rclimber = top; + fneb_spin->rclimber = top; + update->minimize->setup(); + + if (me_universe == 0) { + if (uscreen) { + if (verbose) { + fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN " + "pathangle1 angletangrad1 anglegrad1 gradV1 " + "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " + "... ReplicaForceN MaxAtomForceN\n"); + } else { + fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + } + } + if (ulogfile) { + if (verbose) { + fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN " + "pathangle1 angletangrad1 anglegrad1 gradV1 " + "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " + "... ReplicaForceN MaxAtomForceN\n"); + } else { + fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + "GradV0 GradV1 GradVc " + "EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN\n"); + } + } + } + print_status(); + + // perform climbing NEB_spin for n2steps or until replicas converge + // retrieve PE values from fix NEB_spin and print every nevery iterations + // break induced if converged + // damped dynamic min styles insure all replicas converge together + + timer->init(); + timer->barrier_start(); + + while (update->minimize->niter < n2steps) { + update->minimize->run(nevery); + print_status(); + if (update->minimize->stop_condition) break; + } + + timer->barrier_stop(); + + update->minimize->cleanup(); + + finish.end(1); + + update->whichflag = 0; + update->multireplica = 0; + update->firststep = update->laststep = 0; + update->beginstep = update->endstep = 0; +} + +/* ---------------------------------------------------------------------- + read initial config atom coords from file + flag = 0 + only first replica opens file and reads it + first replica bcasts lines to all replicas + final replica stores coords + intermediate replicas interpolate from coords + new coord = replica fraction between current and final state + initial replica does nothing + flag = 1 + each replica (except first) opens file and reads it + each replica stores coords + initial replica does nothing +------------------------------------------------------------------------- */ + +void NEB_spin::readfile(char *file, int flag) +{ + int i,j,m,nchunk,eofflag,nlines; + tagint tag; + char *eof,*start,*next,*buf; + char line[MAXLINE]; + double xx,yy,zz,delx,dely,delz; + // creating new temp. sp + double spx,spy,spz,delspx,delspy,delspz; + + if (me_universe == 0 && screen) + fprintf(screen,"Reading NEB_spin coordinate file(s) ...\n"); + + // flag = 0, universe root reads header of file, bcast to universe + // flag = 1, each replica's root reads header of file, bcast to world + // but explicitly skip first replica + + if (flag == 0) { + if (me_universe == 0) { + open(file); + while (1) { + eof = fgets(line,MAXLINE,fp); + if (eof == NULL) error->one(FLERR,"Unexpected end of neb file"); + start = &line[strspn(line," \t\n\v\f\r")]; + if (*start != '\0' && *start != '#') break; + } + sscanf(line,"%d",&nlines); + } + MPI_Bcast(&nlines,1,MPI_INT,0,uworld); + + } else { + if (me == 0) { + if (ireplica) { + open(file); + while (1) { + eof = fgets(line,MAXLINE,fp); + if (eof == NULL) error->one(FLERR,"Unexpected end of neb file"); + start = &line[strspn(line," \t\n\v\f\r")]; + if (*start != '\0' && *start != '#') break; + } + sscanf(line,"%d",&nlines); + } else nlines = 0; + } + MPI_Bcast(&nlines,1,MPI_INT,0,world); + } + + char *buffer = new char[CHUNK*MAXLINE]; + char **values = new char*[ATTRIBUTE_PERLINE]; + + double fraction = ireplica/(nreplica-1.0); + + double **x = atom->x; + // spin table + double **sp = atom->sp; + int nlocal = atom->nlocal; + + // loop over chunks of lines read from file + // two versions of read_lines_from_file() for world vs universe bcast + // count # of atom coords changed so can check for invalid atom IDs in file + + int ncount = 0; + + int nread = 0; + while (nread < nlines) { + nchunk = MIN(nlines-nread,CHUNK); + if (flag == 0) + eofflag = comm->read_lines_from_file_universe(fp,nchunk,MAXLINE,buffer); + else + eofflag = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer); + if (eofflag) error->all(FLERR,"Unexpected end of neb file"); + + buf = buffer; + next = strchr(buf,'\n'); + *next = '\0'; + int nwords = atom->count_words(buf); + *next = '\n'; + + if (nwords != ATTRIBUTE_PERLINE) + error->all(FLERR,"Incorrect atom format in neb file"); + + // loop over lines of atom coords + // tokenize the line into values + + for (i = 0; i < nchunk; i++) { + next = strchr(buf,'\n'); + + values[0] = strtok(buf," \t\n\r\f"); + for (j = 1; j < nwords; j++) + values[j] = strtok(NULL," \t\n\r\f"); + + // adjust atom coord based on replica fraction + // for flag = 0, interpolate for intermediate and final replicas + // for flag = 1, replace existing coord with new coord + // ignore image flags of final x + // for interpolation: + // new x is displacement from old x via minimum image convention + // if final x is across periodic boundary: + // new x may be outside box + // will be remapped back into box when simulation starts + // its image flags will then be adjusted + + tag = ATOTAGINT(values[0]); + m = atom->map(tag); + if (m >= 0 && m < nlocal) { + ncount++; + xx = atof(values[1]); + yy = atof(values[2]); + zz = atof(values[3]); + + if (flag == 0) { + delx = xx - x[m][0]; + dely = yy - x[m][1]; + delz = zz - x[m][2]; + domain->minimum_image(delx,dely,delz); + x[m][0] += fraction*delx; + x[m][1] += fraction*dely; + x[m][2] += fraction*delz; + } else { + x[m][0] = xx; + x[m][1] = yy; + x[m][2] = zz; + } + } + + buf = next + 1; + } + + nread += nchunk; + } + + // check that all atom IDs in file were found by a proc + + if (flag == 0) { + int ntotal; + MPI_Allreduce(&ncount,&ntotal,1,MPI_INT,MPI_SUM,uworld); + if (ntotal != nreplica*nlines) + error->universe_all(FLERR,"Invalid atom IDs in neb file"); + } else { + int ntotal; + MPI_Allreduce(&ncount,&ntotal,1,MPI_INT,MPI_SUM,world); + if (ntotal != nlines) + error->all(FLERR,"Invalid atom IDs in neb file"); + } + + // clean up + + delete [] buffer; + delete [] values; + + if (flag == 0) { + if (me_universe == 0) { + if (compressed) pclose(fp); + else fclose(fp); + } + } else { + if (me == 0 && ireplica) { + if (compressed) pclose(fp); + else fclose(fp); + } + } +} + +/* ---------------------------------------------------------------------- + universe proc 0 opens NEB_spin data file + test if gzipped +------------------------------------------------------------------------- */ + +void NEB_spin::open(char *file) +{ + compressed = 0; + char *suffix = file + strlen(file) - 3; + if (suffix > file && strcmp(suffix,".gz") == 0) compressed = 1; + if (!compressed) fp = fopen(file,"r"); + else { +#ifdef LAMMPS_GZIP + char gunzip[128]; + snprintf(gunzip,128,"gzip -c -d %s",file); + +#ifdef _WIN32 + fp = _popen(gunzip,"rb"); +#else + fp = popen(gunzip,"r"); +#endif + +#else + error->one(FLERR,"Cannot open gzipped file"); +#endif + } + + if (fp == NULL) { + char str[128]; + snprintf(str,128,"Cannot open file %s",file); + error->one(FLERR,str); + } +} + +/* ---------------------------------------------------------------------- + query fix NEB_spin for info on each replica + universe proc 0 prints current NEB_spin status +------------------------------------------------------------------------- */ + +void NEB_spin::print_status() +{ + double fnorm2 = sqrt(update->minimize->fnorm_sqr()); + double fmaxreplica; + MPI_Allreduce(&fnorm2,&fmaxreplica,1,MPI_DOUBLE,MPI_MAX,roots); + double fnorminf = update->minimize->fnorm_inf(); + double fmaxatom; + MPI_Allreduce(&fnorminf,&fmaxatom,1,MPI_DOUBLE,MPI_MAX,roots); + + if (verbose) { + freplica = new double[nreplica]; + MPI_Allgather(&fnorm2,1,MPI_DOUBLE,&freplica[0],1,MPI_DOUBLE,roots); + fmaxatomInRepl = new double[nreplica]; + MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots); + } + + double one[7]; + //one[0] = fneb->veng; + //one[1] = fneb->plen; + //one[2] = fneb->nlen; + //one[3] = fneb->gradlen; + one[0] = fneb_neb->veng; + one[1] = fneb_neb->plen; + one[2] = fneb_neb->nlen; + one[3] = fneb_neb->gradlen; + + if (verbose) { + //one[4] = fneb->dotpath; + //one[5] = fneb->dottangrad; + //one[6] = fneb->dotgrad; + one[4] = fneb_spin->dotpath; + one[5] = fneb_spin->dottangrad; + one[6] = fneb_spin->dotgrad; + } + + if (output->thermo->normflag) one[0] /= atom->natoms; + if (me == 0) + MPI_Allgather(one,numall,MPI_DOUBLE,&all[0][0],numall,MPI_DOUBLE,roots); + MPI_Bcast(&all[0][0],numall*nreplica,MPI_DOUBLE,0,world); + + rdist[0] = 0.0; + for (int i = 1; i < nreplica; i++) + rdist[i] = rdist[i-1] + all[i][1]; + double endpt = rdist[nreplica-1] = rdist[nreplica-2] + all[nreplica-2][2]; + for (int i = 1; i < nreplica; i++) + rdist[i] /= endpt; + + // look up GradV for the initial, final, and climbing replicas + // these are identical to fnorm2, but to be safe we + // take them straight from fix_neb + + double gradvnorm0, gradvnorm1, gradvnormc; + + int irep; + irep = 0; + gradvnorm0 = all[irep][3]; + irep = nreplica-1; + gradvnorm1 = all[irep][3]; + irep = fneb->rclimber; + if (irep > -1) { + gradvnormc = all[irep][3]; + ebf = all[irep][0]-all[0][0]; + ebr = all[irep][0]-all[nreplica-1][0]; + } else { + double vmax = all[0][0]; + int top = 0; + for (int m = 1; m < nreplica; m++) + if (vmax < all[m][0]) { + vmax = all[m][0]; + top = m; + } + irep = top; + gradvnormc = all[irep][3]; + ebf = all[irep][0]-all[0][0]; + ebr = all[irep][0]-all[nreplica-1][0]; + } + + if (me_universe == 0) { + const double todeg=180.0/MY_PI; + FILE *uscreen = universe->uscreen; + FILE *ulogfile = universe->ulogfile; + if (uscreen) { + fprintf(uscreen,BIGINT_FORMAT " %12.8g %12.8g ", + update->ntimestep,fmaxreplica,fmaxatom); + fprintf(uscreen,"%12.8g %12.8g %12.8g ", + gradvnorm0,gradvnorm1,gradvnormc); + fprintf(uscreen,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); + for (int i = 0; i < nreplica; i++) + fprintf(uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); + if (verbose) { + fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, + all[0][3],freplica[0],fmaxatomInRepl[0]); + for (int i = 1; i < nreplica-1; i++) + fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, + 180-acos(all[i][6])*todeg,all[i][3],freplica[i], + fmaxatomInRepl[i]); + fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + NAN,180-acos(all[nreplica-1][5])*todeg,NAN,all[nreplica-1][3], + freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + } + fprintf(uscreen,"\n"); + } + + if (ulogfile) { + fprintf(ulogfile,BIGINT_FORMAT " %12.8g %12.8g ", + update->ntimestep,fmaxreplica,fmaxatom); + fprintf(ulogfile,"%12.8g %12.8g %12.8g ", + gradvnorm0,gradvnorm1,gradvnormc); + fprintf(ulogfile,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); + for (int i = 0; i < nreplica; i++) + fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); + if (verbose) { + fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, + all[0][3],freplica[0],fmaxatomInRepl[0]); + for (int i = 1; i < nreplica-1; i++) + fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, + 180-acos(all[i][6])*todeg,all[i][3],freplica[i], + fmaxatomInRepl[i]); + fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", + NAN,180-acos(all[nreplica-1][5])*todeg,NAN,all[nreplica-1][3], + freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + } + fprintf(ulogfile,"\n"); + fflush(ulogfile); + } + } +} diff --git a/src/REPLICA/neb_spin.h b/src/REPLICA/neb_spin.h new file mode 100644 index 0000000000..3fa19460fc --- /dev/null +++ b/src/REPLICA/neb_spin.h @@ -0,0 +1,137 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef COMMAND_CLASS + +CommandStyle(neb_spin,NEB_SPIN) + +#else + +#ifndef LMP_NEB_SPIN_H +#define LMP_NEB_SPIN_H + +#include +#include "pointers.h" + +namespace LAMMPS_NS { + +class NEB_spin : protected Pointers { + public: + NEB_spin(class LAMMPS *); + NEB_spin(class LAMMPS *, double, double, int, int, int, double *, double *); + ~NEB_spin(); + void command(int, char **); // process neb command + void run(); // run NEB_spin + + double ebf,ebr; // forward and reverse energy barriers + + private: + int me,me_universe; // my proc ID in world and universe + int ireplica,nreplica; + bool verbose; + MPI_Comm uworld; + MPI_Comm roots; // MPI comm with 1 root proc from each world + FILE *fp; + int compressed; + double etol; // energy tolerance convergence criterion + double ftol; // force tolerance convergence criterion + int n1steps, n2steps; // number of steps in stage 1 and 2 + int nevery; // output interval + char *infile; // name of file containing final state + + class FixNEB_spin *fneb; + int numall; // per-replica dimension of array all + double **all; // PE,plen,nlen,gradvnorm from each replica + double *rdist; // normalize reaction distance, 0 to 1 + double *freplica; // force on an image + double *fmaxatomInRepl; // force on an image + + void readfile(char *, int); + void open(char *); + void print_status(); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: NEB_spin command before simulation box is defined + +Self-explanatory. + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +E: Cannot use NEB_spin with a single replica + +Self-explanatory. + +E: Cannot use NEB_spin unless atom map exists + +Use the atom_modify command to create an atom map. + +E: NEB_spin requires use of fix neb + +Self-explanatory. + +E: NEB_spin requires damped dynamics minimizer + +Use a different minimization style. + +E: Too many timesteps for NEB_spin + +You must use a number of timesteps that fit in a 32-bit integer +for NEB_spin. + +E: Too many timesteps + +The cumulative timesteps must fit in a 64-bit integer. + +E: Unexpected end of neb file + +A read operation from the file failed. + +E: Incorrect atom format in neb file + +The number of fields per line is not what expected. + +E: Invalid atom IDs in neb file + +An ID in the file was not found in the system. + +E: Cannot open gzipped file + +LAMMPS was compiled without support for reading and writing gzipped +files through a pipeline to the gzip program with -DLAMMPS_GZIP. + +E: Cannot open file %s + +The specified file cannot be opened. Check that the path and name are +correct. If the file is a compressed file, also check that the gzip +executable can be found and run. + +U: Can only use NEB_spin with 1-processor replicas + +This is current restriction for NEB_spin as implemented in LAMMPS. + +U: Cannot use NEB_spin with atom_modify sort enabled + +This is current restriction for NEB_spin implemented in LAMMPS. + +*/ From 9fcd69921fd268bcec2d23d6ec519581f2a76794 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 4 Feb 2019 11:27:00 -0700 Subject: [PATCH 02/35] Commit JT 020419 - neb/spin implemneted - rotational initial states to be implemented - climbing image to be implemented --- examples/SPIN/gneb_bfo/final.iron_spin | 64 ++-- examples/SPIN/gneb_bfo/in.neb.hop1 | 1 + examples/SPIN/gneb_bfo/in.neb.spin_iron | 82 +--- examples/SPIN/gneb_bfo/in.spin.iron | 4 +- src/REPLICA/fix_neb_spin.cpp | 481 +++++++++++++++--------- src/REPLICA/fix_neb_spin.h | 7 +- src/REPLICA/neb_spin.cpp | 453 +++++++++++++++++++--- src/REPLICA/neb_spin.h | 7 +- src/SPIN/pair_spin_exchange.cpp | 3 +- 9 files changed, 754 insertions(+), 348 deletions(-) diff --git a/examples/SPIN/gneb_bfo/final.iron_spin b/examples/SPIN/gneb_bfo/final.iron_spin index a921287ccb..aa1cbae770 100644 --- a/examples/SPIN/gneb_bfo/final.iron_spin +++ b/examples/SPIN/gneb_bfo/final.iron_spin @@ -1,36 +1,36 @@ 32 -2.2000000000000002e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 1.4332499999999999e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 2.8664999999999998e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 4.2997499999999995e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 5.7329999999999997e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 7.1662499999999998e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 8.5994999999999990e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 1.0032750000000000e+01 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 0.0000000000000000e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 2.8664999999999998e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 5.7329999999999997e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 8.5994999999999990e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 1.4332499999999999e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 4.2997499999999995e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 7.1662499999999998e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 1.0032750000000000e+01 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 0.0000000000000000e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 1.4332499999999999e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 2.8664999999999998e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 4.2997499999999995e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 5.7329999999999997e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 7.1662499999999998e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 8.5994999999999990e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 1.0032750000000000e+01 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 0.0000000000000000e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 2.8664999999999998e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 5.7329999999999997e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 8.5994999999999990e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 1.4332499999999999e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 4.2997499999999995e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 7.1662499999999998e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.2000000000000002e+00 1.0032750000000000e+01 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +1 2.2000000000000002e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 2.2000000000000002e+00 1.4332499999999999e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +3 2.2000000000000002e+00 2.8664999999999998e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +4 2.2000000000000002e+00 4.2997499999999995e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +5 2.2000000000000002e+00 5.7329999999999997e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +6 2.2000000000000002e+00 7.1662499999999998e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +7 2.2000000000000002e+00 8.5994999999999990e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +8 2.2000000000000002e+00 1.0032750000000000e+01 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +9 2.2000000000000002e+00 0.0000000000000000e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +10 2.2000000000000002e+00 2.8664999999999998e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +11 2.2000000000000002e+00 5.7329999999999997e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +12 2.2000000000000002e+00 8.5994999999999990e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +13 2.2000000000000002e+00 1.4332499999999999e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +14 2.2000000000000002e+00 4.2997499999999995e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +15 2.2000000000000002e+00 7.1662499999999998e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +16 2.2000000000000002e+00 1.0032750000000000e+01 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +17 2.2000000000000002e+00 0.0000000000000000e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +18 2.2000000000000002e+00 1.4332499999999999e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +19 2.2000000000000002e+00 2.8664999999999998e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +20 2.2000000000000002e+00 4.2997499999999995e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +21 2.2000000000000002e+00 5.7329999999999997e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +22 2.2000000000000002e+00 7.1662499999999998e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +23 2.2000000000000002e+00 8.5994999999999990e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +24 2.2000000000000002e+00 1.0032750000000000e+01 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +25 2.2000000000000002e+00 0.0000000000000000e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +26 2.2000000000000002e+00 2.8664999999999998e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +27 2.2000000000000002e+00 5.7329999999999997e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +28 2.2000000000000002e+00 8.5994999999999990e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +29 2.2000000000000002e+00 1.4332499999999999e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +30 2.2000000000000002e+00 4.2997499999999995e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +31 2.2000000000000002e+00 7.1662499999999998e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +32 2.2000000000000002e+00 1.0032750000000000e+01 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 diff --git a/examples/SPIN/gneb_bfo/in.neb.hop1 b/examples/SPIN/gneb_bfo/in.neb.hop1 index 4e203afd82..6697330faa 100644 --- a/examples/SPIN/gneb_bfo/in.neb.hop1 +++ b/examples/SPIN/gneb_bfo/in.neb.hop1 @@ -1,4 +1,5 @@ # 2d NEB surface simulation, hop from surface to become adatom +print "Test 1" dimension 2 boundary p s p diff --git a/examples/SPIN/gneb_bfo/in.neb.spin_iron b/examples/SPIN/gneb_bfo/in.neb.spin_iron index 6b99cd4639..2cf3a8653e 100644 --- a/examples/SPIN/gneb_bfo/in.neb.spin_iron +++ b/examples/SPIN/gneb_bfo/in.neb.spin_iron @@ -1,12 +1,12 @@ # bcc iron in a 3d periodic box +print "Test 1" -clear units metal -atom_style spin - dimension 3 boundary p p f +atom_style spin + # necessary for the serial algorithm (sametag) atom_modify map array @@ -20,7 +20,7 @@ read_data ../examples/SPIN/gneb_bfo/initial.iron_spin # setting mass, mag. moments, and interactions for bcc iron mass 1 55.845 -set group all spin 2.2 -1.0 0.0 0.0 +#set group all spin 2.2 -1.0 0.0 0.0 pair_style spin/exchange 3.5 pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 @@ -28,73 +28,13 @@ pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 neighbor 0.1 bin neigh_modify every 10 check yes delay 20 -fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 -fix 2 all langevin/spin 0.0 0.0 21 -fix 2 nebatoms neb_spin 1.0 +fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 +#fix 2 all langevin/spin 0.0 0.0 21 +fix 2 all neb/spin 1.0 #parallel ideal -min_style quickmin -neb 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin +timestep 0.0001 - -############################################################# - -# 2d NEB surface simulation, hop from surface to become adatom - - -variable u uloop 20 - -# create geometry with flat surface - -lattice hex 0.9 -region box block 0 20 0 10 -0.25 0.25 - -#create_box 3 box -#create_atoms 1 box -#mass * 1.0 -#write_data initial.hop1 - -read_data ../examples/SPIN/gneb_bfo/initial.hop1 - -# LJ potentials - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 2.5 -pair_modify shift yes - -# initial minimization to relax surface - -minimize 1.0e-6 1.0e-4 1000 10000 -reset_timestep 0 - -# define groups - -region 1 block INF INF INF 1.25 INF INF -group lower region 1 -group mobile subtract all lower -set group lower type 2 - -timestep 0.05 - -# group of NEB atoms - either block or single atom ID 412 - -region surround block 10 18 17 20 0 0 units box -group nebatoms region surround -#group nebatoms id 412 -set group nebatoms type 3 -group nonneb subtract all nebatoms - -fix 1 lower setforce 0.0 0.0 0.0 -fix 2 nebatoms neb 1.0 parallel ideal -fix 3 all enforce2d - -thermo 100 - -#dump 1 nebatoms atom 10 dump.neb.$u -#dump 2 nonneb atom 10 dump.nonneb.$u - -# run NEB for 2000 steps or to force tolerance - -min_style quickmin - -neb 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.hop1 +#min_style quickmin +neb/spin 0.0 0.1 1 1 1 final ../examples/SPIN/gneb_bfo/final.iron_spin +#neb/spin 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.spin.iron b/examples/SPIN/gneb_bfo/in.spin.iron index 6d291c633b..0c84845f5f 100644 --- a/examples/SPIN/gneb_bfo/in.spin.iron +++ b/examples/SPIN/gneb_bfo/in.spin.iron @@ -19,7 +19,7 @@ create_atoms 1 box mass 1 55.845 -set group all spin 2.2 -1.0 0.0 0.0 +set group all spin 2.2 1.0 0.0 0.0 #velocity all create 100 4928459 rot yes dist gaussian pair_style spin/exchange 3.5 @@ -53,4 +53,4 @@ 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] run 0 -write_data final.iron_spin +write_data initial.iron_spin diff --git a/src/REPLICA/fix_neb_spin.cpp b/src/REPLICA/fix_neb_spin.cpp index a96af45267..150c37a03e 100644 --- a/src/REPLICA/fix_neb_spin.cpp +++ b/src/REPLICA/fix_neb_spin.cpp @@ -11,11 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -/* ---------------------------------------------------------------------- - Contributing author for: Emile Maras (CEA, France) - new options for inter-replica forces, first/last replica treatment -------------------------------------------------------------------------- */ - #include #include #include @@ -392,6 +387,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) nlen = 0.0; double tlen = 0.0; double gradnextlen = 0.0; + double delndots, delpdots; dotgrad = gradlen = dotpath = dottangrad = 0.0; @@ -403,12 +399,20 @@ void FixNEB_spin::min_post_force(int /*vflag*/) for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { + // tangent vector delspxp = sp[i][0] - spprev[i][0]; delspyp = sp[i][1] - spprev[i][1]; delspzp = sp[i][2] - spprev[i][2]; - domain->minimum_image(delspxp,delspyp,delspzp); // check what it does - delsqp = delspxp*delspxp+delspyp*delspyp+delspzp*delspzp; + + // project delp vector on tangent space + delpdots = delspxp*sp[i][0]+delspyp*sp[i][1]+delspzp*sp[i][2]; + delspxp -= delpdots*sp[i][0]; + delspyp -= delpdots*sp[i][1]; + delspzp -= delpdots*sp[i][2]; + + // adjust distance if pbc + //domain->minimum_image(delspxp,delspyp,delspzp); // calc. geodesic length spi[0]=sp[i][0]; @@ -419,7 +423,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) spj[2]=spprev[i][2]; templen = geodesic_distance(spi, spj); plen += templen*templen; - dottangrad += delxp*fm[i][0]+ delyp*fm[i][1]+delzp*fm[i][2]; + dottangrad += delspxp*fm[i][0]+ delspyp*fm[i][1]+delspzp*fm[i][2]; gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; //plen += delxp*delxp + delyp*delyp + delzp*delzp; @@ -430,14 +434,14 @@ void FixNEB_spin::min_post_force(int /*vflag*/) // (unless FreeEnd option) if (FreeEndFinal||FreeEndFinalWithRespToEIni) { error->all(FLERR,"Free End option not yet active"); - tangent[i][0]=delspxp; - tangent[i][1]=delspyp; - tangent[i][2]=delspzp; - // if needed, tlen has to be modified - tlen += tangent[i][0]*tangent[i][0] + - tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; - dot += fm[i][0]*tangent[i][0] + fm[i][1]*tangent[i][1] + - fm[i][2]*tangent[i][2]; + //tangent[i][0]=delspxp; + //tangent[i][1]=delspyp; + //tangent[i][2]=delspzp; + //// if needed, tlen has to be modified + //tlen += tangent[i][0]*tangent[i][0] + + // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + //dot += fm[i][0]*tangent[i][0] + fm[i][1]*tangent[i][1] + + // fm[i][2]*tangent[i][2]; } @@ -469,9 +473,16 @@ void FixNEB_spin::min_post_force(int /*vflag*/) delspxn = spnext[i][0]- sp[i][0]; delspyn = spnext[i][1]- sp[i][1]; delspzn = spnext[i][2]- sp[i][2]; - domain->minimum_image(delspxn,delspyn,delspzn); // check what it does - delsqn = delspxn*delspxn+delspyn*delspyn+delspzn*delspzn; + // project deln vector on tangent space + delndots = delspxn*sp[i][0]+delspyn*sp[i][1]+delspzn*sp[i][2]; + delspxn -= delndots*sp[i][0]; + delspyn -= delndots*sp[i][1]; + delspzn -= delndots*sp[i][2]; + + // adjust del. if pbc + //domain->minimum_image(delspxn,delspyn,delspzn); + // calc. geodesic length spi[0]=sp[i][0]; spi[1]=sp[i][1]; @@ -485,14 +496,14 @@ void FixNEB_spin::min_post_force(int /*vflag*/) gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; if (FreeEndIni) { error->all(FLERR,"Free End option not yet active"); - tangent[i][0]=delxn; - tangent[i][1]=delyn; - tangent[i][2]=delzn; - // if needed, tlen has to be modified - tlen += tangent[i][0]*tangent[i][0] + - tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; - dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + - f[i][2]*tangent[i][2]; + //tangent[i][0]=delxn; + //tangent[i][1]=delyn; + //tangent[i][2]=delzn; + //// if needed, tlen has to be modified + //tlen += tangent[i][0]*tangent[i][0] + + // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + //dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + + // f[i][2]*tangent[i][2]; } //delxn = xnext[i][0] - x[i][0]; @@ -528,10 +539,20 @@ void FixNEB_spin::min_post_force(int /*vflag*/) for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - delspxp = spx[i][0] - spxprev[i][0]; - delspyp = spx[i][1] - spxprev[i][1]; - delspzp = spx[i][2] - spxprev[i][2]; - domain->minimum_image(delspxp,delspyp,delspzp); + + // calc. delp vector + delspxp = sp[i][0] - spprev[i][0]; + delspyp = sp[i][1] - spprev[i][1]; + delspzp = sp[i][2] - spprev[i][2]; + + // project delp vector on tangent space + delndots = delspxp*sp[i][0]+delspyp*sp[i][1]+delspzp*sp[i][2]; + delspxp -= delpdots*sp[i][0]; + delspyp -= delpdots*sp[i][1]; + delspzp -= delpdots*sp[i][2]; + + // adjust distance if pbc + //domain->minimum_image(delspxp,delspyp,delspzp); // calc. geodesic length spi[0]=sp[i][0]; @@ -543,10 +564,19 @@ void FixNEB_spin::min_post_force(int /*vflag*/) templen = geodesic_distance(spi, spj); plen += templen*templen; - delspxn = spxnext[i][0] - spx[i][0]; - delspyn = spxnext[i][1] - spx[i][1]; - delspzn = spxnext[i][2] - spx[i][2]; - domain->minimum_image(delspxn,delspyn,delspzn); + // calc. deln vector + delspxn = spnext[i][0] - sp[i][0]; + delspyn = spnext[i][1] - sp[i][1]; + delspzn = spnext[i][2] - sp[i][2]; + + // project deln vector on tangent space + delndots = delspxn*sp[i][0]+delspyn*sp[i][1]+delspzn*sp[i][2]; + delspxn -= delndots*sp[i][0]; + delspyn -= delndots*sp[i][1]; + delspzn -= delndots*sp[i][2]; + + // adjust distance if pbc + //domain->minimum_image(delspxn,delspyn,delspzn); if (vnext > veng && veng > vprev) { tangent[i][0] = delspxn; @@ -593,63 +623,11 @@ void FixNEB_spin::min_post_force(int /*vflag*/) dotgrad += fm[i][0]*fnext[i][0] + fm[i][1]*fnext[i][1] + fm[i][2]*fnext[i][2]; - // is this a perpandicular spring force? + // no Perpendicular nudging force option active yet + // see fix_neb for example if (kspringPerp != 0.0) - error->all(FLERR,"Perpendicular nudging force not yet active"); - //springF[i][0] = kspringPerp*(delxn-delxp); - //springF[i][1] = kspringPerp*(delyn-delyp); - //springF[i][2] = kspringPerp*(delzn-delzp); + error->all(FLERR,"NEB_spin Perpendicular nudging force not yet active"); - //delxp = x[i][0] - xprev[i][0]; - //delyp = x[i][1] - xprev[i][1]; - //delzp = x[i][2] - xprev[i][2]; - //domain->minimum_image(delxp,delyp,delzp); - //plen += delxp*delxp + delyp*delyp + delzp*delzp; - - //delxn = xnext[i][0] - x[i][0]; - //delyn = xnext[i][1] - x[i][1]; - //delzn = xnext[i][2] - x[i][2]; - //domain->minimum_image(delxn,delyn,delzn); - - //if (vnext > veng && veng > vprev) { - // tangent[i][0] = delxn; - // tangent[i][1] = delyn; - // tangent[i][2] = delzn; - //} else if (vnext < veng && veng < vprev) { - // tangent[i][0] = delxp; - // tangent[i][1] = delyp; - // tangent[i][2] = delzp; - //} else { - // if (vnext > vprev) { - // tangent[i][0] = vmax*delxn + vmin*delxp; - // tangent[i][1] = vmax*delyn + vmin*delyp; - // tangent[i][2] = vmax*delzn + vmin*delzp; - // } else if (vnext < vprev) { - // tangent[i][0] = vmin*delxn + vmax*delxp; - // tangent[i][1] = vmin*delyn + vmax*delyp; - // tangent[i][2] = vmin*delzn + vmax*delzp; - // } else { // vnext == vprev, e.g. for potentials that do not compute an energy - // tangent[i][0] = delxn + delxp; - // tangent[i][1] = delyn + delyp; - // tangent[i][2] = delzn + delzp; - // } - //} - - //nlen += delxn*delxn + delyn*delyn + delzn*delzn; - //tlen += tangent[i][0]*tangent[i][0] + - // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; - //gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - //dotpath += delxp*delxn + delyp*delyn + delzp*delzn; - //dottangrad += tangent[i][0]*f[i][0] + - // tangent[i][1]*f[i][1] + tangent[i][2]*f[i][2]; - //gradnextlen += fnext[i][0]*fnext[i][0] + - // fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; - //dotgrad += f[i][0]*fnext[i][0] + f[i][1]*fnext[i][1] + - // f[i][2]*fnext[i][2]; - - //springF[i][0] = kspringPerp*(delxn-delxp); - //springF[i][1] = kspringPerp*(delyn-delyp); - //springF[i][2] = kspringPerp*(delzn-delzp); } } @@ -675,6 +653,24 @@ void FixNEB_spin::min_post_force(int /*vflag*/) dottangrad = bufout[6]; dotgrad = bufout[7]; + + // project tangent vector on tangent space + + double buftan[3]; + double tandots; + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + tandots = tangent[i][0]*sp[i][0]+tangent[i][1]*sp[i][1]+ + tangent[i][2]*sp[i][2]; + buftan[0] = tangent[i][0]-tandots*sp[i][0]; + buftan[1] = tangent[i][1]-tandots*sp[i][1]; + buftan[2] = tangent[i][2]-tandots*sp[i][2]; + tangent[i][0] = buftan[0]; + tangent[i][1] = buftan[1]; + tangent[i][2] = buftan[2]; + } + + // normalize tangent vector if (tlen > 0.0) { @@ -687,8 +683,6 @@ void FixNEB_spin::min_post_force(int /*vflag*/) } } -//////////////////////////////////////////////////////// - // first or last replica has no change to forces, just return if (ireplica > 0 && ireplica < nreplica-1) @@ -700,93 +694,31 @@ void FixNEB_spin::min_post_force(int /*vflag*/) if (ireplica < nreplica-1) dotgrad = dotgrad /(gradlen*gradnextlen); + // no Free End option active yet + // see fix_neb for example if (FreeEndIni && ireplica == 0) { - if (tlen > 0.0) { - double dotall; - MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); - dot=dotall/tlen; - - if (dot<0) prefactor = -dot - kspringIni*(veng-EIniIni); - else prefactor = -dot + kspringIni*(veng-EIniIni); - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - f[i][0] += prefactor *tangent[i][0]; - f[i][1] += prefactor *tangent[i][1]; - f[i][2] += prefactor *tangent[i][2]; - } - } + error->all(FLERR,"NEB_spin Free End option not yet active"); } + // no Free End option active yet + // see fix_neb for example if (FreeEndFinal && ireplica == nreplica -1) { - if (tlen > 0.0) { - double dotall; - MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); - dot=dotall/tlen; - - if (vengall(FLERR,"NEB_spin Free End option not yet active"); } + // no Free End option active yet + // see fix_neb for example if (FreeEndFinalWithRespToEIni&&ireplica == nreplica -1) { - if (tlen > 0.0) { - double dotall; - MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); - dot=dotall/tlen; - if (vengall(FLERR,"NEB_spin Free End option not yet active"); } + // no NEB_spin long range option + // see fix_neb for example double lentot = 0; double meanDist,idealPos,lenuntilIm,lenuntilClimber; lenuntilClimber=0; if (NEBLongRange) { - if (cmode == SINGLE_PROC_DIRECT || cmode == SINGLE_PROC_MAP) { - MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,uworld); - } else { - if (me == 0) - MPI_Allgather(&nlen,1,MPI_DOUBLE,&nlenall[0],1,MPI_DOUBLE,rootworld); - MPI_Bcast(nlenall,nreplica,MPI_DOUBLE,0,world); - } - - lenuntilIm = 0; - for (int i = 0; i < ireplica; i++) - lenuntilIm += nlenall[i]; - - for (int i = 0; i < nreplica; i++) - lentot += nlenall[i]; - - meanDist = lentot/(nreplica -1); - - if (rclimber>0) { - for (int i = 0; i < rclimber; i++) - lenuntilClimber += nlenall[i]; - double meanDistBeforeClimber = lenuntilClimber/rclimber; - double meanDistAfterClimber = - (lentot-lenuntilClimber)/(nreplica-rclimber-1); - if (ireplicaall(FLERR,"NEB_spin long range option not yet active"); } if (ireplica == 0 || ireplica == nreplica-1) return ; @@ -800,12 +732,19 @@ void FixNEB_spin::min_post_force(int /*vflag*/) for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { - dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + - f[i][2]*tangent[i][2]; - dotSpringTangent += springF[i][0]*tangent[i][0] + + dot += fm[i][0]*tangent[i][0] + fm[i][1]*tangent[i][1] + + fm[i][2]*tangent[i][2]; + // springF defined for perp. spring option + // not defined here + //dotSpringTangent += springF[i][0]*tangent[i][0] + springF[i][1]*tangent[i][1] + springF[i][2]*tangent[i][2];} + //dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + + // f[i][2]*tangent[i][2]; + //dotSpringTangent += springF[i][0]*tangent[i][0] + + // springF[i][1]*tangent[i][1] + springF[i][2]*tangent[i][2];} } + // gather all dot and dotSpring for this replica (world) double dotSpringTangentall; MPI_Allreduce(&dotSpringTangent,&dotSpringTangentall,1, MPI_DOUBLE,MPI_SUM,world); @@ -814,20 +753,26 @@ void FixNEB_spin::min_post_force(int /*vflag*/) MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); dot=dotall; - if (ireplica == rclimber) prefactor = -2.0*dot; - else { + + // implement climbing image here + + if (ireplica == rclimber) { + error->all(FLERR,"NEB_spin climber option not yet active"); + //prefactor = -2.0*dot; + } else { if (NEBLongRange) { - prefactor = -dot - kspring*(lenuntilIm-idealPos)/(2*meanDist); + error->all(FLERR,"NEB_spin climber option not yet active"); + //prefactor = -dot - kspring*(lenuntilIm-idealPos)/(2*meanDist); } else if (StandardNEB) { prefactor = -dot + kspring*(nlen-plen); } if (FinalAndInterWithRespToEIni&& vengsametag; + int nlocal = atom->nlocal; + int *mask = atom->mask; + double **sp = atom->sp; + double **fm = atom->fm; + double tdampx,tdampy,tdampz; + double msq,scale,fm2,energy,dts2; + double alpha; + double spi[3],fmi[3]; + double cp[3],g[3]; + + //cp[0] = cp[1] = cp[2] = 0.0; + //g[0] = g[1] = g[2] = 0.0; + dts2 = dts*dts; + + // fictitious Gilbert damping of 1 + alpha = 1.0; + + // loop on all spins on proc. + + if (ireplica != nreplica-1 && ireplica != 0) + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + + spi[0] = sp[i][0]; + spi[1] = sp[i][1]; + spi[2] = sp[i][2]; + + fmi[0] = fm[i][0]; + fmi[1] = fm[i][1]; + fmi[2] = fm[i][2]; + + // calc. damping torque + + tdampx = -alpha*(fmi[1]*spi[2] - fmi[2]*spi[1]); + tdampy = -alpha*(fmi[2]*spi[0] - fmi[0]*spi[2]); + tdampz = -alpha*(fmi[0]*spi[1] - fmi[1]*spi[0]); + + // apply advance algorithm (geometric, norm preserving) + + fm2 = (tdampx*tdampx+tdampy*tdampy+tdampz*tdampz); + energy = (sp[i][0]*tdampx)+(sp[i][1]*tdampy)+(sp[i][2]*tdampz); + + cp[0] = tdampy*sp[i][2]-tdampz*sp[i][1]; + cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; + cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; + + g[0] = sp[i][0]+cp[0]*dts; + g[1] = sp[i][1]+cp[1]*dts; + g[2] = sp[i][2]+cp[2]*dts; + + g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; + g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; + g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; + + g[0] /= (1+0.25*fm2*dts2); + g[1] /= (1+0.25*fm2*dts2); + g[2] /= (1+0.25*fm2*dts2); + + sp[i][0] = g[0]; + sp[i][1] = g[1]; + sp[i][2] = g[2]; + + // renormalization (check if necessary) + + msq = g[0]*g[0] + g[1]*g[1] + g[2]*g[2]; + scale = 1.0/sqrt(msq); + sp[i][0] *= scale; + sp[i][1] *= scale; + sp[i][2] *= scale; + + // comm. sp[i] to atoms with same tag (for serial algo) + + // no need for simplecticity + //if (sector_flag == 0) { + // if (sametag[i] >= 0) { + // j = sametag[i]; + // while (j >= 0) { + // sp[j][0] = sp[i][0]; + // sp[j][1] = sp[i][1]; + // sp[j][2] = sp[i][2]; + // j = sametag[j]; + // } + // } + //} + // + + } +} + +/* ---------------------------------------------------------------------- + evaluate max timestep +---------------------------------------------------------------------- */ + +double FixNEB_spin::evaluate_dt() +{ + double dtmax; + double fmsq; + double fmaxsqone,fmaxsqloc,fmaxsqall; + int nlocal = atom->nlocal; + int *mask = atom->mask; + double **fm = atom->fm; + + // finding max fm on this proc. + + fmsq = fmaxsqone = fmaxsqloc = fmaxsqall = 0.0; + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; + fmaxsqone = MAX(fmaxsqone,fmsq); + } + + // finding max fm on this replica + + fmaxsqloc = fmaxsqone; + MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world); + + // finding max fm over all replicas, if necessary + // this communicator would be invalid for multiprocess replicas + + if (update->multireplica == 1) { + fmaxsqall = fmaxsqloc; + MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld); + } + + if (fmaxsqall < fmaxsqloc) + error->all(FLERR,"Incorrect fmaxall calc."); + + // define max timestep + // dividing by 10 the inverse of max frequency + + dtmax = MY_2PI/(10.0*sqrt(fmaxsqall)); + + return dtmax; +} + /* ---------------------------------------------------------------------- send/recv NEB atoms to/from adjacent replicas received atoms matching my local atoms are stored in xprev,xnext @@ -913,19 +1018,25 @@ void FixNEB_spin::inter_replica_comm() if (cmode == SINGLE_PROC_DIRECT) { if (ireplica > 0) MPI_Irecv(xprev[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld,&request); + MPI_Irecv(spprev[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld,&request); if (ireplica < nreplica-1) MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld); + MPI_Send(sp[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld); if (ireplica > 0) MPI_Wait(&request,MPI_STATUS_IGNORE); if (ireplica < nreplica-1) MPI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); + MPI_Irecv(spnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); if (ireplica > 0) MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(sp[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); if (ireplica < nreplica-1) MPI_Wait(&request,MPI_STATUS_IGNORE); if (ireplica < nreplica-1) MPI_Irecv(fnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); + MPI_Irecv(fmnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); if (ireplica > 0) MPI_Send(f[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); + MPI_Send(fm[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); if (ireplica < nreplica-1) MPI_Wait(&request,MPI_STATUS_IGNORE); return; @@ -1077,7 +1188,7 @@ void FixNEB_spin::inter_replica_comm() fmsendall[0],counts,displacements,MPI_DOUBLE,0,world); } else { MPI_Gatherv(NULL,3*m,MPI_DOUBLE, - xsendall[0],counts,displacements,MPI_DOUBLE,0,world); + spsendall[0],counts,displacements,MPI_DOUBLE,0,world); MPI_Gatherv(NULL,3*m,MPI_DOUBLE, fmsendall[0],counts,displacements,MPI_DOUBLE,0,world); } diff --git a/src/REPLICA/fix_neb_spin.h b/src/REPLICA/fix_neb_spin.h index e3bdd6889d..291341860e 100644 --- a/src/REPLICA/fix_neb_spin.h +++ b/src/REPLICA/fix_neb_spin.h @@ -13,8 +13,8 @@ #ifdef FIX_CLASS -FixStyle(neb,FixNEB) -FixStyle(neb_spin,FixNEB_spin) +//FixStyle(neb,FixNEB) +FixStyle(neb/spin,FixNEB_spin) #else @@ -36,6 +36,8 @@ class FixNEB_spin : public Fix { void init(); void min_setup(int); void min_post_force(int); + void advance_spins(double); + double evaluate_dt(); private: int me,nprocs,nprocs_universe; @@ -79,6 +81,7 @@ class FixNEB_spin : public Fix { int *counts,*displacements; // used for MPI_Gather + double geodesic_distance(double *, double *); void inter_replica_comm(); void reallocate(); }; diff --git a/src/REPLICA/neb_spin.cpp b/src/REPLICA/neb_spin.cpp index 7860553532..60d44d1875 100644 --- a/src/REPLICA/neb_spin.cpp +++ b/src/REPLICA/neb_spin.cpp @@ -13,7 +13,7 @@ // 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 +// before lmptype.h can set flags to insure it is done correctly #include "lmptype.h" #include @@ -21,7 +21,10 @@ #include #include //#include "neb.h" +// test spin #include "neb_spin.h" +#include "compute.h" + #include "universe.h" #include "atom.h" #include "update.h" @@ -30,7 +33,10 @@ #include "min.h" #include "modify.h" #include "fix.h" -#include "fix_neb.h" +//#include "fix_neb.h" +// test spin +#include "fix_neb_spin.h" + #include "output.h" #include "thermo.h" #include "finish.h" @@ -46,7 +52,7 @@ using namespace MathConst; #define MAXLINE 256 #define CHUNK 1024 //#define ATTRIBUTE_PERLINE 4 -// 8 attributes: tag number, coords, spin norm, spin dir. +// 8 attributes: tag, spin norm, position (3), spin direction (3) #define ATTRIBUTE_PERLINE 8 /* ---------------------------------------------------------------------- */ @@ -61,7 +67,8 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, int n2steps_in, int nevery_in, double *buf_init, double *buf_final) : Pointers(lmp) { - double delx,dely,delz; + //double delx,dely,delz; + double delspx,delspy,delspz; etol = etol_in; ftol = ftol_in; @@ -82,19 +89,40 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, double fraction = ireplica/(nreplica-1.0); double **x = atom->x; + // spin quantitites double **sp = atom->sp; int nlocal = atom->nlocal; - // modif interp. int ii = 0; + double spinit[3],spfinal[3]; for (int i = 0; i < nlocal; i++) { - delx = buf_final[ii] - buf_init[ii]; - dely = buf_final[ii+1] - buf_init[ii+1]; - delz = buf_final[ii+2] - buf_init[ii+2]; - domain->minimum_image(delx,dely,delz); - x[i][0] = buf_init[ii] + fraction*delx; - x[i][1] = buf_init[ii+1] + fraction*dely; - x[i][2] = buf_init[ii+2] + fraction*delz; + + spinit[0] = buf_init[ii]; + spinit[1] = buf_init[ii+1]; + spinit[2] = buf_init[ii+2]; + spfinal[0] = buf_final[ii]; + spfinal[1] = buf_final[ii+1]; + spfinal[2] = buf_final[ii+2]; + + initial_rotation(spinit,spfinal,fraction); + + sp[i][0] = spfinal[0]; + sp[i][1] = spfinal[1]; + sp[i][2] = spfinal[2]; + + //delx = buf_final[ii] - buf_init[ii]; + //dely = buf_final[ii+1] - buf_init[ii+1]; + //delz = buf_final[ii+2] - buf_init[ii+2]; + + // adjust distance if pbc + // not implemented yet + //domain->minimum_image(delx,dely,delz); + + // need to define a procedure for circular initialization + + //x[i][0] = buf_init[ii] + fraction*delx; + //x[i][1] = buf_init[ii+1] + fraction*dely; + //x[i][2] = buf_init[ii+2] + fraction*delz; ii += 3; } } @@ -114,6 +142,15 @@ NEB_spin::~NEB_spin() void NEB_spin::command(int narg, char **arg) { + + printf("test 1 \n"); + + // test 1 + double **sp1 = atom->sp; + printf("test 1 atom: i=%d,%g,%g,%g \n",1,sp1[1][0],sp1[1][1],sp1[1][2]); + //error->all(FLERR,"end neb_spin test"); + + if (domain->box_exist == 0) error->all(FLERR,"NEB_spin command before simulation box is defined"); @@ -141,6 +178,13 @@ void NEB_spin::command(int narg, char **arg) uworld = universe->uworld; MPI_Comm_rank(world,&me); + // check metal units and spin atom/style + + if (!atom->sp_flag) + error->all(FLERR,"neb/spin requires atom/spin style"); + if (strcmp(update->unit_style,"metal") != 0) + error->all(FLERR,"neb/spin simulation requires metal unit style"); + // error checks if (nreplica == 1) error->all(FLERR,"Cannot use NEB_spin with a single replica"); @@ -149,6 +193,7 @@ void NEB_spin::command(int narg, char **arg) // process file-style setting to setup initial configs for all replicas + // check what options are available if (strcmp(arg[5],"final") == 0) { if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEB_spin command"); infile = arg[6]; @@ -163,6 +208,13 @@ void NEB_spin::command(int narg, char **arg) verbose=false; if (strcmp(arg[narg-1],"verbose") == 0) verbose=true; + + + // test 1 + double **sp = atom->sp; + printf("test 2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); + error->all(FLERR,"end neb_spin test"); + // run the NEB_spin calculation run(); @@ -181,17 +233,13 @@ void NEB_spin::run() else color = 1; MPI_Comm_split(uworld,color,0,&roots); + // search for neb_spin fix, allocate it int ineb; for (ineb = 0; ineb < modify->nfix; ineb++) - if (strcmp(modify->fix[ineb]->style,"neb_spin") == 0) break; - if (ineb == modify->nfix) error->all(FLERR,"NEB_spin requires use of fix neb_spin"); - //int ineb; - //for (ineb = 0; ineb < modify->nfix; ineb++) - // if (strcmp(modify->fix[ineb]->style,"neb") == 0) break; - //if (ineb == modify->nfix) error->all(FLERR,"NEB_spin requires use of fix neb"); + if (strcmp(modify->fix[ineb]->style,"neb/spin") == 0) break; + if (ineb == modify->nfix) error->all(FLERR,"NEB_spin requires use of fix neb/spin"); - //fneb = (FixNEB_spin *) modify->fix[ineb]; - fneb_spin = (FixNEB_spin *) modify->fix[ineb]; + fneb = (FixNEB_spin *) modify->fix[ineb]; if (verbose) numall =7; else numall = 4; memory->create(all,nreplica,numall,"neb:all"); @@ -206,8 +254,10 @@ void NEB_spin::run() lmp->init(); - if (update->minimize->searchflag) - error->all(FLERR,"NEB_spin requires damped dynamics minimizer"); + // put flag to check gilbert damping procedure is set + + //if (update->minimize->searchflag) + // error->all(FLERR,"NEB_spin requires damped dynamics minimizer"); // setup regular NEB_spin minimization FILE *uscreen = universe->uscreen; @@ -264,8 +314,19 @@ void NEB_spin::run() timer->init(); timer->barrier_start(); + double dts; while (update->minimize->niter < n1steps) { - update->minimize->run(nevery); + //dts = evaluate_dt(); + //advance_spins(dts); + dts = fneb->evaluate_dt(); + fneb->advance_spins(dts); + + // no minimizer for spins + //update->minimize->run(nevery); + // + // evaluate dts + // loop on spins, damped advance + // print_status(); if (update->minimize->stop_condition) break; } @@ -309,8 +370,7 @@ void NEB_spin::run() error->all(FLERR,"Too many timesteps"); update->minimize->init(); - //fneb->rclimber = top; - fneb_spin->rclimber = top; + fneb->rclimber = top; update->minimize->setup(); if (me_universe == 0) { @@ -356,7 +416,11 @@ void NEB_spin::run() timer->barrier_start(); while (update->minimize->niter < n2steps) { - update->minimize->run(nevery); + //dts = evaluate_dt(); + //advance_spins(dts); + dts = fneb->evaluate_dt(); + fneb->advance_spins(dts); + //update->minimize->run(nevery); print_status(); if (update->minimize->stop_condition) break; } @@ -373,6 +437,174 @@ void NEB_spin::run() update->beginstep = update->endstep = 0; } +/* ---------------------------------------------------------------------- + geodesic distance calculation (Vincenty's formula) +------------------------------------------------------------------------- */ + +//double NEB_spin::geodesic_distance2(double spi[3], double spj[3]) +//{ +// double dist; +// double crossx,crossy,crossz; +// double dotx,doty,dotz; +// double crosslen,dots; +// +// crossx = spi[1]*spj[2]-spi[2]*spj[1]; +// crossy = spi[2]*spj[0]-spi[0]*spj[2]; +// crossz = spi[0]*spj[1]-spi[1]*spj[0]; +// crosslen = sqrt(crossx*crossx + crossy*crossy + crossz*crossz); +// dotx = spi[0]*spj[0]; +// doty = spi[1]*spj[1]; +// dotz = spi[2]*spj[2]; +// dots = dotx+doty+dotz; +// +// dist = atan2(crosslen,dots); +// +// return dist; +//} + +/* ---------------------------------------------------------------------- + evaluate max timestep +---------------------------------------------------------------------- */ + +//double NEB_spin::evaluate_dt() +//{ +// double dtmax; +// double fmsq; +// double fmaxsqone,fmaxsqloc,fmaxsqall; +// int nlocal = atom->nlocal; +// int *mask = atom->mask; +// double **fm = atom->fm; +// +// // finding max fm on this proc. +// +// fmsq = fmaxsqone = fmaxsqloc = fmaxsqall = 0.0; +// for (int i = 0; i < nlocal; i++) +// if (mask[i] & groupbit) { +// fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; +// fmaxsqone = MAX(fmaxsqone,fmsq); +// } +// +// // finding max fm on this replica +// +// fmaxsqloc = fmaxsqone; +// MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world); +// +// // finding max fm over all replicas, if necessary +// // this communicator would be invalid for multiprocess replicas +// +// if (update->multireplica == 1) { +// fmaxsqall = fmaxsqloc; +// MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld); +// } +// +// if (fmaxsqall < fmaxsqloc) +// error->all(FLERR,"Incorrect fmaxall calc."); +// +// // define max timestep +// // dividing by 10 the inverse of max frequency +// +// dtmax = MY_2PI/(10.0*sqrt(fmaxsqall)); +// +// return dtmax; +//} + +/* ---------------------------------------------------------------------- + geometric damped advance os spins +---------------------------------------------------------------------- */ + +//void NEB_spin::advance_spins(double dts) +//{ +// //int j=0; +// //int *sametag = atom->sametag; +// int nlocal = atom->nlocal; +// int *mask = atom->mask; +// double **sp = atom->sp; +// double **fm = atom->fm; +// double tdampx,tdampy,tdampz; +// double msq,scale,fm2,energy,dts2; +// double alpha; +// double spi[3],fmi[3]; +// double cp[3],g[3]; +// +// //cp[0] = cp[1] = cp[2] = 0.0; +// //g[0] = g[1] = g[2] = 0.0; +// dts2 = dts*dts; +// +// // fictitious Gilbert damping of 1 +// alpha = 1.0; +// +// // loop on all spins on proc. +// +// if (ireplica != nreplica-1 && ireplica != 0) +// for (int i = 0; i < nlocal; i++) +// if (mask[i] & groupbit) { +// +// spi[0] = sp[i][0]; +// spi[1] = sp[i][1]; +// spi[2] = sp[i][2]; +// +// fmi[0] = fm[i][0]; +// fmi[1] = fm[i][1]; +// fmi[2] = fm[i][2]; +// +// // calc. damping torque +// +// tdampx = -alpha*(fmi[1]*spi[2] - fmi[2]*spi[1]); +// tdampy = -alpha*(fmi[2]*spi[0] - fmi[0]*spi[2]); +// tdampz = -alpha*(fmi[0]*spi[1] - fmi[1]*spi[0]); +// +// // apply advance algorithm (geometric, norm preserving) +// +// fm2 = (tdampx*tdampx+tdampy*tdampy+tdampz*tdampz); +// energy = (sp[i][0]*tdampx)+(sp[i][1]*tdampy)+(sp[i][2]*tdampz); +// +// cp[0] = tdampy*sp[i][2]-tdampz*sp[i][1]; +// cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; +// cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; +// +// g[0] = sp[i][0]+cp[0]*dts; +// g[1] = sp[i][1]+cp[1]*dts; +// g[2] = sp[i][2]+cp[2]*dts; +// +// g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; +// g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; +// g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; +// +// g[0] /= (1+0.25*fm2*dts2); +// g[1] /= (1+0.25*fm2*dts2); +// g[2] /= (1+0.25*fm2*dts2); +// +// sp[i][0] = g[0]; +// sp[i][1] = g[1]; +// sp[i][2] = g[2]; +// +// // renormalization (check if necessary) +// +// msq = g[0]*g[0] + g[1]*g[1] + g[2]*g[2]; +// scale = 1.0/sqrt(msq); +// sp[i][0] *= scale; +// sp[i][1] *= scale; +// sp[i][2] *= scale; +// +// // comm. sp[i] to atoms with same tag (for serial algo) +// +// // no need for simplecticity +// //if (sector_flag == 0) { +// // if (sametag[i] >= 0) { +// // j = sametag[i]; +// // while (j >= 0) { +// // sp[j][0] = sp[i][0]; +// // sp[j][1] = sp[i][1]; +// // sp[j][2] = sp[i][2]; +// // j = sametag[j]; +// // } +// // } +// //} +// // +// +// } +//} + /* ---------------------------------------------------------------------- read initial config atom coords from file flag = 0 @@ -395,8 +627,9 @@ void NEB_spin::readfile(char *file, int flag) char *eof,*start,*next,*buf; char line[MAXLINE]; double xx,yy,zz,delx,dely,delz; - // creating new temp. sp - double spx,spy,spz,delspx,delspy,delspz; + // spin quantities + double musp,spx,spy,spz; + //,delx,dely,delz; if (me_universe == 0 && screen) fprintf(screen,"Reading NEB_spin coordinate file(s) ...\n"); @@ -440,10 +673,17 @@ void NEB_spin::readfile(char *file, int flag) double fraction = ireplica/(nreplica-1.0); double **x = atom->x; - // spin table + // spin quantities double **sp = atom->sp; + double spinit[3],spfinal[3]; int nlocal = atom->nlocal; + // test 1.2 + //double **sp = atom->sp; + printf("test 1.2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); + //error->all(FLERR,"end neb_spin test"); + + // loop over chunks of lines read from file // two versions of read_lines_from_file() for world vs universe bcast // count # of atom coords changed so can check for invalid atom IDs in file @@ -493,22 +733,59 @@ void NEB_spin::readfile(char *file, int flag) m = atom->map(tag); if (m >= 0 && m < nlocal) { ncount++; - xx = atof(values[1]); - yy = atof(values[2]); - zz = atof(values[3]); + musp = atof(values[1]); + xx = atof(values[2]); + yy = atof(values[3]); + zz = atof(values[4]); + spx = atof(values[5]); + spy = atof(values[6]); + spz = atof(values[7]); + //xx = atof(values[1]); + //yy = atof(values[2]); + //zz = atof(values[3]); if (flag == 0) { - delx = xx - x[m][0]; - dely = yy - x[m][1]; - delz = zz - x[m][2]; - domain->minimum_image(delx,dely,delz); - x[m][0] += fraction*delx; - x[m][1] += fraction*dely; - x[m][2] += fraction*delz; + + // here, function interp. spin states + + //spinit[0] = x[m][0]; + //spinit[1] = x[m][1]; + //spinit[2] = x[m][2]; + spinit[0] = sp[m][0]; + spinit[1] = sp[m][1]; + spinit[2] = sp[m][2]; + spfinal[0] = spx; + spfinal[1] = spy; + spfinal[2] = spz; + //domain->minimum_image(delx,dely,delz); + + // test + printf("spinit: %g %g %g \n",spinit[0],spinit[1],spinit[2]); + printf("spfinal bef: %g %g %g \n",spfinal[0],spfinal[1],spfinal[2]); + + initial_rotation(spinit,spfinal,fraction); + + // test + printf("spfinal aft: %g %g %g \n",spfinal[0],spfinal[1],spfinal[2]); + + sp[m][0] = spfinal[0]; + sp[m][1] = spfinal[1]; + sp[m][2] = spfinal[2]; + sp[m][3] = musp; + //delx = xx - x[m][0]; + //dely = yy - x[m][1]; + //delz = zz - x[m][2]; + //x[m][0] += fraction*delx; + //x[m][1] += fraction*dely; + //x[m][2] += fraction*delz; } else { - x[m][0] = xx; + sp[m][3] = musp; + x[m][0] = xx; x[m][1] = yy; x[m][2] = zz; + sp[m][0] = spx; + sp[m][1] = spy; + sp[m][2] = spz; } } @@ -518,6 +795,12 @@ void NEB_spin::readfile(char *file, int flag) nread += nchunk; } + // test 1.3 + //double **sp = atom->sp; + printf("test 1.3 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); + //error->all(FLERR,"end neb_spin test"); + + // check that all atom IDs in file were found by a proc if (flag == 0) { @@ -550,6 +833,75 @@ void NEB_spin::readfile(char *file, int flag) } } +/* ---------------------------------------------------------------------- + initial configuration of spin sploc using Rodrigues' formula + interpolates between initial (spi) and final (stored in sploc) +------------------------------------------------------------------------- */ + +void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) +{ + + + // implementing initial rotation using atan2 + + //atan2(crosslen,dots); + + + + double theta,spdot; + double inormdot,ispinorm; + double kix,kiy,kiz; + double kinorm, ikinorm; + double crossx,crossy,crossz; + + //printf("inside rot, spi %g, spf %g \n",spi[0],sploc[0]); + + spdot = spi[0]*sploc[0]+spi[1]*sploc[1]+spi[2]*sploc[2]; + theta = fraction*acos(spdot); + + printf("inside rot, theta %g \n",theta); + + kix = spi[1]*sploc[2]-spi[2]*sploc[1]; + kiy = spi[2]*sploc[0]-spi[0]*sploc[2]; + kiz = spi[0]*sploc[1]-spi[1]*sploc[0]; + + //printf("inside rot1.1, ki %g %g %g \n",kix,kiy,kiz); + + inormdot = 1.0/sqrt(spdot); + kinorm = kix*kix+kiy*kiy+kiz*kiz; + if (kinorm == 0.0) { + kix = 0.0; + kiy = 0.0; + kiz = 0.0; + } else { + ikinorm = 1.0/kinorm; + kix *= ikinorm; + kiy *= ikinorm; + kiz *= ikinorm; + } + + //printf("inside rot1.2, kin %g %g %g \n",kix,kiy,kiz); + + crossx = kiy*spi[2]-kiz*spi[1]; + crossy = kiz*spi[0]-kix*spi[2]; + crossz = kix*spi[1]-kiy*spi[0]; + + //printf("inside rot1.3, cross %g %g %g \n",crossx,crossy,crossz); + + sploc[0] = spi[0]*cos(theta)+crossx*sin(theta); + sploc[1] = spi[1]*cos(theta)+crossy*sin(theta); + sploc[2] = spi[2]*cos(theta)+crossz*sin(theta); + + //printf("inside rot2, spf %g %g %g \n",sploc[0],sploc[1],sploc[2]); + + ispinorm = 1.0/sqrt(sploc[0]*sploc[0]+sploc[1]*sploc[1]+sploc[2]*sploc[2]); + + sploc[0] *= ispinorm; + sploc[1] *= ispinorm; + sploc[2] *= ispinorm; + printf("inside rot2, spf %g %g %g \n",sploc[0],sploc[1],sploc[2]); +} + /* ---------------------------------------------------------------------- universe proc 0 opens NEB_spin data file test if gzipped @@ -606,22 +958,15 @@ void NEB_spin::print_status() } double one[7]; - //one[0] = fneb->veng; - //one[1] = fneb->plen; - //one[2] = fneb->nlen; - //one[3] = fneb->gradlen; - one[0] = fneb_neb->veng; - one[1] = fneb_neb->plen; - one[2] = fneb_neb->nlen; - one[3] = fneb_neb->gradlen; + one[0] = fneb->veng; + one[1] = fneb->plen; + one[2] = fneb->nlen; + one[3] = fneb->gradlen; if (verbose) { - //one[4] = fneb->dotpath; - //one[5] = fneb->dottangrad; - //one[6] = fneb->dotgrad; - one[4] = fneb_spin->dotpath; - one[5] = fneb_spin->dottangrad; - one[6] = fneb_spin->dotgrad; + one[4] = fneb->dotpath; + one[5] = fneb->dottangrad; + one[6] = fneb->dotgrad; } if (output->thermo->normflag) one[0] /= atom->natoms; diff --git a/src/REPLICA/neb_spin.h b/src/REPLICA/neb_spin.h index 3fa19460fc..6541658fd7 100644 --- a/src/REPLICA/neb_spin.h +++ b/src/REPLICA/neb_spin.h @@ -13,7 +13,8 @@ #ifdef COMMAND_CLASS -CommandStyle(neb_spin,NEB_SPIN) +CommandStyle(neb/spin,NEB_spin) +//CommandStyle(neb,NEB_spin) #else @@ -56,7 +57,11 @@ class NEB_spin : protected Pointers { double *freplica; // force on an image double *fmaxatomInRepl; // force on an image + //double geodesic_distance2(double *, double *); + //double evaluate_dt(); + //void advance_spins(double); void readfile(char *, int); + void initial_rotation(double *, double *, double); void open(char *); void print_status(); }; diff --git a/src/SPIN/pair_spin_exchange.cpp b/src/SPIN/pair_spin_exchange.cpp index 8cd9d33abd..ec21fe8838 100644 --- a/src/SPIN/pair_spin_exchange.cpp +++ b/src/SPIN/pair_spin_exchange.cpp @@ -153,11 +153,12 @@ void PairSpinExchange::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) From e96878a70e9a9eaf31f2fa3e84ec655d745132c7 Mon Sep 17 00:00:00 2001 From: julient31 Date: Wed, 6 Feb 2019 11:35:33 -0700 Subject: [PATCH 03/35] Commit JT 020619 - correction gneb/spin - run but do not converge yet - check forces --- src/REPLICA/neb_spin.cpp | 167 +++++++++++++++++++++++++-------------- 1 file changed, 108 insertions(+), 59 deletions(-) diff --git a/src/REPLICA/neb_spin.cpp b/src/REPLICA/neb_spin.cpp index 60d44d1875..8780cb9a0a 100644 --- a/src/REPLICA/neb_spin.cpp +++ b/src/REPLICA/neb_spin.cpp @@ -143,11 +143,11 @@ NEB_spin::~NEB_spin() void NEB_spin::command(int narg, char **arg) { - printf("test 1 \n"); + //printf("test 1 \n"); // test 1 double **sp1 = atom->sp; - printf("test 1 atom: i=%d,%g,%g,%g \n",1,sp1[1][0],sp1[1][1],sp1[1][2]); + //printf("test 1 atom: i=%d,%g,%g,%g \n",1,sp1[1][0],sp1[1][1],sp1[1][2]); //error->all(FLERR,"end neb_spin test"); @@ -212,8 +212,8 @@ void NEB_spin::command(int narg, char **arg) // test 1 double **sp = atom->sp; - printf("test 2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); - error->all(FLERR,"end neb_spin test"); + //printf("test 2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); + //error->all(FLERR,"end neb_spin test"); // run the NEB_spin calculation @@ -680,7 +680,7 @@ void NEB_spin::readfile(char *file, int flag) // test 1.2 //double **sp = atom->sp; - printf("test 1.2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); + //printf("test 1.2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); //error->all(FLERR,"end neb_spin test"); @@ -760,13 +760,13 @@ void NEB_spin::readfile(char *file, int flag) //domain->minimum_image(delx,dely,delz); // test - printf("spinit: %g %g %g \n",spinit[0],spinit[1],spinit[2]); - printf("spfinal bef: %g %g %g \n",spfinal[0],spfinal[1],spfinal[2]); + //printf("spinit: %g %g %g \n",spinit[0],spinit[1],spinit[2]); + //printf("spfinal bef: %g %g %g \n",spfinal[0],spfinal[1],spfinal[2]); initial_rotation(spinit,spfinal,fraction); // test - printf("spfinal aft: %g %g %g \n",spfinal[0],spfinal[1],spfinal[2]); + //printf("spfinal aft: %g %g %g \n",spfinal[0],spfinal[1],spfinal[2]); sp[m][0] = spfinal[0]; sp[m][1] = spfinal[1]; @@ -797,7 +797,7 @@ void NEB_spin::readfile(char *file, int flag) // test 1.3 //double **sp = atom->sp; - printf("test 1.3 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); + //printf("test 1.3 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); //error->all(FLERR,"end neb_spin test"); @@ -841,65 +841,101 @@ void NEB_spin::readfile(char *file, int flag) void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) { - // implementing initial rotation using atan2 - //atan2(crosslen,dots); - - - - double theta,spdot; - double inormdot,ispinorm; - double kix,kiy,kiz; - double kinorm, ikinorm; - double crossx,crossy,crossz; - //printf("inside rot, spi %g, spf %g \n",spi[0],sploc[0]); + // this is not a sufficient routine, + // we need more accurate verifications - spdot = spi[0]*sploc[0]+spi[1]*sploc[1]+spi[2]*sploc[2]; - theta = fraction*acos(spdot); + + // initial and final and inter ang. values + double itheta,iphi,ftheta,fphi,ktheta,kphi; + double spix,spiy,spiz,spfx,spfy,spfz; + double spkx,spky,spkz,iknorm; + + spix = spi[0]; + spiy = spi[1]; + spiz = spi[2]; + + spfx = sploc[0]; + spfy = sploc[1]; + spfz = sploc[2]; + + iphi = acos(spiz); + itheta = acos(spix/sin(iphi)); + + fphi = acos(spfz); + ftheta = acos(spfx/sin(fphi)); - printf("inside rot, theta %g \n",theta); - - kix = spi[1]*sploc[2]-spi[2]*sploc[1]; - kiy = spi[2]*sploc[0]-spi[0]*sploc[2]; - kiz = spi[0]*sploc[1]-spi[1]*sploc[0]; - - //printf("inside rot1.1, ki %g %g %g \n",kix,kiy,kiz); - - inormdot = 1.0/sqrt(spdot); - kinorm = kix*kix+kiy*kiy+kiz*kiz; - if (kinorm == 0.0) { - kix = 0.0; - kiy = 0.0; - kiz = 0.0; - } else { - ikinorm = 1.0/kinorm; - kix *= ikinorm; - kiy *= ikinorm; - kiz *= ikinorm; - } + kphi = iphi + fraction*(fphi-iphi); + ktheta = itheta + fraction*(ftheta-itheta); - //printf("inside rot1.2, kin %g %g %g \n",kix,kiy,kiz); + spkx = cos(ktheta)*sin(kphi); + spky = sin(ktheta)*sin(kphi); + spkz = cos(kphi); - crossx = kiy*spi[2]-kiz*spi[1]; - crossy = kiz*spi[0]-kix*spi[2]; - crossz = kix*spi[1]-kiy*spi[0]; - - //printf("inside rot1.3, cross %g %g %g \n",crossx,crossy,crossz); + iknorm = spkx*spkx+spky*spky+spkz*spkz; - sploc[0] = spi[0]*cos(theta)+crossx*sin(theta); - sploc[1] = spi[1]*cos(theta)+crossy*sin(theta); - sploc[2] = spi[2]*cos(theta)+crossz*sin(theta); + spkx *= iknorm; + spky *= iknorm; + spkz *= iknorm; + + sploc[0] = spkx; + sploc[1] = spky; + sploc[2] = spkz; + //double theta,spdot; + //double inormdot,ispinorm; + //double kix,kiy,kiz; + //double kinorm, ikinorm; + //double crossx,crossy,crossz; + + ////printf("inside rot, spi %g, spf %g \n",spi[0],sploc[0]); + + //spdot = spi[0]*sploc[0]+spi[1]*sploc[1]+spi[2]*sploc[2]; + //theta = fraction*acos(spdot); + + //printf("inside rot, theta %g \n",theta); + + //kix = spi[1]*sploc[2]-spi[2]*sploc[1]; + //kiy = spi[2]*sploc[0]-spi[0]*sploc[2]; + //kiz = spi[0]*sploc[1]-spi[1]*sploc[0]; + // + ////printf("inside rot1.1, ki %g %g %g \n",kix,kiy,kiz); + + //inormdot = 1.0/sqrt(spdot); + //kinorm = kix*kix+kiy*kiy+kiz*kiz; + //if (kinorm == 0.0) { + // kix = 0.0; + // kiy = 0.0; + // kiz = 0.0; + //} else { + // ikinorm = 1.0/kinorm; + // kix *= ikinorm; + // kiy *= ikinorm; + // kiz *= ikinorm; + //} + + ////printf("inside rot1.2, kin %g %g %g \n",kix,kiy,kiz); + + //crossx = kiy*spi[2]-kiz*spi[1]; + //crossy = kiz*spi[0]-kix*spi[2]; + //crossz = kix*spi[1]-kiy*spi[0]; + // + ////printf("inside rot1.3, cross %g %g %g \n",crossx,crossy,crossz); + + //sploc[0] = spi[0]*cos(theta)+crossx*sin(theta); + //sploc[1] = spi[1]*cos(theta)+crossy*sin(theta); + //sploc[2] = spi[2]*cos(theta)+crossz*sin(theta); + // + ////printf("inside rot2, spf %g %g %g \n",sploc[0],sploc[1],sploc[2]); + + //ispinorm = 1.0/sqrt(sploc[0]*sploc[0]+sploc[1]*sploc[1]+sploc[2]*sploc[2]); + + //sploc[0] *= ispinorm; + //sploc[1] *= ispinorm; + //sploc[2] *= ispinorm; //printf("inside rot2, spf %g %g %g \n",sploc[0],sploc[1],sploc[2]); - - ispinorm = 1.0/sqrt(sploc[0]*sploc[0]+sploc[1]*sploc[1]+sploc[2]*sploc[2]); - - sploc[0] *= ispinorm; - sploc[1] *= ispinorm; - sploc[2] *= ispinorm; - printf("inside rot2, spf %g %g %g \n",sploc[0],sploc[1],sploc[2]); } /* ---------------------------------------------------------------------- @@ -943,7 +979,20 @@ void NEB_spin::open(char *file) void NEB_spin::print_status() { - double fnorm2 = sqrt(update->minimize->fnorm_sqr()); + + //double fnorm2 = sqrt(update->minimize->fnorm_sqr()); + + // test fmax spin + int nlocal = atom->nlocal; + double **fm = atom->fm; + double fnorm2; + for (int i = 0; i < nlocal; i++) + fnorm2 += (fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]); + //for (int i = 0; i < nlocal; i++) + // if (mask[i] & groupbit) { + // fnorm2 += (fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]); + // } + double fmaxreplica; MPI_Allreduce(&fnorm2,&fmaxreplica,1,MPI_DOUBLE,MPI_MAX,roots); double fnorminf = update->minimize->fnorm_inf(); From edd4b0cf2548c6ddc5b3ad08a7141c4f5a016606 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 4 Mar 2019 07:35:02 -0700 Subject: [PATCH 04/35] Commit JT 030419 - added minspin - modifs before co --- examples/SPIN/gneb_bfo/in.neb.spin_iron | 11 +- examples/SPIN/gneb_bfo/in.neb.spin_iron_min | 42 ++ examples/SPIN/gneb_bfo/in.spin.dyna_iron | 53 +++ src/REPLICA/fix_neb_spin.cpp | 285 ++++++------- src/REPLICA/fix_neb_spin.h | 4 +- src/REPLICA/neb_spin.cpp | 45 +- src/SPIN/min_spinmin.cpp | 428 ++++++++++++++++++++ src/SPIN/min_spinmin.h | 56 +++ 8 files changed, 772 insertions(+), 152 deletions(-) create mode 100644 examples/SPIN/gneb_bfo/in.neb.spin_iron_min create mode 100644 examples/SPIN/gneb_bfo/in.spin.dyna_iron create mode 100644 src/SPIN/min_spinmin.cpp create mode 100644 src/SPIN/min_spinmin.h diff --git a/examples/SPIN/gneb_bfo/in.neb.spin_iron b/examples/SPIN/gneb_bfo/in.neb.spin_iron index 2cf3a8653e..860db24a61 100644 --- a/examples/SPIN/gneb_bfo/in.neb.spin_iron +++ b/examples/SPIN/gneb_bfo/in.neb.spin_iron @@ -29,12 +29,15 @@ neighbor 0.1 bin neigh_modify every 10 check yes delay 20 fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 -#fix 2 all langevin/spin 0.0 0.0 21 -fix 2 all neb/spin 1.0 +fix 2 all langevin/spin 0.1 0.0 21 +fix 3 all neb/spin 1.0 +#fix 4 all nve/spin lattice no #parallel ideal timestep 0.0001 +thermo 100 -#min_style quickmin -neb/spin 0.0 0.1 1 1 1 final ../examples/SPIN/gneb_bfo/final.iron_spin + +min_style spinmin +neb/spin 0.0 0.1 100 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin #neb/spin 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.neb.spin_iron_min b/examples/SPIN/gneb_bfo/in.neb.spin_iron_min new file mode 100644 index 0000000000..a38a8fbde5 --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.neb.spin_iron_min @@ -0,0 +1,42 @@ +# bcc iron in a 3d periodic box + +units metal +dimension 3 +boundary p p f + +atom_style spin + +# necessary for the serial algorithm (sametag) +atom_modify map array + +lattice bcc 2.8665 +region box block 0.0 4.0 0.0 4.0 0.0 1.0 +#create_box 1 box +#create_atoms 1 box + +read_data ../examples/SPIN/gneb_bfo/initial.iron_spin + +# setting mass, mag. moments, and interactions for bcc iron + +mass 1 55.845 +#set group all spin 2.2 -1.0 0.0 0.0 + +pair_style spin/exchange 3.5 +pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 + +neighbor 0.1 bin +neigh_modify every 10 check yes delay 20 + +fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 +fix 2 all langevin/spin 0.1 0.0 21 +fix 3 all neb/spin 1.0 +fix 4 all nve/spin lattice no +#parallel ideal + +timestep 0.0001 +thermo 100 + + +min_style spinmin +neb/spin 0.0 0.1 10 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin +#neb/spin 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.spin.dyna_iron b/examples/SPIN/gneb_bfo/in.spin.dyna_iron new file mode 100644 index 0000000000..918819c816 --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.spin.dyna_iron @@ -0,0 +1,53 @@ +# bcc iron in a 3d periodic box + +clear +units metal +atom_style spin + +dimension 3 +boundary f f f + +# necessary for the serial algorithm (sametag) +atom_modify map array + +lattice bcc 2.8665 +region box block 0.0 4.0 0.0 4.0 0.0 1.0 +create_box 1 box +create_atoms 1 box + +#read_data ../examples/SPIN/gneb_bfo/initial.iron_spin + +# setting mass, mag. moments, and interactions for bcc iron + +mass 1 55.845 +set group all spin 2.2 -1.0 0.0 0.0 + +pair_style spin/exchange 3.5 +pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 + +neighbor 0.1 bin +neigh_modify every 10 check yes delay 20 + +fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 +fix 2 all langevin/spin 300.0 0.01 21 +#fix 3 all neb/spin 1.0 +fix 3 all nve/spin lattice no +timestep 0.0001 + +compute out_mag all spin +compute out_pe all pe +compute out_ke all ke +compute out_temp all temp + +variable magx equal c_out_mag[1] +variable magz equal c_out_mag[3] +variable magnorm equal c_out_mag[4] +variable emag equal c_out_mag[5] +variable tmag equal c_out_mag[6] + +thermo_style custom step time v_magx v_magnorm v_tmag temp v_emag ke pe etotal +thermo 100 + +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] +run 10000 diff --git a/src/REPLICA/fix_neb_spin.cpp b/src/REPLICA/fix_neb_spin.cpp index 150c37a03e..42450c2f0f 100644 --- a/src/REPLICA/fix_neb_spin.cpp +++ b/src/REPLICA/fix_neb_spin.cpp @@ -334,6 +334,9 @@ void FixNEB_spin::min_post_force(int /*vflag*/) MPI_Bcast(&vnext,1,MPI_DOUBLE,0,world); } + //printf("test veng: %g / %g / %g \n",veng,vprev,vnext); + //error->universe_all(FLERR,"End test"); + if (FreeEndFinal && ireplica == nreplica-1 && (update->ntimestep == 0)) EFinalIni = veng; if (ireplica == 0) vIni=veng; @@ -391,7 +394,6 @@ void FixNEB_spin::min_post_force(int /*vflag*/) dotgrad = gradlen = dotpath = dottangrad = 0.0; - // computation of the tangent vector // final replica @@ -401,11 +403,13 @@ void FixNEB_spin::min_post_force(int /*vflag*/) if (mask[i] & groupbit) { // tangent vector + delspxp = sp[i][0] - spprev[i][0]; delspyp = sp[i][1] - spprev[i][1]; delspzp = sp[i][2] - spprev[i][2]; // project delp vector on tangent space + delpdots = delspxp*sp[i][0]+delspyp*sp[i][1]+delspzp*sp[i][2]; delspxp -= delpdots*sp[i][0]; delspyp -= delpdots*sp[i][1]; @@ -415,6 +419,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) //domain->minimum_image(delspxp,delspyp,delspzp); // calc. geodesic length + spi[0]=sp[i][0]; spi[1]=sp[i][1]; spi[2]=sp[i][2]; @@ -470,11 +475,13 @@ void FixNEB_spin::min_post_force(int /*vflag*/) if (mask[i] & groupbit) { // tangent vector + delspxn = spnext[i][0]- sp[i][0]; delspyn = spnext[i][1]- sp[i][1]; delspzn = spnext[i][2]- sp[i][2]; // project deln vector on tangent space + delndots = delspxn*sp[i][0]+delspyn*sp[i][1]+delspzn*sp[i][2]; delspxn -= delndots*sp[i][0]; delspyn -= delndots*sp[i][1]; @@ -484,6 +491,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) //domain->minimum_image(delspxn,delspyn,delspzn); // calc. geodesic length + spi[0]=sp[i][0]; spi[1]=sp[i][1]; spi[2]=sp[i][2]; @@ -492,7 +500,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) spj[2]=spnext[i][2]; templen = geodesic_distance(spi, spj); nlen += templen*templen; - dottangrad += delspxn*fm[i][0] + delspyn*fm[i][1] + delspzp*fm[i][2]; + dottangrad += delspxn*fm[i][0] + delspyn*fm[i][1] + delspzn*fm[i][2]; gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; if (FreeEndIni) { error->all(FLERR,"Free End option not yet active"); @@ -817,18 +825,19 @@ double FixNEB_spin::geodesic_distance(double spi[3], double spj[3]) double dist; double crossx,crossy,crossz; double dotx,doty,dotz; - double crosslen,dots; + double normcross,dots; crossx = spi[1]*spj[2]-spi[2]*spj[1]; crossy = spi[2]*spj[0]-spi[0]*spj[2]; crossz = spi[0]*spj[1]-spi[1]*spj[0]; - crosslen = sqrt(crossx*crossx + crossy*crossy + crossz*crossz); + normcross = sqrt(crossx*crossx + crossy*crossy + crossz*crossz); + dotx = spi[0]*spj[0]; doty = spi[1]*spj[1]; dotz = spi[2]*spj[2]; dots = dotx+doty+dotz; - dist = atan2(crosslen,dots); + dist = atan2(normcross,dots); return dist; } @@ -837,144 +846,144 @@ double FixNEB_spin::geodesic_distance(double spi[3], double spj[3]) geometric damped advance os spins ---------------------------------------------------------------------- */ -void FixNEB_spin::advance_spins(double dts) -{ - //int j=0; - //int *sametag = atom->sametag; - int nlocal = atom->nlocal; - int *mask = atom->mask; - double **sp = atom->sp; - double **fm = atom->fm; - double tdampx,tdampy,tdampz; - double msq,scale,fm2,energy,dts2; - double alpha; - double spi[3],fmi[3]; - double cp[3],g[3]; - - //cp[0] = cp[1] = cp[2] = 0.0; - //g[0] = g[1] = g[2] = 0.0; - dts2 = dts*dts; - - // fictitious Gilbert damping of 1 - alpha = 1.0; - - // loop on all spins on proc. - - if (ireplica != nreplica-1 && ireplica != 0) - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - - spi[0] = sp[i][0]; - spi[1] = sp[i][1]; - spi[2] = sp[i][2]; - - fmi[0] = fm[i][0]; - fmi[1] = fm[i][1]; - fmi[2] = fm[i][2]; - - // calc. damping torque - - tdampx = -alpha*(fmi[1]*spi[2] - fmi[2]*spi[1]); - tdampy = -alpha*(fmi[2]*spi[0] - fmi[0]*spi[2]); - tdampz = -alpha*(fmi[0]*spi[1] - fmi[1]*spi[0]); - - // apply advance algorithm (geometric, norm preserving) - - fm2 = (tdampx*tdampx+tdampy*tdampy+tdampz*tdampz); - energy = (sp[i][0]*tdampx)+(sp[i][1]*tdampy)+(sp[i][2]*tdampz); - - cp[0] = tdampy*sp[i][2]-tdampz*sp[i][1]; - cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; - cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; - - g[0] = sp[i][0]+cp[0]*dts; - g[1] = sp[i][1]+cp[1]*dts; - g[2] = sp[i][2]+cp[2]*dts; - - g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; - g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; - g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; - - g[0] /= (1+0.25*fm2*dts2); - g[1] /= (1+0.25*fm2*dts2); - g[2] /= (1+0.25*fm2*dts2); - - sp[i][0] = g[0]; - sp[i][1] = g[1]; - sp[i][2] = g[2]; - - // renormalization (check if necessary) - - msq = g[0]*g[0] + g[1]*g[1] + g[2]*g[2]; - scale = 1.0/sqrt(msq); - sp[i][0] *= scale; - sp[i][1] *= scale; - sp[i][2] *= scale; - - // comm. sp[i] to atoms with same tag (for serial algo) - - // no need for simplecticity - //if (sector_flag == 0) { - // if (sametag[i] >= 0) { - // j = sametag[i]; - // while (j >= 0) { - // sp[j][0] = sp[i][0]; - // sp[j][1] = sp[i][1]; - // sp[j][2] = sp[i][2]; - // j = sametag[j]; - // } - // } - //} - // - - } -} +//void FixNEB_spin::advance_spins(double dts) +//{ +// //int j=0; +// //int *sametag = atom->sametag; +// int nlocal = atom->nlocal; +// int *mask = atom->mask; +// double **sp = atom->sp; +// double **fm = atom->fm; +// double tdampx,tdampy,tdampz; +// double msq,scale,fm2,energy,dts2; +// double alpha; +// double spi[3],fmi[3]; +// double cp[3],g[3]; +// +// //cp[0] = cp[1] = cp[2] = 0.0; +// //g[0] = g[1] = g[2] = 0.0; +// dts2 = dts*dts; +// +// // fictitious Gilbert damping of 1 +// alpha = 1.0; +// +// // loop on all spins on proc. +// +// if (ireplica != nreplica-1 && ireplica != 0) +// for (int i = 0; i < nlocal; i++) +// if (mask[i] & groupbit) { +// +// spi[0] = sp[i][0]; +// spi[1] = sp[i][1]; +// spi[2] = sp[i][2]; +// +// fmi[0] = fm[i][0]; +// fmi[1] = fm[i][1]; +// fmi[2] = fm[i][2]; +// +// // calc. damping torque +// +// tdampx = -alpha*(fmi[1]*spi[2] - fmi[2]*spi[1]); +// tdampy = -alpha*(fmi[2]*spi[0] - fmi[0]*spi[2]); +// tdampz = -alpha*(fmi[0]*spi[1] - fmi[1]*spi[0]); +// +// // apply advance algorithm (geometric, norm preserving) +// +// fm2 = (tdampx*tdampx+tdampy*tdampy+tdampz*tdampz); +// energy = (sp[i][0]*tdampx)+(sp[i][1]*tdampy)+(sp[i][2]*tdampz); +// +// cp[0] = tdampy*sp[i][2]-tdampz*sp[i][1]; +// cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; +// cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; +// +// g[0] = sp[i][0]+cp[0]*dts; +// g[1] = sp[i][1]+cp[1]*dts; +// g[2] = sp[i][2]+cp[2]*dts; +// +// g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; +// g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; +// g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; +// +// g[0] /= (1+0.25*fm2*dts2); +// g[1] /= (1+0.25*fm2*dts2); +// g[2] /= (1+0.25*fm2*dts2); +// +// sp[i][0] = g[0]; +// sp[i][1] = g[1]; +// sp[i][2] = g[2]; +// +// // renormalization (check if necessary) +// +// msq = g[0]*g[0] + g[1]*g[1] + g[2]*g[2]; +// scale = 1.0/sqrt(msq); +// sp[i][0] *= scale; +// sp[i][1] *= scale; +// sp[i][2] *= scale; +// +// // comm. sp[i] to atoms with same tag (for serial algo) +// +// // no need for simplecticity +// //if (sector_flag == 0) { +// // if (sametag[i] >= 0) { +// // j = sametag[i]; +// // while (j >= 0) { +// // sp[j][0] = sp[i][0]; +// // sp[j][1] = sp[i][1]; +// // sp[j][2] = sp[i][2]; +// // j = sametag[j]; +// // } +// // } +// //} +// // +// +// } +//} /* ---------------------------------------------------------------------- evaluate max timestep ---------------------------------------------------------------------- */ -double FixNEB_spin::evaluate_dt() -{ - double dtmax; - double fmsq; - double fmaxsqone,fmaxsqloc,fmaxsqall; - int nlocal = atom->nlocal; - int *mask = atom->mask; - double **fm = atom->fm; - - // finding max fm on this proc. - - fmsq = fmaxsqone = fmaxsqloc = fmaxsqall = 0.0; - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; - fmaxsqone = MAX(fmaxsqone,fmsq); - } - - // finding max fm on this replica - - fmaxsqloc = fmaxsqone; - MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world); - - // finding max fm over all replicas, if necessary - // this communicator would be invalid for multiprocess replicas - - if (update->multireplica == 1) { - fmaxsqall = fmaxsqloc; - MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld); - } - - if (fmaxsqall < fmaxsqloc) - error->all(FLERR,"Incorrect fmaxall calc."); - - // define max timestep - // dividing by 10 the inverse of max frequency - - dtmax = MY_2PI/(10.0*sqrt(fmaxsqall)); - - return dtmax; -} +//double FixNEB_spin::evaluate_dt() +//{ +// double dtmax; +// double fmsq; +// double fmaxsqone,fmaxsqloc,fmaxsqall; +// int nlocal = atom->nlocal; +// int *mask = atom->mask; +// double **fm = atom->fm; +// +// // finding max fm on this proc. +// +// fmsq = fmaxsqone = fmaxsqloc = fmaxsqall = 0.0; +// for (int i = 0; i < nlocal; i++) +// if (mask[i] & groupbit) { +// fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; +// fmaxsqone = MAX(fmaxsqone,fmsq); +// } +// +// // finding max fm on this replica +// +// fmaxsqloc = fmaxsqone; +// MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world); +// +// // finding max fm over all replicas, if necessary +// // this communicator would be invalid for multiprocess replicas +// +// if (update->multireplica == 1) { +// fmaxsqall = fmaxsqloc; +// MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld); +// } +// +// if (fmaxsqall < fmaxsqloc) +// error->all(FLERR,"Incorrect fmaxall calc."); +// +// // define max timestep +// // dividing by 10 the inverse of max frequency +// +// dtmax = MY_2PI/(10.0*sqrt(fmaxsqall)); +// +// return dtmax; +//} /* ---------------------------------------------------------------------- send/recv NEB atoms to/from adjacent replicas diff --git a/src/REPLICA/fix_neb_spin.h b/src/REPLICA/fix_neb_spin.h index 291341860e..c70f35ae2d 100644 --- a/src/REPLICA/fix_neb_spin.h +++ b/src/REPLICA/fix_neb_spin.h @@ -36,8 +36,8 @@ class FixNEB_spin : public Fix { void init(); void min_setup(int); void min_post_force(int); - void advance_spins(double); - double evaluate_dt(); + //void advance_spins(double); + //double evaluate_dt(); private: int me,nprocs,nprocs_universe; diff --git a/src/REPLICA/neb_spin.cpp b/src/REPLICA/neb_spin.cpp index 8780cb9a0a..6249797e95 100644 --- a/src/REPLICA/neb_spin.cpp +++ b/src/REPLICA/neb_spin.cpp @@ -24,6 +24,7 @@ // test spin #include "neb_spin.h" #include "compute.h" +#include "force.h" #include "universe.h" #include "atom.h" @@ -262,6 +263,8 @@ void NEB_spin::run() // setup regular NEB_spin minimization FILE *uscreen = universe->uscreen; FILE *ulogfile = universe->ulogfile; + + //printf("test before run 1 \n"); if (me_universe == 0 && uscreen) fprintf(uscreen,"Setting up regular NEB_spin ...\n"); @@ -272,8 +275,12 @@ void NEB_spin::run() update->max_eval = n1steps; if (update->laststep < 0) error->all(FLERR,"Too many timesteps for NEB_spin"); + + //printf("test before run 2 \n"); update->minimize->setup(); + + //printf("test before run 3 \n"); if (me_universe == 0) { if (uscreen) { @@ -304,7 +311,9 @@ void NEB_spin::run() } } } + //printf("test before run 4 \n"); print_status(); + //printf("test before run 5 \n"); // perform regular NEB_spin for n1steps or until replicas converge // retrieve PE values from fix NEB_spin and print every nevery iterations @@ -314,13 +323,23 @@ void NEB_spin::run() timer->init(); timer->barrier_start(); + // test import fix_nve scheme + + //printf("test 2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); + //error->all(FLERR,"end neb_spin test"); double dts; while (update->minimize->niter < n1steps) { //dts = evaluate_dt(); //advance_spins(dts); - dts = fneb->evaluate_dt(); - fneb->advance_spins(dts); + //fneb-> + //dts = fneb->evaluate_dt(); + //fneb->advance_spins(dts); + + // no minimizer for spins + update->minimize->run(nevery); + + // no minimizer for spins //update->minimize->run(nevery); // @@ -331,6 +350,9 @@ void NEB_spin::run() if (update->minimize->stop_condition) break; } + // test neb end + //error->all(FLERR,"end neb_spin test"); + timer->barrier_stop(); update->minimize->cleanup(); @@ -371,8 +393,11 @@ void NEB_spin::run() update->minimize->init(); fneb->rclimber = top; + printf("test print 6.2 \n"); update->minimize->setup(); + printf("test print 6.3 \n"); + if (me_universe == 0) { if (uscreen) { if (verbose) { @@ -418,9 +443,9 @@ void NEB_spin::run() while (update->minimize->niter < n2steps) { //dts = evaluate_dt(); //advance_spins(dts); - dts = fneb->evaluate_dt(); - fneb->advance_spins(dts); - //update->minimize->run(nevery); + //dts = fneb->evaluate_dt(); + //fneb->advance_spins(dts); + update->minimize->run(nevery); print_status(); if (update->minimize->stop_condition) break; } @@ -995,9 +1020,13 @@ void NEB_spin::print_status() double fmaxreplica; MPI_Allreduce(&fnorm2,&fmaxreplica,1,MPI_DOUBLE,MPI_MAX,roots); - double fnorminf = update->minimize->fnorm_inf(); - double fmaxatom; - MPI_Allreduce(&fnorminf,&fmaxatom,1,MPI_DOUBLE,MPI_MAX,roots); + + // no minimize->fnorm_inf for spins + //double fnorminf = update->minimize->fnorm_inf(); + //double fmaxatom; + //MPI_Allreduce(&fnorminf,&fmaxatom,1,MPI_DOUBLE,MPI_MAX,roots); + double fnorminf = 0.0; + double fmaxatom = 0.0; if (verbose) { freplica = new double[nreplica]; diff --git a/src/SPIN/min_spinmin.cpp b/src/SPIN/min_spinmin.cpp new file mode 100644 index 0000000000..08f91abae7 --- /dev/null +++ b/src/SPIN/min_spinmin.cpp @@ -0,0 +1,428 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include +#include +#include "min_spinmin.h" +#include "universe.h" +#include "atom.h" +#include "force.h" +#include "update.h" +#include "output.h" +#include "timer.h" +#include "error.h" + +#include +#include +#include "modify.h" +#include "math_special.h" +#include "math_const.h" +#include "fix_neb_spin.h" + +using namespace LAMMPS_NS; +using namespace MathConst; + +// EPS_ENERGY = minimum normalization for energy tolerance + +#define EPS_ENERGY 1.0e-8 + +#define DELAYSTEP 5 + +/* ---------------------------------------------------------------------- */ + +MinSpinMin::MinSpinMin(LAMMPS *lmp) : Min(lmp) {} + +/* ---------------------------------------------------------------------- */ + +void MinSpinMin::init() +{ + Min::init(); + + dt = update->dt; + last_negative = update->ntimestep; + + // test dts + dts = dt; + +} + +/* ---------------------------------------------------------------------- */ + +void MinSpinMin::setup_style() +{ + double **v = atom->v; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) + v[i][0] = v[i][1] = v[i][2] = 0.0; +} + +/* ---------------------------------------------------------------------- + set current vector lengths and pointers + called after atoms have migrated +------------------------------------------------------------------------- */ + +void MinSpinMin::reset_vectors() +{ + // atomic dof + + // not really good size => sp is 4N vector + nvec = 4 * atom->nlocal; + if (nvec) spvec = atom->sp[0]; + + nvec = 3 * atom->nlocal; + if (nvec) fmvec = atom->fm[0]; + + if (nvec) xvec = atom->x[0]; + if (nvec) fvec = atom->f[0]; +} + +/* ---------------------------------------------------------------------- + minimization via QuickMin damped dynamics +------------------------------------------------------------------------- */ + +int MinSpinMin::iterate(int maxiter) +{ + bigint ntimestep; + //double vmax,vdotf,vdotfall,fdotf,fdotfall,scale; + //double dtvone,dtv,dtf,dtfm; + //int flag,flagall; + + //alpha_final = 0.0; + + // search for and allocate neb_spin fix + + //int ineb; + //for (ineb = 0; ineb < modify->nfix; ineb++) + // if (strcmp(modify->fix[ineb]->style,"neb/spin") == 0) break; + //if (ineb == modify->nfix) error->all(FLERR,"spinmin requires use of fix neb/spin"); + //fneb = (FixNEB_spin *) modify->fix[ineb]; + + for (int iter = 0; iter < maxiter; iter++) { + + if (timer->check_timeout(niter)) + return TIMEOUT; + + ntimestep = ++update->ntimestep; + niter++; + + // optimize timestep accross processes / replicas + + //dts = fneb->evaluate_dt(); + dts = evaluate_dt(); + + // apply damped precessional dynamics to the spins + + //fneb->advance_spins(dts); + advance_spins(dts); + + + //// zero velocity if anti-parallel to force + //// else project velocity in direction of force + + //double **v = atom->v; + //double **f = atom->f; + //int nlocal = atom->nlocal; + + //vdotf = 0.0; + //for (int i = 0; i < nlocal; i++) + // vdotf += v[i][0]*f[i][0] + v[i][1]*f[i][1] + v[i][2]*f[i][2]; + //MPI_Allreduce(&vdotf,&vdotfall,1,MPI_DOUBLE,MPI_SUM,world); + + // sum vdotf over replicas, if necessary + // this communicator would be invalid for multiprocess replicas + + //if (update->multireplica == 1) { + // vdotf = vdotfall; + // MPI_Allreduce(&vdotf,&vdotfall,1,MPI_DOUBLE,MPI_SUM,universe->uworld); + //} + + //if (vdotfall < 0.0) { + // last_negative = ntimestep; + // for (int i = 0; i < nlocal; i++) + // v[i][0] = v[i][1] = v[i][2] = 0.0; + + //} else { + // fdotf = 0.0; + // for (int i = 0; i < nlocal; i++) + // fdotf += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; + // MPI_Allreduce(&fdotf,&fdotfall,1,MPI_DOUBLE,MPI_SUM,world); + + // // sum fdotf over replicas, if necessary + // // this communicator would be invalid for multiprocess replicas + + // if (update->multireplica == 1) { + // fdotf = fdotfall; + // MPI_Allreduce(&fdotf,&fdotfall,1,MPI_DOUBLE,MPI_SUM,universe->uworld); + // } + + // if (fdotfall == 0.0) scale = 0.0; + // else scale = vdotfall/fdotfall; + // for (int i = 0; i < nlocal; i++) { + // v[i][0] = scale * f[i][0]; + // v[i][1] = scale * f[i][1]; + // v[i][2] = scale * f[i][2]; + // } + //} + + //// limit timestep so no particle moves further than dmax + + //double *rmass = atom->rmass; + //double *mass = atom->mass; + //int *type = atom->type; + + //dtvone = dt; + + //for (int i = 0; i < nlocal; i++) { + // vmax = MAX(fabs(v[i][0]),fabs(v[i][1])); + // vmax = MAX(vmax,fabs(v[i][2])); + // if (dtvone*vmax > dmax) dtvone = dmax/vmax; + //} + //MPI_Allreduce(&dtvone,&dtv,1,MPI_DOUBLE,MPI_MIN,world); + + //// min dtv over replicas, if necessary + //// this communicator would be invalid for multiprocess replicas + + //if (update->multireplica == 1) { + // dtvone = dtv; + // MPI_Allreduce(&dtvone,&dtv,1,MPI_DOUBLE,MPI_MIN,universe->uworld); + //} + + //dtf = dtv * force->ftm2v; + + //// Euler integration step + + //double **x = atom->x; + + //if (rmass) { + // for (int i = 0; i < nlocal; i++) { + // dtfm = dtf / rmass[i]; + // x[i][0] += dtv * v[i][0]; + // x[i][1] += dtv * v[i][1]; + // x[i][2] += dtv * v[i][2]; + // v[i][0] += dtfm * f[i][0]; + // v[i][1] += dtfm * f[i][1]; + // v[i][2] += dtfm * f[i][2]; + // } + //} else { + // for (int i = 0; i < nlocal; i++) { + // dtfm = dtf / mass[type[i]]; + // x[i][0] += dtv * v[i][0]; + // x[i][1] += dtv * v[i][1]; + // x[i][2] += dtv * v[i][2]; + // v[i][0] += dtfm * f[i][0]; + // v[i][1] += dtfm * f[i][1]; + // v[i][2] += dtfm * f[i][2]; + // } + //} + + //eprevious = ecurrent; + //ecurrent = energy_force(0); + //neval++; + + //// energy tolerance criterion + //// only check after DELAYSTEP elapsed since velocties reset to 0 + //// sync across replicas if running multi-replica minimization + + //if (update->etol > 0.0 && ntimestep-last_negative > DELAYSTEP) { + // if (update->multireplica == 0) { + // if (fabs(ecurrent-eprevious) < + // update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY)) + // return ETOL; + // } else { + // if (fabs(ecurrent-eprevious) < + // update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY)) + // flag = 0; + // else flag = 1; + // MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld); + // if (flagall == 0) return ETOL; + // } + //} + + //// force tolerance criterion + //// sync across replicas if running multi-replica minimization + + //if (update->ftol > 0.0) { + // fdotf = fnorm_sqr(); + // if (update->multireplica == 0) { + // if (fdotf < update->ftol*update->ftol) return FTOL; + // } else { + // if (fdotf < update->ftol*update->ftol) flag = 0; + // else flag = 1; + // MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld); + // if (flagall == 0) return FTOL; + // } + //} + + //// output for thermo, dump, restart files + + //if (output->next == ntimestep) { + // timer->stamp(); + // output->write(ntimestep); + // timer->stamp(Timer::OUTPUT); + //} + } + + return MAXITER; +} + +/* ---------------------------------------------------------------------- + evaluate max timestep +---------------------------------------------------------------------- */ + +double MinSpinMin::evaluate_dt() +{ + double dtmax; + double fmsq; + double fmaxsqone,fmaxsqloc,fmaxsqall; + int nlocal = atom->nlocal; + int *mask = atom->mask; + double **fm = atom->fm; + + // finding max fm on this proc. + + fmsq = fmaxsqone = fmaxsqloc = fmaxsqall = 0.0; + for (int i = 0; i < nlocal; i++) { + fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; + fmaxsqone = MAX(fmaxsqone,fmsq); + } + //for (int i = 0; i < nlocal; i++) + // if (mask[i] & groupbit) { + // fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; + // fmaxsqone = MAX(fmaxsqone,fmsq); + // } + + // finding max fm on this replica + + fmaxsqloc = fmaxsqone; + MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world); + + // finding max fm over all replicas, if necessary + // this communicator would be invalid for multiprocess replicas + + if (update->multireplica == 1) { + fmaxsqall = fmaxsqloc; + MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld); + } + + if (fmaxsqall < fmaxsqloc) + error->all(FLERR,"Incorrect fmaxall calc."); + + // define max timestep + // dividing by 10 the inverse of max frequency + + dtmax = MY_2PI/(10.0*sqrt(fmaxsqall)); + + return dtmax; +} + +/* ---------------------------------------------------------------------- + geometric damped advance of spins +---------------------------------------------------------------------- */ + +void MinSpinMin::advance_spins(double dts) +{ + //int j=0; + //int *sametag = atom->sametag; + int nlocal = atom->nlocal; + int *mask = atom->mask; + double **sp = atom->sp; + double **fm = atom->fm; + double tdampx,tdampy,tdampz; + double msq,scale,fm2,energy,dts2; + double alpha; + double spi[3],fmi[3]; + double cp[3],g[3]; + + //cp[0] = cp[1] = cp[2] = 0.0; + //g[0] = g[1] = g[2] = 0.0; + dts2 = dts*dts; + + // fictitious Gilbert damping of 1 + alpha = 1.0; + + // loop on all spins on proc. + + //if (ireplica != nreplica-1 && ireplica != 0) + // for (int i = 0; i < nlocal; i++) + // if (mask[i] & groupbit) { + for (int i = 0; i < nlocal; i++) { + + spi[0] = sp[i][0]; + spi[1] = sp[i][1]; + spi[2] = sp[i][2]; + + fmi[0] = fm[i][0]; + fmi[1] = fm[i][1]; + fmi[2] = fm[i][2]; + + // calc. damping torque + + tdampx = -alpha*(fmi[1]*spi[2] - fmi[2]*spi[1]); + tdampy = -alpha*(fmi[2]*spi[0] - fmi[0]*spi[2]); + tdampz = -alpha*(fmi[0]*spi[1] - fmi[1]*spi[0]); + + // apply advance algorithm (geometric, norm preserving) + + fm2 = (tdampx*tdampx+tdampy*tdampy+tdampz*tdampz); + energy = (sp[i][0]*tdampx)+(sp[i][1]*tdampy)+(sp[i][2]*tdampz); + + cp[0] = tdampy*sp[i][2]-tdampz*sp[i][1]; + cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; + cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; + + g[0] = sp[i][0]+cp[0]*dts; + g[1] = sp[i][1]+cp[1]*dts; + g[2] = sp[i][2]+cp[2]*dts; + + g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; + g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; + g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; + + g[0] /= (1+0.25*fm2*dts2); + g[1] /= (1+0.25*fm2*dts2); + g[2] /= (1+0.25*fm2*dts2); + + sp[i][0] = g[0]; + sp[i][1] = g[1]; + sp[i][2] = g[2]; + + // renormalization (check if necessary) + + msq = g[0]*g[0] + g[1]*g[1] + g[2]*g[2]; + scale = 1.0/sqrt(msq); + sp[i][0] *= scale; + sp[i][1] *= scale; + sp[i][2] *= scale; + + // comm. sp[i] to atoms with same tag (for serial algo) + + // no need for simplecticity + //if (sector_flag == 0) { + // if (sametag[i] >= 0) { + // j = sametag[i]; + // while (j >= 0) { + // sp[j][0] = sp[i][0]; + // sp[j][1] = sp[i][1]; + // sp[j][2] = sp[i][2]; + // j = sametag[j]; + // } + // } + //} + // + } + + printf("test inside spinmin, dts = %g \n",dts); + printf("test inside spinmin, fmi i=%d, %g %g %g \n",1,fm[1][0],fm[1][1],fm[1][2]); + printf("test inside spinmin, spi i=%d, %g %g %g \n",1,sp[1][0],sp[1][1],sp[1][2]); +} diff --git a/src/SPIN/min_spinmin.h b/src/SPIN/min_spinmin.h new file mode 100644 index 0000000000..fe2cf7c51d --- /dev/null +++ b/src/SPIN/min_spinmin.h @@ -0,0 +1,56 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef MINIMIZE_CLASS + +MinimizeStyle(spinmin,MinSpinMin) + +#else + +#ifndef LMP_MIN_SPINMIN_H +#define LMP_MIN_SPINMIN_H + +#include "min.h" + +namespace LAMMPS_NS { + +class MinSpinMin : public Min { + public: + MinSpinMin(class LAMMPS *); + ~MinSpinMin() {} + void init(); + void setup_style(); + void reset_vectors(); + int iterate(int); + double evaluate_dt(); + void advance_spins(double); + + class FixNEB_spin *fneb; + + private: + + // spin timestep + double dts; + + double *spvec; // variables for atomic dof, as 1d vector + double *fmvec; // variables for atomic dof, as 1d vector + + + double dt; + bigint last_negative; +}; + +} + +#endif +#endif From 14a00662e6efc8795b82262d48a1b6b9d0605db4 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 11 Mar 2019 13:04:03 -0600 Subject: [PATCH 05/35] Commit JT 031119 - first working version of spinmin --- examples/SPIN/read_restart/in.spin.read_data | 2 +- src/SPIN/fix_precession_spin.cpp | 3 + src/SPIN/min_spinmin.cpp | 112 ++++++++++++------- src/SPIN/pair_spin_exchange.cpp | 5 +- 4 files changed, 80 insertions(+), 42 deletions(-) diff --git a/examples/SPIN/read_restart/in.spin.read_data b/examples/SPIN/read_restart/in.spin.read_data index 17343994b5..a450421699 100644 --- a/examples/SPIN/read_restart/in.spin.read_data +++ b/examples/SPIN/read_restart/in.spin.read_data @@ -40,6 +40,6 @@ thermo_style custom step time v_magnorm v_emag v_tmag temp etotal thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz -dump 10 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] +dump 1 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] run 100 diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index d3edb3ae8a..65d5e9120e 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -171,6 +171,9 @@ void FixPrecessionSpin::setup(int vflag) void FixPrecessionSpin::post_force(int /*vflag*/) { + + printf("test inside post force (precession) \n"); + // update mag field with time (potential improvement) if (varflag != CONSTANT) { diff --git a/src/SPIN/min_spinmin.cpp b/src/SPIN/min_spinmin.cpp index 08f91abae7..4b362fda87 100644 --- a/src/SPIN/min_spinmin.cpp +++ b/src/SPIN/min_spinmin.cpp @@ -96,7 +96,7 @@ int MinSpinMin::iterate(int maxiter) bigint ntimestep; //double vmax,vdotf,vdotfall,fdotf,fdotfall,scale; //double dtvone,dtv,dtf,dtfm; - //int flag,flagall; + int flag,flagall; //alpha_final = 0.0; @@ -226,29 +226,44 @@ int MinSpinMin::iterate(int maxiter) // } //} - //eprevious = ecurrent; - //ecurrent = energy_force(0); - //neval++; + eprevious = ecurrent; + ecurrent = energy_force(0); + neval++; //// energy tolerance criterion //// only check after DELAYSTEP elapsed since velocties reset to 0 //// sync across replicas if running multi-replica minimization - //if (update->etol > 0.0 && ntimestep-last_negative > DELAYSTEP) { + if (update->etol > 0.0 && ntimestep-last_negative > DELAYSTEP) { + if (update->multireplica == 0) { + if (fabs(ecurrent-eprevious) < + update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY)) + return ETOL; + } else { + if (fabs(ecurrent-eprevious) < + update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY)) + flag = 0; + else flag = 1; + MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld); + if (flagall == 0) return ETOL; + } + } + + //// magnetic force tolerance criterion + //// sync across replicas if running multi-replica minimization + + //if (update->fmtol > 0.0) { + // fmdotfm = fmnorm_sqr(); // if (update->multireplica == 0) { - // if (fabs(ecurrent-eprevious) < - // update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY)) - // return ETOL; + // if (fmdotfm < update->fmtol*update->fmtol) return FTOL; // } else { - // if (fabs(ecurrent-eprevious) < - // update->etol * 0.5*(fabs(ecurrent) + fabs(eprevious) + EPS_ENERGY)) - // flag = 0; + // if (fmdotfm < update->fmtol*update->fmtol) flag = 0; // else flag = 1; - // MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld); - // if (flagall == 0) return ETOL; + // MPI_Allreduce(&fmlag,&fmlagall,1,MPI_INT,MPI_SUM,universe->uworld); + // if (fmlagall == 0) return FTOL; // } //} - + //// force tolerance criterion //// sync across replicas if running multi-replica minimization @@ -266,11 +281,11 @@ int MinSpinMin::iterate(int maxiter) //// output for thermo, dump, restart files - //if (output->next == ntimestep) { - // timer->stamp(); - // output->write(ntimestep); - // timer->stamp(Timer::OUTPUT); - //} + if (output->next == ntimestep) { + timer->stamp(); + output->write(ntimestep); + timer->stamp(Timer::OUTPUT); + } } return MAXITER; @@ -296,6 +311,7 @@ double MinSpinMin::evaluate_dt() fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; fmaxsqone = MAX(fmaxsqone,fmsq); } + //printf("test inside evaluate dt, fmaxsqone = %g \n",fmaxsqone); //for (int i = 0; i < nlocal; i++) // if (mask[i] & groupbit) { // fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; @@ -310,18 +326,21 @@ double MinSpinMin::evaluate_dt() // finding max fm over all replicas, if necessary // this communicator would be invalid for multiprocess replicas + fmaxsqall = fmaxsqloc; if (update->multireplica == 1) { fmaxsqall = fmaxsqloc; MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld); } - if (fmaxsqall < fmaxsqloc) - error->all(FLERR,"Incorrect fmaxall calc."); + //if (fmaxsqall < fmaxsqloc) + // error->all(FLERR,"Incorrect fmaxall calc."); // define max timestep // dividing by 10 the inverse of max frequency + //printf("test inside evaluate dt, fmaxsqall = %g \n",fmaxsqall); dtmax = MY_2PI/(10.0*sqrt(fmaxsqall)); + //printf("test inside evaluate dt, dtmax = %g \n",dtmax); return dtmax; } @@ -341,7 +360,7 @@ void MinSpinMin::advance_spins(double dts) double tdampx,tdampy,tdampz; double msq,scale,fm2,energy,dts2; double alpha; - double spi[3],fmi[3]; + //double spi[3],fmi[3]; double cp[3],g[3]; //cp[0] = cp[1] = cp[2] = 0.0; @@ -351,6 +370,9 @@ void MinSpinMin::advance_spins(double dts) // fictitious Gilbert damping of 1 alpha = 1.0; + //printf("test inside spinmin, dts %g \n",dts); + //printf("test inside spinmin, fmi i=%d, %g %g %g \n",1,fm[1][0],fm[1][1],fm[1][2]); + // loop on all spins on proc. //if (ireplica != nreplica-1 && ireplica != 0) @@ -358,19 +380,21 @@ void MinSpinMin::advance_spins(double dts) // if (mask[i] & groupbit) { for (int i = 0; i < nlocal; i++) { - spi[0] = sp[i][0]; - spi[1] = sp[i][1]; - spi[2] = sp[i][2]; - - fmi[0] = fm[i][0]; - fmi[1] = fm[i][1]; - fmi[2] = fm[i][2]; + //spi[0] = sp[i][0]; + //spi[1] = sp[i][1]; + //spi[2] = sp[i][2]; + // + //fmi[0] = fm[i][0]; + //fmi[1] = fm[i][1]; + //fmi[2] = fm[i][2]; // calc. damping torque - tdampx = -alpha*(fmi[1]*spi[2] - fmi[2]*spi[1]); - tdampy = -alpha*(fmi[2]*spi[0] - fmi[0]*spi[2]); - tdampz = -alpha*(fmi[0]*spi[1] - fmi[1]*spi[0]); + tdampx = -alpha*(fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]); + tdampy = -alpha*(fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]); + tdampz = -alpha*(fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]); + + //printf("for %d, test tdamp: %g %g %g \n",i,tdampx,tdampy,tdampz); // apply advance algorithm (geometric, norm preserving) @@ -381,18 +405,27 @@ void MinSpinMin::advance_spins(double dts) cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; + //printf("for %d, test cp: %g %g %g \n",i,cp[0],cp[1],cp[2]); + g[0] = sp[i][0]+cp[0]*dts; g[1] = sp[i][1]+cp[1]*dts; g[2] = sp[i][2]+cp[2]*dts; - g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; - g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; - g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; + //g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; + //g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; + //g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; + g[0] += (tdampx*energy-0.5*sp[i][0]*fm2)*0.5*dts2; + g[1] += (tdampy*energy-0.5*sp[i][1]*fm2)*0.5*dts2; + g[2] += (tdampz*energy-0.5*sp[i][2]*fm2)*0.5*dts2; g[0] /= (1+0.25*fm2*dts2); g[1] /= (1+0.25*fm2*dts2); g[2] /= (1+0.25*fm2*dts2); - + + //printf("test inside spinmin, spi i=%d, %g %g %g \n",i,sp[i][0],sp[i][1],sp[i][2]); + //printf("test inside spinmin, fmi i=%d, %g %g %g \n",i,fm[i][0],fm[i][1],fm[i][2]); + //printf("for %d, test g: %g %g %g \n",i,g[0],g[1],g[2]); + sp[i][0] = g[0]; sp[i][1] = g[1]; sp[i][2] = g[2]; @@ -422,7 +455,8 @@ void MinSpinMin::advance_spins(double dts) // } - printf("test inside spinmin, dts = %g \n",dts); - printf("test inside spinmin, fmi i=%d, %g %g %g \n",1,fm[1][0],fm[1][1],fm[1][2]); - printf("test inside spinmin, spi i=%d, %g %g %g \n",1,sp[1][0],sp[1][1],sp[1][2]); + //printf("test inside spinmin, dts = %g \n",dts); + //printf("test inside spinmin, fmi i=%d, %g %g %g \n",1,fm[1][0],fm[1][1],fm[1][2]); + //printf("test inside spinmin, spi i=%d, %g %g %g \n",1,sp[1][0],sp[1][1],sp[1][2]); } + diff --git a/src/SPIN/pair_spin_exchange.cpp b/src/SPIN/pair_spin_exchange.cpp index ec21fe8838..84e771a2ed 100644 --- a/src/SPIN/pair_spin_exchange.cpp +++ b/src/SPIN/pair_spin_exchange.cpp @@ -161,8 +161,9 @@ void PairSpinExchange::init_style() if (strcmp(modify->fix[ifix]->style,"neb/spin") == 0) break; ifix++; } - if (ifix == modify->nfix) - error->all(FLERR,"pair/spin style requires nve/spin"); + // test remove if test + //if (ifix == modify->nfix) + // error->all(FLERR,"pair/spin style requires nve/spin"); // get the lattice_flag from nve/spin From 5fff18932d446df46a48f284f2df251a360fce38 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 11 Mar 2019 13:23:55 -0600 Subject: [PATCH 06/35] Commit 2 JT 031119 - new input files gneb and spinmin --- examples/SPIN/gneb_bfo/Si.sw | 18 - examples/SPIN/gneb_bfo/final.hop1 | 2 - examples/SPIN/gneb_bfo/final.iron_spin_data | 82 -- .../{in.neb.spin_iron => in.gneb.iron} | 0 examples/SPIN/gneb_bfo/in.neb.hop1 | 67 -- examples/SPIN/gneb_bfo/in.neb.spin_iron_min | 42 - examples/SPIN/gneb_bfo/in.spin.bfo | 56 -- examples/SPIN/gneb_bfo/in.spin.dyna_iron | 53 -- examples/SPIN/gneb_bfo/in.spin.iron | 56 -- examples/SPIN/gneb_bfo/in.spin.single_spin | 57 -- examples/SPIN/gneb_bfo/in.spinmin.bfo | 83 ++ examples/SPIN/gneb_bfo/in.spinmin.iron | 71 ++ examples/SPIN/gneb_bfo/in.tad | 110 --- examples/SPIN/gneb_bfo/initial.hop1 | 860 ------------------ 14 files changed, 154 insertions(+), 1403 deletions(-) delete mode 100644 examples/SPIN/gneb_bfo/Si.sw delete mode 100644 examples/SPIN/gneb_bfo/final.hop1 delete mode 100644 examples/SPIN/gneb_bfo/final.iron_spin_data rename examples/SPIN/gneb_bfo/{in.neb.spin_iron => in.gneb.iron} (100%) delete mode 100644 examples/SPIN/gneb_bfo/in.neb.hop1 delete mode 100644 examples/SPIN/gneb_bfo/in.neb.spin_iron_min delete mode 100644 examples/SPIN/gneb_bfo/in.spin.bfo delete mode 100644 examples/SPIN/gneb_bfo/in.spin.dyna_iron delete mode 100644 examples/SPIN/gneb_bfo/in.spin.iron delete mode 100644 examples/SPIN/gneb_bfo/in.spin.single_spin create mode 100644 examples/SPIN/gneb_bfo/in.spinmin.bfo create mode 100644 examples/SPIN/gneb_bfo/in.spinmin.iron delete mode 100644 examples/SPIN/gneb_bfo/in.tad delete mode 100644 examples/SPIN/gneb_bfo/initial.hop1 diff --git a/examples/SPIN/gneb_bfo/Si.sw b/examples/SPIN/gneb_bfo/Si.sw deleted file mode 100644 index db4be100ef..0000000000 --- a/examples/SPIN/gneb_bfo/Si.sw +++ /dev/null @@ -1,18 +0,0 @@ -# DATE: 2007-06-11 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: Stillinger and Weber, Phys Rev B, 31, 5262, (1985) -# Stillinger-Weber parameters for various elements and mixtures -# multiple entries can be added to this file, LAMMPS reads the ones it needs -# these entries are in LAMMPS "metal" units: -# epsilon = eV; sigma = Angstroms -# other quantities are unitless - -# format of a single entry (one or more lines): -# element 1, element 2, element 3, -# epsilon, sigma, a, lambda, gamma, costheta0, A, B, p, q, tol - -# Here are the original parameters in metal units, for Silicon from: -# -# Stillinger and Weber, Phys. Rev. B, v. 31, p. 5262, (1985) -# - -Si Si Si 2.1683 2.0951 1.80 21.0 1.20 -0.333333333333 - 7.049556277 0.6022245584 4.0 0.0 0.0 diff --git a/examples/SPIN/gneb_bfo/final.hop1 b/examples/SPIN/gneb_bfo/final.hop1 deleted file mode 100644 index 338e674a9c..0000000000 --- a/examples/SPIN/gneb_bfo/final.hop1 +++ /dev/null @@ -1,2 +0,0 @@ -1 -412 14.0 20.5 0 diff --git a/examples/SPIN/gneb_bfo/final.iron_spin_data b/examples/SPIN/gneb_bfo/final.iron_spin_data deleted file mode 100644 index b337bac188..0000000000 --- a/examples/SPIN/gneb_bfo/final.iron_spin_data +++ /dev/null @@ -1,82 +0,0 @@ -LAMMPS data file via write_data, version 4 Jan 2019, timestep = 0 - -32 atoms -1 atom types - -0.0000000000000000e+00 1.1465999999999999e+01 xlo xhi -0.0000000000000000e+00 1.1465999999999999e+01 ylo yhi -0.0000000000000000e+00 2.8664999999999998e+00 zlo zhi - -Masses - -1 55.845 - -Atoms # spin - -1 1 2.2000000000000002e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -2 1 2.2000000000000002e+00 1.4332499999999999e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -3 1 2.2000000000000002e+00 2.8664999999999998e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -4 1 2.2000000000000002e+00 4.2997499999999995e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -5 1 2.2000000000000002e+00 5.7329999999999997e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -6 1 2.2000000000000002e+00 7.1662499999999998e+00 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -7 1 2.2000000000000002e+00 8.5994999999999990e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -8 1 2.2000000000000002e+00 1.0032750000000000e+01 1.4332499999999999e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -9 1 2.2000000000000002e+00 0.0000000000000000e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -11 1 2.2000000000000002e+00 2.8664999999999998e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -13 1 2.2000000000000002e+00 5.7329999999999997e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -15 1 2.2000000000000002e+00 8.5994999999999990e+00 2.8664999999999998e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -10 1 2.2000000000000002e+00 1.4332499999999999e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -12 1 2.2000000000000002e+00 4.2997499999999995e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -14 1 2.2000000000000002e+00 7.1662499999999998e+00 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -16 1 2.2000000000000002e+00 1.0032750000000000e+01 4.2997499999999995e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -17 1 2.2000000000000002e+00 0.0000000000000000e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -18 1 2.2000000000000002e+00 1.4332499999999999e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -19 1 2.2000000000000002e+00 2.8664999999999998e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -20 1 2.2000000000000002e+00 4.2997499999999995e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -21 1 2.2000000000000002e+00 5.7329999999999997e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -22 1 2.2000000000000002e+00 7.1662499999999998e+00 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -23 1 2.2000000000000002e+00 8.5994999999999990e+00 5.7329999999999997e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -24 1 2.2000000000000002e+00 1.0032750000000000e+01 7.1662499999999998e+00 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -25 1 2.2000000000000002e+00 0.0000000000000000e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -27 1 2.2000000000000002e+00 2.8664999999999998e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -29 1 2.2000000000000002e+00 5.7329999999999997e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -31 1 2.2000000000000002e+00 8.5994999999999990e+00 8.5994999999999990e+00 0.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -26 1 2.2000000000000002e+00 1.4332499999999999e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -28 1 2.2000000000000002e+00 4.2997499999999995e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -30 1 2.2000000000000002e+00 7.1662499999999998e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -32 1 2.2000000000000002e+00 1.0032750000000000e+01 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 - -Velocities - -1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -31 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -30 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -32 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 diff --git a/examples/SPIN/gneb_bfo/in.neb.spin_iron b/examples/SPIN/gneb_bfo/in.gneb.iron similarity index 100% rename from examples/SPIN/gneb_bfo/in.neb.spin_iron rename to examples/SPIN/gneb_bfo/in.gneb.iron diff --git a/examples/SPIN/gneb_bfo/in.neb.hop1 b/examples/SPIN/gneb_bfo/in.neb.hop1 deleted file mode 100644 index 6697330faa..0000000000 --- a/examples/SPIN/gneb_bfo/in.neb.hop1 +++ /dev/null @@ -1,67 +0,0 @@ -# 2d NEB surface simulation, hop from surface to become adatom -print "Test 1" - -dimension 2 -boundary p s p - -atom_style atomic -neighbor 0.3 bin -neigh_modify delay 5 -atom_modify map array sort 0 0.0 - -variable u uloop 20 - -# create geometry with flat surface - -lattice hex 0.9 -region box block 0 20 0 10 -0.25 0.25 - -#create_box 3 box -#create_atoms 1 box -#mass * 1.0 -#write_data initial.hop1 - -read_data ../examples/SPIN/gneb_bfo/initial.hop1 - -# LJ potentials - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 2.5 -pair_modify shift yes - -# initial minimization to relax surface - -minimize 1.0e-6 1.0e-4 1000 10000 -reset_timestep 0 - -# define groups - -region 1 block INF INF INF 1.25 INF INF -group lower region 1 -group mobile subtract all lower -set group lower type 2 - -timestep 0.05 - -# group of NEB atoms - either block or single atom ID 412 - -region surround block 10 18 17 20 0 0 units box -group nebatoms region surround -#group nebatoms id 412 -set group nebatoms type 3 -group nonneb subtract all nebatoms - -fix 1 lower setforce 0.0 0.0 0.0 -fix 2 nebatoms neb 1.0 parallel ideal -fix 3 all enforce2d - -thermo 100 - -#dump 1 nebatoms atom 10 dump.neb.$u -#dump 2 nonneb atom 10 dump.nonneb.$u - -# run NEB for 2000 steps or to force tolerance - -min_style quickmin - -neb 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.hop1 diff --git a/examples/SPIN/gneb_bfo/in.neb.spin_iron_min b/examples/SPIN/gneb_bfo/in.neb.spin_iron_min deleted file mode 100644 index a38a8fbde5..0000000000 --- a/examples/SPIN/gneb_bfo/in.neb.spin_iron_min +++ /dev/null @@ -1,42 +0,0 @@ -# bcc iron in a 3d periodic box - -units metal -dimension 3 -boundary p p f - -atom_style spin - -# necessary for the serial algorithm (sametag) -atom_modify map array - -lattice bcc 2.8665 -region box block 0.0 4.0 0.0 4.0 0.0 1.0 -#create_box 1 box -#create_atoms 1 box - -read_data ../examples/SPIN/gneb_bfo/initial.iron_spin - -# setting mass, mag. moments, and interactions for bcc iron - -mass 1 55.845 -#set group all spin 2.2 -1.0 0.0 0.0 - -pair_style spin/exchange 3.5 -pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 - -neighbor 0.1 bin -neigh_modify every 10 check yes delay 20 - -fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 -fix 2 all langevin/spin 0.1 0.0 21 -fix 3 all neb/spin 1.0 -fix 4 all nve/spin lattice no -#parallel ideal - -timestep 0.0001 -thermo 100 - - -min_style spinmin -neb/spin 0.0 0.1 10 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin -#neb/spin 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.spin.bfo b/examples/SPIN/gneb_bfo/in.spin.bfo deleted file mode 100644 index e3c88b0f06..0000000000 --- a/examples/SPIN/gneb_bfo/in.spin.bfo +++ /dev/null @@ -1,56 +0,0 @@ -# layer sc iron atoms (in the [001] plane) in bismuth oxide - -clear -units metal -atom_style spin - -dimension 3 -boundary p p f - -# necessary for the serial algorithm (sametag) -atom_modify map array - -lattice sc 3.96 -region box block 0.0 34.0 0.0 34.0 0.0 5.0 -create_box 1 box -create_atoms 1 box - -# setting mass, mag. moments, and interactions for bfo - -mass 1 1.0 - -set group all spin/random 11 2.50 - -#pair_style hybrid/overlay spin/exchange 6.0 spin/magelec 4.5 -pair_style hybrid/overlay spin/exchange 6.0 spin/magelec 4.5 spin/dmi 4.5 -pair_coeff * * spin/exchange exchange 6.0 -0.01575 0.0 1.965 -pair_coeff * * spin/magelec magelec 4.5 0.000109 1.0 1.0 1.0 -pair_coeff * * spin/dmi dmi 4.5 0.00005 1.0 1.0 1.0 - -neighbor 0.1 bin -neigh_modify every 10 check yes delay 20 - -fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0 -fix 2 all langevin/spin 0.0 0.1 21 -fix 3 all nve/spin lattice no - -timestep 0.0002 - -compute out_mag all spin -compute out_pe all pe -compute out_ke all ke -compute out_temp all temp - -variable magz equal c_out_mag[3] -variable magnorm equal c_out_mag[4] -variable emag equal c_out_mag[5] -variable tmag equal c_out_mag[6] - -#thermo_style custom step time v_magnorm v_emag temp etotal -thermo_style custom step time v_magnorm pe ke v_emag temp etotal -thermo 10 - -compute outsp all property/atom spx spy spz sp fmx fmy fmz -dump 100 all custom 1 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] - -run 2000 diff --git a/examples/SPIN/gneb_bfo/in.spin.dyna_iron b/examples/SPIN/gneb_bfo/in.spin.dyna_iron deleted file mode 100644 index 918819c816..0000000000 --- a/examples/SPIN/gneb_bfo/in.spin.dyna_iron +++ /dev/null @@ -1,53 +0,0 @@ -# bcc iron in a 3d periodic box - -clear -units metal -atom_style spin - -dimension 3 -boundary f f f - -# necessary for the serial algorithm (sametag) -atom_modify map array - -lattice bcc 2.8665 -region box block 0.0 4.0 0.0 4.0 0.0 1.0 -create_box 1 box -create_atoms 1 box - -#read_data ../examples/SPIN/gneb_bfo/initial.iron_spin - -# setting mass, mag. moments, and interactions for bcc iron - -mass 1 55.845 -set group all spin 2.2 -1.0 0.0 0.0 - -pair_style spin/exchange 3.5 -pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 - -neighbor 0.1 bin -neigh_modify every 10 check yes delay 20 - -fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 -fix 2 all langevin/spin 300.0 0.01 21 -#fix 3 all neb/spin 1.0 -fix 3 all nve/spin lattice no -timestep 0.0001 - -compute out_mag all spin -compute out_pe all pe -compute out_ke all ke -compute out_temp all temp - -variable magx equal c_out_mag[1] -variable magz equal c_out_mag[3] -variable magnorm equal c_out_mag[4] -variable emag equal c_out_mag[5] -variable tmag equal c_out_mag[6] - -thermo_style custom step time v_magx v_magnorm v_tmag temp v_emag ke pe etotal -thermo 100 - -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] -run 10000 diff --git a/examples/SPIN/gneb_bfo/in.spin.iron b/examples/SPIN/gneb_bfo/in.spin.iron deleted file mode 100644 index 0c84845f5f..0000000000 --- a/examples/SPIN/gneb_bfo/in.spin.iron +++ /dev/null @@ -1,56 +0,0 @@ -# bcc iron in a 3d periodic box - -clear -units metal -atom_style spin - -dimension 3 -boundary p p p - -# necessary for the serial algorithm (sametag) -atom_modify map array - -lattice bcc 2.8665 -region box block 0.0 4.0 0.0 4.0 0.0 1.0 -create_box 1 box -create_atoms 1 box - -# setting mass, mag. moments, and interactions for bcc iron - -mass 1 55.845 - -set group all spin 2.2 1.0 0.0 0.0 -#velocity all create 100 4928459 rot yes dist gaussian - -pair_style spin/exchange 3.5 -pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 - -neighbor 0.1 bin -neigh_modify every 10 check yes delay 20 - -fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 -fix 2 all langevin/spin 0.0 0.0 21 - -fix 3 all nve/spin lattice yes -timestep 0.0001 - -# compute and output options - -compute out_mag all spin -compute out_pe all pe -compute out_ke all ke -compute out_temp all temp - -variable magz equal c_out_mag[3] -variable magnorm equal c_out_mag[4] -variable emag equal c_out_mag[5] -variable tmag equal c_out_mag[6] - -thermo_style custom step time v_magnorm v_tmag temp v_emag ke pe etotal -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] - -run 0 -write_data initial.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.spin.single_spin b/examples/SPIN/gneb_bfo/in.spin.single_spin deleted file mode 100644 index 3a63c87b8c..0000000000 --- a/examples/SPIN/gneb_bfo/in.spin.single_spin +++ /dev/null @@ -1,57 +0,0 @@ -# bcc iron in a 3d periodic box - -clear -units metal -atom_style spin - -dimension 3 -boundary f f f -#boundary p p p - -# necessary for the serial algorithm (sametag) -atom_modify map array - -lattice sc 2.8665 -region box block 0.0 1.0 0.0 1.0 0.0 1.0 -create_box 1 box -create_atoms 1 box - -# setting mass, mag. moments, and interactions for bcc iron - -mass 1 55.845 - -set group all spin 2.2 0.0 0.0 1.0 -#velocity all create 100 4928459 rot yes dist gaussian - -pair_style spin/exchange 3.5 -pair_coeff * * exchange 3.4 0.0 0.2171 1.841 - -neighbor 0.1 bin -neigh_modify every 10 check yes delay 20 - -fix 1 all precession/spin zeeman 0.01 0.0 1.0 0.0 anisotropy 0.005 0.0 0.0 1.0 -fix 2 all langevin/spin 50.0 0.1 21 - -fix 3 all nve/spin lattice no -timestep 0.0001 - -# compute and output options - -compute out_mag all spin -compute out_pe all pe -compute out_ke all ke -compute out_temp all temp - -variable magz equal c_out_mag[3] -variable magnorm equal c_out_mag[4] -variable emag equal c_out_mag[5] -variable tmag equal c_out_mag[6] - -thermo_style custom step time v_magz v_magnorm v_tmag temp v_emag ke pe etotal -thermo 100 - -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] - -run 50000 -write_data final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.spinmin.bfo b/examples/SPIN/gneb_bfo/in.spinmin.bfo new file mode 100644 index 0000000000..c048ac32c6 --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.spinmin.bfo @@ -0,0 +1,83 @@ +# bcc iron in a 3d periodic box + +units metal +dimension 3 +boundary p p f +atom_style spin + +# necessary for the serial algorithm (sametag) +atom_modify map array + +lattice sc 3.96 +region box block 0.0 68.0 0.0 68.0 0.0 1.0 +create_box 1 box +create_atoms 1 box + +#read_data ../examples/SPIN/gneb_bfo/initial.iron_spin + +# setting mass, mag. moments, and interactions for bcc iron + +mass 1 1.0 +set group all spin/random 11 2.50 +#set group all spin 2.5 -1.0 0.0 0.0 + +pair_style hybrid/overlay spin/exchange 6.0 spin/magelec 4.5 spin/dmi 4.5 +pair_coeff * * spin/exchange exchange 6.0 -0.01575 0.0 1.965 +#pair_coeff * * spin/magelec magelec 4.5 0.000109 1.0 1.0 1.0 +pair_coeff * * spin/magelec magelec 4.5 0.00109 1.0 1.0 1.0 +pair_coeff * * spin/dmi dmi 4.5 0.00005 1.0 1.0 1.0 + +neighbor 0.1 bin +neigh_modify every 10 check yes delay 20 + +#fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 +fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0 +fix 2 all langevin/spin 0.1 0.0 21 +fix 3 all nve/spin lattice no +#fix 3 all neb/spin 1.0 +#fix 4 all nve/spin lattice no +#parallel ideal + +timestep 0.0001 +#thermo 10 + +#compute outsp all property/atom spx spy spz sp fmx fmy fmz +#dump 1 all custom 100 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] + +#min_style spinmin +#minimize 1.0e-6 1.0e-6 1000 10000 +#minimize 1.0e-6 1.0e-6 10000 10000 +#minimize 1.0e-7 1.0e-7 10000 10000 + +compute out_mag all spin +compute out_pe all pe +compute out_ke all ke +compute out_temp all temp + +variable magz equal c_out_mag[3] +variable magnorm equal c_out_mag[4] +variable emag equal c_out_mag[5] +variable tmag equal c_out_mag[6] + +thermo 50 +thermo_style custom step time v_magnorm v_emag v_tmag temp etotal +thermo_modify format float %20.15g + +compute outsp all property/atom spx spy spz sp fmx fmy fmz +dump 200 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] + +#timestep 0.0001 +#run 1 +min_style spinmin +#minimize 1.0e-6 1.0e-6 1000 10000 +#minimize 1.0e-6 1.0e-6 10000 10000 +minimize 1.0e-8 1.0e-8 10000 1000 + +#write_dump all custom dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] + +#compute outsp all property/atom spx spy spz sp fmx fmy fmz +#dump 1 all custom 1 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] +#thermo 1 + +#neb/spin 0.0 0.1 10 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin +#neb/spin 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.spinmin.iron b/examples/SPIN/gneb_bfo/in.spinmin.iron new file mode 100644 index 0000000000..4439960390 --- /dev/null +++ b/examples/SPIN/gneb_bfo/in.spinmin.iron @@ -0,0 +1,71 @@ +# bcc iron in a 3d periodic box + +units metal +dimension 3 +boundary p p f +atom_style spin + +# necessary for the serial algorithm (sametag) +atom_modify map array + +lattice bcc 2.8665 +region box block 0.0 4.0 0.0 4.0 0.0 1.0 +create_box 1 box +create_atoms 1 box + +#read_data ../examples/SPIN/gneb_bfo/initial.iron_spin + +# setting mass, mag. moments, and interactions for bcc iron + +mass 1 55.845 +set group all spin/random 31 2.2 +#set group all spin 2.2 -1.0 0.0 0.0 + +pair_style spin/exchange 3.5 +pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 + +neighbor 0.1 bin +neigh_modify every 10 check yes delay 20 + +#fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 +fix 1 all precession/spin anisotropy 0.001 0.0 0.0 1.0 +fix 2 all langevin/spin 0.1 0.0 21 +fix 3 all nve/spin lattice no +#fix 3 all neb/spin 1.0 +#fix 4 all nve/spin lattice no +#parallel ideal + +timestep 0.0001 + +#min_style spinmin +#minimize 1.0e-6 1.0e-6 1000 10000 +#minimize 1.0e-8 1.0e-6 1000 10000 + +compute out_mag all spin +compute out_pe all pe +compute out_ke all ke +compute out_temp all temp + +variable magz equal c_out_mag[3] +variable magnorm equal c_out_mag[4] +variable emag equal c_out_mag[5] +variable tmag equal c_out_mag[6] + +thermo 1 +thermo_style custom step time v_magnorm v_emag v_tmag temp etotal +thermo_modify format float %20.15g + +compute outsp all property/atom spx spy spz sp fmx fmy fmz +dump 1 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] + +#timestep 0.0001 +#run 1 + +min_style spinmin +#minimize 1.0e-6 1.0e-6 1000 10000 +minimize 1.0e-8 1.0e-6 1000 10000 + + + +#neb/spin 0.0 0.1 10 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin +#neb/spin 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.tad b/examples/SPIN/gneb_bfo/in.tad deleted file mode 100644 index 674fdc8172..0000000000 --- a/examples/SPIN/gneb_bfo/in.tad +++ /dev/null @@ -1,110 +0,0 @@ -# temperature accelerated dynamics model for a single vacancy in bulk Si -# events occur when a neighboring atom diffuses to the vacant site -# run this on multiple partitions as -# mpirun -np 3 lmp_g++ -partition 3x1 -in in.tad - -units metal - -atom_style atomic -atom_modify map array -boundary p p p -atom_modify sort 0 0.0 - -# temperatures -variable tlo equal 1800.0 -variable thi equal 2400.0 - -# coordination number cutoff - -variable r equal 2.835 - -# minimization parameters - -variable etol equal 1.0e-5 -variable ftol equal 1.0e-5 -variable maxiter equal 100 -variable maxeval equal 100 -variable dmax equal 1.0e-1 - -# diamond unit cell - -variable a equal 5.431 -lattice custom $a & - a1 1.0 0.0 0.0 & - a2 0.0 1.0 0.0 & - a3 0.0 0.0 1.0 & - basis 0.0 0.0 0.0 & - basis 0.0 0.5 0.5 & - basis 0.5 0.0 0.5 & - basis 0.5 0.5 0.0 & - basis 0.25 0.25 0.25 & - basis 0.25 0.75 0.75 & - basis 0.75 0.25 0.75 & - basis 0.75 0.75 0.25 - -region myreg block 0 4 & - 0 4 & - 0 4 -create_box 1 myreg -create_atoms 1 region myreg - -mass 1 28.06 - -group Si type 1 - -velocity all create ${thi} 5287286 mom yes rot yes dist gaussian - -# make a vacancy - -group del id 300 -delete_atoms group del - -pair_style sw -pair_coeff * * ../examples/SPIN/gneb_bfo/Si.sw Si - -thermo 10 - -fix 1 all nve -fix 2 all langevin ${thi} ${thi} 0.1 48278 - -timestep 1.0e-3 -neighbor 1.0 bin -neigh_modify every 1 delay 10 check yes - -# equilibrate - -run 1000 - -# Eliminate COM motion -velocity all zero linear - -# only output atoms near vacancy - -compute coord all coord/atom cutoff $r - -#dump events all custom 1 dump.prd id type x y z -#dump_modify events thresh c_coord != 4 - -compute patom all pe/atom -compute pe all reduce sum c_patom -compute satom all stress/atom NULL -compute str all reduce sum c_satom[1] c_satom[2] c_satom[3] -variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol) - -thermo_style custom step temp pe c_pe press v_press - -compute event all event/displace 1.0 - -unfix 1 -unfix 2 -fix 1 all nvt temp ${thi} ${thi} 0.1 - -# tad nsteps nevent tlo thi delta_conf tmax compute -# [min etol ftol niter neval] -# [neb etol_neb ftol_neb n1steps n2steps nevery] -# [neb_style min_style] -# [neb_log logfile] - -tad 2000 50 ${tlo} ${thi} 0.05 1.0 event & - min ${etol} ${ftol} ${maxiter} ${maxeval} & - neb 0.0 0.01 200 200 20 neb_style fire neb_log log.neb diff --git a/examples/SPIN/gneb_bfo/initial.hop1 b/examples/SPIN/gneb_bfo/initial.hop1 deleted file mode 100644 index 228708c314..0000000000 --- a/examples/SPIN/gneb_bfo/initial.hop1 +++ /dev/null @@ -1,860 +0,0 @@ -LAMMPS data file via write_data, version 27 Sep 2016, timestep = 0 - -420 atoms -3 atom types - -0.0000000000000000e+00 2.2653923264628304e+01 xlo xhi --1.9618873042551413e-03 1.9620834929855668e+01 ylo yhi --2.8317404080785380e-01 2.8317404080785380e-01 zlo zhi - -Masses - -1 1 -2 1 -3 1 - -Atoms # atomic - -1 1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -2 1 5.6634808161570760e-01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -3 1 1.1326961632314152e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -4 1 1.6990442448471228e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -5 1 2.2653923264628304e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -6 1 2.8317404080785380e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -7 1 3.3980884896942456e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -8 1 3.9644365713099532e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -9 1 4.5307846529256608e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -10 1 5.0971327345413684e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -11 1 5.6634808161570760e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -12 1 6.2298288977727836e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -13 1 6.7961769793884912e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -14 1 7.3625250610041988e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -15 1 7.9288731426199064e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -16 1 8.4952212242356140e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -17 1 9.0615693058513216e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -18 1 9.6279173874670292e+00 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -19 1 1.0194265469082737e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -20 1 1.0760613550698444e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -21 1 1.1326961632314152e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -22 1 1.1893309713929860e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -23 1 1.2459657795545567e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -24 1 1.3026005877161275e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -25 1 1.3592353958776982e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -26 1 1.4158702040392690e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -27 1 1.4725050122008398e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -28 1 1.5291398203624105e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -29 1 1.5857746285239813e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -30 1 1.6424094366855520e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -31 1 1.6990442448471228e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -32 1 1.7556790530086936e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -33 1 1.8123138611702643e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -34 1 1.8689486693318351e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -35 1 1.9255834774934058e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -36 1 1.9822182856549766e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -37 1 2.0388530938165474e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -38 1 2.0954879019781181e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -39 1 2.1521227101396889e+01 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0 -40 1 2.2087575183012596e+01 9.8094365212757073e-01 0.0000000000000000e+00 0 0 0 -41 1 0.0000000000000000e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -42 1 5.6634808161570760e-01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -43 1 1.1326961632314152e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -44 1 1.6990442448471228e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -45 1 2.2653923264628304e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -46 1 2.8317404080785380e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -47 1 3.3980884896942456e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -48 1 3.9644365713099532e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -49 1 4.5307846529256608e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -50 1 5.0971327345413684e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -51 1 5.6634808161570760e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -52 1 6.2298288977727836e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -53 1 6.7961769793884912e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -54 1 7.3625250610041988e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -55 1 7.9288731426199064e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -56 1 8.4952212242356140e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -57 1 9.0615693058513216e+00 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -58 1 9.6279173874670292e+00 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -59 1 1.0194265469082737e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -60 1 1.0760613550698444e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -61 1 1.1326961632314152e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -62 1 1.1893309713929860e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -63 1 1.2459657795545567e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -64 1 1.3026005877161275e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -65 1 1.3592353958776982e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -66 1 1.4158702040392690e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -67 1 1.4725050122008398e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -68 1 1.5291398203624105e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -69 1 1.5857746285239813e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -70 1 1.6424094366855520e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -71 1 1.6990442448471228e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -72 1 1.7556790530086936e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -73 1 1.8123138611702643e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -74 1 1.8689486693318351e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -75 1 1.9255834774934058e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -76 1 1.9822182856549766e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -77 1 2.0388530938165474e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -78 1 2.0954879019781181e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -79 1 2.1521227101396889e+01 1.9618873042551415e+00 0.0000000000000000e+00 0 0 0 -80 1 2.2087575183012596e+01 2.9428309563827124e+00 0.0000000000000000e+00 0 0 0 -81 1 0.0000000000000000e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -82 1 5.6634808161570760e-01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -83 1 1.1326961632314152e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -84 1 1.6990442448471228e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -85 1 2.2653923264628304e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -86 1 2.8317404080785380e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -87 1 3.3980884896942456e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -88 1 3.9644365713099532e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -89 1 4.5307846529256608e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -90 1 5.0971327345413684e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -91 1 5.6634808161570760e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -92 1 6.2298288977727836e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -93 1 6.7961769793884912e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -94 1 7.3625250610041988e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -95 1 7.9288731426199064e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -96 1 8.4952212242356140e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -97 1 9.0615693058513216e+00 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -98 1 9.6279173874670292e+00 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -99 1 1.0194265469082737e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -100 1 1.0760613550698444e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -101 1 1.1326961632314152e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -102 1 1.1893309713929860e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -103 1 1.2459657795545567e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -104 1 1.3026005877161275e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -105 1 1.3592353958776982e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -106 1 1.4158702040392690e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -107 1 1.4725050122008398e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -108 1 1.5291398203624105e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -109 1 1.5857746285239813e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -110 1 1.6424094366855520e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -111 1 1.6990442448471228e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -112 1 1.7556790530086936e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -113 1 1.8123138611702643e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -114 1 1.8689486693318351e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -115 1 1.9255834774934058e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -116 1 1.9822182856549766e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -117 1 2.0388530938165474e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -118 1 2.0954879019781181e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -119 1 2.1521227101396889e+01 3.9237746085102829e+00 0.0000000000000000e+00 0 0 0 -120 1 2.2087575183012596e+01 4.9047182606378534e+00 0.0000000000000000e+00 0 0 0 -121 1 0.0000000000000000e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -122 1 5.6634808161570760e-01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -123 1 1.1326961632314152e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -124 1 1.6990442448471228e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -125 1 2.2653923264628304e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -126 1 2.8317404080785380e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -127 1 3.3980884896942456e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -128 1 3.9644365713099532e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -129 1 4.5307846529256608e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -130 1 5.0971327345413684e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -131 1 5.6634808161570760e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -132 1 6.2298288977727836e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -133 1 6.7961769793884912e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -134 1 7.3625250610041988e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -135 1 7.9288731426199064e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -136 1 8.4952212242356140e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -137 1 9.0615693058513216e+00 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -138 1 9.6279173874670292e+00 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -139 1 1.0194265469082737e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -140 1 1.0760613550698444e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -141 1 1.1326961632314152e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -142 1 1.1893309713929860e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -143 1 1.2459657795545567e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -144 1 1.3026005877161275e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -145 1 1.3592353958776982e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -146 1 1.4158702040392690e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -147 1 1.4725050122008398e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -148 1 1.5291398203624105e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -149 1 1.5857746285239813e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -150 1 1.6424094366855520e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -151 1 1.6990442448471228e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -152 1 1.7556790530086936e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -153 1 1.8123138611702643e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -154 1 1.8689486693318351e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -155 1 1.9255834774934058e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -156 1 1.9822182856549766e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -157 1 2.0388530938165474e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -158 1 2.0954879019781181e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -159 1 2.1521227101396889e+01 5.8856619127654248e+00 0.0000000000000000e+00 0 0 0 -160 1 2.2087575183012596e+01 6.8666055648929953e+00 0.0000000000000000e+00 0 0 0 -161 1 0.0000000000000000e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -162 1 5.6634808161570760e-01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -163 1 1.1326961632314152e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -164 1 1.6990442448471228e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -165 1 2.2653923264628304e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -166 1 2.8317404080785380e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -167 1 3.3980884896942456e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -168 1 3.9644365713099532e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -169 1 4.5307846529256608e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -170 1 5.0971327345413684e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -171 1 5.6634808161570760e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -172 1 6.2298288977727836e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -173 1 6.7961769793884912e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -174 1 7.3625250610041988e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -175 1 7.9288731426199064e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -176 1 8.4952212242356140e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -177 1 9.0615693058513216e+00 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -178 1 9.6279173874670292e+00 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -179 1 1.0194265469082737e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -180 1 1.0760613550698444e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -181 1 1.1326961632314152e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -182 1 1.1893309713929860e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -183 1 1.2459657795545567e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -184 1 1.3026005877161275e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -185 1 1.3592353958776982e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -186 1 1.4158702040392690e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -187 1 1.4725050122008398e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -188 1 1.5291398203624105e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -189 1 1.5857746285239813e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -190 1 1.6424094366855520e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -191 1 1.6990442448471228e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -192 1 1.7556790530086936e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -193 1 1.8123138611702643e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -194 1 1.8689486693318351e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -195 1 1.9255834774934058e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -196 1 1.9822182856549766e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -197 1 2.0388530938165474e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -198 1 2.0954879019781181e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -199 1 2.1521227101396889e+01 7.8475492170205658e+00 0.0000000000000000e+00 0 0 0 -200 1 2.2087575183012596e+01 8.8284928691481355e+00 0.0000000000000000e+00 0 0 0 -201 1 0.0000000000000000e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -202 1 5.6634808161570760e-01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -203 1 1.1326961632314152e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -204 1 1.6990442448471228e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -205 1 2.2653923264628304e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -206 1 2.8317404080785380e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -207 1 3.3980884896942456e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -208 1 3.9644365713099532e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -209 1 4.5307846529256608e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -210 1 5.0971327345413684e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -211 1 5.6634808161570760e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -212 1 6.2298288977727836e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -213 1 6.7961769793884912e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -214 1 7.3625250610041988e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -215 1 7.9288731426199064e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -216 1 8.4952212242356140e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -217 1 9.0615693058513216e+00 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -218 1 9.6279173874670292e+00 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -219 1 1.0194265469082737e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -220 1 1.0760613550698444e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -221 1 1.1326961632314152e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -222 1 1.1893309713929860e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -223 1 1.2459657795545567e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -224 1 1.3026005877161275e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -225 1 1.3592353958776982e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -226 1 1.4158702040392690e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -227 1 1.4725050122008398e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -228 1 1.5291398203624105e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -229 1 1.5857746285239813e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -230 1 1.6424094366855520e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -231 1 1.6990442448471228e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -232 1 1.7556790530086936e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -233 1 1.8123138611702643e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -234 1 1.8689486693318351e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -235 1 1.9255834774934058e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -236 1 1.9822182856549766e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -237 1 2.0388530938165474e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -238 1 2.0954879019781181e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -239 1 2.1521227101396889e+01 9.8094365212757069e+00 0.0000000000000000e+00 0 0 0 -240 1 2.2087575183012596e+01 1.0790380173403278e+01 0.0000000000000000e+00 0 0 0 -241 1 0.0000000000000000e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -242 1 5.6634808161570760e-01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -243 1 1.1326961632314152e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -244 1 1.6990442448471228e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -245 1 2.2653923264628304e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -246 1 2.8317404080785380e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -247 1 3.3980884896942456e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -248 1 3.9644365713099532e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -249 1 4.5307846529256608e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -250 1 5.0971327345413684e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -251 1 5.6634808161570760e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -252 1 6.2298288977727836e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -253 1 6.7961769793884912e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -254 1 7.3625250610041988e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -255 1 7.9288731426199064e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -256 1 8.4952212242356140e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -257 1 9.0615693058513216e+00 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -258 1 9.6279173874670292e+00 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -259 1 1.0194265469082737e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -260 1 1.0760613550698444e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -261 1 1.1326961632314152e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -262 1 1.1893309713929860e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -263 1 1.2459657795545567e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -264 1 1.3026005877161275e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -265 1 1.3592353958776982e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -266 1 1.4158702040392690e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -267 1 1.4725050122008398e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -268 1 1.5291398203624105e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -269 1 1.5857746285239813e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -270 1 1.6424094366855520e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -271 1 1.6990442448471228e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -272 1 1.7556790530086936e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -273 1 1.8123138611702643e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -274 1 1.8689486693318351e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -275 1 1.9255834774934058e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -276 1 1.9822182856549766e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -277 1 2.0388530938165474e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -278 1 2.0954879019781181e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -279 1 2.1521227101396889e+01 1.1771323825530850e+01 0.0000000000000000e+00 0 0 0 -280 1 2.2087575183012596e+01 1.2752267477658419e+01 0.0000000000000000e+00 0 0 0 -281 1 0.0000000000000000e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -282 1 5.6634808161570760e-01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -283 1 1.1326961632314152e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -284 1 1.6990442448471228e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -285 1 2.2653923264628304e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -286 1 2.8317404080785380e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -287 1 3.3980884896942456e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -288 1 3.9644365713099532e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -289 1 4.5307846529256608e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -290 1 5.0971327345413684e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -291 1 5.6634808161570760e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -292 1 6.2298288977727836e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -293 1 6.7961769793884912e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -294 1 7.3625250610041988e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -295 1 7.9288731426199064e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -296 1 8.4952212242356140e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -297 1 9.0615693058513216e+00 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -298 1 9.6279173874670292e+00 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -299 1 1.0194265469082737e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -300 1 1.0760613550698444e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -301 1 1.1326961632314152e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -302 1 1.1893309713929860e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -303 1 1.2459657795545567e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -304 1 1.3026005877161275e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -305 1 1.3592353958776982e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -306 1 1.4158702040392690e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -307 1 1.4725050122008398e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -308 1 1.5291398203624105e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -309 1 1.5857746285239813e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -310 1 1.6424094366855520e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -311 1 1.6990442448471228e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -312 1 1.7556790530086936e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -313 1 1.8123138611702643e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -314 1 1.8689486693318351e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -315 1 1.9255834774934058e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -316 1 1.9822182856549766e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -317 1 2.0388530938165474e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -318 1 2.0954879019781181e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -319 1 2.1521227101396889e+01 1.3733211129785991e+01 0.0000000000000000e+00 0 0 0 -320 1 2.2087575183012596e+01 1.4714154781913560e+01 0.0000000000000000e+00 0 0 0 -321 1 0.0000000000000000e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -322 1 5.6634808161570760e-01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -323 1 1.1326961632314152e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -324 1 1.6990442448471228e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -325 1 2.2653923264628304e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -326 1 2.8317404080785380e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -327 1 3.3980884896942456e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -328 1 3.9644365713099532e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -329 1 4.5307846529256608e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -330 1 5.0971327345413684e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -331 1 5.6634808161570760e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -332 1 6.2298288977727836e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -333 1 6.7961769793884912e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -334 1 7.3625250610041988e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -335 1 7.9288731426199064e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -336 1 8.4952212242356140e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -337 1 9.0615693058513216e+00 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -338 1 9.6279173874670292e+00 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -339 1 1.0194265469082737e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -340 1 1.0760613550698444e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -341 1 1.1326961632314152e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -342 1 1.1893309713929860e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -343 1 1.2459657795545567e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -344 1 1.3026005877161275e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -345 1 1.3592353958776982e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -346 1 1.4158702040392690e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -347 1 1.4725050122008398e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -348 1 1.5291398203624105e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -349 1 1.5857746285239813e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -350 1 1.6424094366855520e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -351 1 1.6990442448471228e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -352 1 1.7556790530086936e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -353 1 1.8123138611702643e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -354 1 1.8689486693318351e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -355 1 1.9255834774934058e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -356 1 1.9822182856549766e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -357 1 2.0388530938165474e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -358 1 2.0954879019781181e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -359 1 2.1521227101396889e+01 1.5695098434041132e+01 0.0000000000000000e+00 0 0 0 -360 1 2.2087575183012596e+01 1.6676042086168703e+01 0.0000000000000000e+00 0 0 0 -361 1 0.0000000000000000e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -362 1 5.6634808161570760e-01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -363 1 1.1326961632314152e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -364 1 1.6990442448471228e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -365 1 2.2653923264628304e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -366 1 2.8317404080785380e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -367 1 3.3980884896942456e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -368 1 3.9644365713099532e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -369 1 4.5307846529256608e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -370 1 5.0971327345413684e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -371 1 5.6634808161570760e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -372 1 6.2298288977727836e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -373 1 6.7961769793884912e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -374 1 7.3625250610041988e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -375 1 7.9288731426199064e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -376 1 8.4952212242356140e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -377 1 9.0615693058513216e+00 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -378 1 9.6279173874670292e+00 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -379 1 1.0194265469082737e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -380 1 1.0760613550698444e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -381 1 1.1326961632314152e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -382 1 1.1893309713929860e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -383 1 1.2459657795545567e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -384 1 1.3026005877161275e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -385 1 1.3592353958776982e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -386 1 1.4158702040392690e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -387 1 1.4725050122008398e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -388 1 1.5291398203624105e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -389 1 1.5857746285239813e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -390 1 1.6424094366855520e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -391 1 1.6990442448471228e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -392 1 1.7556790530086936e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -393 1 1.8123138611702643e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -394 1 1.8689486693318351e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -395 1 1.9255834774934058e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -396 1 1.9822182856549766e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -397 1 2.0388530938165474e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -398 1 2.0954879019781181e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -399 1 2.1521227101396889e+01 1.7656985738296271e+01 0.0000000000000000e+00 0 0 0 -400 1 2.2087575183012596e+01 1.8637929390423842e+01 0.0000000000000000e+00 0 0 0 -401 1 0.0000000000000000e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -402 1 1.1326961632314152e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -403 1 2.2653923264628304e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -404 1 3.3980884896942456e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -405 1 4.5307846529256608e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -406 1 5.6634808161570760e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -407 1 6.7961769793884912e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -408 1 7.9288731426199064e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -409 1 9.0615693058513216e+00 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -410 1 1.0194265469082737e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -411 1 1.1326961632314152e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -412 1 1.2459657795545567e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -413 1 1.3592353958776982e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -414 1 1.4725050122008398e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -415 1 1.5857746285239813e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -416 1 1.6990442448471228e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -417 1 1.8123138611702643e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -418 1 1.9255834774934058e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -419 1 2.0388530938165474e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 -420 1 2.1521227101396889e+01 1.9618873042551414e+01 0.0000000000000000e+00 0 0 0 - -Velocities - -1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -30 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -31 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -32 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -33 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -34 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -35 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -36 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -37 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -38 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -39 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -40 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -41 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -42 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -43 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -44 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -45 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -46 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -47 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -48 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -49 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -50 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -51 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -52 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -53 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -54 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -55 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -56 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -57 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -58 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -59 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -60 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -61 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -62 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -63 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -64 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -65 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -66 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -67 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -68 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -69 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -70 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -71 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -72 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -73 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -74 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -75 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -76 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -77 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -78 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -79 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -80 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -81 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -82 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -83 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -84 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -85 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -86 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -87 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -88 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -89 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -90 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -91 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -92 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -93 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -94 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -95 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -96 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -97 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -98 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -99 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -100 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -101 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -102 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -103 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -104 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -105 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -106 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -107 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -108 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -109 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -110 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -111 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -112 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -113 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -114 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -115 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -116 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -117 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -118 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -119 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -120 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -121 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -122 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -123 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -124 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -125 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -126 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -127 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -128 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -129 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -130 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -131 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -132 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -133 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -134 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -135 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -136 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -137 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -138 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -139 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -140 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -141 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -142 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -143 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -144 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -145 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -146 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -147 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -148 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -149 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -150 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -151 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -152 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -153 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -154 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -155 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -156 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -157 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -158 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -159 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -160 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -161 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -162 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -163 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -164 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -165 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -166 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -167 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -168 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -169 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -170 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -171 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -172 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -173 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -174 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -175 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -176 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -177 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -178 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -179 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -180 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -181 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -182 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -183 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -184 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -185 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -186 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -187 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -188 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -189 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -190 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -191 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -192 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -193 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -194 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -195 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -196 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -197 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -198 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -199 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -200 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -201 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -202 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -203 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -204 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -205 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -206 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -207 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -208 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -209 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -210 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -211 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -213 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -214 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -215 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -216 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -217 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -218 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -219 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -220 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -221 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -222 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -223 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -224 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -225 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -226 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -227 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -228 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -229 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -230 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -231 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -232 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -233 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -234 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -235 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -236 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -237 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -238 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -239 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -240 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -241 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -242 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -243 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -244 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -245 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -246 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -247 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -248 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -249 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -250 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -251 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -252 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -253 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -254 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -255 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -256 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -257 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -258 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -259 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -260 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -261 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -262 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -263 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -264 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -265 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -266 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -267 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -268 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -269 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -270 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -271 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -272 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -273 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -274 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -275 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -276 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -277 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -278 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -279 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -280 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -281 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -282 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -283 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -284 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -285 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -286 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -287 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -288 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -289 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -290 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -291 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -292 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -293 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -294 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -295 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -296 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -297 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -298 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -299 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -300 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -301 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -302 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -303 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -304 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -305 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -306 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -307 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -308 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -309 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -310 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -311 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -312 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -313 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -314 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -315 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -316 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -317 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -318 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -319 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -320 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -321 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -322 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -323 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -324 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -325 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -326 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -327 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -328 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -329 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -330 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -331 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -332 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -333 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -334 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -335 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -336 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -337 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -338 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -339 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -340 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -341 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -342 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -343 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -344 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -345 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -346 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -347 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -348 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -349 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -350 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -351 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -352 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -353 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -354 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -355 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -356 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -357 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -358 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -359 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -360 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -361 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -362 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -363 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -364 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -365 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -366 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -367 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -368 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -369 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -370 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -371 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -372 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -373 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -374 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -375 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -376 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -377 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -378 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -379 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -380 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -381 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -382 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -383 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -384 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -385 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -386 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -387 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -388 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -389 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -390 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -391 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -392 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -393 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -394 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -395 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -396 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -397 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -398 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -399 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -400 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -401 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -402 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -403 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -404 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -405 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -406 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -407 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -408 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -409 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -410 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -411 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -412 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -413 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -414 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -415 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -416 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -417 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -418 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -419 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -420 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 From cc2b5fbb80d1087fbb4fe272f48cc08ef3c24967 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 11 Mar 2019 17:37:44 -0600 Subject: [PATCH 07/35] Commit JT 031119 - add min_post_force in precession --- examples/SPIN/gneb_bfo/in.gneb.iron | 1 - examples/SPIN/gneb_bfo/in.spinmin.bfo | 30 ++---------------- examples/SPIN/gneb_bfo/in.spinmin.iron | 21 ++---------- src/SPIN/fix_precession_spin.cpp | 8 +++++ src/SPIN/fix_precession_spin.h | 5 +-- src/SPIN/min_spinmin.cpp | 44 ++------------------------ src/SPIN/min_spinmin.h | 5 ++- 7 files changed, 19 insertions(+), 95 deletions(-) diff --git a/examples/SPIN/gneb_bfo/in.gneb.iron b/examples/SPIN/gneb_bfo/in.gneb.iron index 860db24a61..80ab698c16 100644 --- a/examples/SPIN/gneb_bfo/in.gneb.iron +++ b/examples/SPIN/gneb_bfo/in.gneb.iron @@ -1,5 +1,4 @@ # bcc iron in a 3d periodic box -print "Test 1" units metal dimension 3 diff --git a/examples/SPIN/gneb_bfo/in.spinmin.bfo b/examples/SPIN/gneb_bfo/in.spinmin.bfo index c048ac32c6..15a4d6e0f9 100644 --- a/examples/SPIN/gneb_bfo/in.spinmin.bfo +++ b/examples/SPIN/gneb_bfo/in.spinmin.bfo @@ -13,8 +13,6 @@ region box block 0.0 68.0 0.0 68.0 0.0 1.0 create_box 1 box create_atoms 1 box -#read_data ../examples/SPIN/gneb_bfo/initial.iron_spin - # setting mass, mag. moments, and interactions for bcc iron mass 1 1.0 @@ -34,20 +32,8 @@ neigh_modify every 10 check yes delay 20 fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0 fix 2 all langevin/spin 0.1 0.0 21 fix 3 all nve/spin lattice no -#fix 3 all neb/spin 1.0 -#fix 4 all nve/spin lattice no -#parallel ideal timestep 0.0001 -#thermo 10 - -#compute outsp all property/atom spx spy spz sp fmx fmy fmz -#dump 1 all custom 100 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] - -#min_style spinmin -#minimize 1.0e-6 1.0e-6 1000 10000 -#minimize 1.0e-6 1.0e-6 10000 10000 -#minimize 1.0e-7 1.0e-7 10000 10000 compute out_mag all spin compute out_pe all pe @@ -66,18 +52,6 @@ thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz dump 200 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] -#timestep 0.0001 -#run 1 min_style spinmin -#minimize 1.0e-6 1.0e-6 1000 10000 -#minimize 1.0e-6 1.0e-6 10000 10000 -minimize 1.0e-8 1.0e-8 10000 1000 - -#write_dump all custom dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] - -#compute outsp all property/atom spx spy spz sp fmx fmy fmz -#dump 1 all custom 1 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] -#thermo 1 - -#neb/spin 0.0 0.1 10 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin -#neb/spin 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin +minimize 1.0e-6 1.0e-6 10000 10000 +#minimize 1.0e-8 1.0e-8 10000 1000 diff --git a/examples/SPIN/gneb_bfo/in.spinmin.iron b/examples/SPIN/gneb_bfo/in.spinmin.iron index 4439960390..67d8095c06 100644 --- a/examples/SPIN/gneb_bfo/in.spinmin.iron +++ b/examples/SPIN/gneb_bfo/in.spinmin.iron @@ -13,8 +13,6 @@ region box block 0.0 4.0 0.0 4.0 0.0 1.0 create_box 1 box create_atoms 1 box -#read_data ../examples/SPIN/gneb_bfo/initial.iron_spin - # setting mass, mag. moments, and interactions for bcc iron mass 1 55.845 @@ -31,16 +29,9 @@ neigh_modify every 10 check yes delay 20 fix 1 all precession/spin anisotropy 0.001 0.0 0.0 1.0 fix 2 all langevin/spin 0.1 0.0 21 fix 3 all nve/spin lattice no -#fix 3 all neb/spin 1.0 -#fix 4 all nve/spin lattice no -#parallel ideal timestep 0.0001 -#min_style spinmin -#minimize 1.0e-6 1.0e-6 1000 10000 -#minimize 1.0e-8 1.0e-6 1000 10000 - compute out_mag all spin compute out_pe all pe compute out_ke all ke @@ -58,14 +49,6 @@ thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz dump 1 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] -#timestep 0.0001 -#run 1 - min_style spinmin -#minimize 1.0e-6 1.0e-6 1000 10000 -minimize 1.0e-8 1.0e-6 1000 10000 - - - -#neb/spin 0.0 0.1 10 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin -#neb/spin 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin +minimize 1.0e-6 1.0e-6 1000 10000 +#minimize 1.0e-8 1.0e-6 1000 10000 diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 65d5e9120e..08e4fd5a63 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -115,6 +115,7 @@ int FixPrecessionSpin::setmask() { int mask = 0; mask |= POST_FORCE; + mask |= MIN_POST_FORCE; mask |= THERMO_ENERGY; mask |= POST_FORCE_RESPA; return mask; @@ -283,3 +284,10 @@ double FixPrecessionSpin::compute_scalar() } return emag_all; } + +/* ---------------------------------------------------------------------- */ + +void FixPrecessionSpin::min_post_force(int vflag) +{ + post_force(vflag); +} diff --git a/src/SPIN/fix_precession_spin.h b/src/SPIN/fix_precession_spin.h index 53ae4ba124..2fe6b5a673 100644 --- a/src/SPIN/fix_precession_spin.h +++ b/src/SPIN/fix_precession_spin.h @@ -33,8 +33,9 @@ class FixPrecessionSpin : public Fix { int setmask(); void init(); void setup(int); - virtual void post_force(int); - virtual void post_force_respa(int, int, int); + void post_force(int); + void post_force_respa(int, int, int); + void min_post_force(int); double compute_scalar(); int zeeman_flag, aniso_flag; diff --git a/src/SPIN/min_spinmin.cpp b/src/SPIN/min_spinmin.cpp index 4b362fda87..2e03086bf0 100644 --- a/src/SPIN/min_spinmin.cpp +++ b/src/SPIN/min_spinmin.cpp @@ -88,7 +88,7 @@ void MinSpinMin::reset_vectors() } /* ---------------------------------------------------------------------- - minimization via QuickMin damped dynamics + minimization via damped spin dynamics ------------------------------------------------------------------------- */ int MinSpinMin::iterate(int maxiter) @@ -98,16 +98,6 @@ int MinSpinMin::iterate(int maxiter) //double dtvone,dtv,dtf,dtfm; int flag,flagall; - //alpha_final = 0.0; - - // search for and allocate neb_spin fix - - //int ineb; - //for (ineb = 0; ineb < modify->nfix; ineb++) - // if (strcmp(modify->fix[ineb]->style,"neb/spin") == 0) break; - //if (ineb == modify->nfix) error->all(FLERR,"spinmin requires use of fix neb/spin"); - //fneb = (FixNEB_spin *) modify->fix[ineb]; - for (int iter = 0; iter < maxiter; iter++) { if (timer->check_timeout(niter)) @@ -118,12 +108,10 @@ int MinSpinMin::iterate(int maxiter) // optimize timestep accross processes / replicas - //dts = fneb->evaluate_dt(); dts = evaluate_dt(); // apply damped precessional dynamics to the spins - //fneb->advance_spins(dts); advance_spins(dts); @@ -351,8 +339,6 @@ double MinSpinMin::evaluate_dt() void MinSpinMin::advance_spins(double dts) { - //int j=0; - //int *sametag = atom->sametag; int nlocal = atom->nlocal; int *mask = atom->mask; double **sp = atom->sp; @@ -360,18 +346,14 @@ void MinSpinMin::advance_spins(double dts) double tdampx,tdampy,tdampz; double msq,scale,fm2,energy,dts2; double alpha; - //double spi[3],fmi[3]; double cp[3],g[3]; - //cp[0] = cp[1] = cp[2] = 0.0; - //g[0] = g[1] = g[2] = 0.0; dts2 = dts*dts; // fictitious Gilbert damping of 1 + alpha = 1.0; - //printf("test inside spinmin, dts %g \n",dts); - //printf("test inside spinmin, fmi i=%d, %g %g %g \n",1,fm[1][0],fm[1][1],fm[1][2]); // loop on all spins on proc. @@ -379,14 +361,6 @@ void MinSpinMin::advance_spins(double dts) // for (int i = 0; i < nlocal; i++) // if (mask[i] & groupbit) { for (int i = 0; i < nlocal; i++) { - - //spi[0] = sp[i][0]; - //spi[1] = sp[i][1]; - //spi[2] = sp[i][2]; - // - //fmi[0] = fm[i][0]; - //fmi[1] = fm[i][1]; - //fmi[2] = fm[i][2]; // calc. damping torque @@ -394,8 +368,6 @@ void MinSpinMin::advance_spins(double dts) tdampy = -alpha*(fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]); tdampz = -alpha*(fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]); - //printf("for %d, test tdamp: %g %g %g \n",i,tdampx,tdampy,tdampz); - // apply advance algorithm (geometric, norm preserving) fm2 = (tdampx*tdampx+tdampy*tdampy+tdampz*tdampz); @@ -405,15 +377,10 @@ void MinSpinMin::advance_spins(double dts) cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; - //printf("for %d, test cp: %g %g %g \n",i,cp[0],cp[1],cp[2]); - g[0] = sp[i][0]+cp[0]*dts; g[1] = sp[i][1]+cp[1]*dts; g[2] = sp[i][2]+cp[2]*dts; - //g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; - //g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; - //g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; g[0] += (tdampx*energy-0.5*sp[i][0]*fm2)*0.5*dts2; g[1] += (tdampy*energy-0.5*sp[i][1]*fm2)*0.5*dts2; g[2] += (tdampz*energy-0.5*sp[i][2]*fm2)*0.5*dts2; @@ -421,10 +388,6 @@ void MinSpinMin::advance_spins(double dts) g[0] /= (1+0.25*fm2*dts2); g[1] /= (1+0.25*fm2*dts2); g[2] /= (1+0.25*fm2*dts2); - - //printf("test inside spinmin, spi i=%d, %g %g %g \n",i,sp[i][0],sp[i][1],sp[i][2]); - //printf("test inside spinmin, fmi i=%d, %g %g %g \n",i,fm[i][0],fm[i][1],fm[i][2]); - //printf("for %d, test g: %g %g %g \n",i,g[0],g[1],g[2]); sp[i][0] = g[0]; sp[i][1] = g[1]; @@ -455,8 +418,5 @@ void MinSpinMin::advance_spins(double dts) // } - //printf("test inside spinmin, dts = %g \n",dts); - //printf("test inside spinmin, fmi i=%d, %g %g %g \n",1,fm[1][0],fm[1][1],fm[1][2]); - //printf("test inside spinmin, spi i=%d, %g %g %g \n",1,sp[1][0],sp[1][1],sp[1][2]); } diff --git a/src/SPIN/min_spinmin.h b/src/SPIN/min_spinmin.h index fe2cf7c51d..943b2d2749 100644 --- a/src/SPIN/min_spinmin.h +++ b/src/SPIN/min_spinmin.h @@ -39,14 +39,13 @@ class MinSpinMin : public Min { private: - // spin timestep + // global and spin timesteps + double dt; double dts; double *spvec; // variables for atomic dof, as 1d vector double *fmvec; // variables for atomic dof, as 1d vector - - double dt; bigint last_negative; }; From 75ddde438c13cf32564a9271c03d6867c5db92bc Mon Sep 17 00:00:00 2001 From: julient31 Date: Tue, 12 Mar 2019 14:38:49 -0600 Subject: [PATCH 08/35] Commit JT 031219 - correct errors in fix_prec_spin - clean version of spinmin --- src/REPLICA/fix_neb_spin.cpp | 3 +- src/SPIN/fix_precession_spin.cpp | 10 +- src/SPIN/min_spinmin.cpp | 242 +++++++++---------------------- src/SPIN/min_spinmin.h | 4 +- src/min.cpp | 8 + src/min.h | 5 + 6 files changed, 86 insertions(+), 186 deletions(-) diff --git a/src/REPLICA/fix_neb_spin.cpp b/src/REPLICA/fix_neb_spin.cpp index 42450c2f0f..7a72936200 100644 --- a/src/REPLICA/fix_neb_spin.cpp +++ b/src/REPLICA/fix_neb_spin.cpp @@ -337,7 +337,8 @@ void FixNEB_spin::min_post_force(int /*vflag*/) //printf("test veng: %g / %g / %g \n",veng,vprev,vnext); //error->universe_all(FLERR,"End test"); - if (FreeEndFinal && ireplica == nreplica-1 && (update->ntimestep == 0)) EFinalIni = veng; + if (FreeEndFinal && ireplica == nreplica-1 && (update->ntimestep == 0)) + EFinalIni = veng; if (ireplica == 0) vIni=veng; diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 08e4fd5a63..433a260e83 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -173,8 +173,6 @@ void FixPrecessionSpin::setup(int vflag) void FixPrecessionSpin::post_force(int /*vflag*/) { - printf("test inside post force (precession) \n"); - // update mag field with time (potential improvement) if (varflag != CONSTANT) { @@ -204,7 +202,7 @@ void FixPrecessionSpin::post_force(int /*vflag*/) if (aniso_flag) { // compute magnetic anisotropy compute_anisotropy(spi,fmi); - emag -= (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); + emag -= 0.5*(spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); } fm[i][0] += fmi[0]; @@ -232,9 +230,9 @@ void FixPrecessionSpin::compute_single_precession(int i, double spi[3], double f void FixPrecessionSpin::compute_zeeman(int i, double fmi[3]) { double **sp = atom->sp; - fmi[0] -= sp[i][3]*hx; - fmi[1] -= sp[i][3]*hy; - fmi[2] -= sp[i][3]*hz; + fmi[0] += sp[i][0]*hx; + fmi[1] += sp[i][1]*hy; + fmi[2] += sp[i][3]*hz; } /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/min_spinmin.cpp b/src/SPIN/min_spinmin.cpp index 2e03086bf0..cdd0d45287 100644 --- a/src/SPIN/min_spinmin.cpp +++ b/src/SPIN/min_spinmin.cpp @@ -46,14 +46,13 @@ MinSpinMin::MinSpinMin(LAMMPS *lmp) : Min(lmp) {} void MinSpinMin::init() { + alpha_damp = 1.0; + discret_factor = 10.0; + Min::init(); - dt = update->dt; + dts = dt = update->dt; last_negative = update->ntimestep; - - // test dts - dts = dt; - } /* ---------------------------------------------------------------------- */ @@ -94,8 +93,7 @@ void MinSpinMin::reset_vectors() int MinSpinMin::iterate(int maxiter) { bigint ntimestep; - //double vmax,vdotf,vdotfall,fdotf,fdotfall,scale; - //double dtvone,dtv,dtf,dtfm; + double fmdotfm,fmdotfmall; int flag,flagall; for (int iter = 0; iter < maxiter; iter++) { @@ -114,106 +112,6 @@ int MinSpinMin::iterate(int maxiter) advance_spins(dts); - - //// zero velocity if anti-parallel to force - //// else project velocity in direction of force - - //double **v = atom->v; - //double **f = atom->f; - //int nlocal = atom->nlocal; - - //vdotf = 0.0; - //for (int i = 0; i < nlocal; i++) - // vdotf += v[i][0]*f[i][0] + v[i][1]*f[i][1] + v[i][2]*f[i][2]; - //MPI_Allreduce(&vdotf,&vdotfall,1,MPI_DOUBLE,MPI_SUM,world); - - // sum vdotf over replicas, if necessary - // this communicator would be invalid for multiprocess replicas - - //if (update->multireplica == 1) { - // vdotf = vdotfall; - // MPI_Allreduce(&vdotf,&vdotfall,1,MPI_DOUBLE,MPI_SUM,universe->uworld); - //} - - //if (vdotfall < 0.0) { - // last_negative = ntimestep; - // for (int i = 0; i < nlocal; i++) - // v[i][0] = v[i][1] = v[i][2] = 0.0; - - //} else { - // fdotf = 0.0; - // for (int i = 0; i < nlocal; i++) - // fdotf += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - // MPI_Allreduce(&fdotf,&fdotfall,1,MPI_DOUBLE,MPI_SUM,world); - - // // sum fdotf over replicas, if necessary - // // this communicator would be invalid for multiprocess replicas - - // if (update->multireplica == 1) { - // fdotf = fdotfall; - // MPI_Allreduce(&fdotf,&fdotfall,1,MPI_DOUBLE,MPI_SUM,universe->uworld); - // } - - // if (fdotfall == 0.0) scale = 0.0; - // else scale = vdotfall/fdotfall; - // for (int i = 0; i < nlocal; i++) { - // v[i][0] = scale * f[i][0]; - // v[i][1] = scale * f[i][1]; - // v[i][2] = scale * f[i][2]; - // } - //} - - //// limit timestep so no particle moves further than dmax - - //double *rmass = atom->rmass; - //double *mass = atom->mass; - //int *type = atom->type; - - //dtvone = dt; - - //for (int i = 0; i < nlocal; i++) { - // vmax = MAX(fabs(v[i][0]),fabs(v[i][1])); - // vmax = MAX(vmax,fabs(v[i][2])); - // if (dtvone*vmax > dmax) dtvone = dmax/vmax; - //} - //MPI_Allreduce(&dtvone,&dtv,1,MPI_DOUBLE,MPI_MIN,world); - - //// min dtv over replicas, if necessary - //// this communicator would be invalid for multiprocess replicas - - //if (update->multireplica == 1) { - // dtvone = dtv; - // MPI_Allreduce(&dtvone,&dtv,1,MPI_DOUBLE,MPI_MIN,universe->uworld); - //} - - //dtf = dtv * force->ftm2v; - - //// Euler integration step - - //double **x = atom->x; - - //if (rmass) { - // for (int i = 0; i < nlocal; i++) { - // dtfm = dtf / rmass[i]; - // x[i][0] += dtv * v[i][0]; - // x[i][1] += dtv * v[i][1]; - // x[i][2] += dtv * v[i][2]; - // v[i][0] += dtfm * f[i][0]; - // v[i][1] += dtfm * f[i][1]; - // v[i][2] += dtfm * f[i][2]; - // } - //} else { - // for (int i = 0; i < nlocal; i++) { - // dtfm = dtf / mass[type[i]]; - // x[i][0] += dtv * v[i][0]; - // x[i][1] += dtv * v[i][1]; - // x[i][2] += dtv * v[i][2]; - // v[i][0] += dtfm * f[i][0]; - // v[i][1] += dtfm * f[i][1]; - // v[i][2] += dtfm * f[i][2]; - // } - //} - eprevious = ecurrent; ecurrent = energy_force(0); neval++; @@ -237,37 +135,22 @@ int MinSpinMin::iterate(int maxiter) } } - //// magnetic force tolerance criterion - //// sync across replicas if running multi-replica minimization + // magnetic torque tolerance criterion + // sync across replicas if running multi-replica minimization - //if (update->fmtol > 0.0) { - // fmdotfm = fmnorm_sqr(); - // if (update->multireplica == 0) { - // if (fmdotfm < update->fmtol*update->fmtol) return FTOL; - // } else { - // if (fmdotfm < update->fmtol*update->fmtol) flag = 0; - // else flag = 1; - // MPI_Allreduce(&fmlag,&fmlagall,1,MPI_INT,MPI_SUM,universe->uworld); - // if (fmlagall == 0) return FTOL; - // } - //} - - //// force tolerance criterion - //// sync across replicas if running multi-replica minimization + if (update->ftol > 0.0) { + fmdotfm = fmnorm_sqr(); + if (update->multireplica == 0) { + if (fmdotfm < update->ftol*update->ftol) return FTOL; + } else { + if (fmdotfm < update->ftol*update->ftol) flag = 0; + else flag = 1; + MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld); + if (flagall == 0) return FTOL; + } + } - //if (update->ftol > 0.0) { - // fdotf = fnorm_sqr(); - // if (update->multireplica == 0) { - // if (fdotf < update->ftol*update->ftol) return FTOL; - // } else { - // if (fdotf < update->ftol*update->ftol) flag = 0; - // else flag = 1; - // MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,universe->uworld); - // if (flagall == 0) return FTOL; - // } - //} - - //// output for thermo, dump, restart files + // output for thermo, dump, restart files if (output->next == ntimestep) { timer->stamp(); @@ -299,12 +182,6 @@ double MinSpinMin::evaluate_dt() fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; fmaxsqone = MAX(fmaxsqone,fmsq); } - //printf("test inside evaluate dt, fmaxsqone = %g \n",fmaxsqone); - //for (int i = 0; i < nlocal; i++) - // if (mask[i] & groupbit) { - // fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; - // fmaxsqone = MAX(fmaxsqone,fmsq); - // } // finding max fm on this replica @@ -320,15 +197,13 @@ double MinSpinMin::evaluate_dt() MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld); } - //if (fmaxsqall < fmaxsqloc) - // error->all(FLERR,"Incorrect fmaxall calc."); + if (fmaxsqall == 0.0) + error->all(FLERR,"Incorrect fmaxsqall calculation"); - // define max timestep - // dividing by 10 the inverse of max frequency - //printf("test inside evaluate dt, fmaxsqall = %g \n",fmaxsqall); + // define max timestep by dividing by the + // inverse of max frequency by discret_factor - dtmax = MY_2PI/(10.0*sqrt(fmaxsqall)); - //printf("test inside evaluate dt, dtmax = %g \n",dtmax); + dtmax = MY_2PI/(discret_factor*sqrt(fmaxsqall)); return dtmax; } @@ -345,28 +220,19 @@ void MinSpinMin::advance_spins(double dts) double **fm = atom->fm; double tdampx,tdampy,tdampz; double msq,scale,fm2,energy,dts2; - double alpha; double cp[3],g[3]; dts2 = dts*dts; - // fictitious Gilbert damping of 1 - - alpha = 1.0; - - // loop on all spins on proc. - //if (ireplica != nreplica-1 && ireplica != 0) - // for (int i = 0; i < nlocal; i++) - // if (mask[i] & groupbit) { for (int i = 0; i < nlocal; i++) { // calc. damping torque - tdampx = -alpha*(fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]); - tdampy = -alpha*(fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]); - tdampz = -alpha*(fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]); + tdampx = -alpha_damp*(fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]); + tdampy = -alpha_damp*(fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]); + tdampz = -alpha_damp*(fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]); // apply advance algorithm (geometric, norm preserving) @@ -401,22 +267,44 @@ void MinSpinMin::advance_spins(double dts) sp[i][1] *= scale; sp[i][2] *= scale; - // comm. sp[i] to atoms with same tag (for serial algo) - - // no need for simplecticity - //if (sector_flag == 0) { - // if (sametag[i] >= 0) { - // j = sametag[i]; - // while (j >= 0) { - // sp[j][0] = sp[i][0]; - // sp[j][1] = sp[i][1]; - // sp[j][2] = sp[i][2]; - // j = sametag[j]; - // } - // } - //} - // + // no comm. to atoms with same tag + // because no need for simplecticity } - +} + +/* ---------------------------------------------------------------------- + compute and return ||mag. torque||_2^2 +------------------------------------------------------------------------- */ + +double MinSpinMin::fmnorm_sqr() +{ + int i,n; + double *fmatom; + + int nlocal = atom->nlocal; + double tx,ty,tz; + double **sp = atom->sp; + double **fm = atom->fm; + + // calc. magnetic torques + + double local_norm2_sqr = 0.0; + for (int i = 0; i < nlocal; i++) { + tx = (fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]); + ty = (fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]); + tz = (fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]); + + local_norm2_sqr += tx*tx + ty*ty + tz*tz; + } + + // no extra atom calc. for spins + + if (nextra_atom) + error->all(FLERR,"extra atom option not available yet"); + + double norm2_sqr = 0.0; + MPI_Allreduce(&local_norm2_sqr,&norm2_sqr,1,MPI_DOUBLE,MPI_SUM,world); + + return norm2_sqr; } diff --git a/src/SPIN/min_spinmin.h b/src/SPIN/min_spinmin.h index 943b2d2749..abc532a3d5 100644 --- a/src/SPIN/min_spinmin.h +++ b/src/SPIN/min_spinmin.h @@ -34,12 +34,12 @@ class MinSpinMin : public Min { int iterate(int); double evaluate_dt(); void advance_spins(double); - - class FixNEB_spin *fneb; + double fmnorm_sqr(); private: // global and spin timesteps + double dt; double dts; diff --git a/src/min.cpp b/src/min.cpp index cd9253f8d3..c75db6e2b0 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -655,6 +655,14 @@ void Min::modify_params(int narg, char **arg) else if (strcmp(arg[iarg+1],"forcezero") == 0) linestyle = 2; else error->all(FLERR,"Illegal min_modify command"); iarg += 2; + } else if (strcmp(arg[iarg],"alpha_damp") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command"); + alpha_damp = force->numeric(FLERR,arg[iarg+1]); + iarg += 2; + } else if (strcmp(arg[iarg],"discret_factor") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command"); + discret_factor = force->numeric(FLERR,arg[iarg+1]); + iarg += 2; } else error->all(FLERR,"Illegal min_modify command"); } } diff --git a/src/min.h b/src/min.h index 92da97c664..ba1885671e 100644 --- a/src/min.h +++ b/src/min.h @@ -58,6 +58,11 @@ class Min : protected Pointers { double dmax; // max dist to move any atom in one step int linestyle; // 0 = backtrack, 1 = quadratic, 2 = forcezero + // spinmin quantities + + double alpha_damp; // damping for spin minimization + double discret_factor; // factor for spin timestep evaluation + int nelist_global,nelist_atom; // # of PE,virial computes to check int nvlist_global,nvlist_atom; class Compute **elist_global; // lists of PE,virial Computes From f6fb8b220d3b436d8ae003a62aa094f80f166d2e Mon Sep 17 00:00:00 2001 From: julient31 Date: Tue, 12 Mar 2019 16:59:13 -0600 Subject: [PATCH 09/35] Commit 2 JT 031219 - modified examples (gneb and spinmin now distinct) - started documention for spinmin --- doc/src/min_modify.txt | 11 +- doc/src/min_style.txt | 15 +- examples/SPIN/{gneb_bfo => gneb}/README | 0 .../SPIN/{gneb_bfo => gneb}/final.iron_spin | 0 examples/SPIN/{gneb_bfo => gneb}/in.gneb.iron | 0 .../SPIN/{gneb_bfo => gneb}/initial.iron_spin | 0 .../SPIN/{gneb_bfo => spinmin}/in.spinmin.bfo | 14 +- .../{gneb_bfo => spinmin}/in.spinmin.iron | 21 +-- src/REPLICA/fix_neb_spin.cpp | 144 ------------------ 9 files changed, 42 insertions(+), 163 deletions(-) rename examples/SPIN/{gneb_bfo => gneb}/README (100%) rename examples/SPIN/{gneb_bfo => gneb}/final.iron_spin (100%) rename examples/SPIN/{gneb_bfo => gneb}/in.gneb.iron (100%) rename examples/SPIN/{gneb_bfo => gneb}/initial.iron_spin (100%) rename examples/SPIN/{gneb_bfo => spinmin}/in.spinmin.bfo (78%) rename examples/SPIN/{gneb_bfo => spinmin}/in.spinmin.iron (62%) diff --git a/doc/src/min_modify.txt b/doc/src/min_modify.txt index 9408eea167..bb5ad513c1 100644 --- a/doc/src/min_modify.txt +++ b/doc/src/min_modify.txt @@ -13,11 +13,15 @@ min_modify command :h3 min_modify keyword values ... :pre one or more keyword/value pairs may be listed :ulb,l -keyword = {dmax} or {line} +keyword = {dmax} or {line} or {alpha_damp} or {discret_factor} {dmax} value = max max = maximum distance for line search to move (distance units) {line} value = {backtrack} or {quadratic} or {forcezero} - backtrack,quadratic,forcezero = style of linesearch to use :pre + backtrack,quadratic,forcezero = style of linesearch to use + {alpha_damp} value = damping + damping = fictitious Gilbert damping for spin minimization (adim) + {discret_factor} value = factor + factor = defines a dividing factor for adaptive spin timestep (adim) :pre :ule [Examples:] @@ -65,6 +69,9 @@ difference of two large values (energy before and energy after) and that difference may be smaller than machine epsilon even if atoms could move in the gradient direction to reduce forces further. +Keywords {alpha_damp} and {discret_factor} only make sense when +a {spinmin} minimization style is declared. + [Restrictions:] none [Related commands:] diff --git a/doc/src/min_style.txt b/doc/src/min_style.txt index 4948a34864..b1a9da997d 100644 --- a/doc/src/min_style.txt +++ b/doc/src/min_style.txt @@ -11,11 +11,12 @@ min_style command :h3 min_style style :pre -style = {cg} or {hftn} or {sd} or {quickmin} or {fire} :ul +style = {cg} or {hftn} or {sd} or {quickmin} or {fire} or {spinmin} :ul [Examples:] min_style cg +min_style spinmin min_style fire :pre [Description:] @@ -61,9 +62,21 @@ the velocity non-parallel to the current force vector. The velocity of each atom is initialized to 0.0 by this style, at the beginning of a minimization. +Style {spinmin} is a damped spin dynamics with a variable +timestep as described in "(Tranchida)"_#Tranchida. +The value of the fictitious Gilbert damping and of the dividing +factor for the adaptive timestep can be modified by the +{alpha_damp} and {discret_factor} options respectively. +Those options can be defined using the "min_modify"_min_modify.html +command. + Either the {quickmin} and {fire} styles are useful in the context of nudged elastic band (NEB) calculations via the "neb"_neb.html command. +The {spinmin} style is useful in the context of geodesic nudged +elastic band (GNEB) calculations via the "neb/spin"_neb_spin.html +command. + NOTE: The damped dynamic minimizers use whatever timestep you have defined via the "timestep"_timestep.html command. Often they will converge more quickly if you use a timestep about 10x larger than you diff --git a/examples/SPIN/gneb_bfo/README b/examples/SPIN/gneb/README similarity index 100% rename from examples/SPIN/gneb_bfo/README rename to examples/SPIN/gneb/README diff --git a/examples/SPIN/gneb_bfo/final.iron_spin b/examples/SPIN/gneb/final.iron_spin similarity index 100% rename from examples/SPIN/gneb_bfo/final.iron_spin rename to examples/SPIN/gneb/final.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.gneb.iron b/examples/SPIN/gneb/in.gneb.iron similarity index 100% rename from examples/SPIN/gneb_bfo/in.gneb.iron rename to examples/SPIN/gneb/in.gneb.iron diff --git a/examples/SPIN/gneb_bfo/initial.iron_spin b/examples/SPIN/gneb/initial.iron_spin similarity index 100% rename from examples/SPIN/gneb_bfo/initial.iron_spin rename to examples/SPIN/gneb/initial.iron_spin diff --git a/examples/SPIN/gneb_bfo/in.spinmin.bfo b/examples/SPIN/spinmin/in.spinmin.bfo similarity index 78% rename from examples/SPIN/gneb_bfo/in.spinmin.bfo rename to examples/SPIN/spinmin/in.spinmin.bfo index 15a4d6e0f9..a00af8833c 100644 --- a/examples/SPIN/gneb_bfo/in.spinmin.bfo +++ b/examples/SPIN/spinmin/in.spinmin.bfo @@ -1,4 +1,4 @@ -# bcc iron in a 3d periodic box +# bfo in a 3d periodic box units metal dimension 3 @@ -9,7 +9,7 @@ atom_style spin atom_modify map array lattice sc 3.96 -region box block 0.0 68.0 0.0 68.0 0.0 1.0 +region box block 0.0 34.0 0.0 34.0 0.0 1.0 create_box 1 box create_atoms 1 box @@ -17,7 +17,6 @@ create_atoms 1 box mass 1 1.0 set group all spin/random 11 2.50 -#set group all spin 2.5 -1.0 0.0 0.0 pair_style hybrid/overlay spin/exchange 6.0 spin/magelec 4.5 spin/dmi 4.5 pair_coeff * * spin/exchange exchange 6.0 -0.01575 0.0 1.965 @@ -30,7 +29,8 @@ neigh_modify every 10 check yes delay 20 #fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0 -fix 2 all langevin/spin 0.1 0.0 21 +fix_modify 1 energy yes +fix 2 all langevin/spin 0.0 0.1 21 fix 3 all nve/spin lattice no timestep 0.0001 @@ -50,8 +50,8 @@ thermo_style custom step time v_magnorm v_emag v_tmag temp etotal thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz -dump 200 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] +dump 1 all custom 50 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] min_style spinmin -minimize 1.0e-6 1.0e-6 10000 10000 -#minimize 1.0e-8 1.0e-8 10000 1000 +min_modify alpha_damp 1.0 discret_factor 10.0 +minimize 0.0 0.0 10000 1000 diff --git a/examples/SPIN/gneb_bfo/in.spinmin.iron b/examples/SPIN/spinmin/in.spinmin.iron similarity index 62% rename from examples/SPIN/gneb_bfo/in.spinmin.iron rename to examples/SPIN/spinmin/in.spinmin.iron index 67d8095c06..5a15082122 100644 --- a/examples/SPIN/gneb_bfo/in.spinmin.iron +++ b/examples/SPIN/spinmin/in.spinmin.iron @@ -9,7 +9,7 @@ atom_style spin atom_modify map array lattice bcc 2.8665 -region box block 0.0 4.0 0.0 4.0 0.0 1.0 +region box block 0.0 4.0 0.0 4.0 0.0 4.0 create_box 1 box create_atoms 1 box @@ -17,7 +17,7 @@ create_atoms 1 box mass 1 55.845 set group all spin/random 31 2.2 -#set group all spin 2.2 -1.0 0.0 0.0 +#set group all spin 2.2 1.0 1.0 -1.0 pair_style spin/exchange 3.5 pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 @@ -26,8 +26,9 @@ neighbor 0.1 bin neigh_modify every 10 check yes delay 20 #fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 -fix 1 all precession/spin anisotropy 0.001 0.0 0.0 1.0 -fix 2 all langevin/spin 0.1 0.0 21 +fix 1 all precession/spin anisotropy 0.0001 0.0 0.0 1.0 +fix_modify 1 energy yes +fix 2 all langevin/spin 0.0 0.1 21 fix 3 all nve/spin lattice no timestep 0.0001 @@ -37,18 +38,20 @@ compute out_pe all pe compute out_ke all ke compute out_temp all temp +variable magx equal c_out_mag[1] +variable magy equal c_out_mag[2] variable magz equal c_out_mag[3] variable magnorm equal c_out_mag[4] variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] -thermo 1 -thermo_style custom step time v_magnorm v_emag v_tmag temp etotal +thermo 100 +thermo_style custom step time v_magx v_magz v_magnorm v_tmag etotal thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz -dump 1 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] +dump 1 all custom 100 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] min_style spinmin -minimize 1.0e-6 1.0e-6 1000 10000 -#minimize 1.0e-8 1.0e-6 1000 10000 +min_modify alpha_damp 1.0 discret_factor 10.0 +minimize 1.0e-10 1.0e-10 100000 1000 diff --git a/src/REPLICA/fix_neb_spin.cpp b/src/REPLICA/fix_neb_spin.cpp index 7a72936200..d8f9e655fd 100644 --- a/src/REPLICA/fix_neb_spin.cpp +++ b/src/REPLICA/fix_neb_spin.cpp @@ -843,156 +843,12 @@ double FixNEB_spin::geodesic_distance(double spi[3], double spj[3]) return dist; } -/* ---------------------------------------------------------------------- - geometric damped advance os spins ----------------------------------------------------------------------- */ - -//void FixNEB_spin::advance_spins(double dts) -//{ -// //int j=0; -// //int *sametag = atom->sametag; -// int nlocal = atom->nlocal; -// int *mask = atom->mask; -// double **sp = atom->sp; -// double **fm = atom->fm; -// double tdampx,tdampy,tdampz; -// double msq,scale,fm2,energy,dts2; -// double alpha; -// double spi[3],fmi[3]; -// double cp[3],g[3]; -// -// //cp[0] = cp[1] = cp[2] = 0.0; -// //g[0] = g[1] = g[2] = 0.0; -// dts2 = dts*dts; -// -// // fictitious Gilbert damping of 1 -// alpha = 1.0; -// -// // loop on all spins on proc. -// -// if (ireplica != nreplica-1 && ireplica != 0) -// for (int i = 0; i < nlocal; i++) -// if (mask[i] & groupbit) { -// -// spi[0] = sp[i][0]; -// spi[1] = sp[i][1]; -// spi[2] = sp[i][2]; -// -// fmi[0] = fm[i][0]; -// fmi[1] = fm[i][1]; -// fmi[2] = fm[i][2]; -// -// // calc. damping torque -// -// tdampx = -alpha*(fmi[1]*spi[2] - fmi[2]*spi[1]); -// tdampy = -alpha*(fmi[2]*spi[0] - fmi[0]*spi[2]); -// tdampz = -alpha*(fmi[0]*spi[1] - fmi[1]*spi[0]); -// -// // apply advance algorithm (geometric, norm preserving) -// -// fm2 = (tdampx*tdampx+tdampy*tdampy+tdampz*tdampz); -// energy = (sp[i][0]*tdampx)+(sp[i][1]*tdampy)+(sp[i][2]*tdampz); -// -// cp[0] = tdampy*sp[i][2]-tdampz*sp[i][1]; -// cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; -// cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; -// -// g[0] = sp[i][0]+cp[0]*dts; -// g[1] = sp[i][1]+cp[1]*dts; -// g[2] = sp[i][2]+cp[2]*dts; -// -// g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; -// g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; -// g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; -// -// g[0] /= (1+0.25*fm2*dts2); -// g[1] /= (1+0.25*fm2*dts2); -// g[2] /= (1+0.25*fm2*dts2); -// -// sp[i][0] = g[0]; -// sp[i][1] = g[1]; -// sp[i][2] = g[2]; -// -// // renormalization (check if necessary) -// -// msq = g[0]*g[0] + g[1]*g[1] + g[2]*g[2]; -// scale = 1.0/sqrt(msq); -// sp[i][0] *= scale; -// sp[i][1] *= scale; -// sp[i][2] *= scale; -// -// // comm. sp[i] to atoms with same tag (for serial algo) -// -// // no need for simplecticity -// //if (sector_flag == 0) { -// // if (sametag[i] >= 0) { -// // j = sametag[i]; -// // while (j >= 0) { -// // sp[j][0] = sp[i][0]; -// // sp[j][1] = sp[i][1]; -// // sp[j][2] = sp[i][2]; -// // j = sametag[j]; -// // } -// // } -// //} -// // -// -// } -//} - -/* ---------------------------------------------------------------------- - evaluate max timestep ----------------------------------------------------------------------- */ - -//double FixNEB_spin::evaluate_dt() -//{ -// double dtmax; -// double fmsq; -// double fmaxsqone,fmaxsqloc,fmaxsqall; -// int nlocal = atom->nlocal; -// int *mask = atom->mask; -// double **fm = atom->fm; -// -// // finding max fm on this proc. -// -// fmsq = fmaxsqone = fmaxsqloc = fmaxsqall = 0.0; -// for (int i = 0; i < nlocal; i++) -// if (mask[i] & groupbit) { -// fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; -// fmaxsqone = MAX(fmaxsqone,fmsq); -// } -// -// // finding max fm on this replica -// -// fmaxsqloc = fmaxsqone; -// MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world); -// -// // finding max fm over all replicas, if necessary -// // this communicator would be invalid for multiprocess replicas -// -// if (update->multireplica == 1) { -// fmaxsqall = fmaxsqloc; -// MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld); -// } -// -// if (fmaxsqall < fmaxsqloc) -// error->all(FLERR,"Incorrect fmaxall calc."); -// -// // define max timestep -// // dividing by 10 the inverse of max frequency -// -// dtmax = MY_2PI/(10.0*sqrt(fmaxsqall)); -// -// return dtmax; -//} - /* ---------------------------------------------------------------------- send/recv NEB atoms to/from adjacent replicas received atoms matching my local atoms are stored in xprev,xnext replicas 0 and N-1 send but do not receive any atoms ------------------------------------------------------------------------- */ - void FixNEB_spin::inter_replica_comm() { int i,m; From 8c50c3d7c87be57f356b9ad454fbe66799c3c7ef Mon Sep 17 00:00:00 2001 From: julient31 Date: Wed, 13 Mar 2019 17:02:40 -0600 Subject: [PATCH 10/35] Commit JT 031319 - improved gneb functions - correct name in fix_neb (Weinan) --- doc/src/fix_neb.txt | 6 +- doc/src/min_modify.txt | 1 + src/REPLICA/fix_neb_spin.cpp | 72 ++---- src/REPLICA/neb_spin.cpp | 417 ++++++----------------------------- src/REPLICA/neb_spin.h | 6 +- 5 files changed, 82 insertions(+), 420 deletions(-) diff --git a/doc/src/fix_neb.txt b/doc/src/fix_neb.txt index 410ab3d4d1..87292bb5cd 100644 --- a/doc/src/fix_neb.txt +++ b/doc/src/fix_neb.txt @@ -97,7 +97,7 @@ Note that in this case the specified {Kspring} is in force/distance units. With a value of {ideal}, the spring force is computed as suggested in -"(WeinenE)"_#WeinenE : +"(WeinanE)"_#WeinanE : Fnudge_parallel = -{Kspring} * (RD-RDideal) / (2 * meanDist) :pre @@ -224,8 +224,8 @@ specified (no inter-replica force on the end replicas). [(Henkelman2)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, 9901-9904 (2000). -:link(WeinenE) -[(WeinenE)] E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002). +:link(WeinanE) +[(WeinanE)] E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002). :link(Jonsson) [(Jonsson)] Jonsson, Mills and Jacobsen, in Classical and Quantum diff --git a/doc/src/min_modify.txt b/doc/src/min_modify.txt index bb5ad513c1..701f579af4 100644 --- a/doc/src/min_modify.txt +++ b/doc/src/min_modify.txt @@ -71,6 +71,7 @@ could move in the gradient direction to reduce forces further. Keywords {alpha_damp} and {discret_factor} only make sense when a {spinmin} minimization style is declared. +Default values are alpha_damp = 1.0 and discret_factor = 10.0. [Restrictions:] none diff --git a/src/REPLICA/fix_neb_spin.cpp b/src/REPLICA/fix_neb_spin.cpp index d8f9e655fd..015ff1a313 100644 --- a/src/REPLICA/fix_neb_spin.cpp +++ b/src/REPLICA/fix_neb_spin.cpp @@ -69,65 +69,25 @@ FixNEB_spin::FixNEB_spin(LAMMPS *lmp, int narg, char **arg) : kspringPerp = 0.0; kspringIni = 1.0; kspringFinal = 1.0; - // only regular neb for now - SpinLattice = false; - + SpinLattice = false; // no spin-lattice neb for now + // no available fix neb/spin options for now int iarg = 4; while (iarg < narg) { - if (strcmp(arg[iarg],"lattice") == 0) - error->all(FLERR,"Illegal fix neb command"); - } - - /* if (strcmp(arg[iarg],"parallel") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal fix neb command"); - if (strcmp(arg[iarg+1],"ideal") == 0) { - NEBLongRange = true; - StandardNEB = false; - } else if (strcmp(arg[iarg+1],"neigh") == 0) { - NEBLongRange = false; - StandardNEB = true; - } else error->all(FLERR,"Illegal fix neb command"); + error->all(FLERR,"Illegal fix neb command"); iarg += 2; - } else if (strcmp(arg[iarg],"perp") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal fix neb command"); - PerpSpring = true; - kspringPerp = force->numeric(FLERR,arg[iarg+1]); - if (kspringPerp == 0.0) PerpSpring = false; - if (kspringPerp < 0.0) error->all(FLERR,"Illegal fix neb command"); + error->all(FLERR,"Illegal fix neb command"); iarg += 2; - } else if (strcmp (arg[iarg],"end") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal fix neb command"); - if (strcmp(arg[iarg+1],"first") == 0) { - FreeEndIni = true; - kspringIni = force->numeric(FLERR,arg[iarg+2]); - } else if (strcmp(arg[iarg+1],"last") == 0) { - FreeEndFinal = true; - FinalAndInterWithRespToEIni = false; - FreeEndFinalWithRespToEIni = false; - kspringFinal = force->numeric(FLERR,arg[iarg+2]); - } else if (strcmp(arg[iarg+1],"last/efirst") == 0) { - FreeEndFinal = false; - FinalAndInterWithRespToEIni = false; - FreeEndFinalWithRespToEIni = true; - kspringFinal = force->numeric(FLERR,arg[iarg+2]); - } else if (strcmp(arg[iarg+1],"last/efirst/middle") == 0) { - FreeEndFinal = false; - FinalAndInterWithRespToEIni = true; - FreeEndFinalWithRespToEIni = true; - kspringFinal = force->numeric(FLERR,arg[iarg+2]); - } else error->all(FLERR,"Illegal fix neb command"); - iarg += 3; - + } else if (strcmp (arg[iarg],"lattice") == 0) { + iarg += 2; } else error->all(FLERR,"Illegal fix neb command"); } - */ - + // nreplica = number of partitions // ireplica = which world I am in universe // nprocs_universe = # of procs in all replicase @@ -172,10 +132,6 @@ FixNEB_spin::FixNEB_spin(LAMMPS *lmp, int narg, char **arg) : modify->add_compute(3,newarg); delete [] newarg; - // might need a test - // => check if pe does not compute mech potentials - - // initialize local storage maxlocal = -1; @@ -374,14 +330,12 @@ void FixNEB_spin::min_post_force(int /*vflag*/) pe->addstep(update->ntimestep+1); double **x = atom->x; - // spin quantities double **sp = atom->sp; int *mask = atom->mask; double dot = 0.0; double prefactor = 0.0; - double **f = atom->f; - // spin quantities + //double **f = atom->f; double **fm = atom->fm; int nlocal = atom->nlocal; @@ -397,9 +351,10 @@ void FixNEB_spin::min_post_force(int /*vflag*/) // computation of the tangent vector - // final replica if (ireplica == nreplica-1) { + // final replica + for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -470,8 +425,10 @@ void FixNEB_spin::min_post_force(int /*vflag*/) //} } - // initial replica } else if (ireplica == 0) { + + // initial replica + for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -537,7 +494,6 @@ void FixNEB_spin::min_post_force(int /*vflag*/) //} } - // in-between replica } else { // not the first or last replica @@ -770,7 +726,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) //prefactor = -2.0*dot; } else { if (NEBLongRange) { - error->all(FLERR,"NEB_spin climber option not yet active"); + error->all(FLERR,"Long Range NEB_spin climber option not yet active"); //prefactor = -dot - kspring*(lenuntilIm-idealPos)/(2*meanDist); } else if (StandardNEB) { prefactor = -dot + kspring*(nlen-plen); diff --git a/src/REPLICA/neb_spin.cpp b/src/REPLICA/neb_spin.cpp index 6249797e95..e82b08e354 100644 --- a/src/REPLICA/neb_spin.cpp +++ b/src/REPLICA/neb_spin.cpp @@ -72,7 +72,8 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, double delspx,delspy,delspz; etol = etol_in; - ftol = ftol_in; + //ftol = ftol_in; + ttol = ftol_in; n1steps = n1steps_in; n2steps = n2steps_in; nevery = nevery_in; @@ -85,12 +86,10 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, uworld = universe->uworld; MPI_Comm_rank(world,&me); - // generate linear interpolate replica + // fraction to interpolate intermediate replica double fraction = ireplica/(nreplica-1.0); - double **x = atom->x; - // spin quantitites double **sp = atom->sp; int nlocal = atom->nlocal; @@ -111,19 +110,11 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, sp[i][1] = spfinal[1]; sp[i][2] = spfinal[2]; - //delx = buf_final[ii] - buf_init[ii]; - //dely = buf_final[ii+1] - buf_init[ii+1]; - //delz = buf_final[ii+2] - buf_init[ii+2]; - // adjust distance if pbc - // not implemented yet //domain->minimum_image(delx,dely,delz); - // need to define a procedure for circular initialization - - //x[i][0] = buf_init[ii] + fraction*delx; - //x[i][1] = buf_init[ii+1] + fraction*dely; - //x[i][2] = buf_init[ii+2] + fraction*delz; + // need to define a better procedure for circular initialization + ii += 3; } } @@ -143,22 +134,14 @@ NEB_spin::~NEB_spin() void NEB_spin::command(int narg, char **arg) { - - //printf("test 1 \n"); - - // test 1 - double **sp1 = atom->sp; - //printf("test 1 atom: i=%d,%g,%g,%g \n",1,sp1[1][0],sp1[1][1],sp1[1][2]); - //error->all(FLERR,"end neb_spin test"); - - if (domain->box_exist == 0) error->all(FLERR,"NEB_spin command before simulation box is defined"); if (narg < 6) error->universe_all(FLERR,"Illegal NEB_spin command"); etol = force->numeric(FLERR,arg[0]); - ftol = force->numeric(FLERR,arg[1]); + //ftol = force->numeric(FLERR,arg[1]); + ttol = force->numeric(FLERR,arg[1]); n1steps = force->inumeric(FLERR,arg[2]); n2steps = force->inumeric(FLERR,arg[3]); nevery = force->inumeric(FLERR,arg[4]); @@ -166,7 +149,8 @@ void NEB_spin::command(int narg, char **arg) // error checks if (etol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); - if (ftol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); + //if (ftol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); + if (ttol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); if (nevery <= 0) error->universe_all(FLERR,"Illegal NEB_spin command"); if (n1steps % nevery || n2steps % nevery) error->universe_all(FLERR,"Illegal NEB_spin command"); @@ -209,14 +193,6 @@ void NEB_spin::command(int narg, char **arg) verbose=false; if (strcmp(arg[narg-1],"verbose") == 0) verbose=true; - - - // test 1 - double **sp = atom->sp; - //printf("test 2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); - //error->all(FLERR,"end neb_spin test"); - - // run the NEB_spin calculation run(); } @@ -250,22 +226,24 @@ void NEB_spin::run() update->whichflag = 2; update->etol = etol; - update->ftol = ftol; + //update->ftol = ftol; + update->ftol = ttol; // update->ftol is a torque tolerance update->multireplica = 1; lmp->init(); - // put flag to check gilbert damping procedure is set + // check if correct minimizer is setup - //if (update->minimize->searchflag) - // error->all(FLERR,"NEB_spin requires damped dynamics minimizer"); + if (update->minimize->searchflag) + error->all(FLERR,"NEB_spin requires damped dynamics minimizer"); + if (strcmp(update->minimize_style,"spinmin") != 0) + error->all(FLERR,"NEB_spin requires spinmin minimizer"); // setup regular NEB_spin minimization + FILE *uscreen = universe->uscreen; FILE *ulogfile = universe->ulogfile; - //printf("test before run 1 \n"); - if (me_universe == 0 && uscreen) fprintf(uscreen,"Setting up regular NEB_spin ...\n"); @@ -276,22 +254,23 @@ void NEB_spin::run() if (update->laststep < 0) error->all(FLERR,"Too many timesteps for NEB_spin"); - //printf("test before run 2 \n"); - update->minimize->setup(); - //printf("test before run 3 \n"); - if (me_universe == 0) { if (uscreen) { if (verbose) { - fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " - "... ReplicaForceN MaxAtomForceN\n"); + "... ReplicaTorqueN MaxAtomTorqueN\n"); + //fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + // "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " + // "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " + // "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " + // "... ReplicaForceN MaxAtomForceN\n"); } else { - fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " "RDN PEN\n"); } @@ -299,21 +278,19 @@ void NEB_spin::run() if (ulogfile) { if (verbose) { - fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " - "... ReplicaForceN MaxAtomForceN\n"); + "... ReplicaTorqueN MaxAtomTorqueN\n"); } else { - fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " "RDN PEN\n"); } } } - //printf("test before run 4 \n"); print_status(); - //printf("test before run 5 \n"); // perform regular NEB_spin for n1steps or until replicas converge // retrieve PE values from fix NEB_spin and print every nevery iterations @@ -323,35 +300,11 @@ void NEB_spin::run() timer->init(); timer->barrier_start(); - // test import fix_nve scheme - - //printf("test 2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); - //error->all(FLERR,"end neb_spin test"); - double dts; while (update->minimize->niter < n1steps) { - //dts = evaluate_dt(); - //advance_spins(dts); - //fneb-> - - //dts = fneb->evaluate_dt(); - //fneb->advance_spins(dts); - - // no minimizer for spins update->minimize->run(nevery); - - - // no minimizer for spins - //update->minimize->run(nevery); - // - // evaluate dts - // loop on spins, damped advance - // print_status(); if (update->minimize->stop_condition) break; } - - // test neb end - //error->all(FLERR,"end neb_spin test"); timer->barrier_stop(); @@ -393,22 +346,19 @@ void NEB_spin::run() update->minimize->init(); fneb->rclimber = top; - printf("test print 6.2 \n"); update->minimize->setup(); - printf("test print 6.3 \n"); - if (me_universe == 0) { if (uscreen) { if (verbose) { - fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN " "pathangle1 angletangrad1 anglegrad1 gradV1 " "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " "... ReplicaForceN MaxAtomForceN\n"); } else { - fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " + fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc " "EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN\n"); @@ -416,14 +366,14 @@ void NEB_spin::run() } if (ulogfile) { if (verbose) { - fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN " "pathangle1 angletangrad1 anglegrad1 gradV1 " "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " "... ReplicaForceN MaxAtomForceN\n"); } else { - fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " + fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc " "EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN\n"); @@ -441,10 +391,6 @@ void NEB_spin::run() timer->barrier_start(); while (update->minimize->niter < n2steps) { - //dts = evaluate_dt(); - //advance_spins(dts); - //dts = fneb->evaluate_dt(); - //fneb->advance_spins(dts); update->minimize->run(nevery); print_status(); if (update->minimize->stop_condition) break; @@ -462,174 +408,6 @@ void NEB_spin::run() update->beginstep = update->endstep = 0; } -/* ---------------------------------------------------------------------- - geodesic distance calculation (Vincenty's formula) -------------------------------------------------------------------------- */ - -//double NEB_spin::geodesic_distance2(double spi[3], double spj[3]) -//{ -// double dist; -// double crossx,crossy,crossz; -// double dotx,doty,dotz; -// double crosslen,dots; -// -// crossx = spi[1]*spj[2]-spi[2]*spj[1]; -// crossy = spi[2]*spj[0]-spi[0]*spj[2]; -// crossz = spi[0]*spj[1]-spi[1]*spj[0]; -// crosslen = sqrt(crossx*crossx + crossy*crossy + crossz*crossz); -// dotx = spi[0]*spj[0]; -// doty = spi[1]*spj[1]; -// dotz = spi[2]*spj[2]; -// dots = dotx+doty+dotz; -// -// dist = atan2(crosslen,dots); -// -// return dist; -//} - -/* ---------------------------------------------------------------------- - evaluate max timestep ----------------------------------------------------------------------- */ - -//double NEB_spin::evaluate_dt() -//{ -// double dtmax; -// double fmsq; -// double fmaxsqone,fmaxsqloc,fmaxsqall; -// int nlocal = atom->nlocal; -// int *mask = atom->mask; -// double **fm = atom->fm; -// -// // finding max fm on this proc. -// -// fmsq = fmaxsqone = fmaxsqloc = fmaxsqall = 0.0; -// for (int i = 0; i < nlocal; i++) -// if (mask[i] & groupbit) { -// fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; -// fmaxsqone = MAX(fmaxsqone,fmsq); -// } -// -// // finding max fm on this replica -// -// fmaxsqloc = fmaxsqone; -// MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world); -// -// // finding max fm over all replicas, if necessary -// // this communicator would be invalid for multiprocess replicas -// -// if (update->multireplica == 1) { -// fmaxsqall = fmaxsqloc; -// MPI_Allreduce(&fmaxsqloc,&fmaxsqall,1,MPI_DOUBLE,MPI_MAX,universe->uworld); -// } -// -// if (fmaxsqall < fmaxsqloc) -// error->all(FLERR,"Incorrect fmaxall calc."); -// -// // define max timestep -// // dividing by 10 the inverse of max frequency -// -// dtmax = MY_2PI/(10.0*sqrt(fmaxsqall)); -// -// return dtmax; -//} - -/* ---------------------------------------------------------------------- - geometric damped advance os spins ----------------------------------------------------------------------- */ - -//void NEB_spin::advance_spins(double dts) -//{ -// //int j=0; -// //int *sametag = atom->sametag; -// int nlocal = atom->nlocal; -// int *mask = atom->mask; -// double **sp = atom->sp; -// double **fm = atom->fm; -// double tdampx,tdampy,tdampz; -// double msq,scale,fm2,energy,dts2; -// double alpha; -// double spi[3],fmi[3]; -// double cp[3],g[3]; -// -// //cp[0] = cp[1] = cp[2] = 0.0; -// //g[0] = g[1] = g[2] = 0.0; -// dts2 = dts*dts; -// -// // fictitious Gilbert damping of 1 -// alpha = 1.0; -// -// // loop on all spins on proc. -// -// if (ireplica != nreplica-1 && ireplica != 0) -// for (int i = 0; i < nlocal; i++) -// if (mask[i] & groupbit) { -// -// spi[0] = sp[i][0]; -// spi[1] = sp[i][1]; -// spi[2] = sp[i][2]; -// -// fmi[0] = fm[i][0]; -// fmi[1] = fm[i][1]; -// fmi[2] = fm[i][2]; -// -// // calc. damping torque -// -// tdampx = -alpha*(fmi[1]*spi[2] - fmi[2]*spi[1]); -// tdampy = -alpha*(fmi[2]*spi[0] - fmi[0]*spi[2]); -// tdampz = -alpha*(fmi[0]*spi[1] - fmi[1]*spi[0]); -// -// // apply advance algorithm (geometric, norm preserving) -// -// fm2 = (tdampx*tdampx+tdampy*tdampy+tdampz*tdampz); -// energy = (sp[i][0]*tdampx)+(sp[i][1]*tdampy)+(sp[i][2]*tdampz); -// -// cp[0] = tdampy*sp[i][2]-tdampz*sp[i][1]; -// cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; -// cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; -// -// g[0] = sp[i][0]+cp[0]*dts; -// g[1] = sp[i][1]+cp[1]*dts; -// g[2] = sp[i][2]+cp[2]*dts; -// -// g[0] += (fm[i][0]*energy-0.5*sp[i][0]*fm2)*0.5*dts2; -// g[1] += (fm[i][1]*energy-0.5*sp[i][1]*fm2)*0.5*dts2; -// g[2] += (fm[i][2]*energy-0.5*sp[i][2]*fm2)*0.5*dts2; -// -// g[0] /= (1+0.25*fm2*dts2); -// g[1] /= (1+0.25*fm2*dts2); -// g[2] /= (1+0.25*fm2*dts2); -// -// sp[i][0] = g[0]; -// sp[i][1] = g[1]; -// sp[i][2] = g[2]; -// -// // renormalization (check if necessary) -// -// msq = g[0]*g[0] + g[1]*g[1] + g[2]*g[2]; -// scale = 1.0/sqrt(msq); -// sp[i][0] *= scale; -// sp[i][1] *= scale; -// sp[i][2] *= scale; -// -// // comm. sp[i] to atoms with same tag (for serial algo) -// -// // no need for simplecticity -// //if (sector_flag == 0) { -// // if (sametag[i] >= 0) { -// // j = sametag[i]; -// // while (j >= 0) { -// // sp[j][0] = sp[i][0]; -// // sp[j][1] = sp[i][1]; -// // sp[j][2] = sp[i][2]; -// // j = sametag[j]; -// // } -// // } -// //} -// // -// -// } -//} - /* ---------------------------------------------------------------------- read initial config atom coords from file flag = 0 @@ -654,7 +432,6 @@ void NEB_spin::readfile(char *file, int flag) double xx,yy,zz,delx,dely,delz; // spin quantities double musp,spx,spy,spz; - //,delx,dely,delz; if (me_universe == 0 && screen) fprintf(screen,"Reading NEB_spin coordinate file(s) ...\n"); @@ -703,12 +480,6 @@ void NEB_spin::readfile(char *file, int flag) double spinit[3],spfinal[3]; int nlocal = atom->nlocal; - // test 1.2 - //double **sp = atom->sp; - //printf("test 1.2 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); - //error->all(FLERR,"end neb_spin test"); - - // loop over chunks of lines read from file // two versions of read_lines_from_file() for world vs universe bcast // count # of atom coords changed so can check for invalid atom IDs in file @@ -765,44 +536,27 @@ void NEB_spin::readfile(char *file, int flag) spx = atof(values[5]); spy = atof(values[6]); spz = atof(values[7]); - //xx = atof(values[1]); - //yy = atof(values[2]); - //zz = atof(values[3]); if (flag == 0) { - // here, function interp. spin states - - //spinit[0] = x[m][0]; - //spinit[1] = x[m][1]; - //spinit[2] = x[m][2]; spinit[0] = sp[m][0]; spinit[1] = sp[m][1]; spinit[2] = sp[m][2]; spfinal[0] = spx; spfinal[1] = spy; spfinal[2] = spz; - //domain->minimum_image(delx,dely,delz); + + // to be used it atomic displacements with pbc + //domain->minimum_image(delx,dely,delz); - // test - //printf("spinit: %g %g %g \n",spinit[0],spinit[1],spinit[2]); - //printf("spfinal bef: %g %g %g \n",spfinal[0],spfinal[1],spfinal[2]); + // interpolate intermediate spin states initial_rotation(spinit,spfinal,fraction); - - // test - //printf("spfinal aft: %g %g %g \n",spfinal[0],spfinal[1],spfinal[2]); sp[m][0] = spfinal[0]; sp[m][1] = spfinal[1]; sp[m][2] = spfinal[2]; sp[m][3] = musp; - //delx = xx - x[m][0]; - //dely = yy - x[m][1]; - //delz = zz - x[m][2]; - //x[m][0] += fraction*delx; - //x[m][1] += fraction*dely; - //x[m][2] += fraction*delz; } else { sp[m][3] = musp; x[m][0] = xx; @@ -820,12 +574,6 @@ void NEB_spin::readfile(char *file, int flag) nread += nchunk; } - // test 1.3 - //double **sp = atom->sp; - //printf("test 1.3 atom: i=%d,%g,%g,%g \n",1,sp[1][0],sp[1][1],sp[1][2]); - //error->all(FLERR,"end neb_spin test"); - - // check that all atom IDs in file were found by a proc if (flag == 0) { @@ -867,13 +615,11 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) { // implementing initial rotation using atan2 - //atan2(crosslen,dots); - // this is not a sufficient routine, // we need more accurate verifications - // initial and final and inter ang. values + // initial, final and inter ang. values double itheta,iphi,ftheta,fphi,ktheta,kphi; double spix,spiy,spiz,spfx,spfy,spfz; double spkx,spky,spkz,iknorm; @@ -909,58 +655,6 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) sploc[1] = spky; sploc[2] = spkz; - //double theta,spdot; - //double inormdot,ispinorm; - //double kix,kiy,kiz; - //double kinorm, ikinorm; - //double crossx,crossy,crossz; - - ////printf("inside rot, spi %g, spf %g \n",spi[0],sploc[0]); - - //spdot = spi[0]*sploc[0]+spi[1]*sploc[1]+spi[2]*sploc[2]; - //theta = fraction*acos(spdot); - - //printf("inside rot, theta %g \n",theta); - - //kix = spi[1]*sploc[2]-spi[2]*sploc[1]; - //kiy = spi[2]*sploc[0]-spi[0]*sploc[2]; - //kiz = spi[0]*sploc[1]-spi[1]*sploc[0]; - // - ////printf("inside rot1.1, ki %g %g %g \n",kix,kiy,kiz); - - //inormdot = 1.0/sqrt(spdot); - //kinorm = kix*kix+kiy*kiy+kiz*kiz; - //if (kinorm == 0.0) { - // kix = 0.0; - // kiy = 0.0; - // kiz = 0.0; - //} else { - // ikinorm = 1.0/kinorm; - // kix *= ikinorm; - // kiy *= ikinorm; - // kiz *= ikinorm; - //} - - ////printf("inside rot1.2, kin %g %g %g \n",kix,kiy,kiz); - - //crossx = kiy*spi[2]-kiz*spi[1]; - //crossy = kiz*spi[0]-kix*spi[2]; - //crossz = kix*spi[1]-kiy*spi[0]; - // - ////printf("inside rot1.3, cross %g %g %g \n",crossx,crossy,crossz); - - //sploc[0] = spi[0]*cos(theta)+crossx*sin(theta); - //sploc[1] = spi[1]*cos(theta)+crossy*sin(theta); - //sploc[2] = spi[2]*cos(theta)+crossz*sin(theta); - // - ////printf("inside rot2, spf %g %g %g \n",sploc[0],sploc[1],sploc[2]); - - //ispinorm = 1.0/sqrt(sploc[0]*sploc[0]+sploc[1]*sploc[1]+sploc[2]*sploc[2]); - - //sploc[0] *= ispinorm; - //sploc[1] *= ispinorm; - //sploc[2] *= ispinorm; - //printf("inside rot2, spf %g %g %g \n",sploc[0],sploc[1],sploc[2]); } /* ---------------------------------------------------------------------- @@ -1007,30 +701,43 @@ void NEB_spin::print_status() //double fnorm2 = sqrt(update->minimize->fnorm_sqr()); - // test fmax spin int nlocal = atom->nlocal; + double tx,ty,tz; + double tnorm2,local_norm_inf,temp_inf; + double **sp = atom->sp; double **fm = atom->fm; - double fnorm2; - for (int i = 0; i < nlocal; i++) - fnorm2 += (fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]); - //for (int i = 0; i < nlocal; i++) - // if (mask[i] & groupbit) { - // fnorm2 += (fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]); - // } + + // calc. magnetic torques + tnorm2 = local_norm_inf = temp_inf = 0.0; + for (int i = 0; i < nlocal; i++) { + tx = (fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]); + ty = (fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]); + tz = (fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]); + tnorm2 += tx*tx + ty*ty + tz*tz; + + temp_inf = MAX(fabs(tx),fabs(ty)); + temp_inf = MAX(fabs(tz),temp_inf); + local_norm_inf = MAX(temp_inf,local_norm_inf); + + } + double fmaxreplica; - MPI_Allreduce(&fnorm2,&fmaxreplica,1,MPI_DOUBLE,MPI_MAX,roots); + //MPI_Allreduce(&fnorm2,&fmaxreplica,1,MPI_DOUBLE,MPI_MAX,roots); + MPI_Allreduce(&tnorm2,&fmaxreplica,1,MPI_DOUBLE,MPI_MAX,roots); - // no minimize->fnorm_inf for spins //double fnorminf = update->minimize->fnorm_inf(); //double fmaxatom; //MPI_Allreduce(&fnorminf,&fmaxatom,1,MPI_DOUBLE,MPI_MAX,roots); double fnorminf = 0.0; - double fmaxatom = 0.0; + MPI_Allreduce(&local_norm_inf,&fnorminf,1,MPI_DOUBLE,MPI_MAX,world); + double fmaxatom; + MPI_Allreduce(&fnorminf,&fmaxatom,1,MPI_DOUBLE,MPI_MAX,roots); if (verbose) { freplica = new double[nreplica]; - MPI_Allgather(&fnorm2,1,MPI_DOUBLE,&freplica[0],1,MPI_DOUBLE,roots); + //MPI_Allgather(&fnorm2,1,MPI_DOUBLE,&freplica[0],1,MPI_DOUBLE,roots); + MPI_Allgather(&tnorm2,1,MPI_DOUBLE,&freplica[0],1,MPI_DOUBLE,roots); fmaxatomInRepl = new double[nreplica]; MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots); } diff --git a/src/REPLICA/neb_spin.h b/src/REPLICA/neb_spin.h index 6541658fd7..f6d742c46c 100644 --- a/src/REPLICA/neb_spin.h +++ b/src/REPLICA/neb_spin.h @@ -45,7 +45,8 @@ class NEB_spin : protected Pointers { FILE *fp; int compressed; double etol; // energy tolerance convergence criterion - double ftol; // force tolerance convergence criterion + //double ftol; // force tolerance convergence criterion + double ttol; // torque tolerance convergence criterion int n1steps, n2steps; // number of steps in stage 1 and 2 int nevery; // output interval char *infile; // name of file containing final state @@ -57,9 +58,6 @@ class NEB_spin : protected Pointers { double *freplica; // force on an image double *fmaxatomInRepl; // force on an image - //double geodesic_distance2(double *, double *); - //double evaluate_dt(); - //void advance_spins(double); void readfile(char *, int); void initial_rotation(double *, double *, double); void open(char *); From 033a5c27210d5bfd443a9e5c42fbfdb4e0c4f61b Mon Sep 17 00:00:00 2001 From: julient31 Date: Thu, 14 Mar 2019 11:07:24 -0600 Subject: [PATCH 11/35] Commit JT 031419 - cleaned fix_neb_spin - first working version --- examples/SPIN/gneb/in.gneb.iron | 35 +++- src/REPLICA/fix_neb_spin.cpp | 334 ++++++++------------------------ src/REPLICA/neb_spin.cpp | 6 - src/REPLICA/neb_spin.h | 1 - 4 files changed, 110 insertions(+), 266 deletions(-) diff --git a/examples/SPIN/gneb/in.gneb.iron b/examples/SPIN/gneb/in.gneb.iron index 80ab698c16..7aab0c04c3 100644 --- a/examples/SPIN/gneb/in.gneb.iron +++ b/examples/SPIN/gneb/in.gneb.iron @@ -3,7 +3,6 @@ units metal dimension 3 boundary p p f - atom_style spin # necessary for the serial algorithm (sametag) @@ -14,7 +13,7 @@ region box block 0.0 4.0 0.0 4.0 0.0 1.0 #create_box 1 box #create_atoms 1 box -read_data ../examples/SPIN/gneb_bfo/initial.iron_spin +read_data initial.iron_spin # setting mass, mag. moments, and interactions for bcc iron @@ -27,16 +26,36 @@ pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 neighbor 0.1 bin neigh_modify every 10 check yes delay 20 -fix 1 all precession/spin zeeman 0.001 0.0 0.0 1.0 anisotropy 0.01 1.0 0.0 0.0 -fix 2 all langevin/spin 0.1 0.0 21 -fix 3 all neb/spin 1.0 +fix 1 all precession/spin zeeman 0.1 0.0 0.0 1.0 anisotropy 0.0001 1.0 0.0 0.0 +fix_modify 1 energy yes +fix 2 all langevin/spin 0.0 0.0 21 +fix 3 all neb/spin 1.0 #fix 4 all nve/spin lattice no -#parallel ideal timestep 0.0001 thermo 100 +compute out_mag all spin +compute out_pe all pe +compute out_ke all ke +compute out_temp all temp + +variable magx equal c_out_mag[1] +variable magy equal c_out_mag[2] +variable magz equal c_out_mag[3] +variable magnorm equal c_out_mag[4] +variable emag equal c_out_mag[5] + +thermo 100 +thermo_style custom step time v_magx v_magz v_magnorm etotal +thermo_modify format float %20.15g + +compute outsp all property/atom spx spy spz sp fmx fmy fmz +variable u universe 1 2 3 4 +#dump 1 all custom 100 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] +dump 1 all custom 200 dump.$u type x y z c_outsp[1] c_outsp[2] c_outsp[3] min_style spinmin -neb/spin 0.0 0.1 100 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin -#neb/spin 0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin +min_modify alpha_damp 1.0 discret_factor 10.0 +neb/spin 1.0e-12 1.0e-12 50000 50000 10 final final.iron_spin +#neb/spin 1.0e-6 1.0e-6 1000 10 10 final final.iron_spin diff --git a/src/REPLICA/fix_neb_spin.cpp b/src/REPLICA/fix_neb_spin.cpp index 015ff1a313..95d5e19f25 100644 --- a/src/REPLICA/fix_neb_spin.cpp +++ b/src/REPLICA/fix_neb_spin.cpp @@ -15,7 +15,6 @@ #include #include #include -//#include "fix_neb.h" #include "fix_neb_spin.h" #include "universe.h" #include "update.h" @@ -41,18 +40,13 @@ enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; /* ---------------------------------------------------------------------- */ FixNEB_spin::FixNEB_spin(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), - id_pe(NULL), pe(NULL), nlenall(NULL), xprev(NULL), xnext(NULL), - fnext(NULL), - spprev(NULL), spnext(NULL), fmnext(NULL), - springF(NULL), tangent(NULL), - xsend(NULL), xrecv(NULL), fsend(NULL), frecv(NULL), - spsend(NULL), sprecv(NULL), fmsend(NULL), fmrecv(NULL), - tagsend(NULL), tagrecv(NULL), - xsendall(NULL), xrecvall(NULL), fsendall(NULL), frecvall(NULL), - spsendall(NULL), sprecvall(NULL), fmsendall(NULL), fmrecvall(NULL), - tagsendall(NULL), tagrecvall(NULL), counts(NULL), - displacements(NULL) + Fix(lmp, narg, arg), id_pe(NULL), pe(NULL), nlenall(NULL), xprev(NULL), + xnext(NULL), fnext(NULL), spprev(NULL), spnext(NULL), fmnext(NULL), springF(NULL), + tangent(NULL), xsend(NULL), xrecv(NULL), fsend(NULL), frecv(NULL), spsend(NULL), + sprecv(NULL), fmsend(NULL), fmrecv(NULL), tagsend(NULL), tagrecv(NULL), + xsendall(NULL), xrecvall(NULL), fsendall(NULL), frecvall(NULL), spsendall(NULL), + sprecvall(NULL), fmsendall(NULL), fmrecvall(NULL), tagsendall(NULL), tagrecvall(NULL), + counts(NULL), displacements(NULL) { if (narg < 4) error->all(FLERR,"Illegal fix neb_spin command"); @@ -145,11 +139,12 @@ FixNEB_spin::~FixNEB_spin() modify->delete_compute(id_pe); delete [] id_pe; + // memory destroy of all spin and lattice arrays + memory->destroy(xprev); memory->destroy(xnext); memory->destroy(tangent); memory->destroy(fnext); - // spin quantities memory->destroy(spprev); memory->destroy(spnext); memory->destroy(fmnext); @@ -158,7 +153,6 @@ FixNEB_spin::~FixNEB_spin() memory->destroy(xrecv); memory->destroy(fsend); memory->destroy(frecv); - // spin quantities memory->destroy(spsend); memory->destroy(sprecv); memory->destroy(fmsend); @@ -170,7 +164,6 @@ FixNEB_spin::~FixNEB_spin() memory->destroy(xrecvall); memory->destroy(fsendall); memory->destroy(frecvall); - // spin quantities memory->destroy(spsendall); memory->destroy(sprecvall); memory->destroy(fmsendall); @@ -237,7 +230,6 @@ void FixNEB_spin::init() memory->create(frecvall,ntotal,3,"neb:frecvall"); memory->create(tagsendall,ntotal,"neb:tagsendall"); memory->create(tagrecvall,ntotal,"neb:tagrecvall"); - // spin quantities memory->create(spsendall,ntotal,3,"neb:xsendall"); memory->create(sprecvall,ntotal,3,"neb:xrecvall"); memory->create(fmsendall,ntotal,3,"neb:fsendall"); @@ -263,14 +255,10 @@ void FixNEB_spin::min_setup(int vflag) void FixNEB_spin::min_post_force(int /*vflag*/) { double vprev,vnext; - //double delxp,delyp,delzp,delxn,delyn,delzn; - // spin quantities double delspxp,delspyp,delspzp; double delspxn,delspyn,delspzn; double templen; double vIni=0.0; - - // local spin values for geo. dist. calc. double spi[3],spj[3]; vprev = vnext = veng = pe->compute_scalar(); @@ -290,36 +278,17 @@ void FixNEB_spin::min_post_force(int /*vflag*/) MPI_Bcast(&vnext,1,MPI_DOUBLE,0,world); } - //printf("test veng: %g / %g / %g \n",veng,vprev,vnext); - //error->universe_all(FLERR,"End test"); - if (FreeEndFinal && ireplica == nreplica-1 && (update->ntimestep == 0)) - EFinalIni = veng; + error->all(FLERR,"NEB_spin Free End option not yet active"); if (ireplica == 0) vIni=veng; - if (FreeEndFinalWithRespToEIni) { - if (cmode == SINGLE_PROC_DIRECT || cmode == SINGLE_PROC_MAP) { - int procFirst; - procFirst=universe->root_proc[0]; - MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld); - } else { - if (me == 0) - MPI_Bcast(&vIni,1,MPI_DOUBLE,0,rootworld); + if (FreeEndFinalWithRespToEIni) + error->all(FLERR,"NEB_spin Free End option not yet active"); - MPI_Bcast(&vIni,1,MPI_DOUBLE,0,world); - } - } + if (FreeEndIni && ireplica == 0 && (update->ntimestep == 0)) + error->all(FLERR,"NEB_spin Free End option not yet active"); - if (FreeEndIni && ireplica == 0 && (update->ntimestep == 0)) EIniIni = veng; - /* if (FreeEndIni && ireplica == 0) { - // if (me == 0 ) - if (update->ntimestep == 0) { - EIniIni = veng; - // if (cmode == MULTI_PROC) - // MPI_Bcast(&EIniIni,1,MPI_DOUBLE,0,world); - } - }*/ // communicate atoms to/from adjacent replicas to fill xprev,xnext @@ -329,15 +298,13 @@ void FixNEB_spin::min_post_force(int /*vflag*/) pe->addstep(update->ntimestep+1); + int nlocal = atom->nlocal; + int *mask = atom->mask; double **x = atom->x; double **sp = atom->sp; - int *mask = atom->mask; double dot = 0.0; double prefactor = 0.0; - - //double **f = atom->f; double **fm = atom->fm; - int nlocal = atom->nlocal; //calculating separation between images @@ -351,10 +318,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) // computation of the tangent vector - if (ireplica == nreplica-1) { - - // final replica - + if (ireplica == nreplica-1) { // final replica for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -371,64 +335,26 @@ void FixNEB_spin::min_post_force(int /*vflag*/) delspyp -= delpdots*sp[i][1]; delspzp -= delpdots*sp[i][2]; - // adjust distance if pbc - //domain->minimum_image(delspxp,delspyp,delspzp); - // calc. geodesic length - spi[0]=sp[i][0]; - spi[1]=sp[i][1]; - spi[2]=sp[i][2]; - spj[0]=spprev[i][0]; - spj[1]=spprev[i][1]; - spj[2]=spprev[i][2]; - templen = geodesic_distance(spi, spj); + spi[0] = sp[i][0]; + spi[1] = sp[i][1]; + spi[2] = sp[i][2]; + spj[0] = spprev[i][0]; + spj[1] = spprev[i][1]; + spj[2] = spprev[i][2]; + templen = geodesic_distance(spi,spj); plen += templen*templen; dottangrad += delspxp*fm[i][0]+ delspyp*fm[i][1]+delspzp*fm[i][2]; gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; - - //plen += delxp*delxp + delyp*delyp + delzp*delzp; - //dottangrad += delxp* f[i][0]+ delyp*f[i][1]+delzp*f[i][2]; - //gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - // final replica, no need for the tangent vector - // (unless FreeEnd option) - if (FreeEndFinal||FreeEndFinalWithRespToEIni) { - error->all(FLERR,"Free End option not yet active"); - //tangent[i][0]=delspxp; - //tangent[i][1]=delspyp; - //tangent[i][2]=delspzp; - //// if needed, tlen has to be modified - //tlen += tangent[i][0]*tangent[i][0] + - // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; - //dot += fm[i][0]*tangent[i][0] + fm[i][1]*tangent[i][1] + - // fm[i][2]*tangent[i][2]; - } - - - //delxp = x[i][0] - xprev[i][0]; - //delyp = x[i][1] - xprev[i][1]; - //delzp = x[i][2] - xprev[i][2]; - //domain->minimum_image(delxp,delyp,delzp); + // no free end option for now - //plen += delxp*delxp + delyp*delyp + delzp*delzp; - //dottangrad += delxp* f[i][0]+ delyp*f[i][1]+delzp*f[i][2]; - //gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - //if (FreeEndFinal||FreeEndFinalWithRespToEIni) { - // tangent[i][0]=delxp; - // tangent[i][1]=delyp; - // tangent[i][2]=delzp; - // tlen += tangent[i][0]*tangent[i][0] + - // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; - // dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + - // f[i][2]*tangent[i][2]; - //} + if (FreeEndFinal||FreeEndFinalWithRespToEIni) + error->all(FLERR,"Free End option not yet active"); + } - - } else if (ireplica == 0) { - - // initial replica - + } else if (ireplica == 0) { // initial replica for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -444,9 +370,6 @@ void FixNEB_spin::min_post_force(int /*vflag*/) delspxn -= delndots*sp[i][0]; delspyn -= delndots*sp[i][1]; delspzn -= delndots*sp[i][2]; - - // adjust del. if pbc - //domain->minimum_image(delspxn,delspyn,delspzn); // calc. geodesic length @@ -456,70 +379,40 @@ void FixNEB_spin::min_post_force(int /*vflag*/) spj[0]=spnext[i][0]; spj[1]=spnext[i][1]; spj[2]=spnext[i][2]; - templen = geodesic_distance(spi, spj); + templen = geodesic_distance(spi,spj); nlen += templen*templen; dottangrad += delspxn*fm[i][0] + delspyn*fm[i][1] + delspzn*fm[i][2]; gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; - if (FreeEndIni) { + + // no free end option for now + + if (FreeEndIni) error->all(FLERR,"Free End option not yet active"); - //tangent[i][0]=delxn; - //tangent[i][1]=delyn; - //tangent[i][2]=delzn; - //// if needed, tlen has to be modified - //tlen += tangent[i][0]*tangent[i][0] + - // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; - //dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + - // f[i][2]*tangent[i][2]; - } - //delxn = xnext[i][0] - x[i][0]; - //delyn = xnext[i][1] - x[i][1]; - //delzn = xnext[i][2] - x[i][2]; - //domain->minimum_image(delxn,delyn,delzn); - //nlen += delxn*delxn + delyn*delyn + delzn*delzn; - //gradnextlen += fnext[i][0]*fnext[i][0] - // + fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; - //dotgrad += f[i][0]*fnext[i][0] - // + f[i][1]*fnext[i][1] + f[i][2]*fnext[i][2]; - //dottangrad += delxn*f[i][0]+ delyn*f[i][1] + delzn*f[i][2]; - //gradlen += f[i][0]*f[i][0] + f[i][1]*f[i][1] + f[i][2]*f[i][2]; - //if (FreeEndIni) { - // tangent[i][0]=delxn; - // tangent[i][1]=delyn; - // tangent[i][2]=delzn; - // tlen += tangent[i][0]*tangent[i][0] + - // tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; - // dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + - // f[i][2]*tangent[i][2]; - //} } - - } else { - - // not the first or last replica + } else { // intermediate replica double vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); double vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); - for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { // calc. delp vector + delspxp = sp[i][0] - spprev[i][0]; delspyp = sp[i][1] - spprev[i][1]; delspzp = sp[i][2] - spprev[i][2]; // project delp vector on tangent space + delndots = delspxp*sp[i][0]+delspyp*sp[i][1]+delspzp*sp[i][2]; delspxp -= delpdots*sp[i][0]; delspyp -= delpdots*sp[i][1]; delspzp -= delpdots*sp[i][2]; - - // adjust distance if pbc - //domain->minimum_image(delspxp,delspyp,delspzp); - // calc. geodesic length + // calc. prev. geodesic length + spi[0]=sp[i][0]; spi[1]=sp[i][1]; spi[2]=sp[i][2]; @@ -530,18 +423,19 @@ void FixNEB_spin::min_post_force(int /*vflag*/) plen += templen*templen; // calc. deln vector - delspxn = spnext[i][0] - sp[i][0]; + + delspxn = spnext[i][0] - sp[i][0]; delspyn = spnext[i][1] - sp[i][1]; delspzn = spnext[i][2] - sp[i][2]; // project deln vector on tangent space + delndots = delspxn*sp[i][0]+delspyn*sp[i][1]+delspzn*sp[i][2]; delspxn -= delndots*sp[i][0]; delspyn -= delndots*sp[i][1]; delspzn -= delndots*sp[i][2]; - - // adjust distance if pbc - //domain->minimum_image(delspxn,delspyn,delspzn); + + // evaluate best path tangent if (vnext > veng && veng > vprev) { tangent[i][0] = delspxn; @@ -567,7 +461,8 @@ void FixNEB_spin::min_post_force(int /*vflag*/) } } - // calc. geodesic length + // calc. next geodesic length + spi[0]=sp[i][0]; spi[1]=sp[i][1]; spi[2]=sp[i][2]; @@ -576,27 +471,26 @@ void FixNEB_spin::min_post_force(int /*vflag*/) spj[2]=spnext[i][2]; templen = geodesic_distance(spi, spj); nlen += templen*templen; - //nlen += delxn*delxn + delyn*delyn + delzn*delzn; - tlen += tangent[i][0]*tangent[i][0] + - tangent[i][1]*tangent[i][1] + tangent[i][2]*tangent[i][2]; + + tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + + tangent[i][2]*tangent[i][2]; gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; dotpath += delspxp*delspxn + delspyp*delspyn + delspzp*delspzn; - dottangrad += tangent[i][0]*fm[i][0] + - tangent[i][1]*fm[i][1] + tangent[i][2]*fm[i][2]; - gradnextlen += fnext[i][0]*fnext[i][0] + - fnext[i][1]*fnext[i][1] +fnext[i][2] * fnext[i][2]; + dottangrad += tangent[i][0]*fm[i][0] + tangent[i][1]*fm[i][1] + + tangent[i][2]*fm[i][2]; + gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] + + fnext[i][2]*fnext[i][2]; dotgrad += fm[i][0]*fnext[i][0] + fm[i][1]*fnext[i][1] + fm[i][2]*fnext[i][2]; // no Perpendicular nudging force option active yet - // see fix_neb for example - if (kspringPerp != 0.0) + + if (kspringPerp != 0.0) error->all(FLERR,"NEB_spin Perpendicular nudging force not yet active"); } } - // MPI reduce if more than one proc for world double bufin[BUFSIZE], bufout[BUFSIZE]; @@ -618,8 +512,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) dottangrad = bufout[6]; dotgrad = bufout[7]; - - // project tangent vector on tangent space + // project tangent vector on tangent space and normalize it double buftan[3]; double tandots; @@ -633,20 +526,14 @@ void FixNEB_spin::min_post_force(int /*vflag*/) tangent[i][0] = buftan[0]; tangent[i][1] = buftan[1]; tangent[i][2] = buftan[2]; - } - - // normalize tangent vector - - if (tlen > 0.0) { - double tleninv = 1.0/tlen; - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { + if (tlen > 0.0) { + double tleninv = 1.0/tlen; tangent[i][0] *= tleninv; tangent[i][1] *= tleninv; tangent[i][2] *= tleninv; } - } + } // first or last replica has no change to forces, just return @@ -659,32 +546,21 @@ void FixNEB_spin::min_post_force(int /*vflag*/) if (ireplica < nreplica-1) dotgrad = dotgrad /(gradlen*gradnextlen); - // no Free End option active yet - // see fix_neb for example - if (FreeEndIni && ireplica == 0) { + // no Free End options active yet + + if (FreeEndIni && ireplica == 0) error->all(FLERR,"NEB_spin Free End option not yet active"); - } - - // no Free End option active yet - // see fix_neb for example - if (FreeEndFinal && ireplica == nreplica -1) { + if (FreeEndFinal && ireplica == nreplica -1) error->all(FLERR,"NEB_spin Free End option not yet active"); - } - - // no Free End option active yet - // see fix_neb for example - if (FreeEndFinalWithRespToEIni&&ireplica == nreplica -1) { + if (FreeEndFinalWithRespToEIni&&ireplica == nreplica -1) error->all(FLERR,"NEB_spin Free End option not yet active"); - } // no NEB_spin long range option - // see fix_neb for example - double lentot = 0; - double meanDist,idealPos,lenuntilIm,lenuntilClimber; - lenuntilClimber=0; - if (NEBLongRange) { + + if (NEBLongRange) error->all(FLERR,"NEB_spin long range option not yet active"); - } + + // exit calc. if first or last replica (no gneb force) if (ireplica == 0 || ireplica == nreplica-1) return ; @@ -692,47 +568,30 @@ void FixNEB_spin::min_post_force(int /*vflag*/) dotpath = dotpath/(plen*nlen); AngularContr = 0.5 *(1+cos(MY_PI * dotpath)); - double dotSpringTangent; - dotSpringTangent=0; - for (int i = 0; i < nlocal; i++) { + for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { dot += fm[i][0]*tangent[i][0] + fm[i][1]*tangent[i][1] + fm[i][2]*tangent[i][2]; - // springF defined for perp. spring option - // not defined here - //dotSpringTangent += springF[i][0]*tangent[i][0] + - springF[i][1]*tangent[i][1] + springF[i][2]*tangent[i][2];} - //dot += f[i][0]*tangent[i][0] + f[i][1]*tangent[i][1] + - // f[i][2]*tangent[i][2]; - //dotSpringTangent += springF[i][0]*tangent[i][0] + - // springF[i][1]*tangent[i][1] + springF[i][2]*tangent[i][2];} - } + } - // gather all dot and dotSpring for this replica (world) - double dotSpringTangentall; - MPI_Allreduce(&dotSpringTangent,&dotSpringTangentall,1, - MPI_DOUBLE,MPI_SUM,world); - dotSpringTangent=dotSpringTangentall; + // gather all dot for this replica + double dotall; MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); dot=dotall; + // calc. GNEB force prefactor - // implement climbing image here - - if (ireplica == rclimber) { - error->all(FLERR,"NEB_spin climber option not yet active"); - //prefactor = -2.0*dot; - } else { - if (NEBLongRange) { + if (ireplica == rclimber) prefactor = -2.0*dot; // for climbing replica + else { + if (NEBLongRange) { // for intermediate replica error->all(FLERR,"Long Range NEB_spin climber option not yet active"); - //prefactor = -dot - kspring*(lenuntilIm-idealPos)/(2*meanDist); } else if (StandardNEB) { prefactor = -dot + kspring*(nlen-plen); } - if (FinalAndInterWithRespToEIni&& vengall(FLERR,"Incorrect calc. of geodesic_distance in Fix NEB/spin"); + + dist = atan2(normcross,dots); return dist; } @@ -818,7 +672,6 @@ void FixNEB_spin::inter_replica_comm() double **x = atom->x; double **f = atom->f; - // spin quantities double **sp = atom->sp; double **fm = atom->fm; tagint *tag = atom->tag; @@ -880,7 +733,6 @@ void FixNEB_spin::inter_replica_comm() fsend[m][0] = f[i][0]; fsend[m][1] = f[i][1]; fsend[m][2] = f[i][2]; - // spin quantities spsend[m][0] = sp[i][0]; spsend[m][1] = sp[i][1]; spsend[m][2] = sp[i][2]; @@ -892,13 +744,11 @@ void FixNEB_spin::inter_replica_comm() if (ireplica > 0) { MPI_Irecv(xrecv[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld,&requests[0]); - // spin quantities MPI_Irecv(sprecv[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld,&requests[0]); MPI_Irecv(tagrecv,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld,&requests[1]); } if (ireplica < nreplica-1) { MPI_Send(xsend[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld); - // spin quantities MPI_Send(spsend[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld); MPI_Send(tagsend,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld); } @@ -910,7 +760,6 @@ void FixNEB_spin::inter_replica_comm() xprev[m][0] = xrecv[i][0]; xprev[m][1] = xrecv[i][1]; xprev[m][2] = xrecv[i][2]; - // spin quantities spprev[m][0] = sprecv[i][0]; spprev[m][1] = sprecv[i][1]; spprev[m][2] = sprecv[i][2]; @@ -919,7 +768,6 @@ void FixNEB_spin::inter_replica_comm() if (ireplica < nreplica-1) { MPI_Irecv(xrecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); MPI_Irecv(frecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); - // spin quantities MPI_Irecv(sprecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); MPI_Irecv(fmrecv[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); MPI_Irecv(tagrecv,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld,&requests[1]); @@ -927,7 +775,6 @@ void FixNEB_spin::inter_replica_comm() if (ireplica > 0) { MPI_Send(xsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); MPI_Send(fsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); - // spin quantities MPI_Send(spsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); MPI_Send(fmsend[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); MPI_Send(tagsend,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld); @@ -943,7 +790,6 @@ void FixNEB_spin::inter_replica_comm() fnext[m][0] = frecv[i][0]; fnext[m][1] = frecv[i][1]; fnext[m][2] = frecv[i][2]; - // spin quantities spnext[m][0] = sprecv[i][0]; spnext[m][1] = sprecv[i][1]; spnext[m][2] = sprecv[i][2]; @@ -972,7 +818,6 @@ void FixNEB_spin::inter_replica_comm() fsend[m][0] = f[i][0]; fsend[m][1] = f[i][1]; fsend[m][2] = f[i][2]; - // spin quantities spsend[m][0] = sp[i][0]; spsend[m][1] = sp[i][1]; spsend[m][2] = sp[i][2]; @@ -1002,7 +847,6 @@ void FixNEB_spin::inter_replica_comm() MPI_Gatherv(NULL,3*m,MPI_DOUBLE, fsendall[0],counts,displacements,MPI_DOUBLE,0,world); } - // spin quantities if (spsend) { MPI_Gatherv(spsend[0],3*m,MPI_DOUBLE, spsendall[0],counts,displacements,MPI_DOUBLE,0,world); @@ -1017,14 +861,12 @@ void FixNEB_spin::inter_replica_comm() if (ireplica > 0 && me == 0) { MPI_Irecv(xrecvall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld,&requests[0]); - // spin quantities MPI_Irecv(sprecvall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld,&requests[0]); MPI_Irecv(tagrecvall,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld, &requests[1]); } if (ireplica < nreplica-1 && me == 0) { MPI_Send(xsendall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld); - // spin quantities MPI_Send(spsendall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld); MPI_Send(tagsendall,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld); } @@ -1034,7 +876,6 @@ void FixNEB_spin::inter_replica_comm() MPI_Bcast(tagrecvall,nebatoms,MPI_INT,0,world); MPI_Bcast(xrecvall[0],3*nebatoms,MPI_DOUBLE,0,world); - // spin quantities MPI_Bcast(sprecvall[0],3*nebatoms,MPI_DOUBLE,0,world); for (i = 0; i < nebatoms; i++) { @@ -1043,7 +884,6 @@ void FixNEB_spin::inter_replica_comm() xprev[m][0] = xrecvall[i][0]; xprev[m][1] = xrecvall[i][1]; xprev[m][2] = xrecvall[i][2]; - // spin quantities spprev[m][0] = sprecvall[i][0]; spprev[m][1] = sprecvall[i][1]; spprev[m][2] = sprecvall[i][2]; @@ -1053,7 +893,6 @@ void FixNEB_spin::inter_replica_comm() if (ireplica < nreplica-1 && me == 0) { MPI_Irecv(xrecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); MPI_Irecv(frecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); - // spin quantities MPI_Irecv(sprecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); MPI_Irecv(sprecvall[0],3*nebatoms,MPI_DOUBLE,procnext,0,uworld,&requests[0]); MPI_Irecv(tagrecvall,nebatoms,MPI_LMP_TAGINT,procnext,0,uworld, @@ -1062,7 +901,6 @@ void FixNEB_spin::inter_replica_comm() if (ireplica > 0 && me == 0) { MPI_Send(xsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); MPI_Send(fsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); - // spin quantities MPI_Send(spsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); MPI_Send(fmsendall[0],3*nebatoms,MPI_DOUBLE,procprev,0,uworld); MPI_Send(tagsendall,nebatoms,MPI_LMP_TAGINT,procprev,0,uworld); @@ -1074,7 +912,6 @@ void FixNEB_spin::inter_replica_comm() MPI_Bcast(tagrecvall,nebatoms,MPI_INT,0,world); MPI_Bcast(xrecvall[0],3*nebatoms,MPI_DOUBLE,0,world); MPI_Bcast(frecvall[0],3*nebatoms,MPI_DOUBLE,0,world); - // spin quantities MPI_Bcast(sprecvall[0],3*nebatoms,MPI_DOUBLE,0,world); MPI_Bcast(fmrecvall[0],3*nebatoms,MPI_DOUBLE,0,world); @@ -1087,7 +924,6 @@ void FixNEB_spin::inter_replica_comm() fnext[m][0] = frecvall[i][0]; fnext[m][1] = frecvall[i][1]; fnext[m][2] = frecvall[i][2]; - // spin quantities spnext[m][0] = sprecvall[i][0]; spnext[m][1] = sprecvall[i][1]; spnext[m][2] = sprecvall[i][2]; @@ -1112,7 +948,6 @@ void FixNEB_spin::reallocate() memory->destroy(tangent); memory->destroy(fnext); memory->destroy(springF); - // spin quantities memory->destroy(spprev); memory->destroy(spnext); memory->destroy(fmnext); @@ -1122,7 +957,6 @@ void FixNEB_spin::reallocate() memory->create(tangent,maxlocal,3,"neb:tangent"); memory->create(fnext,maxlocal,3,"neb:fnext"); memory->create(springF,maxlocal,3,"neb:springF"); - // spin quantities memory->create(spprev,maxlocal,3,"neb:xprev"); memory->create(spnext,maxlocal,3,"neb:xnext"); memory->create(fmnext,maxlocal,3,"neb:fnext"); @@ -1132,7 +966,6 @@ void FixNEB_spin::reallocate() memory->destroy(fsend); memory->destroy(xrecv); memory->destroy(frecv); - // spin quantities memory->destroy(spsend); memory->destroy(fmsend); memory->destroy(sprecv); @@ -1143,7 +976,6 @@ void FixNEB_spin::reallocate() memory->create(fsend,maxlocal,3,"neb:fsend"); memory->create(xrecv,maxlocal,3,"neb:xrecv"); memory->create(frecv,maxlocal,3,"neb:frecv"); - // spin quantities memory->create(spsend,maxlocal,3,"neb:xsend"); memory->create(fmsend,maxlocal,3,"neb:fsend"); memory->create(sprecv,maxlocal,3,"neb:xrecv"); diff --git a/src/REPLICA/neb_spin.cpp b/src/REPLICA/neb_spin.cpp index e82b08e354..680d4a373b 100644 --- a/src/REPLICA/neb_spin.cpp +++ b/src/REPLICA/neb_spin.cpp @@ -20,12 +20,9 @@ #include #include #include -//#include "neb.h" -// test spin #include "neb_spin.h" #include "compute.h" #include "force.h" - #include "universe.h" #include "atom.h" #include "update.h" @@ -34,10 +31,7 @@ #include "min.h" #include "modify.h" #include "fix.h" -//#include "fix_neb.h" -// test spin #include "fix_neb_spin.h" - #include "output.h" #include "thermo.h" #include "finish.h" diff --git a/src/REPLICA/neb_spin.h b/src/REPLICA/neb_spin.h index f6d742c46c..b579793fe6 100644 --- a/src/REPLICA/neb_spin.h +++ b/src/REPLICA/neb_spin.h @@ -45,7 +45,6 @@ class NEB_spin : protected Pointers { FILE *fp; int compressed; double etol; // energy tolerance convergence criterion - //double ftol; // force tolerance convergence criterion double ttol; // torque tolerance convergence criterion int n1steps, n2steps; // number of steps in stage 1 and 2 int nevery; // output interval From d66b07dabeb0d4804826b8e396e298b95eba1ddb Mon Sep 17 00:00:00 2001 From: julient31 Date: Thu, 14 Mar 2019 15:39:45 -0600 Subject: [PATCH 12/35] Commit2 JT 031419 - commit before solo tests --- src/REPLICA/neb_spin.cpp | 42 ++++++---------------------------------- src/REPLICA/neb_spin.h | 1 - 2 files changed, 6 insertions(+), 37 deletions(-) diff --git a/src/REPLICA/neb_spin.cpp b/src/REPLICA/neb_spin.cpp index 680d4a373b..6681bf56ad 100644 --- a/src/REPLICA/neb_spin.cpp +++ b/src/REPLICA/neb_spin.cpp @@ -46,7 +46,6 @@ using namespace MathConst; #define MAXLINE 256 #define CHUNK 1024 -//#define ATTRIBUTE_PERLINE 4 // 8 attributes: tag, spin norm, position (3), spin direction (3) #define ATTRIBUTE_PERLINE 8 @@ -62,11 +61,9 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, int n2steps_in, int nevery_in, double *buf_init, double *buf_final) : Pointers(lmp) { - //double delx,dely,delz; double delspx,delspy,delspz; etol = etol_in; - //ftol = ftol_in; ttol = ftol_in; n1steps = n1steps_in; n2steps = n2steps_in; @@ -98,16 +95,14 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, spfinal[1] = buf_final[ii+1]; spfinal[2] = buf_final[ii+2]; + // circular initialization + // a better procedure may be developed + initial_rotation(spinit,spfinal,fraction); sp[i][0] = spfinal[0]; sp[i][1] = spfinal[1]; sp[i][2] = spfinal[2]; - - // adjust distance if pbc - //domain->minimum_image(delx,dely,delz); - - // need to define a better procedure for circular initialization ii += 3; } @@ -134,7 +129,6 @@ void NEB_spin::command(int narg, char **arg) if (narg < 6) error->universe_all(FLERR,"Illegal NEB_spin command"); etol = force->numeric(FLERR,arg[0]); - //ftol = force->numeric(FLERR,arg[1]); ttol = force->numeric(FLERR,arg[1]); n1steps = force->inumeric(FLERR,arg[2]); n2steps = force->inumeric(FLERR,arg[3]); @@ -143,7 +137,6 @@ void NEB_spin::command(int narg, char **arg) // error checks if (etol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); - //if (ftol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); if (ttol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); if (nevery <= 0) error->universe_all(FLERR,"Illegal NEB_spin command"); if (n1steps % nevery || n2steps % nevery) @@ -172,7 +165,6 @@ void NEB_spin::command(int narg, char **arg) // process file-style setting to setup initial configs for all replicas - // check what options are available if (strcmp(arg[5],"final") == 0) { if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEB_spin command"); infile = arg[6]; @@ -205,6 +197,7 @@ void NEB_spin::run() MPI_Comm_split(uworld,color,0,&roots); // search for neb_spin fix, allocate it + int ineb; for (ineb = 0; ineb < modify->nfix; ineb++) if (strcmp(modify->fix[ineb]->style,"neb/spin") == 0) break; @@ -220,7 +213,6 @@ void NEB_spin::run() update->whichflag = 2; update->etol = etol; - //update->ftol = ftol; update->ftol = ttol; // update->ftol is a torque tolerance update->multireplica = 1; @@ -258,11 +250,6 @@ void NEB_spin::run() "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " "... ReplicaTorqueN MaxAtomTorqueN\n"); - //fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " - // "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " - // "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " - // "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " - // "... ReplicaForceN MaxAtomForceN\n"); } else { fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " @@ -424,7 +411,6 @@ void NEB_spin::readfile(char *file, int flag) char *eof,*start,*next,*buf; char line[MAXLINE]; double xx,yy,zz,delx,dely,delz; - // spin quantities double musp,spx,spy,spz; if (me_universe == 0 && screen) @@ -469,7 +455,6 @@ void NEB_spin::readfile(char *file, int flag) double fraction = ireplica/(nreplica-1.0); double **x = atom->x; - // spin quantities double **sp = atom->sp; double spinit[3],spfinal[3]; int nlocal = atom->nlocal; @@ -539,9 +524,6 @@ void NEB_spin::readfile(char *file, int flag) spfinal[0] = spx; spfinal[1] = spy; spfinal[2] = spz; - - // to be used it atomic displacements with pbc - //domain->minimum_image(delx,dely,delz); // interpolate intermediate spin states @@ -609,11 +591,10 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) { // implementing initial rotation using atan2 - // this is not a sufficient routine, - // we need more accurate verifications - + // this may not be a sufficient routine, need more accurate verifications // initial, final and inter ang. values + double itheta,iphi,ftheta,fphi,ktheta,kphi; double spix,spiy,spiz,spfx,spfy,spfz; double spkx,spky,spkz,iknorm; @@ -648,7 +629,6 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) sploc[0] = spkx; sploc[1] = spky; sploc[2] = spkz; - } /* ---------------------------------------------------------------------- @@ -692,9 +672,6 @@ void NEB_spin::open(char *file) void NEB_spin::print_status() { - - //double fnorm2 = sqrt(update->minimize->fnorm_sqr()); - int nlocal = atom->nlocal; double tx,ty,tz; double tnorm2,local_norm_inf,temp_inf; @@ -709,20 +686,14 @@ void NEB_spin::print_status() ty = (fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]); tz = (fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]); tnorm2 += tx*tx + ty*ty + tz*tz; - temp_inf = MAX(fabs(tx),fabs(ty)); temp_inf = MAX(fabs(tz),temp_inf); local_norm_inf = MAX(temp_inf,local_norm_inf); - } double fmaxreplica; - //MPI_Allreduce(&fnorm2,&fmaxreplica,1,MPI_DOUBLE,MPI_MAX,roots); MPI_Allreduce(&tnorm2,&fmaxreplica,1,MPI_DOUBLE,MPI_MAX,roots); - //double fnorminf = update->minimize->fnorm_inf(); - //double fmaxatom; - //MPI_Allreduce(&fnorminf,&fmaxatom,1,MPI_DOUBLE,MPI_MAX,roots); double fnorminf = 0.0; MPI_Allreduce(&local_norm_inf,&fnorminf,1,MPI_DOUBLE,MPI_MAX,world); double fmaxatom; @@ -730,7 +701,6 @@ void NEB_spin::print_status() if (verbose) { freplica = new double[nreplica]; - //MPI_Allgather(&fnorm2,1,MPI_DOUBLE,&freplica[0],1,MPI_DOUBLE,roots); MPI_Allgather(&tnorm2,1,MPI_DOUBLE,&freplica[0],1,MPI_DOUBLE,roots); fmaxatomInRepl = new double[nreplica]; MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots); diff --git a/src/REPLICA/neb_spin.h b/src/REPLICA/neb_spin.h index b579793fe6..5988c04a3a 100644 --- a/src/REPLICA/neb_spin.h +++ b/src/REPLICA/neb_spin.h @@ -14,7 +14,6 @@ #ifdef COMMAND_CLASS CommandStyle(neb/spin,NEB_spin) -//CommandStyle(neb,NEB_spin) #else From 194e11c3297d6238b2ae164fa09dfab1f3eab4ea Mon Sep 17 00:00:00 2001 From: julient31 Date: Tue, 19 Mar 2019 08:12:49 -0600 Subject: [PATCH 13/35] Commit JT 031919 - bug with sk sim - commit/push before pull up-to-date SPIN from master --- src/REPLICA/fix_neb_spin.cpp | 6 ++++++ src/REPLICA/fix_neb_spin.h | 6 ------ src/REPLICA/neb_spin.cpp | 6 ++++++ src/SPIN/min_spinmin.cpp | 6 ++++++ src/SPIN/pair_spin_dmi.cpp | 5 +++-- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/REPLICA/fix_neb_spin.cpp b/src/REPLICA/fix_neb_spin.cpp index 95d5e19f25..610e6d2fe5 100644 --- a/src/REPLICA/fix_neb_spin.cpp +++ b/src/REPLICA/fix_neb_spin.cpp @@ -11,6 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +/* ------------------------------------------------------------------------ + Contributing authors: Julien Tranchida (SNL) + + Please cite the related publication: +------------------------------------------------------------------------- */ + #include #include #include diff --git a/src/REPLICA/fix_neb_spin.h b/src/REPLICA/fix_neb_spin.h index c70f35ae2d..9bbacc8bf0 100644 --- a/src/REPLICA/fix_neb_spin.h +++ b/src/REPLICA/fix_neb_spin.h @@ -13,7 +13,6 @@ #ifdef FIX_CLASS -//FixStyle(neb,FixNEB) FixStyle(neb/spin,FixNEB_spin) #else @@ -36,8 +35,6 @@ class FixNEB_spin : public Fix { void init(); void min_setup(int); void min_post_force(int); - //void advance_spins(double); - //double evaluate_dt(); private: int me,nprocs,nprocs_universe; @@ -60,13 +57,11 @@ class FixNEB_spin : public Fix { int maxlocal; // size of xprev,xnext,tangent arrays double *nlenall; double **xprev,**xnext,**fnext; - // spin quantities double **spprev,**spnext,**fmnext; double **springF; double **tangent; double **xsend,**xrecv; // coords to send/recv to/from other replica double **fsend,**frecv; // coords to send/recv to/from other replica - // spin quantities double **spsend,**sprecv; // sp to send/recv to/from other replica double **fmsend,**fmrecv; // fm to send/recv to/from other replica tagint *tagsend,*tagrecv; // ditto for atom IDs @@ -74,7 +69,6 @@ class FixNEB_spin : public Fix { // info gathered from all procs in my replica double **xsendall,**xrecvall; // coords to send/recv to/from other replica double **fsendall,**frecvall; // force to send/recv to/from other replica - // spin quantities double **spsendall,**sprecvall; // sp to send/recv to/from other replica double **fmsendall,**fmrecvall; // fm to send/recv to/from other replica tagint *tagsendall,*tagrecvall; // ditto for atom IDs diff --git a/src/REPLICA/neb_spin.cpp b/src/REPLICA/neb_spin.cpp index 6681bf56ad..38f5b530da 100644 --- a/src/REPLICA/neb_spin.cpp +++ b/src/REPLICA/neb_spin.cpp @@ -11,6 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +/* ------------------------------------------------------------------------ + Contributing authors: Julien Tranchida (SNL) + + Please cite the related publication: +------------------------------------------------------------------------- */ + // 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 diff --git a/src/SPIN/min_spinmin.cpp b/src/SPIN/min_spinmin.cpp index cdd0d45287..808a5359bc 100644 --- a/src/SPIN/min_spinmin.cpp +++ b/src/SPIN/min_spinmin.cpp @@ -11,6 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +/* ------------------------------------------------------------------------ + Contributing authors: Julien Tranchida (SNL) + + Please cite the related publication: +------------------------------------------------------------------------- */ + #include #include #include "min_spinmin.h" diff --git a/src/SPIN/pair_spin_dmi.cpp b/src/SPIN/pair_spin_dmi.cpp index 18682fdb9f..0862e5c618 100644 --- a/src/SPIN/pair_spin_dmi.cpp +++ b/src/SPIN/pair_spin_dmi.cpp @@ -173,8 +173,9 @@ void PairSpinDmi::init_style() if (strcmp(modify->fix[ifix]->style,"nve/spin") == 0) break; ifix++; } - if (ifix == modify->nfix) - error->all(FLERR,"pair/spin style requires nve/spin"); + // test remove if test + //if (ifix == modify->nfix) + // error->all(FLERR,"pair/spin style requires nve/spin"); // get the lattice_flag from nve/spin From 2cbf56846a28fe7ffc751b0fd270d17a80c73653 Mon Sep 17 00:00:00 2001 From: julient31 Date: Wed, 20 Mar 2019 10:41:36 -0600 Subject: [PATCH 14/35] Commit JT 032019 - moved gneb files from src/REPLICA to src/SPIN - changed name of min/spin - implemented read_param in min.cpp and min_spin.cpp - set sp_flag tests in min_spin.cpp and neb_spin.cpp --- doc/src/min_style.txt | 12 ++-- examples/SPIN/gneb/in.gneb.iron | 2 +- examples/SPIN/spinmin/in.spinmin.bfo | 2 +- examples/SPIN/spinmin/in.spinmin.iron | 2 +- src/SPIN/README | 5 +- src/{REPLICA => SPIN}/fix_neb_spin.cpp | 0 src/{REPLICA => SPIN}/fix_neb_spin.h | 0 src/SPIN/fix_precession_spin.cpp | 4 +- src/SPIN/{min_spinmin.cpp => min_spin.cpp} | 41 ++++++++--- src/SPIN/{min_spinmin.h => min_spin.h} | 16 +++-- src/{REPLICA => SPIN}/neb_spin.cpp | 79 ++++++++++++++++++++-- src/{REPLICA => SPIN}/neb_spin.h | 0 src/min.cpp | 14 ++-- src/min.h | 6 +- 14 files changed, 133 insertions(+), 50 deletions(-) rename src/{REPLICA => SPIN}/fix_neb_spin.cpp (100%) rename src/{REPLICA => SPIN}/fix_neb_spin.h (100%) rename src/SPIN/{min_spinmin.cpp => min_spin.cpp} (90%) rename src/SPIN/{min_spinmin.h => min_spin.h} (78%) rename src/{REPLICA => SPIN}/neb_spin.cpp (93%) rename src/{REPLICA => SPIN}/neb_spin.h (100%) diff --git a/doc/src/min_style.txt b/doc/src/min_style.txt index b1a9da997d..f8c05d5483 100644 --- a/doc/src/min_style.txt +++ b/doc/src/min_style.txt @@ -11,7 +11,7 @@ min_style command :h3 min_style style :pre -style = {cg} or {hftn} or {sd} or {quickmin} or {fire} or {spinmin} :ul +style = {cg} or {hftn} or {sd} or {quickmin} or {fire} or {spin} :ul [Examples:] @@ -62,18 +62,14 @@ the velocity non-parallel to the current force vector. The velocity of each atom is initialized to 0.0 by this style, at the beginning of a minimization. -Style {spinmin} is a damped spin dynamics with a variable +Style {spin} is a damped spin dynamics with a variable timestep as described in "(Tranchida)"_#Tranchida. -The value of the fictitious Gilbert damping and of the dividing -factor for the adaptive timestep can be modified by the -{alpha_damp} and {discret_factor} options respectively. -Those options can be defined using the "min_modify"_min_modify.html -command. +See the "min/spin"_min_spin.html doc page for more information. Either the {quickmin} and {fire} styles are useful in the context of nudged elastic band (NEB) calculations via the "neb"_neb.html command. -The {spinmin} style is useful in the context of geodesic nudged +The {spin} style is useful in the context of geodesic nudged elastic band (GNEB) calculations via the "neb/spin"_neb_spin.html command. diff --git a/examples/SPIN/gneb/in.gneb.iron b/examples/SPIN/gneb/in.gneb.iron index 7aab0c04c3..a8028392a1 100644 --- a/examples/SPIN/gneb/in.gneb.iron +++ b/examples/SPIN/gneb/in.gneb.iron @@ -55,7 +55,7 @@ variable u universe 1 2 3 4 #dump 1 all custom 100 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] dump 1 all custom 200 dump.$u type x y z c_outsp[1] c_outsp[2] c_outsp[3] -min_style spinmin +min_style spin min_modify alpha_damp 1.0 discret_factor 10.0 neb/spin 1.0e-12 1.0e-12 50000 50000 10 final final.iron_spin #neb/spin 1.0e-6 1.0e-6 1000 10 10 final final.iron_spin diff --git a/examples/SPIN/spinmin/in.spinmin.bfo b/examples/SPIN/spinmin/in.spinmin.bfo index a00af8833c..5b678c8a4d 100644 --- a/examples/SPIN/spinmin/in.spinmin.bfo +++ b/examples/SPIN/spinmin/in.spinmin.bfo @@ -52,6 +52,6 @@ thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz dump 1 all custom 50 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] -min_style spinmin +min_style spin min_modify alpha_damp 1.0 discret_factor 10.0 minimize 0.0 0.0 10000 1000 diff --git a/examples/SPIN/spinmin/in.spinmin.iron b/examples/SPIN/spinmin/in.spinmin.iron index 5a15082122..b87a811cc7 100644 --- a/examples/SPIN/spinmin/in.spinmin.iron +++ b/examples/SPIN/spinmin/in.spinmin.iron @@ -52,6 +52,6 @@ thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz dump 1 all custom 100 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] -min_style spinmin +min_style spin min_modify alpha_damp 1.0 discret_factor 10.0 minimize 1.0e-10 1.0e-10 100000 1000 diff --git a/src/SPIN/README b/src/SPIN/README index e371e39767..c3c02b1445 100644 --- a/src/SPIN/README +++ b/src/SPIN/README @@ -8,13 +8,16 @@ atom in the system * integrating the equations of motion for the coupled spin-lattice system * implementing magnetic pair interactions and magnetic forces * thermostating and applying a transverse damping to the magnetic spins +* minimizing spin configurations with an adaptive timestep scheme +* performing geodesic NEB calculations * computing and outputing magnetic quantities The different options provided by this package are explained in the LAMMPS documentation. Once you have successfully built LAMMPS with this package, you can test -it using one of the input files provided from the examples/SPIN dir: +it using one of the input files provided from the examples/SPIN dir. +For example: ./lmp_serial < lammps/examples/SPIN/cobalt_hcp/in.spin.cobalt_hcp diff --git a/src/REPLICA/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp similarity index 100% rename from src/REPLICA/fix_neb_spin.cpp rename to src/SPIN/fix_neb_spin.cpp diff --git a/src/REPLICA/fix_neb_spin.h b/src/SPIN/fix_neb_spin.h similarity index 100% rename from src/REPLICA/fix_neb_spin.h rename to src/SPIN/fix_neb_spin.h diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 433a260e83..6ccb692033 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -230,8 +230,8 @@ void FixPrecessionSpin::compute_single_precession(int i, double spi[3], double f void FixPrecessionSpin::compute_zeeman(int i, double fmi[3]) { double **sp = atom->sp; - fmi[0] += sp[i][0]*hx; - fmi[1] += sp[i][1]*hy; + fmi[0] += sp[i][3]*hx; + fmi[1] += sp[i][3]*hy; fmi[2] += sp[i][3]*hz; } diff --git a/src/SPIN/min_spinmin.cpp b/src/SPIN/min_spin.cpp similarity index 90% rename from src/SPIN/min_spinmin.cpp rename to src/SPIN/min_spin.cpp index 808a5359bc..ac8f22186e 100644 --- a/src/SPIN/min_spinmin.cpp +++ b/src/SPIN/min_spin.cpp @@ -19,7 +19,7 @@ #include #include -#include "min_spinmin.h" +#include "min_spin.h" #include "universe.h" #include "atom.h" #include "force.h" @@ -27,7 +27,6 @@ #include "output.h" #include "timer.h" #include "error.h" - #include #include #include "modify.h" @@ -46,11 +45,11 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -MinSpinMin::MinSpinMin(LAMMPS *lmp) : Min(lmp) {} +MinSpin::MinSpin(LAMMPS *lmp) : Min(lmp) {} /* ---------------------------------------------------------------------- */ -void MinSpinMin::init() +void MinSpin::init() { alpha_damp = 1.0; discret_factor = 10.0; @@ -63,21 +62,43 @@ void MinSpinMin::init() /* ---------------------------------------------------------------------- */ -void MinSpinMin::setup_style() +void MinSpin::setup_style() { double **v = atom->v; int nlocal = atom->nlocal; + // check if the atom/spin style is defined + + if (!atom->sp_flag) + error->all(FLERR,"min/spin requires atom/spin style"); + for (int i = 0; i < nlocal; i++) v[i][0] = v[i][1] = v[i][2] = 0.0; } +/* ---------------------------------------------------------------------- */ + +int MinSpin::modify_param(int narg, char **arg) +{ + if (strcmp(arg[0],"alpha_damp") == 0) { + if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); + alpha_damp = force->numeric(FLERR,arg[1]); + return 2; + } + if (strcmp(arg[0],"discret_factor") == 0) { + if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); + discret_factor = force->numeric(FLERR,arg[1]); + return 2; + } + return 0; +} + /* ---------------------------------------------------------------------- set current vector lengths and pointers called after atoms have migrated ------------------------------------------------------------------------- */ -void MinSpinMin::reset_vectors() +void MinSpin::reset_vectors() { // atomic dof @@ -96,7 +117,7 @@ void MinSpinMin::reset_vectors() minimization via damped spin dynamics ------------------------------------------------------------------------- */ -int MinSpinMin::iterate(int maxiter) +int MinSpin::iterate(int maxiter) { bigint ntimestep; double fmdotfm,fmdotfmall; @@ -172,7 +193,7 @@ int MinSpinMin::iterate(int maxiter) evaluate max timestep ---------------------------------------------------------------------- */ -double MinSpinMin::evaluate_dt() +double MinSpin::evaluate_dt() { double dtmax; double fmsq; @@ -218,7 +239,7 @@ double MinSpinMin::evaluate_dt() geometric damped advance of spins ---------------------------------------------------------------------- */ -void MinSpinMin::advance_spins(double dts) +void MinSpin::advance_spins(double dts) { int nlocal = atom->nlocal; int *mask = atom->mask; @@ -282,7 +303,7 @@ void MinSpinMin::advance_spins(double dts) compute and return ||mag. torque||_2^2 ------------------------------------------------------------------------- */ -double MinSpinMin::fmnorm_sqr() +double MinSpin::fmnorm_sqr() { int i,n; double *fmatom; diff --git a/src/SPIN/min_spinmin.h b/src/SPIN/min_spin.h similarity index 78% rename from src/SPIN/min_spinmin.h rename to src/SPIN/min_spin.h index abc532a3d5..569bcbaab2 100644 --- a/src/SPIN/min_spinmin.h +++ b/src/SPIN/min_spin.h @@ -13,23 +13,24 @@ #ifdef MINIMIZE_CLASS -MinimizeStyle(spinmin,MinSpinMin) +MinimizeStyle(spin,MinSpin) #else -#ifndef LMP_MIN_SPINMIN_H -#define LMP_MIN_SPINMIN_H +#ifndef LMP_MIN_SPIN_H +#define LMP_MIN_SPIN_H #include "min.h" namespace LAMMPS_NS { -class MinSpinMin : public Min { +class MinSpin : public Min { public: - MinSpinMin(class LAMMPS *); - ~MinSpinMin() {} + MinSpin(class LAMMPS *); + ~MinSpin() {} void init(); void setup_style(); + int modify_param(int, char **); void reset_vectors(); int iterate(int); double evaluate_dt(); @@ -43,6 +44,9 @@ class MinSpinMin : public Min { double dt; double dts; + double alpha_damp; // damping for spin minimization + double discret_factor; // factor for spin timestep evaluation + double *spvec; // variables for atomic dof, as 1d vector double *fmvec; // variables for atomic dof, as 1d vector diff --git a/src/REPLICA/neb_spin.cpp b/src/SPIN/neb_spin.cpp similarity index 93% rename from src/REPLICA/neb_spin.cpp rename to src/SPIN/neb_spin.cpp index 38f5b530da..f5d9a75020 100644 --- a/src/REPLICA/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -109,7 +109,7 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, sp[i][0] = spfinal[0]; sp[i][1] = spfinal[1]; sp[i][2] = spfinal[2]; - + ii += 3; } } @@ -228,8 +228,8 @@ void NEB_spin::run() if (update->minimize->searchflag) error->all(FLERR,"NEB_spin requires damped dynamics minimizer"); - if (strcmp(update->minimize_style,"spinmin") != 0) - error->all(FLERR,"NEB_spin requires spinmin minimizer"); + if (strcmp(update->minimize_style,"spin") != 0) + error->all(FLERR,"NEB_spin requires spin minimizer"); // setup regular NEB_spin minimization @@ -530,10 +530,14 @@ void NEB_spin::readfile(char *file, int flag) spfinal[0] = spx; spfinal[1] = spy; spfinal[2] = spz; + + printf("test spinit[0]:%g \n",sp[m][0]); // interpolate intermediate spin states initial_rotation(spinit,spfinal,fraction); + + printf("test spfinal[0]:%g \n",spfinal[0]); sp[m][0] = spfinal[0]; sp[m][1] = spfinal[1]; @@ -556,6 +560,8 @@ void NEB_spin::readfile(char *file, int flag) nread += nchunk; } + printf("test sp[1][2]:%g \n",sp[1][2]); + // check that all atom IDs in file were found by a proc if (flag == 0) { @@ -613,11 +619,15 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) spfy = sploc[1]; spfz = sploc[2]; + iphi = itheta = fphi = ftheta = 0.0; + iphi = acos(spiz); - itheta = acos(spix/sin(iphi)); + if (sin(iphi) != 0.0) + itheta = acos(spix/sin(iphi)); fphi = acos(spfz); - ftheta = acos(spfx/sin(fphi)); + if (sin(fphi) != 0.0) + ftheta = acos(spfx/sin(fphi)); kphi = iphi + fraction*(fphi-iphi); ktheta = itheta + fraction*(ftheta-itheta); @@ -626,12 +636,69 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) spky = sin(ktheta)*sin(kphi); spkz = cos(kphi); - iknorm = spkx*spkx+spky*spky+spkz*spkz; + double knormsq = spkx*spkx+spky*spky+spkz*spkz; + if (knormsq != 0.0) + iknorm = 1.0/sqrt(knormsq); spkx *= iknorm; spky *= iknorm; spkz *= iknorm; + //sploc[0] = spkx; + //sploc[1] = spky; + //sploc[2] = spkz; + + //double kx,ky,kz; + //double spix,spiy,spiz,spfx,spfy,spfz; + //double kcrossx,kcrossy,kcrossz,knormsq; + //double spkx,spky,spkz; + //double sdot,omega,iknorm; + + //spix = spi[0]; + //spiy = spi[1]; + //spiz = spi[2]; + + //spfx = sploc[0]; + //spfy = sploc[1]; + //spfz = sploc[2]; + // + //kx = spiy*spfz - spiz*spfy; + //ky = spiz*spfx - spix*spfz; + //kz = spix*spfy - spiy*spfx; + + //knormsq = kx*kx+ky*ky+kz*kz; + // + //if (knormsq != 0.0) { + // iknorm = 1.0/sqrt(knormsq); + // kx *= iknorm; + // ky *= iknorm; + // kz *= iknorm; + //} + // + //kcrossx = ky*spiz - kz*spiy; + //kcrossy = kz*spix - kx*spiz; + //kcrossz = kx*spiy - ky*spix; + + //sdot = spix*spfx + spiy*spfy + spiz*spfz; + + //omega = acos(sdot); + //omega *= fraction; + + //spkx = spix*cos(omega) + kcrossx*sin(omega); + //spky = spiy*cos(omega) + kcrossy*sin(omega); + //spkz = spiz*cos(omega) + kcrossz*sin(omega); + // + //iknorm = 1.0/sqrt(spkx*spkx+spky*spky+spkz*spkz); + //if (iknorm == 0.0) + // error->all(FLERR,"Incorrect rotation operation"); + + //spkx *= iknorm; + //spky *= iknorm; + //spkz *= iknorm; + + printf("init: %g %g %g \n",spix,spiy,spiz); + printf("fina: %g %g %g \n",spkx,spky,spkz); + sploc[0] = spkx; sploc[1] = spky; sploc[2] = spkz; diff --git a/src/REPLICA/neb_spin.h b/src/SPIN/neb_spin.h similarity index 100% rename from src/REPLICA/neb_spin.h rename to src/SPIN/neb_spin.h diff --git a/src/min.cpp b/src/min.cpp index c75db6e2b0..2a42a444a0 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -655,15 +655,11 @@ void Min::modify_params(int narg, char **arg) else if (strcmp(arg[iarg+1],"forcezero") == 0) linestyle = 2; else error->all(FLERR,"Illegal min_modify command"); iarg += 2; - } else if (strcmp(arg[iarg],"alpha_damp") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command"); - alpha_damp = force->numeric(FLERR,arg[iarg+1]); - iarg += 2; - } else if (strcmp(arg[iarg],"discret_factor") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command"); - discret_factor = force->numeric(FLERR,arg[iarg+1]); - iarg += 2; - } else error->all(FLERR,"Illegal min_modify command"); + } else { + int n = modify_param(narg-iarg,&arg[iarg]); + if (n == 0) error->all(FLERR,"Illegal fix_modify command"); + iarg += n; + } } } diff --git a/src/min.h b/src/min.h index ba1885671e..a63254231c 100644 --- a/src/min.h +++ b/src/min.h @@ -38,6 +38,7 @@ class Min : protected Pointers { int request(class Pair *, int, double); virtual bigint memory_usage() {return 0;} void modify_params(int, char **); + virtual int modify_param(int, char **) {return 0;} double fnorm_sqr(); double fnorm_inf(); @@ -58,11 +59,6 @@ class Min : protected Pointers { double dmax; // max dist to move any atom in one step int linestyle; // 0 = backtrack, 1 = quadratic, 2 = forcezero - // spinmin quantities - - double alpha_damp; // damping for spin minimization - double discret_factor; // factor for spin timestep evaluation - int nelist_global,nelist_atom; // # of PE,virial computes to check int nvlist_global,nvlist_atom; class Compute **elist_global; // lists of PE,virial Computes From c23ace9c972a47f3cd733f093662d14ac46fbe20 Mon Sep 17 00:00:00 2001 From: julient31 Date: Fri, 22 Mar 2019 11:52:09 -0600 Subject: [PATCH 15/35] Commit JT 032219 - fixed bug 1: precession_spin had no min_setup - fixed bug 2: incorrect init of spins in neb/spin - improved doc min_spin.txt (added eqs, and connected to related files). --- doc/src/Eqs/min_spin_damping.jpg | Bin 0 -> 7035 bytes doc/src/Eqs/min_spin_damping.tex | 13 ++++++ doc/src/Eqs/min_spin_timestep.jpg | Bin 0 -> 5984 bytes doc/src/Eqs/min_spin_timestep.tex | 14 +++++++ doc/src/fix_precession_spin.txt | 2 +- doc/src/lammps.book | 1 + doc/src/min_modify.txt | 11 +++++- doc/src/min_spin.txt | 63 ++++++++++++++++++++++++++++++ doc/src/min_style.txt | 10 ++--- doc/src/minimize.txt | 7 ++++ src/SPIN/atom_vec_spin.cpp | 4 ++ src/SPIN/fix_precession_spin.cpp | 9 ++++- src/SPIN/fix_precession_spin.h | 1 + src/SPIN/min_spin.cpp | 6 ++- src/SPIN/neb_spin.cpp | 63 ++++++++++++++++++------------ src/SPIN/pair_spin_dmi.cpp | 6 +-- 16 files changed, 168 insertions(+), 42 deletions(-) create mode 100644 doc/src/Eqs/min_spin_damping.jpg create mode 100644 doc/src/Eqs/min_spin_damping.tex create mode 100644 doc/src/Eqs/min_spin_timestep.jpg create mode 100644 doc/src/Eqs/min_spin_timestep.tex create mode 100644 doc/src/min_spin.txt diff --git a/doc/src/Eqs/min_spin_damping.jpg b/doc/src/Eqs/min_spin_damping.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0c700cc67863762a99f9b9e3df0cb945612a2e38 GIT binary patch literal 7035 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 B|8W2S literal 0 HcmV?d00001 diff --git a/doc/src/Eqs/min_spin_damping.tex b/doc/src/Eqs/min_spin_damping.tex new file mode 100644 index 0000000000..88b05447d3 --- /dev/null +++ b/doc/src/Eqs/min_spin_damping.tex @@ -0,0 +1,13 @@ +\documentclass[preview]{standalone} +\usepackage{varwidth} +\usepackage[utf8x]{inputenc} +\usepackage{amsmath, amssymb, graphics, setspace} + +\begin{document} +\begin{varwidth}{50in} + \begin{equation} + \frac{d \vec{s}_{i}}{dt} = \lambda\, \vec{s}_{i} \times\left( \vec{\omega}_{i} \times\vec{s}_{i} \right) + \nonumber + \end{equation} +\end{varwidth} +\end{document} diff --git a/doc/src/Eqs/min_spin_timestep.jpg b/doc/src/Eqs/min_spin_timestep.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0d8f8d07f9ff6ef23a0b8a136b05bf36a1952bb6 GIT binary patch literal 5984 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 QPIn^d(7|c_7&spP7aqDz-T(jq literal 0 HcmV?d00001 diff --git a/doc/src/Eqs/min_spin_timestep.tex b/doc/src/Eqs/min_spin_timestep.tex new file mode 100644 index 0000000000..b0f6e68e4d --- /dev/null +++ b/doc/src/Eqs/min_spin_timestep.tex @@ -0,0 +1,14 @@ +\documentclass[preview]{standalone} +\usepackage{varwidth} +\usepackage[utf8x]{inputenc} +\usepackage{amsmath, amssymb, graphics, setspace} + +\begin{document} +\begin{varwidth}{50in} + \begin{equation} + {\Delta t}_{\rm max} = \frac{2\pi}{\kappa + \left|\vec{\omega}_{\rm max} \right|} + \nonumber + \end{equation} +\end{varwidth} +\end{document} diff --git a/doc/src/fix_precession_spin.txt b/doc/src/fix_precession_spin.txt index f16522c7b6..05814931ea 100644 --- a/doc/src/fix_precession_spin.txt +++ b/doc/src/fix_precession_spin.txt @@ -31,7 +31,7 @@ fix 1 all precession/spin zeeman 0.1 0.0 0.0 1.0 anisotropy 0.001 0.0 0.0 1.0 :p [Description:] -Impose a force torque to each magnetic spin in the group. +This fix applies a precession torque to each magnetic spin in the group. Style {zeeman} is used for the simulation of the interaction between the magnetic spins in the defined group and an external diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 198e234f0c..88625e0b73 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -174,6 +174,7 @@ mass.html message.html min_modify.html min_style.html +min_spin.html minimize.html molecule.html neb.html diff --git a/doc/src/min_modify.txt b/doc/src/min_modify.txt index 701f579af4..525d6716d8 100644 --- a/doc/src/min_modify.txt +++ b/doc/src/min_modify.txt @@ -21,7 +21,7 @@ keyword = {dmax} or {line} or {alpha_damp} or {discret_factor} {alpha_damp} value = damping damping = fictitious Gilbert damping for spin minimization (adim) {discret_factor} value = factor - factor = defines a dividing factor for adaptive spin timestep (adim) :pre + factor = discretization factor for adaptive spin timestep (adim) :pre :ule [Examples:] @@ -70,7 +70,14 @@ that difference may be smaller than machine epsilon even if atoms could move in the gradient direction to reduce forces further. Keywords {alpha_damp} and {discret_factor} only make sense when -a {spinmin} minimization style is declared. +a "min_spin"_min_spin.html command is declared. +Keyword {alpha_damp} defines an analog of a magnetic Gilbert +damping. It defines a relaxation rate toward an equilibrium for +a given magnetic system. +Keyword {discret_factor} defines a discretization factor for the +adaptive timestep used in the {spin} minimization. +See "min_spin"_min_spin.html for more information about those +quantities. Default values are alpha_damp = 1.0 and discret_factor = 10.0. [Restrictions:] none diff --git a/doc/src/min_spin.txt b/doc/src/min_spin.txt new file mode 100644 index 0000000000..468cde0fec --- /dev/null +++ b/doc/src/min_spin.txt @@ -0,0 +1,63 @@ +"LAMMPS WWW Page"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Commands_all.html) + +:line + +min_style spin command :h3 + +[Syntax:] + +min_style spin :pre + +[Examples:] + +min_style spin +min_modify alpha_damp 1.0 discret_factor 10.0 :pre + +[Description:] + +Apply a minimization algorithm to use when a "minimize"_minimize.html +command is performed. + +Style {spin} defines a damped spin dynamics with an adaptive +timestep, according to: + +:c,image(Eqs/min_spin_damping.jpg) + +with lambda a damping coefficient (similar to a Gilbert damping) +Lambda can be defined by setting the {alpha_damp} keyword with the +"min_modify"_min_modify.html command. + +The minimization procedure solves this equation using an +adaptive timestep. The value of this timestep is conditionned +by the largest precession frequency that has to be solved in the +system: + +:c,image(Eqs/min_spin_timestep.jpg) + +with |omega|_{max} the norm of the largest precession frequency +in the system (across all processes, and across all replicas if a +spin/neb calculation is performed). + +Kappa defines a discretization factor {discret_factor} for the +definition of this timestep. +{discret_factor} can be defined with the "min_modify"_min_modify.html +command. + +NOTE: The {spin} style replaces the force tolerance by a torque +tolerance. See "minimize"_minimize.html for more explanation. + +[Restrictions:] none + +[Related commands:] + +"min_style"_min_style.html, "minimize"_minimize.html, +"min_modify"_min_modify.html + +[Default:] + +The option defaults are alpha_damp = 1.0 and discret_factor = +10.0. diff --git a/doc/src/min_style.txt b/doc/src/min_style.txt index f8c05d5483..c46c1492b4 100644 --- a/doc/src/min_style.txt +++ b/doc/src/min_style.txt @@ -16,7 +16,7 @@ style = {cg} or {hftn} or {sd} or {quickmin} or {fire} or {spin} :ul [Examples:] min_style cg -min_style spinmin +min_style spin min_style fire :pre [Description:] @@ -62,17 +62,13 @@ the velocity non-parallel to the current force vector. The velocity of each atom is initialized to 0.0 by this style, at the beginning of a minimization. -Style {spin} is a damped spin dynamics with a variable -timestep as described in "(Tranchida)"_#Tranchida. +Style {spin} is a damped spin dynamics with an adaptive +timestep. See the "min/spin"_min_spin.html doc page for more information. Either the {quickmin} and {fire} styles are useful in the context of nudged elastic band (NEB) calculations via the "neb"_neb.html command. -The {spin} style is useful in the context of geodesic nudged -elastic band (GNEB) calculations via the "neb/spin"_neb_spin.html -command. - NOTE: The damped dynamic minimizers use whatever timestep you have defined via the "timestep"_timestep.html command. Often they will converge more quickly if you use a timestep about 10x larger than you diff --git a/doc/src/minimize.txt b/doc/src/minimize.txt index 00de86c5f5..ecf1ad0fcf 100644 --- a/doc/src/minimize.txt +++ b/doc/src/minimize.txt @@ -103,6 +103,13 @@ the line search fails because the step distance backtracks to 0.0 the number of outer iterations or timesteps exceeds {maxiter} the number of total force evaluations exceeds {maxeval} :ul +NOTE: the "minimization style"_min_style.html {spin} replaces +the force tolerance {ftol} by a torque tolerance. +The minimization procedure stops if the 2-norm (length) of the +global torque vector (defined as the cross product between the +spins and their precession vectors omega) is less than {ftol}, +or if any of the other criteria are met. + NOTE: You can also use the "fix halt"_fix_halt.html command to specify a general criterion for exiting a minimization, that is a calculation performed on the state of the current system, as defined by an diff --git a/src/SPIN/atom_vec_spin.cpp b/src/SPIN/atom_vec_spin.cpp index 24c4480e04..a6c0430940 100644 --- a/src/SPIN/atom_vec_spin.cpp +++ b/src/SPIN/atom_vec_spin.cpp @@ -943,6 +943,10 @@ bigint AtomVecSpin::memory_usage() return bytes; } +/* ---------------------------------------------------------------------- + clear all forces (mech and mag) +------------------------------------------------------------------------- */ + void AtomVecSpin::force_clear(int /*n*/, size_t nbytes) { memset(&atom->f[0][0],0,3*nbytes); diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 6ccb692033..d065f38d16 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -170,7 +170,14 @@ void FixPrecessionSpin::setup(int vflag) /* ---------------------------------------------------------------------- */ -void FixPrecessionSpin::post_force(int /*vflag*/) +void FixPrecessionSpin::min_setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixPrecessionSpin::post_force(int vflag) { // update mag field with time (potential improvement) diff --git a/src/SPIN/fix_precession_spin.h b/src/SPIN/fix_precession_spin.h index 2fe6b5a673..1db4d32ae9 100644 --- a/src/SPIN/fix_precession_spin.h +++ b/src/SPIN/fix_precession_spin.h @@ -33,6 +33,7 @@ class FixPrecessionSpin : public Fix { int setmask(); void init(); void setup(int); + void min_setup(int); void post_force(int); void post_force_respa(int, int, int); void min_post_force(int); diff --git a/src/SPIN/min_spin.cpp b/src/SPIN/min_spin.cpp index ac8f22186e..99aa4ac3b7 100644 --- a/src/SPIN/min_spin.cpp +++ b/src/SPIN/min_spin.cpp @@ -102,7 +102,7 @@ void MinSpin::reset_vectors() { // atomic dof - // not really good size => sp is 4N vector + // size sp is 4N vector nvec = 4 * atom->nlocal; if (nvec) spvec = atom->sp[0]; @@ -132,7 +132,9 @@ int MinSpin::iterate(int maxiter) niter++; // optimize timestep accross processes / replicas - + // need a force calculation for timestep optimization + + energy_force(0); dts = evaluate_dt(); // apply damped precessional dynamics to the spins diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index f5d9a75020..728532a187 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -44,7 +44,6 @@ #include "timer.h" #include "memory.h" #include "error.h" -#include "force.h" #include "math_const.h" using namespace LAMMPS_NS; @@ -101,14 +100,22 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, spfinal[1] = buf_final[ii+1]; spfinal[2] = buf_final[ii+2]; - // circular initialization - // a better procedure may be developed - - initial_rotation(spinit,spfinal,fraction); - - sp[i][0] = spfinal[0]; - sp[i][1] = spfinal[1]; - sp[i][2] = spfinal[2]; + // interpolate intermediate spin states + + if (fraction == 0.0) { + sp[i][0] = spinit[0]; + sp[i][1] = spinit[1]; + sp[i][2] = spinit[2]; + } else if (fraction == 1.0) { + sp[i][0] = spfinal[0]; + sp[i][1] = spfinal[1]; + sp[i][2] = spfinal[2]; + } else { + initial_rotation(spinit,spfinal,fraction); + sp[i][0] = spfinal[0]; + sp[i][1] = spfinal[1]; + sp[i][2] = spfinal[2]; + } ii += 3; } @@ -499,7 +506,7 @@ void NEB_spin::readfile(char *file, int flag) for (j = 1; j < nwords; j++) values[j] = strtok(NULL," \t\n\r\f"); - // adjust atom coord based on replica fraction + // adjust spin coord based on replica fraction // for flag = 0, interpolate for intermediate and final replicas // for flag = 1, replace existing coord with new coord // ignore image flags of final x @@ -530,19 +537,24 @@ void NEB_spin::readfile(char *file, int flag) spfinal[0] = spx; spfinal[1] = spy; spfinal[2] = spz; - - printf("test spinit[0]:%g \n",sp[m][0]); - + // interpolate intermediate spin states - initial_rotation(spinit,spfinal,fraction); - - printf("test spfinal[0]:%g \n",spfinal[0]); - - sp[m][0] = spfinal[0]; - sp[m][1] = spfinal[1]; - sp[m][2] = spfinal[2]; sp[m][3] = musp; + if (fraction == 0.0) { + sp[m][0] = spinit[0]; + sp[m][1] = spinit[1]; + sp[m][2] = spinit[2]; + } else if (fraction == 1.0) { + sp[m][0] = spfinal[0]; + sp[m][1] = spfinal[1]; + sp[m][2] = spfinal[2]; + } else { + initial_rotation(spinit,spfinal,fraction); + sp[m][0] = spfinal[0]; + sp[m][1] = spfinal[1]; + sp[m][2] = spfinal[2]; + } } else { sp[m][3] = musp; x[m][0] = xx; @@ -560,8 +572,6 @@ void NEB_spin::readfile(char *file, int flag) nread += nchunk; } - printf("test sp[1][2]:%g \n",sp[1][2]); - // check that all atom IDs in file were found by a proc if (flag == 0) { @@ -605,6 +615,10 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) // implementing initial rotation using atan2 // this may not be a sufficient routine, need more accurate verifications + // interpolation only for intermediate replica + + if (fraction == 0.0 || fraction == 1.0) return; + // initial, final and inter ang. values double itheta,iphi,ftheta,fphi,ktheta,kphi; @@ -636,7 +650,7 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) spky = sin(ktheta)*sin(kphi); spkz = cos(kphi); - double knormsq = spkx*spkx+spky*spky+spkz*spkz; + double knormsq = spkx*spkx + spky*spky + spkz*spkz; if (knormsq != 0.0) iknorm = 1.0/sqrt(knormsq); @@ -696,9 +710,6 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) //spky *= iknorm; //spkz *= iknorm; - printf("init: %g %g %g \n",spix,spiy,spiz); - printf("fina: %g %g %g \n",spkx,spky,spkz); - sploc[0] = spkx; sploc[1] = spky; sploc[2] = spkz; diff --git a/src/SPIN/pair_spin_dmi.cpp b/src/SPIN/pair_spin_dmi.cpp index 9b193f7e08..e54864e126 100644 --- a/src/SPIN/pair_spin_dmi.cpp +++ b/src/SPIN/pair_spin_dmi.cpp @@ -432,9 +432,9 @@ void PairSpinDmi::compute_dmi(int i, int j, double eij[3], double fmi[3], double dmiy = eij[2]*v_dmx[itype][jtype] - eij[0]*v_dmz[itype][jtype]; dmiz = eij[0]*v_dmy[itype][jtype] - eij[1]*v_dmx[itype][jtype]; - fmi[0] -= (spj[1]*dmiz - spj[2]*dmiy); - fmi[1] -= (spj[2]*dmix - spj[0]*dmiz); - fmi[2] -= (spj[0]*dmiy - spj[1]*dmix); + fmi[0] -= (dmiy*spj[2] - dmiz*spj[1]); + fmi[1] -= (dmiz*spj[0] - dmix*spj[2]); + fmi[2] -= (dmix*spj[1] - dmiy*spj[0]); } /* ---------------------------------------------------------------------- From 676370ade7995fca6ef125d8644e196c55c16ef4 Mon Sep 17 00:00:00 2001 From: julient31 Date: Tue, 26 Mar 2019 07:21:16 -0600 Subject: [PATCH 16/35] Commit JT 032619 - added citeme in neb/spin - started work on distance output --- src/SPIN/fix_neb_spin.cpp | 7 ++++++- src/SPIN/neb_spin.cpp | 24 +++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index 610e6d2fe5..49736bce33 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -566,6 +566,10 @@ void FixNEB_spin::min_post_force(int /*vflag*/) if (NEBLongRange) error->all(FLERR,"NEB_spin long range option not yet active"); + // test output length + + //printf("testi irep / plen: %d %g \n",ireplica,nlen); + // exit calc. if first or last replica (no gneb force) if (ireplica == 0 || ireplica == nreplica-1) return ; @@ -587,11 +591,12 @@ void FixNEB_spin::min_post_force(int /*vflag*/) MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); dot=dotall; + // for intermediate replica // calc. GNEB force prefactor if (ireplica == rclimber) prefactor = -2.0*dot; // for climbing replica else { - if (NEBLongRange) { // for intermediate replica + if (NEBLongRange) { error->all(FLERR,"Long Range NEB_spin climber option not yet active"); } else if (StandardNEB) { prefactor = -dot + kspring*(nlen-plen); diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 728532a187..ecbbffdcd8 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -15,6 +15,10 @@ Contributing authors: Julien Tranchida (SNL) Please cite the related publication: + Bessarab, P. F., Uzdin, V. M., & Jónsson, H. (2015). + Method for finding mechanism and activation energy of magnetic transitions, + applied to skyrmion and antivortex annihilation. + Computer Physics Communications, 196, 335-347. ------------------------------------------------------------------------- */ // lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h @@ -27,6 +31,7 @@ #include #include #include "neb_spin.h" +#include "citeme.h" #include "compute.h" #include "force.h" #include "universe.h" @@ -49,6 +54,21 @@ using namespace LAMMPS_NS; using namespace MathConst; +static const char cite_neb_spin[] = + "neb/spin command:\n\n" + "@article{bessarab2015method,\n" + "title={Method for finding mechanism and activation energy of " + "magnetic transitions, applied to skyrmion and antivortex " + "annihilation},\n" + "author={Bessarab, P.F. and Uzdin, V.M. and J{\'o}nsson, H.},\n" + "journal={Computer Physics Communications},\n" + "volume={196},\n" + "pages={335--347},\n" + "year={2015},\n" + "publisher={Elsevier}\n" + "doi={10.1016/j.cpc.2015.07.001}\n" + "}\n\n"; + #define MAXLINE 256 #define CHUNK 1024 // 8 attributes: tag, spin norm, position (3), spin direction (3) @@ -56,7 +76,9 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -NEB_spin::NEB_spin(LAMMPS *lmp) : Pointers(lmp) {} +NEB_spin::NEB_spin(LAMMPS *lmp) : Pointers(lmp) { + if (lmp->citeme) lmp->citeme->add(cite_neb_spin); +} /* ---------------------------------------------------------------------- internal NEB_spin constructor, called from TAD From 3cabfd13cd1b4f4628aff45fd59c1a78f7c4d6b3 Mon Sep 17 00:00:00 2001 From: julient31 Date: Tue, 26 Mar 2019 12:51:51 -0600 Subject: [PATCH 17/35] Commit JT 032619 - finish merge of min_spin.cpp - test output --- src/SPIN/min_spin.cpp | 116 ------------------------------------------ src/SPIN/neb_spin.cpp | 3 +- 2 files changed, 2 insertions(+), 117 deletions(-) diff --git a/src/SPIN/min_spin.cpp b/src/SPIN/min_spin.cpp index 33b602f519..2bddc110e7 100644 --- a/src/SPIN/min_spin.cpp +++ b/src/SPIN/min_spin.cpp @@ -51,11 +51,7 @@ MinSpin::MinSpin(LAMMPS *lmp) : Min(lmp) {} void MinSpin::init() { alpha_damp = 1.0; -<<<<<<< HEAD - discret_factor = 10.0; -======= discrete_factor = 10.0; ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 Min::init(); @@ -88,15 +84,9 @@ int MinSpin::modify_param(int narg, char **arg) alpha_damp = force->numeric(FLERR,arg[1]); return 2; } -<<<<<<< HEAD - if (strcmp(arg[0],"discret_factor") == 0) { - if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); - discret_factor = force->numeric(FLERR,arg[1]); -======= if (strcmp(arg[0],"discrete_factor") == 0) { if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); discrete_factor = force->numeric(FLERR,arg[1]); ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 return 2; } return 0; @@ -114,17 +104,10 @@ void MinSpin::reset_vectors() // size sp is 4N vector nvec = 4 * atom->nlocal; if (nvec) spvec = atom->sp[0]; -<<<<<<< HEAD - - nvec = 3 * atom->nlocal; - if (nvec) fmvec = atom->fm[0]; - -======= nvec = 3 * atom->nlocal; if (nvec) fmvec = atom->fm[0]; ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 if (nvec) xvec = atom->x[0]; if (nvec) fvec = atom->f[0]; } @@ -136,11 +119,7 @@ void MinSpin::reset_vectors() int MinSpin::iterate(int maxiter) { bigint ntimestep; -<<<<<<< HEAD - double fmdotfm,fmdotfmall; -======= double fmdotfm; ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 int flag,flagall; for (int iter = 0; iter < maxiter; iter++) { @@ -153,21 +132,12 @@ int MinSpin::iterate(int maxiter) // optimize timestep accross processes / replicas // need a force calculation for timestep optimization -<<<<<<< HEAD - - energy_force(0); - dts = evaluate_dt(); - - // apply damped precessional dynamics to the spins - -======= energy_force(0); dts = evaluate_dt(); // apply damped precessional dynamics to the spins ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 advance_spins(dts); eprevious = ecurrent; @@ -230,18 +200,10 @@ double MinSpin::evaluate_dt() double fmsq; double fmaxsqone,fmaxsqloc,fmaxsqall; int nlocal = atom->nlocal; -<<<<<<< HEAD - int *mask = atom->mask; - double **fm = atom->fm; - - // finding max fm on this proc. - -======= double **fm = atom->fm; // finding max fm on this proc. ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 fmsq = fmaxsqone = fmaxsqloc = fmaxsqall = 0.0; for (int i = 0; i < nlocal; i++) { fmsq = fm[i][0]*fm[i][0]+fm[i][1]*fm[i][1]+fm[i][2]*fm[i][2]; @@ -249,17 +211,10 @@ double MinSpin::evaluate_dt() } // finding max fm on this replica -<<<<<<< HEAD - - fmaxsqloc = fmaxsqone; - MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world); - -======= fmaxsqloc = fmaxsqone; MPI_Allreduce(&fmaxsqone,&fmaxsqloc,1,MPI_DOUBLE,MPI_MAX,world); ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 // finding max fm over all replicas, if necessary // this communicator would be invalid for multiprocess replicas @@ -272,17 +227,10 @@ double MinSpin::evaluate_dt() if (fmaxsqall == 0.0) error->all(FLERR,"Incorrect fmaxsqall calculation"); -<<<<<<< HEAD - // define max timestep by dividing by the - // inverse of max frequency by discret_factor - - dtmax = MY_2PI/(discret_factor*sqrt(fmaxsqall)); -======= // define max timestep by dividing by the // inverse of max frequency by discrete_factor dtmax = MY_2PI/(discrete_factor*sqrt(fmaxsqall)); ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 return dtmax; } @@ -294,51 +242,17 @@ double MinSpin::evaluate_dt() void MinSpin::advance_spins(double dts) { int nlocal = atom->nlocal; -<<<<<<< HEAD - int *mask = atom->mask; -======= ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 double **sp = atom->sp; double **fm = atom->fm; double tdampx,tdampy,tdampz; double msq,scale,fm2,energy,dts2; double cp[3],g[3]; -<<<<<<< HEAD - dts2 = dts*dts; -======= dts2 = dts*dts; ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 // loop on all spins on proc. for (int i = 0; i < nlocal; i++) { -<<<<<<< HEAD - - // calc. damping torque - - tdampx = -alpha_damp*(fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]); - tdampy = -alpha_damp*(fm[i][2]*sp[i][0] - fm[i][0]*sp[i][2]); - tdampz = -alpha_damp*(fm[i][0]*sp[i][1] - fm[i][1]*sp[i][0]); - - // apply advance algorithm (geometric, norm preserving) - - fm2 = (tdampx*tdampx+tdampy*tdampy+tdampz*tdampz); - energy = (sp[i][0]*tdampx)+(sp[i][1]*tdampy)+(sp[i][2]*tdampz); - - cp[0] = tdampy*sp[i][2]-tdampz*sp[i][1]; - cp[1] = tdampz*sp[i][0]-tdampx*sp[i][2]; - cp[2] = tdampx*sp[i][1]-tdampy*sp[i][0]; - - g[0] = sp[i][0]+cp[0]*dts; - g[1] = sp[i][1]+cp[1]*dts; - g[2] = sp[i][2]+cp[2]*dts; - - g[0] += (tdampx*energy-0.5*sp[i][0]*fm2)*0.5*dts2; - g[1] += (tdampy*energy-0.5*sp[i][1]*fm2)*0.5*dts2; - g[2] += (tdampz*energy-0.5*sp[i][2]*fm2)*0.5*dts2; - -======= // calc. damping torque @@ -363,34 +277,22 @@ void MinSpin::advance_spins(double dts) g[1] += (tdampy*energy-0.5*sp[i][1]*fm2)*0.5*dts2; g[2] += (tdampz*energy-0.5*sp[i][2]*fm2)*0.5*dts2; ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 g[0] /= (1+0.25*fm2*dts2); g[1] /= (1+0.25*fm2*dts2); g[2] /= (1+0.25*fm2*dts2); sp[i][0] = g[0]; sp[i][1] = g[1]; -<<<<<<< HEAD - sp[i][2] = g[2]; - - // renormalization (check if necessary) - -======= sp[i][2] = g[2]; // renormalization (check if necessary) ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 msq = g[0]*g[0] + g[1]*g[1] + g[2]*g[2]; scale = 1.0/sqrt(msq); sp[i][0] *= scale; sp[i][1] *= scale; sp[i][2] *= scale; -<<<<<<< HEAD - -======= ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 // no comm. to atoms with same tag // because no need for simplecticity } @@ -402,23 +304,13 @@ void MinSpin::advance_spins(double dts) double MinSpin::fmnorm_sqr() { -<<<<<<< HEAD - int i,n; - double *fmatom; - -======= ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 int nlocal = atom->nlocal; double tx,ty,tz; double **sp = atom->sp; double **fm = atom->fm; // calc. magnetic torques -<<<<<<< HEAD - -======= ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 double local_norm2_sqr = 0.0; for (int i = 0; i < nlocal; i++) { tx = (fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]); @@ -427,19 +319,11 @@ double MinSpin::fmnorm_sqr() local_norm2_sqr += tx*tx + ty*ty + tz*tz; } -<<<<<<< HEAD - - // no extra atom calc. for spins - - if (nextra_atom) - error->all(FLERR,"extra atom option not available yet"); -======= // no extra atom calc. for spins if (nextra_atom) error->all(FLERR,"extra atom option not available yet"); ->>>>>>> e2e4fe2cf7a95a04ae6a7de93d9b72ad56f0b620 double norm2_sqr = 0.0; MPI_Allreduce(&local_norm2_sqr,&norm2_sqr,1,MPI_DOUBLE,MPI_SUM,world); diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index ecbbffdcd8..53b9da9c42 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -901,7 +901,8 @@ void NEB_spin::print_status() gradvnorm0,gradvnorm1,gradvnormc); fprintf(ulogfile,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); for (int i = 0; i < nreplica; i++) - fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); + //fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); + fprintf(ulogfile,"%12.8g %12.8g %12.8g %12.8g ",rdist[i],all[i][0],all[i][2],all[i][5]); if (verbose) { fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, From 44fe8330b923a2c6221f6678822f1ddd73558aab Mon Sep 17 00:00:00 2001 From: julient31 Date: Wed, 27 Mar 2019 14:59:12 -0600 Subject: [PATCH 18/35] Commit JT 032719 - commit before wok output --- src/SPIN/fix_neb_spin.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index 49736bce33..fce099e7c4 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -492,7 +492,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) // no Perpendicular nudging force option active yet if (kspringPerp != 0.0) - error->all(FLERR,"NEB_spin Perpendicular nudging force not yet active"); + error->all(FLERR,"NEB_spin Perpendicular spring force not yet active"); } } @@ -566,10 +566,6 @@ void FixNEB_spin::min_post_force(int /*vflag*/) if (NEBLongRange) error->all(FLERR,"NEB_spin long range option not yet active"); - // test output length - - //printf("testi irep / plen: %d %g \n",ireplica,nlen); - // exit calc. if first or last replica (no gneb force) if (ireplica == 0 || ireplica == nreplica-1) return ; From a0e5d14990af4cd281e5db5c97c8a281838fb072 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 1 Apr 2019 15:53:36 -0600 Subject: [PATCH 19/35] Commit JT 040119 - corrected tangent vector projection - output verbose (Gradidottan) --- src/SPIN/fix_neb_spin.cpp | 18 ++++++++++-- src/SPIN/neb_spin.cpp | 59 +++++++++++---------------------------- 2 files changed, 33 insertions(+), 44 deletions(-) diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index fce099e7c4..017085a9a8 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -15,6 +15,10 @@ Contributing authors: Julien Tranchida (SNL) Please cite the related publication: + Bessarab, P. F., Uzdin, V. M., & Jónsson, H. (2015). + Method for finding mechanism and activation energy of magnetic transitions, + applied to skyrmion and antivortex annihilation. + Computer Physics Communications, 196, 335-347. ------------------------------------------------------------------------- */ #include @@ -467,6 +471,15 @@ void FixNEB_spin::min_post_force(int /*vflag*/) } } + // project tangent vector on tangent space + + double sdottan; + sdottan = sp[i][0]*tangent[i][0] + sp[i][1]*tangent[i][1] + + sp[i][2]*tangent[i][2]; + tangent[i][0] -= sdottan*sp[i][0]; + tangent[i][1] -= sdottan*sp[i][1]; + tangent[i][2] -= sdottan*sp[i][2]; + // calc. next geodesic length spi[0]=sp[i][0]; @@ -518,7 +531,8 @@ void FixNEB_spin::min_post_force(int /*vflag*/) dottangrad = bufout[6]; dotgrad = bufout[7]; - // project tangent vector on tangent space and normalize it + // check projection of tangent vector on tangent space + // and normalize it double buftan[3]; double tandots; @@ -655,7 +669,7 @@ double FixNEB_spin::geodesic_distance(double spi[3], double spj[3]) if (normcross == 0.0 && dots == 0.0) error->all(FLERR,"Incorrect calc. of geodesic_distance in Fix NEB/spin"); - dist = atan2(normcross,dots); + dist = atan2(normcross,dots); return dist; } diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 53b9da9c42..5dcd27ef2b 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -281,10 +281,9 @@ void NEB_spin::run() if (uscreen) { if (verbose) { fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " - "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " - "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " - "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " - "... ReplicaTorqueN MaxAtomTorqueN\n"); + "GradV0 GradV1 GradVc EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN " + "GradV0dottan ... GradVNdottan\n"); } else { fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " @@ -294,11 +293,10 @@ void NEB_spin::run() if (ulogfile) { if (verbose) { - fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " - "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " - "RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 " - "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " - "... ReplicaTorqueN MaxAtomTorqueN\n"); + fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " + "GradV0 GradV1 GradVc EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN " + "GradV0dottan ... GradVNdottan\n"); } else { fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " @@ -370,9 +368,7 @@ void NEB_spin::run() fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN " - "pathangle1 angletangrad1 anglegrad1 gradV1 " - "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " - "... ReplicaForceN MaxAtomForceN\n"); + "GradV0dottan ... GradVNdottan\n"); } else { fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc " @@ -382,12 +378,10 @@ void NEB_spin::run() } if (ulogfile) { if (verbose) { - fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " - "GradV0 GradV1 GradVc EBF EBR RDT " - "RD1 PE1 RD2 PE2 ... RDN PEN " - "pathangle1 angletangrad1 anglegrad1 gradV1 " - "ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 " - "... ReplicaForceN MaxAtomForceN\n"); + fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " + "GradV0 GradV1 GradVc EBF EBR RDT " + "RD1 PE1 RD2 PE2 ... RDN PEN " + "GradV0dottan ... GradVNdottan\n"); } else { fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc " @@ -879,17 +873,8 @@ void NEB_spin::print_status() for (int i = 0; i < nreplica; i++) fprintf(uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); if (verbose) { - fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, - all[0][3],freplica[0],fmaxatomInRepl[0]); - for (int i = 1; i < nreplica-1; i++) - fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, - 180-acos(all[i][6])*todeg,all[i][3],freplica[i], - fmaxatomInRepl[i]); - fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - NAN,180-acos(all[nreplica-1][5])*todeg,NAN,all[nreplica-1][3], - freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + for (int i = 0; i < nreplica; i++) + fprintf(uscreen,"%12.8g ",all[i][5]); } fprintf(uscreen,"\n"); } @@ -901,20 +886,10 @@ void NEB_spin::print_status() gradvnorm0,gradvnorm1,gradvnormc); fprintf(ulogfile,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); for (int i = 0; i < nreplica; i++) - //fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); - fprintf(ulogfile,"%12.8g %12.8g %12.8g %12.8g ",rdist[i],all[i][0],all[i][2],all[i][5]); + fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); if (verbose) { - fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, - all[0][3],freplica[0],fmaxatomInRepl[0]); - for (int i = 1; i < nreplica-1; i++) - fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, - 180-acos(all[i][6])*todeg,all[i][3],freplica[i], - fmaxatomInRepl[i]); - fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - NAN,180-acos(all[nreplica-1][5])*todeg,NAN,all[nreplica-1][3], - freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); + for (int i = 0; i < nreplica; i++) + fprintf(ulogfile,"%12.8g ",all[i][5]); } fprintf(ulogfile,"\n"); fflush(ulogfile); From 0b8332cedfa5f7df3979efd8525edcf45d7a5d2a Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 1 Apr 2019 17:52:59 -0600 Subject: [PATCH 20/35] Commit2 JT 040119 - improved verbose output - work on examples --- examples/SPIN/gneb/README | 4 +- examples/SPIN/gneb/interpolate/README | 7 + examples/SPIN/gneb/interpolate/interpolate.c | 109 +++ .../interpolate/reac_coords_iron_verbose.dat | 8 + examples/SPIN/gneb/{ => iron}/final.iron_spin | 0 examples/SPIN/gneb/{ => iron}/in.gneb.iron | 14 +- .../SPIN/gneb/{ => iron}/initial.iron_spin | 0 examples/SPIN/gneb/skyrmion/final.skyrmion | 401 +++++++++ examples/SPIN/gneb/skyrmion/in.gneb.skyrmion | 58 ++ examples/SPIN/gneb/skyrmion/initial.skyrmion | 818 ++++++++++++++++++ src/SPIN/neb_spin.cpp | 18 +- 11 files changed, 1415 insertions(+), 22 deletions(-) create mode 100644 examples/SPIN/gneb/interpolate/README create mode 100644 examples/SPIN/gneb/interpolate/interpolate.c create mode 100644 examples/SPIN/gneb/interpolate/reac_coords_iron_verbose.dat rename examples/SPIN/gneb/{ => iron}/final.iron_spin (100%) rename examples/SPIN/gneb/{ => iron}/in.gneb.iron (70%) rename examples/SPIN/gneb/{ => iron}/initial.iron_spin (100%) create mode 100644 examples/SPIN/gneb/skyrmion/final.skyrmion create mode 100644 examples/SPIN/gneb/skyrmion/in.gneb.skyrmion create mode 100644 examples/SPIN/gneb/skyrmion/initial.skyrmion diff --git a/examples/SPIN/gneb/README b/examples/SPIN/gneb/README index eeb4aa4692..7d388d898e 100644 --- a/examples/SPIN/gneb/README +++ b/examples/SPIN/gneb/README @@ -1,5 +1,5 @@ -Run this example as: +Run those examples as: -mpirun -np 3 lmp_g++ -partition 3x1 -in in.tad +mpirun -np 4 lmp_mpi -in in.gneb.iron -partition 4x1 You should be able to use any number of replicas >= 3. diff --git a/examples/SPIN/gneb/interpolate/README b/examples/SPIN/gneb/interpolate/README new file mode 100644 index 0000000000..d0f75226c5 --- /dev/null +++ b/examples/SPIN/gneb/interpolate/README @@ -0,0 +1,7 @@ +Interpolate.x tries to perform a cubic polynomial interpolation +of the MEP found + +Compile the program with: +gcc interpolate.c -o interpolate.x -lm -lgsl + + diff --git a/examples/SPIN/gneb/interpolate/interpolate.c b/examples/SPIN/gneb/interpolate/interpolate.c new file mode 100644 index 0000000000..48804d53a2 --- /dev/null +++ b/examples/SPIN/gneb/interpolate/interpolate.c @@ -0,0 +1,109 @@ +/* ------------------------------------------------------------------------ + Provide some explanation here +------------------------------------------------------------------------- */ + +/* ------------------------------------------------------------------------ + This program is a courtesy of Aleksei Ivanov (Univ. of Iceland) + Contributing authors: Aleksei Ivanov (Univ. of Iceland), + Julien Tranchida (SNL) +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include + +// calculate cubic coefficients + +void count_coefficient(double *V, double *F, double *R, double *a, double *b, + double *c,double *d,int M){ + /* R = square of distance between images*/ + /* V = energy of images */ + /* F = projection of real real forces along the path? */ + int i; + for(i = 0; i < M ; i++) { + a[i] = ( -2.0*(V[i+1]-V[i])/R[i] - F[i] - F[i+1] ) / (R[i]*R[i]); + //a[i] = ( -2.0*(V[i+1]-V[i])/sqrt(R[i]) - F[i] - F[i+1] ) / R[i]; + b[i] = ( 3.0*(V[i+1]-V[i]) + (2.0*F[i]+F[i+1])*R[i] ) / (R[i]*R[i]); + //b[i] = ( 3.0*(V[i+1]-V[i]) + (2.0*F[i]+F[i+1])*sqrt(R[i]) ) / R[i]; + c[i] = -F[i]; + d[i] = V[i]; + } +} + +// cubic spline + +double spline(double a,double b,double c,double d,double x) { + return (a*x*x*x + b*x*x + c*x + d); +} + +int main() { + int M=0; // M+1 = number of images + double *fmdottan; // projection of real forces on tangent path + double *coords; // initial value of reaction coords + double *V; // energy of images + double *dist; // square of the distance between images + double *a, *b, *c, *d ; // coefficients of cubic functions + double x; // reaction coordinate + double A,B; // additional variables for rnd + double length = 0.0; + int i,j; + FILE *data; + + printf("Enter M = number of images - 1 \n"); + scanf("%d",&M); + + // allocating and initializing tables + + a = calloc(M,sizeof(double)); // cubic coefficients + b = calloc(M,sizeof(double)); + c = calloc(M,sizeof(double)); + d = calloc(M,sizeof(double)); + V = calloc((M+1),sizeof(double)); // energies + coords = calloc((M+1),sizeof(double)); // reaction coordinates + fmdottan = calloc((M+1),sizeof(double)); // fm dot tangent + dist = calloc(M+1,sizeof(double)); // distance between images + + // reading input file + + if((data=fopen("reac_coords_iron_verbose.dat","r")) == NULL) { + //if((data=fopen("neb_init.dat","r")) == NULL) { + printf("Incorrect input file name."); + return 0; + } + + for(j=0; j < M+1; j++) { + fscanf(data,"%lf\t%lf\t%lf\t%lf\n",&coords[j],&V[j],&fmdottan[j],&dist[j]); + length += dist[j]; + printf("%lf %lf %lf %lf\n",coords[j],V[j],fmdottan[j],dist[j]); + } + + if( (fclose(data)) == 0) { + printf("Data stored, input file closed.\n "); + } + + // calculate value of coefficients + + count_coefficient(V,fmdottan,dist,a,b,c,d,M); + + // plot result of the interpolation + + if( ( data=fopen("interpolation_result.dat","w") )== NULL) { + printf("Interpolation file could not be open."); + return 0; + } + + A = B = 0.0; + for(i = 0; i < M ; i++) { + B += dist[i]; + printf("%13le\n",B); + for(j = 0; j <= 1000; j++) { + x = dist[i]*1.0e-3*j; + fprintf(data,"%13lf\t%13le\n",(x+A)/length,spline(a[i],b[i],c[i],d[i],x)); + } + A += dist[i]; + } + + return 0; +} diff --git a/examples/SPIN/gneb/interpolate/reac_coords_iron_verbose.dat b/examples/SPIN/gneb/interpolate/reac_coords_iron_verbose.dat new file mode 100644 index 0000000000..7a56274a31 --- /dev/null +++ b/examples/SPIN/gneb/interpolate/reac_coords_iron_verbose.dat @@ -0,0 +1,8 @@ +0.0000000 -3.915271 3.4995081e-17 2.4573077 +0.14285714 -3.9148148 -0.00059075739 2.4573077 +0.28571429 -3.9136926 -0.00072315767 2.4573077 +0.42857143 -3.9127883 -0.0003191228 2.4573265 +0.57142857 -3.9127883 0.0003191228 2.4403341 +0.71428571 -3.9136926 0.00072315767 2.4044093 +0.85714286 -3.9148148 0.00059075739 2.3766041 +1.0000000 -3.915271 -4.1231828e-17 0.0000000 diff --git a/examples/SPIN/gneb/final.iron_spin b/examples/SPIN/gneb/iron/final.iron_spin similarity index 100% rename from examples/SPIN/gneb/final.iron_spin rename to examples/SPIN/gneb/iron/final.iron_spin diff --git a/examples/SPIN/gneb/in.gneb.iron b/examples/SPIN/gneb/iron/in.gneb.iron similarity index 70% rename from examples/SPIN/gneb/in.gneb.iron rename to examples/SPIN/gneb/iron/in.gneb.iron index a8028392a1..4cfbd723b7 100644 --- a/examples/SPIN/gneb/in.gneb.iron +++ b/examples/SPIN/gneb/iron/in.gneb.iron @@ -8,17 +8,11 @@ atom_style spin # necessary for the serial algorithm (sametag) atom_modify map array -lattice bcc 2.8665 -region box block 0.0 4.0 0.0 4.0 0.0 1.0 -#create_box 1 box -#create_atoms 1 box - read_data initial.iron_spin # setting mass, mag. moments, and interactions for bcc iron mass 1 55.845 -#set group all spin 2.2 -1.0 0.0 0.0 pair_style spin/exchange 3.5 pair_coeff * * exchange 3.4 0.02726 0.2171 1.841 @@ -28,9 +22,7 @@ neigh_modify every 10 check yes delay 20 fix 1 all precession/spin zeeman 0.1 0.0 0.0 1.0 anisotropy 0.0001 1.0 0.0 0.0 fix_modify 1 energy yes -fix 2 all langevin/spin 0.0 0.0 21 fix 3 all neb/spin 1.0 -#fix 4 all nve/spin lattice no timestep 0.0001 thermo 100 @@ -52,10 +44,8 @@ thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz variable u universe 1 2 3 4 -#dump 1 all custom 100 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] dump 1 all custom 200 dump.$u type x y z c_outsp[1] c_outsp[2] c_outsp[3] min_style spin -min_modify alpha_damp 1.0 discret_factor 10.0 -neb/spin 1.0e-12 1.0e-12 50000 50000 10 final final.iron_spin -#neb/spin 1.0e-6 1.0e-6 1000 10 10 final final.iron_spin +min_modify alpha_damp 1.0 discrete_factor 10.0 +neb/spin 1.0e-12 1.0e-12 200000 100000 1000 final final.iron_spin verbose diff --git a/examples/SPIN/gneb/initial.iron_spin b/examples/SPIN/gneb/iron/initial.iron_spin similarity index 100% rename from examples/SPIN/gneb/initial.iron_spin rename to examples/SPIN/gneb/iron/initial.iron_spin diff --git a/examples/SPIN/gneb/skyrmion/final.skyrmion b/examples/SPIN/gneb/skyrmion/final.skyrmion new file mode 100644 index 0000000000..4ff51f6376 --- /dev/null +++ b/examples/SPIN/gneb/skyrmion/final.skyrmion @@ -0,0 +1,401 @@ +400 +1 2.5 0.0 0.0 0.0 0.0 0.0 1.0 +2 2.5 0.0 3.0 0.0 0.0 0.0 1.0 +3 2.5 0.0 6.0 0.0 0.0 0.0 1.0 +4 2.5 0.0 9.0 0.0 0.0 0.0 1.0 +5 2.5 0.0 12.0 0.0 0.0 0.0 1.0 +6 2.5 0.0 15.0 0.0 0.0 0.0 1.0 +7 2.5 0.0 18.0 0.0 0.0 0.0 1.0 +8 2.5 0.0 21.0 0.0 0.0 0.0 1.0 +9 2.5 0.0 24.0 0.0 0.0 0.0 1.0 +10 2.5 0.0 27.0 0.0 0.0 0.0 1.0 +11 2.5 0.0 30.0 0.0 0.0 0.0 1.0 +12 2.5 0.0 33.0 0.0 0.0 0.0 1.0 +13 2.5 0.0 36.0 0.0 0.0 0.0 1.0 +14 2.5 0.0 39.0 0.0 0.0 0.0 1.0 +15 2.5 0.0 42.0 0.0 0.0 0.0 1.0 +16 2.5 0.0 45.0 0.0 0.0 0.0 1.0 +17 2.5 0.0 48.0 0.0 0.0 0.0 1.0 +18 2.5 0.0 51.0 0.0 0.0 0.0 1.0 +19 2.5 0.0 54.0 0.0 0.0 0.0 1.0 +20 2.5 0.0 57.0 0.0 0.0 0.0 1.0 +21 2.5 3.0 0.0 0.0 0.0 0.0 1.0 +22 2.5 3.0 3.0 0.0 0.0 0.0 1.0 +23 2.5 3.0 6.0 0.0 0.0 0.0 1.0 +24 2.5 3.0 9.0 0.0 0.0 0.0 1.0 +25 2.5 3.0 12.0 0.0 0.0 0.0 1.0 +26 2.5 3.0 15.0 0.0 0.0 0.0 1.0 +27 2.5 3.0 18.0 0.0 0.0 0.0 1.0 +28 2.5 3.0 21.0 0.0 0.0 0.0 1.0 +29 2.5 3.0 24.0 0.0 0.0 0.0 1.0 +30 2.5 3.0 27.0 0.0 0.0 0.0 1.0 +31 2.5 3.0 30.0 0.0 0.0 0.0 1.0 +32 2.5 3.0 33.0 0.0 0.0 0.0 1.0 +33 2.5 3.0 36.0 0.0 0.0 0.0 1.0 +34 2.5 3.0 39.0 0.0 0.0 0.0 1.0 +35 2.5 3.0 42.0 0.0 0.0 0.0 1.0 +36 2.5 3.0 45.0 0.0 0.0 0.0 1.0 +37 2.5 3.0 48.0 0.0 0.0 0.0 1.0 +38 2.5 3.0 51.0 0.0 0.0 0.0 1.0 +39 2.5 3.0 54.0 0.0 0.0 0.0 1.0 +40 2.5 3.0 57.0 0.0 0.0 0.0 1.0 +41 2.5 6.0 0.0 0.0 0.0 0.0 1.0 +42 2.5 6.0 3.0 0.0 0.0 0.0 1.0 +43 2.5 6.0 6.0 0.0 0.0 0.0 1.0 +44 2.5 6.0 9.0 0.0 0.0 0.0 1.0 +45 2.5 6.0 12.0 0.0 0.0 0.0 1.0 +46 2.5 6.0 15.0 0.0 0.0 0.0 1.0 +47 2.5 6.0 18.0 0.0 0.0 0.0 1.0 +48 2.5 6.0 21.0 0.0 0.0 0.0 1.0 +49 2.5 6.0 24.0 0.0 0.0 0.0 1.0 +50 2.5 6.0 27.0 0.0 0.0 0.0 1.0 +51 2.5 6.0 30.0 0.0 0.0 0.0 1.0 +52 2.5 6.0 33.0 0.0 0.0 0.0 1.0 +53 2.5 6.0 36.0 0.0 0.0 0.0 1.0 +54 2.5 6.0 39.0 0.0 0.0 0.0 1.0 +55 2.5 6.0 42.0 0.0 0.0 0.0 1.0 +56 2.5 6.0 45.0 0.0 0.0 0.0 1.0 +57 2.5 6.0 48.0 0.0 0.0 0.0 1.0 +58 2.5 6.0 51.0 0.0 0.0 0.0 1.0 +59 2.5 6.0 54.0 0.0 0.0 0.0 1.0 +60 2.5 6.0 57.0 0.0 0.0 0.0 1.0 +61 2.5 9.0 0.0 0.0 0.0 0.0 1.0 +62 2.5 9.0 3.0 0.0 0.0 0.0 1.0 +63 2.5 9.0 6.0 0.0 0.0 0.0 1.0 +64 2.5 9.0 9.0 0.0 0.0 0.0 1.0 +65 2.5 9.0 12.0 0.0 0.0 0.0 1.0 +66 2.5 9.0 15.0 0.0 0.0 0.0 1.0 +67 2.5 9.0 18.0 0.0 0.0 0.0 1.0 +68 2.5 9.0 21.0 0.0 0.0 0.0 1.0 +69 2.5 9.0 24.0 0.0 0.0 0.0 1.0 +70 2.5 9.0 27.0 0.0 0.0 0.0 1.0 +71 2.5 9.0 30.0 0.0 0.0 0.0 1.0 +72 2.5 9.0 33.0 0.0 0.0 0.0 1.0 +73 2.5 9.0 36.0 0.0 0.0 0.0 1.0 +74 2.5 9.0 39.0 0.0 0.0 0.0 1.0 +75 2.5 9.0 42.0 0.0 0.0 0.0 1.0 +76 2.5 9.0 45.0 0.0 0.0 0.0 1.0 +77 2.5 9.0 48.0 0.0 0.0 0.0 1.0 +78 2.5 9.0 51.0 0.0 0.0 0.0 1.0 +79 2.5 9.0 54.0 0.0 0.0 0.0 1.0 +80 2.5 9.0 57.0 0.0 0.0 0.0 1.0 +81 2.5 12.0 0.0 0.0 0.0 0.0 1.0 +82 2.5 12.0 3.0 0.0 0.0 0.0 1.0 +83 2.5 12.0 6.0 0.0 0.0 0.0 1.0 +84 2.5 12.0 9.0 0.0 0.0 0.0 1.0 +85 2.5 12.0 12.0 0.0 0.0 0.0 1.0 +86 2.5 12.0 15.0 0.0 0.0 0.0 1.0 +87 2.5 12.0 18.0 0.0 0.0 0.0 1.0 +88 2.5 12.0 21.0 0.0 0.0 0.0 1.0 +89 2.5 12.0 24.0 0.0 0.0 0.0 1.0 +90 2.5 12.0 27.0 0.0 0.0 0.0 1.0 +91 2.5 12.0 30.0 0.0 0.0 0.0 1.0 +92 2.5 12.0 33.0 0.0 0.0 0.0 1.0 +93 2.5 12.0 36.0 0.0 0.0 0.0 1.0 +94 2.5 12.0 39.0 0.0 0.0 0.0 1.0 +95 2.5 12.0 42.0 0.0 0.0 0.0 1.0 +96 2.5 12.0 45.0 0.0 0.0 0.0 1.0 +97 2.5 12.0 48.0 0.0 0.0 0.0 1.0 +98 2.5 12.0 51.0 0.0 0.0 0.0 1.0 +99 2.5 12.0 54.0 0.0 0.0 0.0 1.0 +100 2.5 12.0 57.0 0.0 0.0 0.0 1.0 +101 2.5 15.0 0.0 0.0 0.0 0.0 1.0 +102 2.5 15.0 3.0 0.0 0.0 0.0 1.0 +103 2.5 15.0 6.0 0.0 0.0 0.0 1.0 +104 2.5 15.0 9.0 0.0 0.0 0.0 1.0 +105 2.5 15.0 12.0 0.0 0.0 0.0 1.0 +106 2.5 15.0 15.0 0.0 0.0 0.0 1.0 +107 2.5 15.0 18.0 0.0 0.0 0.0 1.0 +108 2.5 15.0 21.0 0.0 0.0 0.0 1.0 +109 2.5 15.0 24.0 0.0 0.0 0.0 1.0 +110 2.5 15.0 27.0 0.0 0.0 0.0 1.0 +111 2.5 15.0 30.0 0.0 0.0 0.0 1.0 +112 2.5 15.0 33.0 0.0 0.0 0.0 1.0 +113 2.5 15.0 36.0 0.0 0.0 0.0 1.0 +114 2.5 15.0 39.0 0.0 0.0 0.0 1.0 +115 2.5 15.0 42.0 0.0 0.0 0.0 1.0 +116 2.5 15.0 45.0 0.0 0.0 0.0 1.0 +117 2.5 15.0 48.0 0.0 0.0 0.0 1.0 +118 2.5 15.0 51.0 0.0 0.0 0.0 1.0 +119 2.5 15.0 54.0 0.0 0.0 0.0 1.0 +120 2.5 15.0 57.0 0.0 0.0 0.0 1.0 +121 2.5 18.0 0.0 0.0 0.0 0.0 1.0 +122 2.5 18.0 3.0 0.0 0.0 0.0 1.0 +123 2.5 18.0 6.0 0.0 0.0 0.0 1.0 +124 2.5 18.0 9.0 0.0 0.0 0.0 1.0 +125 2.5 18.0 12.0 0.0 0.0 0.0 1.0 +126 2.5 18.0 15.0 0.0 0.0 0.0 1.0 +127 2.5 18.0 18.0 0.0 0.0 0.0 1.0 +128 2.5 18.0 21.0 0.0 0.0 0.0 1.0 +129 2.5 18.0 24.0 0.0 0.0 0.0 1.0 +130 2.5 18.0 27.0 0.0 0.0 0.0 1.0 +131 2.5 18.0 30.0 0.0 0.0 0.0 1.0 +132 2.5 18.0 33.0 0.0 0.0 0.0 1.0 +133 2.5 18.0 36.0 0.0 0.0 0.0 1.0 +134 2.5 18.0 39.0 0.0 0.0 0.0 1.0 +135 2.5 18.0 42.0 0.0 0.0 0.0 1.0 +136 2.5 18.0 45.0 0.0 0.0 0.0 1.0 +137 2.5 18.0 48.0 0.0 0.0 0.0 1.0 +138 2.5 18.0 51.0 0.0 0.0 0.0 1.0 +139 2.5 18.0 54.0 0.0 0.0 0.0 1.0 +140 2.5 18.0 57.0 0.0 0.0 0.0 1.0 +141 2.5 21.0 0.0 0.0 0.0 0.0 1.0 +142 2.5 21.0 3.0 0.0 0.0 0.0 1.0 +143 2.5 21.0 6.0 0.0 0.0 0.0 1.0 +144 2.5 21.0 9.0 0.0 0.0 0.0 1.0 +145 2.5 21.0 12.0 0.0 0.0 0.0 1.0 +146 2.5 21.0 15.0 0.0 0.0 0.0 1.0 +147 2.5 21.0 18.0 0.0 0.0 0.0 1.0 +148 2.5 21.0 21.0 0.0 0.0 0.0 1.0 +149 2.5 21.0 24.0 0.0 0.0 0.0 1.0 +150 2.5 21.0 27.0 0.0 0.0 0.0 1.0 +151 2.5 21.0 30.0 0.0 0.0 0.0 1.0 +152 2.5 21.0 33.0 0.0 0.0 0.0 1.0 +153 2.5 21.0 36.0 0.0 0.0 0.0 1.0 +154 2.5 21.0 39.0 0.0 0.0 0.0 1.0 +155 2.5 21.0 42.0 0.0 0.0 0.0 1.0 +156 2.5 21.0 45.0 0.0 0.0 0.0 1.0 +157 2.5 21.0 48.0 0.0 0.0 0.0 1.0 +158 2.5 21.0 51.0 0.0 0.0 0.0 1.0 +159 2.5 21.0 54.0 0.0 0.0 0.0 1.0 +160 2.5 21.0 57.0 0.0 0.0 0.0 1.0 +161 2.5 24.0 0.0 0.0 0.0 0.0 1.0 +162 2.5 24.0 3.0 0.0 0.0 0.0 1.0 +163 2.5 24.0 6.0 0.0 0.0 0.0 1.0 +164 2.5 24.0 9.0 0.0 0.0 0.0 1.0 +165 2.5 24.0 12.0 0.0 0.0 0.0 1.0 +166 2.5 24.0 15.0 0.0 0.0 0.0 1.0 +167 2.5 24.0 18.0 0.0 0.0 0.0 1.0 +168 2.5 24.0 21.0 0.0 0.0 0.0 1.0 +169 2.5 24.0 24.0 0.0 0.0 0.0 1.0 +170 2.5 24.0 27.0 0.0 0.0 0.0 1.0 +171 2.5 24.0 30.0 0.0 0.0 0.0 1.0 +172 2.5 24.0 33.0 0.0 0.0 0.0 1.0 +173 2.5 24.0 36.0 0.0 0.0 0.0 1.0 +174 2.5 24.0 39.0 0.0 0.0 0.0 1.0 +175 2.5 24.0 42.0 0.0 0.0 0.0 1.0 +176 2.5 24.0 45.0 0.0 0.0 0.0 1.0 +177 2.5 24.0 48.0 0.0 0.0 0.0 1.0 +178 2.5 24.0 51.0 0.0 0.0 0.0 1.0 +179 2.5 24.0 54.0 0.0 0.0 0.0 1.0 +180 2.5 24.0 57.0 0.0 0.0 0.0 1.0 +181 2.5 27.0 0.0 0.0 0.0 0.0 1.0 +182 2.5 27.0 3.0 0.0 0.0 0.0 1.0 +183 2.5 27.0 6.0 0.0 0.0 0.0 1.0 +184 2.5 27.0 9.0 0.0 0.0 0.0 1.0 +185 2.5 27.0 12.0 0.0 0.0 0.0 1.0 +186 2.5 27.0 15.0 0.0 0.0 0.0 1.0 +187 2.5 27.0 18.0 0.0 0.0 0.0 1.0 +188 2.5 27.0 21.0 0.0 0.0 0.0 1.0 +189 2.5 27.0 24.0 0.0 0.0 0.0 1.0 +190 2.5 27.0 27.0 0.0 0.0 0.0 1.0 +191 2.5 27.0 30.0 0.0 0.0 0.0 1.0 +192 2.5 27.0 33.0 0.0 0.0 0.0 1.0 +193 2.5 27.0 36.0 0.0 0.0 0.0 1.0 +194 2.5 27.0 39.0 0.0 0.0 0.0 1.0 +195 2.5 27.0 42.0 0.0 0.0 0.0 1.0 +196 2.5 27.0 45.0 0.0 0.0 0.0 1.0 +197 2.5 27.0 48.0 0.0 0.0 0.0 1.0 +198 2.5 27.0 51.0 0.0 0.0 0.0 1.0 +199 2.5 27.0 54.0 0.0 0.0 0.0 1.0 +200 2.5 27.0 57.0 0.0 0.0 0.0 1.0 +201 2.5 30.0 0.0 0.0 0.0 0.0 1.0 +202 2.5 30.0 3.0 0.0 0.0 0.0 1.0 +203 2.5 30.0 6.0 0.0 0.0 0.0 1.0 +204 2.5 30.0 9.0 0.0 0.0 0.0 1.0 +205 2.5 30.0 12.0 0.0 0.0 0.0 1.0 +206 2.5 30.0 15.0 0.0 0.0 0.0 1.0 +207 2.5 30.0 18.0 0.0 0.0 0.0 1.0 +208 2.5 30.0 21.0 0.0 0.0 0.0 1.0 +209 2.5 30.0 24.0 0.0 0.0 0.0 1.0 +210 2.5 30.0 27.0 0.0 0.0 0.0 1.0 +211 2.5 30.0 30.0 0.0 0.0 0.0 1.0 +212 2.5 30.0 33.0 0.0 0.0 0.0 1.0 +213 2.5 30.0 36.0 0.0 0.0 0.0 1.0 +214 2.5 30.0 39.0 0.0 0.0 0.0 1.0 +215 2.5 30.0 42.0 0.0 0.0 0.0 1.0 +216 2.5 30.0 45.0 0.0 0.0 0.0 1.0 +217 2.5 30.0 48.0 0.0 0.0 0.0 1.0 +218 2.5 30.0 51.0 0.0 0.0 0.0 1.0 +219 2.5 30.0 54.0 0.0 0.0 0.0 1.0 +220 2.5 30.0 57.0 0.0 0.0 0.0 1.0 +221 2.5 33.0 0.0 0.0 0.0 0.0 1.0 +222 2.5 33.0 3.0 0.0 0.0 0.0 1.0 +223 2.5 33.0 6.0 0.0 0.0 0.0 1.0 +224 2.5 33.0 9.0 0.0 0.0 0.0 1.0 +225 2.5 33.0 12.0 0.0 0.0 0.0 1.0 +226 2.5 33.0 15.0 0.0 0.0 0.0 1.0 +227 2.5 33.0 18.0 0.0 0.0 0.0 1.0 +228 2.5 33.0 21.0 0.0 0.0 0.0 1.0 +229 2.5 33.0 24.0 0.0 0.0 0.0 1.0 +230 2.5 33.0 27.0 0.0 0.0 0.0 1.0 +231 2.5 33.0 30.0 0.0 0.0 0.0 1.0 +232 2.5 33.0 33.0 0.0 0.0 0.0 1.0 +233 2.5 33.0 36.0 0.0 0.0 0.0 1.0 +234 2.5 33.0 39.0 0.0 0.0 0.0 1.0 +235 2.5 33.0 42.0 0.0 0.0 0.0 1.0 +236 2.5 33.0 45.0 0.0 0.0 0.0 1.0 +237 2.5 33.0 48.0 0.0 0.0 0.0 1.0 +238 2.5 33.0 51.0 0.0 0.0 0.0 1.0 +239 2.5 33.0 54.0 0.0 0.0 0.0 1.0 +240 2.5 33.0 57.0 0.0 0.0 0.0 1.0 +241 2.5 36.0 0.0 0.0 0.0 0.0 1.0 +242 2.5 36.0 3.0 0.0 0.0 0.0 1.0 +243 2.5 36.0 6.0 0.0 0.0 0.0 1.0 +244 2.5 36.0 9.0 0.0 0.0 0.0 1.0 +245 2.5 36.0 12.0 0.0 0.0 0.0 1.0 +246 2.5 36.0 15.0 0.0 0.0 0.0 1.0 +247 2.5 36.0 18.0 0.0 0.0 0.0 1.0 +248 2.5 36.0 21.0 0.0 0.0 0.0 1.0 +249 2.5 36.0 24.0 0.0 0.0 0.0 1.0 +250 2.5 36.0 27.0 0.0 0.0 0.0 1.0 +251 2.5 36.0 30.0 0.0 0.0 0.0 1.0 +252 2.5 36.0 33.0 0.0 0.0 0.0 1.0 +253 2.5 36.0 36.0 0.0 0.0 0.0 1.0 +254 2.5 36.0 39.0 0.0 0.0 0.0 1.0 +255 2.5 36.0 42.0 0.0 0.0 0.0 1.0 +256 2.5 36.0 45.0 0.0 0.0 0.0 1.0 +257 2.5 36.0 48.0 0.0 0.0 0.0 1.0 +258 2.5 36.0 51.0 0.0 0.0 0.0 1.0 +259 2.5 36.0 54.0 0.0 0.0 0.0 1.0 +260 2.5 36.0 57.0 0.0 0.0 0.0 1.0 +261 2.5 39.0 0.0 0.0 0.0 0.0 1.0 +262 2.5 39.0 3.0 0.0 0.0 0.0 1.0 +263 2.5 39.0 6.0 0.0 0.0 0.0 1.0 +264 2.5 39.0 9.0 0.0 0.0 0.0 1.0 +265 2.5 39.0 12.0 0.0 0.0 0.0 1.0 +266 2.5 39.0 15.0 0.0 0.0 0.0 1.0 +267 2.5 39.0 18.0 0.0 0.0 0.0 1.0 +268 2.5 39.0 21.0 0.0 0.0 0.0 1.0 +269 2.5 39.0 24.0 0.0 0.0 0.0 1.0 +270 2.5 39.0 27.0 0.0 0.0 0.0 1.0 +271 2.5 39.0 30.0 0.0 0.0 0.0 1.0 +272 2.5 39.0 33.0 0.0 0.0 0.0 1.0 +273 2.5 39.0 36.0 0.0 0.0 0.0 1.0 +274 2.5 39.0 39.0 0.0 0.0 0.0 1.0 +275 2.5 39.0 42.0 0.0 0.0 0.0 1.0 +276 2.5 39.0 45.0 0.0 0.0 0.0 1.0 +277 2.5 39.0 48.0 0.0 0.0 0.0 1.0 +278 2.5 39.0 51.0 0.0 0.0 0.0 1.0 +279 2.5 39.0 54.0 0.0 0.0 0.0 1.0 +280 2.5 39.0 57.0 0.0 0.0 0.0 1.0 +281 2.5 42.0 0.0 0.0 0.0 0.0 1.0 +282 2.5 42.0 3.0 0.0 0.0 0.0 1.0 +283 2.5 42.0 6.0 0.0 0.0 0.0 1.0 +284 2.5 42.0 9.0 0.0 0.0 0.0 1.0 +285 2.5 42.0 12.0 0.0 0.0 0.0 1.0 +286 2.5 42.0 15.0 0.0 0.0 0.0 1.0 +287 2.5 42.0 18.0 0.0 0.0 0.0 1.0 +288 2.5 42.0 21.0 0.0 0.0 0.0 1.0 +289 2.5 42.0 24.0 0.0 0.0 0.0 1.0 +290 2.5 42.0 27.0 0.0 0.0 0.0 1.0 +291 2.5 42.0 30.0 0.0 0.0 0.0 1.0 +292 2.5 42.0 33.0 0.0 0.0 0.0 1.0 +293 2.5 42.0 36.0 0.0 0.0 0.0 1.0 +294 2.5 42.0 39.0 0.0 0.0 0.0 1.0 +295 2.5 42.0 42.0 0.0 0.0 0.0 1.0 +296 2.5 42.0 45.0 0.0 0.0 0.0 1.0 +297 2.5 42.0 48.0 0.0 0.0 0.0 1.0 +298 2.5 42.0 51.0 0.0 0.0 0.0 1.0 +299 2.5 42.0 54.0 0.0 0.0 0.0 1.0 +300 2.5 42.0 57.0 0.0 0.0 0.0 1.0 +301 2.5 45.0 0.0 0.0 0.0 0.0 1.0 +302 2.5 45.0 3.0 0.0 0.0 0.0 1.0 +303 2.5 45.0 6.0 0.0 0.0 0.0 1.0 +304 2.5 45.0 9.0 0.0 0.0 0.0 1.0 +305 2.5 45.0 12.0 0.0 0.0 0.0 1.0 +306 2.5 45.0 15.0 0.0 0.0 0.0 1.0 +307 2.5 45.0 18.0 0.0 0.0 0.0 1.0 +308 2.5 45.0 21.0 0.0 0.0 0.0 1.0 +309 2.5 45.0 24.0 0.0 0.0 0.0 1.0 +310 2.5 45.0 27.0 0.0 0.0 0.0 1.0 +311 2.5 45.0 30.0 0.0 0.0 0.0 1.0 +312 2.5 45.0 33.0 0.0 0.0 0.0 1.0 +313 2.5 45.0 36.0 0.0 0.0 0.0 1.0 +314 2.5 45.0 39.0 0.0 0.0 0.0 1.0 +315 2.5 45.0 42.0 0.0 0.0 0.0 1.0 +316 2.5 45.0 45.0 0.0 0.0 0.0 1.0 +317 2.5 45.0 48.0 0.0 0.0 0.0 1.0 +318 2.5 45.0 51.0 0.0 0.0 0.0 1.0 +319 2.5 45.0 54.0 0.0 0.0 0.0 1.0 +320 2.5 45.0 57.0 0.0 0.0 0.0 1.0 +321 2.5 48.0 0.0 0.0 0.0 0.0 1.0 +322 2.5 48.0 3.0 0.0 0.0 0.0 1.0 +323 2.5 48.0 6.0 0.0 0.0 0.0 1.0 +324 2.5 48.0 9.0 0.0 0.0 0.0 1.0 +325 2.5 48.0 12.0 0.0 0.0 0.0 1.0 +326 2.5 48.0 15.0 0.0 0.0 0.0 1.0 +327 2.5 48.0 18.0 0.0 0.0 0.0 1.0 +328 2.5 48.0 21.0 0.0 0.0 0.0 1.0 +329 2.5 48.0 24.0 0.0 0.0 0.0 1.0 +330 2.5 48.0 27.0 0.0 0.0 0.0 1.0 +331 2.5 48.0 30.0 0.0 0.0 0.0 1.0 +332 2.5 48.0 33.0 0.0 0.0 0.0 1.0 +333 2.5 48.0 36.0 0.0 0.0 0.0 1.0 +334 2.5 48.0 39.0 0.0 0.0 0.0 1.0 +335 2.5 48.0 42.0 0.0 0.0 0.0 1.0 +336 2.5 48.0 45.0 0.0 0.0 0.0 1.0 +337 2.5 48.0 48.0 0.0 0.0 0.0 1.0 +338 2.5 48.0 51.0 0.0 0.0 0.0 1.0 +339 2.5 48.0 54.0 0.0 0.0 0.0 1.0 +340 2.5 48.0 57.0 0.0 0.0 0.0 1.0 +341 2.5 51.0 0.0 0.0 0.0 0.0 1.0 +342 2.5 51.0 3.0 0.0 0.0 0.0 1.0 +343 2.5 51.0 6.0 0.0 0.0 0.0 1.0 +344 2.5 51.0 9.0 0.0 0.0 0.0 1.0 +345 2.5 51.0 12.0 0.0 0.0 0.0 1.0 +346 2.5 51.0 15.0 0.0 0.0 0.0 1.0 +347 2.5 51.0 18.0 0.0 0.0 0.0 1.0 +348 2.5 51.0 21.0 0.0 0.0 0.0 1.0 +349 2.5 51.0 24.0 0.0 0.0 0.0 1.0 +350 2.5 51.0 27.0 0.0 0.0 0.0 1.0 +351 2.5 51.0 30.0 0.0 0.0 0.0 1.0 +352 2.5 51.0 33.0 0.0 0.0 0.0 1.0 +353 2.5 51.0 36.0 0.0 0.0 0.0 1.0 +354 2.5 51.0 39.0 0.0 0.0 0.0 1.0 +355 2.5 51.0 42.0 0.0 0.0 0.0 1.0 +356 2.5 51.0 45.0 0.0 0.0 0.0 1.0 +357 2.5 51.0 48.0 0.0 0.0 0.0 1.0 +358 2.5 51.0 51.0 0.0 0.0 0.0 1.0 +359 2.5 51.0 54.0 0.0 0.0 0.0 1.0 +360 2.5 51.0 57.0 0.0 0.0 0.0 1.0 +361 2.5 54.0 0.0 0.0 0.0 0.0 1.0 +362 2.5 54.0 3.0 0.0 0.0 0.0 1.0 +363 2.5 54.0 6.0 0.0 0.0 0.0 1.0 +364 2.5 54.0 9.0 0.0 0.0 0.0 1.0 +365 2.5 54.0 12.0 0.0 0.0 0.0 1.0 +366 2.5 54.0 15.0 0.0 0.0 0.0 1.0 +367 2.5 54.0 18.0 0.0 0.0 0.0 1.0 +368 2.5 54.0 21.0 0.0 0.0 0.0 1.0 +369 2.5 54.0 24.0 0.0 0.0 0.0 1.0 +370 2.5 54.0 27.0 0.0 0.0 0.0 1.0 +371 2.5 54.0 30.0 0.0 0.0 0.0 1.0 +372 2.5 54.0 33.0 0.0 0.0 0.0 1.0 +373 2.5 54.0 36.0 0.0 0.0 0.0 1.0 +374 2.5 54.0 39.0 0.0 0.0 0.0 1.0 +375 2.5 54.0 42.0 0.0 0.0 0.0 1.0 +376 2.5 54.0 45.0 0.0 0.0 0.0 1.0 +377 2.5 54.0 48.0 0.0 0.0 0.0 1.0 +378 2.5 54.0 51.0 0.0 0.0 0.0 1.0 +379 2.5 54.0 54.0 0.0 0.0 0.0 1.0 +380 2.5 54.0 57.0 0.0 0.0 0.0 1.0 +381 2.5 57.0 0.0 0.0 0.0 0.0 1.0 +382 2.5 57.0 3.0 0.0 0.0 0.0 1.0 +383 2.5 57.0 6.0 0.0 0.0 0.0 1.0 +384 2.5 57.0 9.0 0.0 0.0 0.0 1.0 +385 2.5 57.0 12.0 0.0 0.0 0.0 1.0 +386 2.5 57.0 15.0 0.0 0.0 0.0 1.0 +387 2.5 57.0 18.0 0.0 0.0 0.0 1.0 +388 2.5 57.0 21.0 0.0 0.0 0.0 1.0 +389 2.5 57.0 24.0 0.0 0.0 0.0 1.0 +390 2.5 57.0 27.0 0.0 0.0 0.0 1.0 +391 2.5 57.0 30.0 0.0 0.0 0.0 1.0 +392 2.5 57.0 33.0 0.0 0.0 0.0 1.0 +393 2.5 57.0 36.0 0.0 0.0 0.0 1.0 +394 2.5 57.0 39.0 0.0 0.0 0.0 1.0 +395 2.5 57.0 42.0 0.0 0.0 0.0 1.0 +396 2.5 57.0 45.0 0.0 0.0 0.0 1.0 +397 2.5 57.0 48.0 0.0 0.0 0.0 1.0 +398 2.5 57.0 51.0 0.0 0.0 0.0 1.0 +399 2.5 57.0 54.0 0.0 0.0 0.0 1.0 +400 2.5 57.0 57.0 0.0 0.0 0.0 1.0 diff --git a/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion b/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion new file mode 100644 index 0000000000..aab6376e98 --- /dev/null +++ b/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion @@ -0,0 +1,58 @@ +# bcc iron in a 3d periodic box + +units metal +dimension 3 +boundary p p f +atom_style spin + +# necessary for the serial algorithm (sametag) +atom_modify map array + +#lattice sc 3.0 +#region box block 0.0 20.0 0.0 20.0 0.0 1.0 +#create_box 1 box +#create_atoms 1 box + +read_data initial.skyrmion + +# setting mass, mag. moments, and interactions for bcc iron + +mass 1 55.845 +#set group all spin 2.2 -1.0 0.0 0.0 + +pair_style hybrid/overlay spin/exchange 3.1 spin/dmi 3.1 +pair_coeff * * spin/exchange exchange 3.1 0.01593 0.06626915552 1.211 +pair_coeff * * spin/dmi dmi 3.1 0.12e-03 0.0 0.0 1.0 + +neighbor 0.1 bin +neigh_modify every 10 check yes delay 20 + +fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 anisotropy 5e-05 0.0 0.0 1.0 +fix_modify 1 energy yes +fix 2 all langevin/spin 0.0 0.0 21 +fix 3 all neb/spin 1.0 +#fix 4 all nve/spin lattice no + +timestep 0.0001 +#run 0 + +compute out_mag all spin +variable magx equal c_out_mag[1] +variable magy equal c_out_mag[2] +variable magz equal c_out_mag[3] +variable magnorm equal c_out_mag[4] +variable emag equal c_out_mag[5] + +thermo 100 +thermo_style custom step time v_magx v_magz v_magnorm etotal +thermo_modify format float %20.15g + +compute outsp all property/atom spx spy spz sp fmx fmy fmz +variable u universe 1 2 3 4 +#dump 1 all custom 100 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] +dump 1 all custom 1 dump.$u type x y z c_outsp[1] c_outsp[2] c_outsp[3] + +min_style spin +min_modify alpha_damp 1.0 discret_factor 10.0 +neb/spin 1.0e-16 1.0e-16 1000 1000 10 final final.skyrmion +#neb/spin 1.0e-16 1.0e-16 10 10 10 final final.skyrmion diff --git a/examples/SPIN/gneb/skyrmion/initial.skyrmion b/examples/SPIN/gneb/skyrmion/initial.skyrmion new file mode 100644 index 0000000000..f940aee182 --- /dev/null +++ b/examples/SPIN/gneb/skyrmion/initial.skyrmion @@ -0,0 +1,818 @@ +LAMMPS data file via write_data, version 28 Feb 2019, timestep = 6 + +400 atoms +1 atom types + +0.0000000000000000e+00 6.0000000000000000e+01 xlo xhi +0.0000000000000000e+00 6.0000000000000000e+01 ylo yhi +0.0000000000000000e+00 3.0000000000000000e+00 zlo zhi + +Masses + +1 55.845 + +Atoms # spin + +1 1 2.5000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -3.9693242391277868e-03 -3.9693242391277929e-03 9.9998424434096433e-01 0 0 0 +21 1 2.5000000000000000e+00 3.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.1868011343002482e-02 -4.8145058779812530e-03 9.9991798205648519e-01 0 0 0 +41 1 2.5000000000000000e+00 6.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.9561861499557517e-02 -6.5828744882500201e-03 9.9978697697966845e-01 0 0 0 +61 1 2.5000000000000000e+00 9.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2.6644762521588476e-02 -9.3989438861432541e-03 9.9960077855311480e-01 0 0 0 +81 1 2.5000000000000000e+00 1.2000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 -3.2364838887478299e-02 -1.3362272507461704e-02 9.9938679542868891e-01 0 0 0 +101 1 2.5000000000000000e+00 1.5000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 -3.5634992015801843e-02 -1.8429703183501425e-02 9.9919492261750509e-01 0 0 0 +121 1 2.5000000000000000e+00 1.8000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 -3.5235119566844247e-02 -2.4270277420221115e-02 9.9908430073895971e-01 0 0 0 +141 1 2.5000000000000000e+00 2.1000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 -3.0237916900163156e-02 -3.0163850736159143e-02 9.9908748890690546e-01 0 0 0 +161 1 2.5000000000000000e+00 2.4000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 -2.0551704657275890e-02 -3.5058787503171429e-02 9.9917391321755789e-01 0 0 0 +181 1 2.5000000000000000e+00 2.7000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 -7.2971667669136115e-03 -3.7860607272964066e-02 9.9925638640646097e-01 0 0 0 +201 1 2.5000000000000000e+00 3.0000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 7.2971667669136028e-03 -3.7860607272964066e-02 9.9925638640646086e-01 0 0 0 +221 1 2.5000000000000000e+00 3.3000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 2.0551704657275901e-02 -3.5058787503171443e-02 9.9917391321755789e-01 0 0 0 +241 1 2.5000000000000000e+00 3.6000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 3.0237916900163156e-02 -3.0163850736159153e-02 9.9908748890690535e-01 0 0 0 +261 1 2.5000000000000000e+00 3.9000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 3.5235119566844234e-02 -2.4270277420221108e-02 9.9908430073895960e-01 0 0 0 +281 1 2.5000000000000000e+00 4.2000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 3.5634992015801829e-02 -1.8429703183501414e-02 9.9919492261750498e-01 0 0 0 +301 1 2.5000000000000000e+00 4.5000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 3.2364838887478306e-02 -1.3362272507461704e-02 9.9938679542868891e-01 0 0 0 +321 1 2.5000000000000000e+00 4.8000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 2.6644762521588494e-02 -9.3989438861432611e-03 9.9960077855311491e-01 0 0 0 +341 1 2.5000000000000000e+00 5.1000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 1.9561861499557517e-02 -6.5828744882500201e-03 9.9978697697966856e-01 0 0 0 +361 1 2.5000000000000000e+00 5.4000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 1.1868011343002482e-02 -4.8145058779812547e-03 9.9991798205648508e-01 0 0 0 +381 1 2.5000000000000000e+00 5.7000000000000000e+01 0.0000000000000000e+00 0.0000000000000000e+00 3.9693242391277929e-03 -3.9693242391277937e-03 9.9998424434096445e-01 0 0 0 +2 1 2.5000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 0.0000000000000000e+00 -4.8145058779812512e-03 -1.1868011343002475e-02 9.9991798205648519e-01 0 0 0 +22 1 2.5000000000000000e+00 3.0000000000000000e+00 3.0000000000000000e+00 0.0000000000000000e+00 -1.4489047587394138e-02 -1.4489047587394138e-02 9.9979004545955574e-01 0 0 0 +42 1 2.5000000000000000e+00 6.0000000000000000e+00 3.0000000000000000e+00 0.0000000000000000e+00 -2.4184841732588187e-02 -2.0009637034407928e-02 9.9950723251816487e-01 0 0 0 +62 1 2.5000000000000000e+00 9.0000000000000000e+00 3.0000000000000000e+00 0.0000000000000000e+00 -3.3534698701154796e-02 -2.8894018478272422e-02 9.9901979944303421e-01 0 0 0 +82 1 2.5000000000000000e+00 1.2000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 -4.1631298256624205e-02 -4.1569375222726884e-02 9.9826791095830603e-01 0 0 0 +102 1 2.5000000000000000e+00 1.5000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 -4.6947676140268457e-02 -5.8031121465001792e-02 9.9721026100143129e-01 0 0 0 +122 1 2.5000000000000000e+00 1.8000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 -4.7535409319668050e-02 -7.7312985281705895e-02 9.9587302763336383e-01 0 0 0 +142 1 2.5000000000000000e+00 2.1000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 -4.1653952417990837e-02 -9.7059251840902777e-02 9.9440658177630958e-01 0 0 0 +162 1 2.5000000000000000e+00 2.4000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 -2.8752729368399305e-02 -1.1365104497068100e-01 9.9310458690459180e-01 0 0 0 +182 1 2.5000000000000000e+00 2.7000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 -1.0293413501576094e-02 -1.2321728304286263e-01 9.9232633079951105e-01 0 0 0 +202 1 2.5000000000000000e+00 3.0000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 1.0293413501576086e-02 -1.2321728304286261e-01 9.9232633079951116e-01 0 0 0 +222 1 2.5000000000000000e+00 3.3000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 2.8752729368399291e-02 -1.1365104497068100e-01 9.9310458690459180e-01 0 0 0 +242 1 2.5000000000000000e+00 3.6000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 4.1653952417990824e-02 -9.7059251840902777e-02 9.9440658177630958e-01 0 0 0 +262 1 2.5000000000000000e+00 3.9000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 4.7535409319668057e-02 -7.7312985281705895e-02 9.9587302763336383e-01 0 0 0 +282 1 2.5000000000000000e+00 4.2000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 4.6947676140268443e-02 -5.8031121465001792e-02 9.9721026100143140e-01 0 0 0 +302 1 2.5000000000000000e+00 4.5000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 4.1631298256624191e-02 -4.1569375222726877e-02 9.9826791095830592e-01 0 0 0 +322 1 2.5000000000000000e+00 4.8000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 3.3534698701154809e-02 -2.8894018478272433e-02 9.9901979944303410e-01 0 0 0 +342 1 2.5000000000000000e+00 5.1000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 2.4184841732588204e-02 -2.0009637034407945e-02 9.9950723251816487e-01 0 0 0 +362 1 2.5000000000000000e+00 5.4000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 1.4489047587394149e-02 -1.4489047587394138e-02 9.9979004545955585e-01 0 0 0 +382 1 2.5000000000000000e+00 5.7000000000000000e+01 3.0000000000000000e+00 0.0000000000000000e+00 4.8145058779812547e-03 -1.1868011343002482e-02 9.9991798205648519e-01 0 0 0 +3 1 2.5000000000000000e+00 0.0000000000000000e+00 6.0000000000000000e+00 0.0000000000000000e+00 -6.5828744882500158e-03 -1.9561861499557527e-02 9.9978697697966856e-01 0 0 0 +23 1 2.5000000000000000e+00 3.0000000000000000e+00 6.0000000000000000e+00 0.0000000000000000e+00 -2.0009637034407932e-02 -2.4184841732588200e-02 9.9950723251816498e-01 0 0 0 +43 1 2.5000000000000000e+00 6.0000000000000000e+00 6.0000000000000000e+00 0.0000000000000000e+00 -3.4047077037887570e-02 -3.4047077037887577e-02 9.9884012388887977e-01 0 0 0 +63 1 2.5000000000000000e+00 9.0000000000000000e+00 6.0000000000000000e+00 0.0000000000000000e+00 -4.8498220596720307e-02 -5.0241530269051260e-02 9.9755887607457838e-01 0 0 0 +83 1 2.5000000000000000e+00 1.2000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 -6.2196104012276265e-02 -7.3954811425103587e-02 9.9532021506285684e-01 0 0 0 +103 1 2.5000000000000000e+00 1.5000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 -7.2649992877525826e-02 -1.0567933713226435e-01 9.9174283775491956e-01 0 0 0 +123 1 2.5000000000000000e+00 1.8000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 -7.6126593015943808e-02 -1.4398087111736477e-01 9.8664798717073865e-01 0 0 0 +143 1 2.5000000000000000e+00 2.1000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 -6.8709104650143085e-02 -1.8428174194944069e-01 9.8046891767268973e-01 0 0 0 +163 1 2.5000000000000000e+00 2.4000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 -4.8457456104349643e-02 -2.1884669159068457e-01 9.7455528346405618e-01 0 0 0 +183 1 2.5000000000000000e+00 2.7000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 -1.7543173966404597e-02 -2.3902270727461428e-01 9.7085548999544657e-01 0 0 0 +203 1 2.5000000000000000e+00 3.0000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 1.7543173966404587e-02 -2.3902270727461422e-01 9.7085548999544646e-01 0 0 0 +223 1 2.5000000000000000e+00 3.3000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 4.8457456104349608e-02 -2.1884669159068454e-01 9.7455528346405618e-01 0 0 0 +243 1 2.5000000000000000e+00 3.6000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 6.8709104650143044e-02 -1.8428174194944069e-01 9.8046891767268962e-01 0 0 0 +263 1 2.5000000000000000e+00 3.9000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 7.6126593015943766e-02 -1.4398087111736474e-01 9.8664798717073865e-01 0 0 0 +283 1 2.5000000000000000e+00 4.2000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 7.2649992877525826e-02 -1.0567933713226434e-01 9.9174283775491956e-01 0 0 0 +303 1 2.5000000000000000e+00 4.5000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 6.2196104012276258e-02 -7.3954811425103573e-02 9.9532021506285673e-01 0 0 0 +323 1 2.5000000000000000e+00 4.8000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 4.8498220596720307e-02 -5.0241530269051260e-02 9.9755887607457838e-01 0 0 0 +343 1 2.5000000000000000e+00 5.1000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 3.4047077037887577e-02 -3.4047077037887577e-02 9.9884012388887966e-01 0 0 0 +363 1 2.5000000000000000e+00 5.4000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 2.0009637034407942e-02 -2.4184841732588211e-02 9.9950723251816498e-01 0 0 0 +383 1 2.5000000000000000e+00 5.7000000000000000e+01 6.0000000000000000e+00 0.0000000000000000e+00 6.5828744882500201e-03 -1.9561861499557531e-02 9.9978697697966856e-01 0 0 0 +4 1 2.5000000000000000e+00 0.0000000000000000e+00 9.0000000000000000e+00 0.0000000000000000e+00 -9.3989438861432524e-03 -2.6644762521588497e-02 9.9960077855311480e-01 0 0 0 +24 1 2.5000000000000000e+00 3.0000000000000000e+00 9.0000000000000000e+00 0.0000000000000000e+00 -2.8894018478272426e-02 -3.3534698701154803e-02 9.9901979944303410e-01 0 0 0 +44 1 2.5000000000000000e+00 6.0000000000000000e+00 9.0000000000000000e+00 0.0000000000000000e+00 -5.0241530269051232e-02 -4.8498220596720286e-02 9.9755887607457827e-01 0 0 0 +64 1 2.5000000000000000e+00 9.0000000000000000e+00 9.0000000000000000e+00 0.0000000000000000e+00 -7.3771080474423129e-02 -7.3771080474423115e-02 9.9454293792237669e-01 0 0 0 +84 1 2.5000000000000000e+00 1.2000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 -9.8127311868331568e-02 -1.1214098437153223e-01 9.8883539089662387e-01 0 0 0 +104 1 2.5000000000000000e+00 1.5000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 -1.1922421797550638e-01 -1.6561310406555055e-01 9.7895755046370747e-01 0 0 0 +124 1 2.5000000000000000e+00 1.8000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 -1.2975986317850730e-01 -2.3284022614534144e-01 9.6381938504912923e-01 0 0 0 +144 1 2.5000000000000000e+00 2.1000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 -1.2090775615411226e-01 -3.0602867088565672e-01 9.4431338394504205e-01 0 0 0 +164 1 2.5000000000000000e+00 2.4000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 -8.7191355151399766e-02 -3.7026717261459724e-01 9.2482424734154478e-01 0 0 0 +184 1 2.5000000000000000e+00 2.7000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 -3.1922103301157183e-02 -4.0821375936870385e-01 9.1232806927272614e-01 0 0 0 +204 1 2.5000000000000000e+00 3.0000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 3.1922103301157155e-02 -4.0821375936870385e-01 9.1232806927272625e-01 0 0 0 +224 1 2.5000000000000000e+00 3.3000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 8.7191355151399724e-02 -3.7026717261459718e-01 9.2482424734154478e-01 0 0 0 +244 1 2.5000000000000000e+00 3.6000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 1.2090775615411219e-01 -3.0602867088565661e-01 9.4431338394504194e-01 0 0 0 +264 1 2.5000000000000000e+00 3.9000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 1.2975986317850724e-01 -2.3284022614534142e-01 9.6381938504912912e-01 0 0 0 +284 1 2.5000000000000000e+00 4.2000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 1.1922421797550635e-01 -1.6561310406555052e-01 9.7895755046370747e-01 0 0 0 +304 1 2.5000000000000000e+00 4.5000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 9.8127311868331568e-02 -1.1214098437153228e-01 9.8883539089662398e-01 0 0 0 +324 1 2.5000000000000000e+00 4.8000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 7.3771080474423129e-02 -7.3771080474423142e-02 9.9454293792237669e-01 0 0 0 +344 1 2.5000000000000000e+00 5.1000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 5.0241530269051253e-02 -4.8498220596720314e-02 9.9755887607457827e-01 0 0 0 +364 1 2.5000000000000000e+00 5.4000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 2.8894018478272443e-02 -3.3534698701154816e-02 9.9901979944303410e-01 0 0 0 +384 1 2.5000000000000000e+00 5.7000000000000000e+01 9.0000000000000000e+00 0.0000000000000000e+00 9.3989438861432611e-03 -2.6644762521588494e-02 9.9960077855311480e-01 0 0 0 +5 1 2.5000000000000000e+00 0.0000000000000000e+00 1.2000000000000000e+01 0.0000000000000000e+00 -1.3362272507461699e-02 -3.2364838887478299e-02 9.9938679542868880e-01 0 0 0 +25 1 2.5000000000000000e+00 3.0000000000000000e+00 1.2000000000000000e+01 0.0000000000000000e+00 -4.1569375222726863e-02 -4.1631298256624198e-02 9.9826791095830603e-01 0 0 0 +45 1 2.5000000000000000e+00 6.0000000000000000e+00 1.2000000000000000e+01 0.0000000000000000e+00 -7.3954811425103559e-02 -6.2196104012276245e-02 9.9532021506285673e-01 0 0 0 +65 1 2.5000000000000000e+00 9.0000000000000000e+00 1.2000000000000000e+01 0.0000000000000000e+00 -1.1214098437153225e-01 -9.8127311868331554e-02 9.8883539089662398e-01 0 0 0 +85 1 2.5000000000000000e+00 1.2000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 -1.5508313718777630e-01 -1.5508313718777628e-01 9.7565282817198595e-01 0 0 0 +105 1 2.5000000000000000e+00 1.5000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 -1.9646003525323200e-01 -2.3830565311068275e-01 9.5111191257590177e-01 0 0 0 +125 1 2.5000000000000000e+00 1.8000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 -2.2234110900479689e-01 -3.4758786972735528e-01 9.1090455266450188e-01 0 0 0 +145 1 2.5000000000000000e+00 2.1000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 -2.1357380845070773e-01 -4.7013886220911955e-01 8.5636188529416402e-01 0 0 0 +165 1 2.5000000000000000e+00 2.4000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 -1.5692234237038313e-01 -5.7886257432716870e-01 8.0018341554190886e-01 0 0 0 +185 1 2.5000000000000000e+00 2.7000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 -5.7920936211537863e-02 -6.4295931380698856e-01 7.6370706814669809e-01 0 0 0 +205 1 2.5000000000000000e+00 3.0000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 5.7920936211537793e-02 -6.4295931380698856e-01 7.6370706814669809e-01 0 0 0 +225 1 2.5000000000000000e+00 3.3000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 1.5692234237038311e-01 -5.7886257432716881e-01 8.0018341554190908e-01 0 0 0 +245 1 2.5000000000000000e+00 3.6000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 2.1357380845070767e-01 -4.7013886220911949e-01 8.5636188529416413e-01 0 0 0 +265 1 2.5000000000000000e+00 3.9000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 2.2234110900479689e-01 -3.4758786972735528e-01 9.1090455266450188e-01 0 0 0 +285 1 2.5000000000000000e+00 4.2000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 1.9646003525323205e-01 -2.3830565311068283e-01 9.5111191257590177e-01 0 0 0 +305 1 2.5000000000000000e+00 4.5000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 1.5508313718777633e-01 -1.5508313718777636e-01 9.7565282817198595e-01 0 0 0 +325 1 2.5000000000000000e+00 4.8000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 1.1214098437153229e-01 -9.8127311868331610e-02 9.8883539089662398e-01 0 0 0 +345 1 2.5000000000000000e+00 5.1000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 7.3954811425103614e-02 -6.2196104012276265e-02 9.9532021506285684e-01 0 0 0 +365 1 2.5000000000000000e+00 5.4000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 4.1569375222726898e-02 -4.1631298256624198e-02 9.9826791095830603e-01 0 0 0 +385 1 2.5000000000000000e+00 5.7000000000000000e+01 1.2000000000000000e+01 0.0000000000000000e+00 1.3362272507461706e-02 -3.2364838887478299e-02 9.9938679542868891e-01 0 0 0 +6 1 2.5000000000000000e+00 0.0000000000000000e+00 1.5000000000000000e+01 0.0000000000000000e+00 -1.8429703183501404e-02 -3.5634992015801836e-02 9.9919492261750509e-01 0 0 0 +26 1 2.5000000000000000e+00 3.0000000000000000e+00 1.5000000000000000e+01 0.0000000000000000e+00 -5.8031121465001771e-02 -4.6947676140268457e-02 9.9721026100143140e-01 0 0 0 +46 1 2.5000000000000000e+00 6.0000000000000000e+00 1.5000000000000000e+01 0.0000000000000000e+00 -1.0567933713226434e-01 -7.2649992877525812e-02 9.9174283775491956e-01 0 0 0 +66 1 2.5000000000000000e+00 9.0000000000000000e+00 1.5000000000000000e+01 0.0000000000000000e+00 -1.6561310406555055e-01 -1.1922421797550634e-01 9.7895755046370747e-01 0 0 0 +86 1 2.5000000000000000e+00 1.2000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 -2.3830565311068275e-01 -1.9646003525323197e-01 9.5111191257590177e-01 0 0 0 +106 1 2.5000000000000000e+00 1.5000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 -3.1460569929723275e-01 -3.1460569929723275e-01 8.9557049300398384e-01 0 0 0 +126 1 2.5000000000000000e+00 1.8000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 -3.6852592591640337e-01 -4.7476254409897906e-01 7.9924287212844281e-01 0 0 0 +146 1 2.5000000000000000e+00 2.1000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 -3.6081689881382256e-01 -6.5421949001862334e-01 6.6468641058031896e-01 0 0 0 +166 1 2.5000000000000000e+00 2.4000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 -2.6598547494087149e-01 -8.0744368404029232e-01 5.2657993146712301e-01 0 0 0 +186 1 2.5000000000000000e+00 2.7000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 -9.7873033584060118e-02 -8.9330169771966939e-01 4.3867179775797049e-01 0 0 0 +206 1 2.5000000000000000e+00 3.0000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 9.7873033584060007e-02 -8.9330169771966939e-01 4.3867179775797044e-01 0 0 0 +226 1 2.5000000000000000e+00 3.3000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 2.6598547494087138e-01 -8.0744368404029232e-01 5.2657993146712301e-01 0 0 0 +246 1 2.5000000000000000e+00 3.6000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 3.6081689881382251e-01 -6.5421949001862334e-01 6.6468641058031896e-01 0 0 0 +266 1 2.5000000000000000e+00 3.9000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 3.6852592591640337e-01 -4.7476254409897911e-01 7.9924287212844303e-01 0 0 0 +286 1 2.5000000000000000e+00 4.2000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 3.1460569929723281e-01 -3.1460569929723281e-01 8.9557049300398361e-01 0 0 0 +306 1 2.5000000000000000e+00 4.5000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 2.3830565311068277e-01 -1.9646003525323205e-01 9.5111191257590177e-01 0 0 0 +326 1 2.5000000000000000e+00 4.8000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 1.6561310406555055e-01 -1.1922421797550636e-01 9.7895755046370736e-01 0 0 0 +346 1 2.5000000000000000e+00 5.1000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 1.0567933713226439e-01 -7.2649992877525854e-02 9.9174283775491956e-01 0 0 0 +366 1 2.5000000000000000e+00 5.4000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 5.8031121465001820e-02 -4.6947676140268485e-02 9.9721026100143140e-01 0 0 0 +386 1 2.5000000000000000e+00 5.7000000000000000e+01 1.5000000000000000e+01 0.0000000000000000e+00 1.8429703183501425e-02 -3.5634992015801836e-02 9.9919492261750498e-01 0 0 0 +7 1 2.5000000000000000e+00 0.0000000000000000e+00 1.8000000000000000e+01 0.0000000000000000e+00 -2.4270277420221083e-02 -3.5235119566844234e-02 9.9908430073895960e-01 0 0 0 +27 1 2.5000000000000000e+00 3.0000000000000000e+00 1.8000000000000000e+01 0.0000000000000000e+00 -7.7312985281705854e-02 -4.7535409319668043e-02 9.9587302763336372e-01 0 0 0 +47 1 2.5000000000000000e+00 6.0000000000000000e+00 1.8000000000000000e+01 0.0000000000000000e+00 -1.4398087111736474e-01 -7.6126593015943766e-02 9.8664798717073854e-01 0 0 0 +67 1 2.5000000000000000e+00 9.0000000000000000e+00 1.8000000000000000e+01 0.0000000000000000e+00 -2.3284022614534147e-01 -1.2975986317850727e-01 9.6381938504912923e-01 0 0 0 +87 1 2.5000000000000000e+00 1.2000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 -3.4758786972735523e-01 -2.2234110900479681e-01 9.1090455266450177e-01 0 0 0 +107 1 2.5000000000000000e+00 1.5000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 -4.7476254409897900e-01 -3.6852592591640326e-01 7.9924287212844292e-01 0 0 0 +127 1 2.5000000000000000e+00 1.8000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 -5.6571145299922609e-01 -5.6571145299922598e-01 5.9995091790163058e-01 0 0 0 +147 1 2.5000000000000000e+00 2.1000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 -5.4725458628470525e-01 -7.6968694425946660e-01 3.2877716713129740e-01 0 0 0 +167 1 2.5000000000000000e+00 2.4000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 -3.9048923819288139e-01 -9.1777534868081290e-01 7.2156525757244322e-02 0 0 0 +187 1 2.5000000000000000e+00 2.7000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 -1.3991724696158017e-01 -9.8714633419212083e-01 -7.7235217962726241e-02 0 0 0 +207 1 2.5000000000000000e+00 3.0000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 1.3991724696158006e-01 -9.8714633419212106e-01 -7.7235217962726241e-02 0 0 0 +227 1 2.5000000000000000e+00 3.3000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 3.9048923819288128e-01 -9.1777534868081279e-01 7.2156525757244322e-02 0 0 0 +247 1 2.5000000000000000e+00 3.6000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 5.4725458628470514e-01 -7.6968694425946649e-01 3.2877716713129734e-01 0 0 0 +267 1 2.5000000000000000e+00 3.9000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 5.6571145299922621e-01 -5.6571145299922609e-01 5.9995091790163035e-01 0 0 0 +287 1 2.5000000000000000e+00 4.2000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 4.7476254409897917e-01 -3.6852592591640337e-01 7.9924287212844281e-01 0 0 0 +307 1 2.5000000000000000e+00 4.5000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 3.4758786972735534e-01 -2.2234110900479692e-01 9.1090455266450188e-01 0 0 0 +327 1 2.5000000000000000e+00 4.8000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 2.3284022614534147e-01 -1.2975986317850732e-01 9.6381938504912912e-01 0 0 0 +347 1 2.5000000000000000e+00 5.1000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 1.4398087111736477e-01 -7.6126593015943808e-02 9.8664798717073854e-01 0 0 0 +367 1 2.5000000000000000e+00 5.4000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 7.7312985281705909e-02 -4.7535409319668064e-02 9.9587302763336372e-01 0 0 0 +387 1 2.5000000000000000e+00 5.7000000000000000e+01 1.8000000000000000e+01 0.0000000000000000e+00 2.4270277420221129e-02 -3.5235119566844247e-02 9.9908430073895971e-01 0 0 0 +8 1 2.5000000000000000e+00 0.0000000000000000e+00 2.1000000000000000e+01 0.0000000000000000e+00 -3.0163850736159105e-02 -3.0237916900163149e-02 9.9908748890690535e-01 0 0 0 +28 1 2.5000000000000000e+00 3.0000000000000000e+00 2.1000000000000000e+01 0.0000000000000000e+00 -9.7059251840902722e-02 -4.1653952417990810e-02 9.9440658177630958e-01 0 0 0 +48 1 2.5000000000000000e+00 6.0000000000000000e+00 2.1000000000000000e+01 0.0000000000000000e+00 -1.8428174194944064e-01 -6.8709104650143071e-02 9.8046891767268973e-01 0 0 0 +68 1 2.5000000000000000e+00 9.0000000000000000e+00 2.1000000000000000e+01 0.0000000000000000e+00 -3.0602867088565666e-01 -1.2090775615411221e-01 9.4431338394504205e-01 0 0 0 +88 1 2.5000000000000000e+00 1.2000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 -4.7013886220911943e-01 -2.1357380845070767e-01 8.5636188529416413e-01 0 0 0 +108 1 2.5000000000000000e+00 1.5000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 -6.5421949001862312e-01 -3.6081689881382245e-01 6.6468641058031908e-01 0 0 0 +128 1 2.5000000000000000e+00 1.8000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 -7.6968694425946649e-01 -5.4725458628470514e-01 3.2877716713129745e-01 0 0 0 +148 1 2.5000000000000000e+00 2.1000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 -7.0472416296125850e-01 -7.0472416296125850e-01 -8.2022608329090224e-02 0 0 0 +168 1 2.5000000000000000e+00 2.4000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 -4.6907708232882805e-01 -7.8303583820847300e-01 -4.0843795968914098e-01 0 0 0 +188 1 2.5000000000000000e+00 2.7000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 -1.6077801357100108e-01 -8.0506391360620255e-01 -5.7098382232881861e-01 0 0 0 +208 1 2.5000000000000000e+00 3.0000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 1.6077801357100094e-01 -8.0506391360620255e-01 -5.7098382232881872e-01 0 0 0 +228 1 2.5000000000000000e+00 3.3000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 4.6907708232882789e-01 -7.8303583820847278e-01 -4.0843795968914093e-01 0 0 0 +248 1 2.5000000000000000e+00 3.6000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 7.0472416296125839e-01 -7.0472416296125850e-01 -8.2022608329090321e-02 0 0 0 +268 1 2.5000000000000000e+00 3.9000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 7.6968694425946660e-01 -5.4725458628470514e-01 3.2877716713129729e-01 0 0 0 +288 1 2.5000000000000000e+00 4.2000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 6.5421949001862334e-01 -3.6081689881382256e-01 6.6468641058031885e-01 0 0 0 +308 1 2.5000000000000000e+00 4.5000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 4.7013886220911955e-01 -2.1357380845070770e-01 8.5636188529416402e-01 0 0 0 +328 1 2.5000000000000000e+00 4.8000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 3.0602867088565666e-01 -1.2090775615411227e-01 9.4431338394504194e-01 0 0 0 +348 1 2.5000000000000000e+00 5.1000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 1.8428174194944072e-01 -6.8709104650143099e-02 9.8046891767268962e-01 0 0 0 +368 1 2.5000000000000000e+00 5.4000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 9.7059251840902791e-02 -4.1653952417990824e-02 9.9440658177630958e-01 0 0 0 +388 1 2.5000000000000000e+00 5.7000000000000000e+01 2.1000000000000000e+01 0.0000000000000000e+00 3.0163850736159153e-02 -3.0237916900163146e-02 9.9908748890690535e-01 0 0 0 +9 1 2.5000000000000000e+00 0.0000000000000000e+00 2.4000000000000000e+01 0.0000000000000000e+00 -3.5058787503171387e-02 -2.0551704657275887e-02 9.9917391321755789e-01 0 0 0 +29 1 2.5000000000000000e+00 3.0000000000000000e+00 2.4000000000000000e+01 0.0000000000000000e+00 -1.1365104497068090e-01 -2.8752729368399281e-02 9.9310458690459180e-01 0 0 0 +49 1 2.5000000000000000e+00 6.0000000000000000e+00 2.4000000000000000e+01 0.0000000000000000e+00 -2.1884669159068454e-01 -4.8457456104349608e-02 9.7455528346405629e-01 0 0 0 +69 1 2.5000000000000000e+00 9.0000000000000000e+00 2.4000000000000000e+01 0.0000000000000000e+00 -3.7026717261459713e-01 -8.7191355151399724e-02 9.2482424734154478e-01 0 0 0 +89 1 2.5000000000000000e+00 1.2000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 -5.7886257432716870e-01 -1.5692234237038305e-01 8.0018341554190908e-01 0 0 0 +109 1 2.5000000000000000e+00 1.5000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 -8.0744368404029221e-01 -2.6598547494087144e-01 5.2657993146712301e-01 0 0 0 +129 1 2.5000000000000000e+00 1.8000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 -9.1777534868081279e-01 -3.9048923819288128e-01 7.2156525757244433e-02 0 0 0 +149 1 2.5000000000000000e+00 2.1000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 -7.8303583820847289e-01 -4.6907708232882789e-01 -4.0843795968914071e-01 0 0 0 +169 1 2.5000000000000000e+00 2.4000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 -4.8741359543182999e-01 -4.8741359543182988e-01 -7.2446944309365668e-01 0 0 0 +189 1 2.5000000000000000e+00 2.7000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 -1.6115060626850930e-01 -4.8338466373268979e-01 -8.6044741208706443e-01 0 0 0 +209 1 2.5000000000000000e+00 3.0000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 1.6115060626850913e-01 -4.8338466373268968e-01 -8.6044741208706432e-01 0 0 0 +229 1 2.5000000000000000e+00 3.3000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 4.8741359543182988e-01 -4.8741359543182988e-01 -7.2446944309365668e-01 0 0 0 +249 1 2.5000000000000000e+00 3.6000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 7.8303583820847289e-01 -4.6907708232882789e-01 -4.0843795968914098e-01 0 0 0 +269 1 2.5000000000000000e+00 3.9000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 9.1777534868081290e-01 -3.9048923819288139e-01 7.2156525757244280e-02 0 0 0 +289 1 2.5000000000000000e+00 4.2000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 8.0744368404029232e-01 -2.6598547494087149e-01 5.2657993146712290e-01 0 0 0 +309 1 2.5000000000000000e+00 4.5000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 5.7886257432716870e-01 -1.5692234237038313e-01 8.0018341554190908e-01 0 0 0 +329 1 2.5000000000000000e+00 4.8000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 3.7026717261459713e-01 -8.7191355151399724e-02 9.2482424734154478e-01 0 0 0 +349 1 2.5000000000000000e+00 5.1000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 2.1884669159068457e-01 -4.8457456104349622e-02 9.7455528346405618e-01 0 0 0 +369 1 2.5000000000000000e+00 5.4000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 1.1365104497068097e-01 -2.8752729368399291e-02 9.9310458690459180e-01 0 0 0 +389 1 2.5000000000000000e+00 5.7000000000000000e+01 2.4000000000000000e+01 0.0000000000000000e+00 3.5058787503171436e-02 -2.0551704657275904e-02 9.9917391321755789e-01 0 0 0 +10 1 2.5000000000000000e+00 0.0000000000000000e+00 2.7000000000000000e+01 0.0000000000000000e+00 -3.7860607272964017e-02 -7.2971667669136089e-03 9.9925638640646097e-01 0 0 0 +30 1 2.5000000000000000e+00 3.0000000000000000e+00 2.7000000000000000e+01 0.0000000000000000e+00 -1.2321728304286257e-01 -1.0293413501576077e-02 9.9232633079951116e-01 0 0 0 +50 1 2.5000000000000000e+00 6.0000000000000000e+00 2.7000000000000000e+01 0.0000000000000000e+00 -2.3902270727461422e-01 -1.7543173966404584e-02 9.7085548999544669e-01 0 0 0 +70 1 2.5000000000000000e+00 9.0000000000000000e+00 2.7000000000000000e+01 0.0000000000000000e+00 -4.0821375936870385e-01 -3.1922103301157141e-02 9.1232806927272625e-01 0 0 0 +90 1 2.5000000000000000e+00 1.2000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 -6.4295931380698856e-01 -5.7920936211537787e-02 7.6370706814669798e-01 0 0 0 +110 1 2.5000000000000000e+00 1.5000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 -8.9330169771966939e-01 -9.7873033584060035e-02 4.3867179775797044e-01 0 0 0 +130 1 2.5000000000000000e+00 1.8000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 -9.8714633419212094e-01 -1.3991724696158003e-01 -7.7235217962726088e-02 0 0 0 +150 1 2.5000000000000000e+00 2.1000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 -8.0506391360620255e-01 -1.6077801357100097e-01 -5.7098382232881850e-01 0 0 0 +170 1 2.5000000000000000e+00 2.4000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 -4.8338466373268996e-01 -1.6115060626850919e-01 -8.6044741208706443e-01 0 0 0 +190 1 2.5000000000000000e+00 2.7000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 -1.5704482464087621e-01 -1.5704482464087605e-01 -9.7502504896388853e-01 0 0 0 +210 1 2.5000000000000000e+00 3.0000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 1.5704482464087599e-01 -1.5704482464087605e-01 -9.7502504896388842e-01 0 0 0 +230 1 2.5000000000000000e+00 3.3000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 4.8338466373268973e-01 -1.6115060626850916e-01 -8.6044741208706443e-01 0 0 0 +250 1 2.5000000000000000e+00 3.6000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 8.0506391360620255e-01 -1.6077801357100097e-01 -5.7098382232881861e-01 0 0 0 +270 1 2.5000000000000000e+00 3.9000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 9.8714633419212106e-01 -1.3991724696158012e-01 -7.7235217962726269e-02 0 0 0 +290 1 2.5000000000000000e+00 4.2000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 8.9330169771966950e-01 -9.7873033584060062e-02 4.3867179775797038e-01 0 0 0 +310 1 2.5000000000000000e+00 4.5000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 6.4295931380698856e-01 -5.7920936211537821e-02 7.6370706814669798e-01 0 0 0 +330 1 2.5000000000000000e+00 4.8000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 4.0821375936870391e-01 -3.1922103301157183e-02 9.1232806927272614e-01 0 0 0 +350 1 2.5000000000000000e+00 5.1000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 2.3902270727461428e-01 -1.7543173966404597e-02 9.7085548999544657e-01 0 0 0 +370 1 2.5000000000000000e+00 5.4000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 1.2321728304286259e-01 -1.0293413501576086e-02 9.9232633079951105e-01 0 0 0 +390 1 2.5000000000000000e+00 5.7000000000000000e+01 2.7000000000000000e+01 0.0000000000000000e+00 3.7860607272964045e-02 -7.2971667669136028e-03 9.9925638640646086e-01 0 0 0 +11 1 2.5000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+01 0.0000000000000000e+00 -3.7860607272964017e-02 7.2971667669136028e-03 9.9925638640646086e-01 0 0 0 +31 1 2.5000000000000000e+00 3.0000000000000000e+00 3.0000000000000000e+01 0.0000000000000000e+00 -1.2321728304286254e-01 1.0293413501576089e-02 9.9232633079951105e-01 0 0 0 +51 1 2.5000000000000000e+00 6.0000000000000000e+00 3.0000000000000000e+01 0.0000000000000000e+00 -2.3902270727461422e-01 1.7543173966404594e-02 9.7085548999544657e-01 0 0 0 +71 1 2.5000000000000000e+00 9.0000000000000000e+00 3.0000000000000000e+01 0.0000000000000000e+00 -4.0821375936870374e-01 3.1922103301157183e-02 9.1232806927272625e-01 0 0 0 +91 1 2.5000000000000000e+00 1.2000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 -6.4295931380698856e-01 5.7920936211537842e-02 7.6370706814669798e-01 0 0 0 +111 1 2.5000000000000000e+00 1.5000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 -8.9330169771966950e-01 9.7873033584060118e-02 4.3867179775797055e-01 0 0 0 +131 1 2.5000000000000000e+00 1.8000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 -9.8714633419212083e-01 1.3991724696158012e-01 -7.7235217962726102e-02 0 0 0 +151 1 2.5000000000000000e+00 2.1000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 -8.0506391360620255e-01 1.6077801357100108e-01 -5.7098382232881850e-01 0 0 0 +171 1 2.5000000000000000e+00 2.4000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 -4.8338466373268996e-01 1.6115060626850930e-01 -8.6044741208706443e-01 0 0 0 +191 1 2.5000000000000000e+00 2.7000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 -1.5704482464087621e-01 1.5704482464087616e-01 -9.7502504896388853e-01 0 0 0 +211 1 2.5000000000000000e+00 3.0000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 1.5704482464087602e-01 1.5704482464087616e-01 -9.7502504896388842e-01 0 0 0 +231 1 2.5000000000000000e+00 3.3000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 4.8338466373268985e-01 1.6115060626850930e-01 -8.6044741208706443e-01 0 0 0 +251 1 2.5000000000000000e+00 3.6000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 8.0506391360620266e-01 1.6077801357100105e-01 -5.7098382232881861e-01 0 0 0 +271 1 2.5000000000000000e+00 3.9000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 9.8714633419212094e-01 1.3991724696158014e-01 -7.7235217962726227e-02 0 0 0 +291 1 2.5000000000000000e+00 4.2000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 8.9330169771966950e-01 9.7873033584060118e-02 4.3867179775797049e-01 0 0 0 +311 1 2.5000000000000000e+00 4.5000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 6.4295931380698867e-01 5.7920936211537849e-02 7.6370706814669809e-01 0 0 0 +331 1 2.5000000000000000e+00 4.8000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 4.0821375936870391e-01 3.1922103301157183e-02 9.1232806927272614e-01 0 0 0 +351 1 2.5000000000000000e+00 5.1000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 2.3902270727461428e-01 1.7543173966404590e-02 9.7085548999544657e-01 0 0 0 +371 1 2.5000000000000000e+00 5.4000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 1.2321728304286261e-01 1.0293413501576086e-02 9.9232633079951116e-01 0 0 0 +391 1 2.5000000000000000e+00 5.7000000000000000e+01 3.0000000000000000e+01 0.0000000000000000e+00 3.7860607272964052e-02 7.2971667669136046e-03 9.9925638640646097e-01 0 0 0 +12 1 2.5000000000000000e+00 0.0000000000000000e+00 3.3000000000000000e+01 0.0000000000000000e+00 -3.5058787503171387e-02 2.0551704657275897e-02 9.9917391321755789e-01 0 0 0 +32 1 2.5000000000000000e+00 3.0000000000000000e+00 3.3000000000000000e+01 0.0000000000000000e+00 -1.1365104497068096e-01 2.8752729368399288e-02 9.9310458690459191e-01 0 0 0 +52 1 2.5000000000000000e+00 6.0000000000000000e+00 3.3000000000000000e+01 0.0000000000000000e+00 -2.1884669159068451e-01 4.8457456104349615e-02 9.7455528346405618e-01 0 0 0 +72 1 2.5000000000000000e+00 9.0000000000000000e+00 3.3000000000000000e+01 0.0000000000000000e+00 -3.7026717261459707e-01 8.7191355151399710e-02 9.2482424734154478e-01 0 0 0 +92 1 2.5000000000000000e+00 1.2000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 -5.7886257432716870e-01 1.5692234237038316e-01 8.0018341554190908e-01 0 0 0 +112 1 2.5000000000000000e+00 1.5000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 -8.0744368404029210e-01 2.6598547494087149e-01 5.2657993146712301e-01 0 0 0 +132 1 2.5000000000000000e+00 1.8000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 -9.1777534868081267e-01 3.9048923819288134e-01 7.2156525757244433e-02 0 0 0 +152 1 2.5000000000000000e+00 2.1000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 -7.8303583820847311e-01 4.6907708232882811e-01 -4.0843795968914082e-01 0 0 0 +172 1 2.5000000000000000e+00 2.4000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 -4.8741359543183005e-01 4.8741359543182999e-01 -7.2446944309365657e-01 0 0 0 +192 1 2.5000000000000000e+00 2.7000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 -1.6115060626850930e-01 4.8338466373268979e-01 -8.6044741208706432e-01 0 0 0 +212 1 2.5000000000000000e+00 3.0000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 1.6115060626850916e-01 4.8338466373268979e-01 -8.6044741208706443e-01 0 0 0 +232 1 2.5000000000000000e+00 3.3000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 4.8741359543182988e-01 4.8741359543182999e-01 -7.2446944309365657e-01 0 0 0 +252 1 2.5000000000000000e+00 3.6000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 7.8303583820847278e-01 4.6907708232882794e-01 -4.0843795968914076e-01 0 0 0 +272 1 2.5000000000000000e+00 3.9000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 9.1777534868081279e-01 3.9048923819288139e-01 7.2156525757244377e-02 0 0 0 +292 1 2.5000000000000000e+00 4.2000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 8.0744368404029221e-01 2.6598547494087149e-01 5.2657993146712301e-01 0 0 0 +312 1 2.5000000000000000e+00 4.5000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 5.7886257432716870e-01 1.5692234237038316e-01 8.0018341554190908e-01 0 0 0 +332 1 2.5000000000000000e+00 4.8000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 3.7026717261459713e-01 8.7191355151399738e-02 9.2482424734154467e-01 0 0 0 +352 1 2.5000000000000000e+00 5.1000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 2.1884669159068457e-01 4.8457456104349622e-02 9.7455528346405618e-01 0 0 0 +372 1 2.5000000000000000e+00 5.4000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 1.1365104497068099e-01 2.8752729368399295e-02 9.9310458690459180e-01 0 0 0 +392 1 2.5000000000000000e+00 5.7000000000000000e+01 3.3000000000000000e+01 0.0000000000000000e+00 3.5058787503171422e-02 2.0551704657275897e-02 9.9917391321755777e-01 0 0 0 +13 1 2.5000000000000000e+00 0.0000000000000000e+00 3.6000000000000000e+01 0.0000000000000000e+00 -3.0163850736159126e-02 3.0237916900163156e-02 9.9908748890690546e-01 0 0 0 +33 1 2.5000000000000000e+00 3.0000000000000000e+00 3.6000000000000000e+01 0.0000000000000000e+00 -9.7059251840902735e-02 4.1653952417990817e-02 9.9440658177630958e-01 0 0 0 +53 1 2.5000000000000000e+00 6.0000000000000000e+00 3.6000000000000000e+01 0.0000000000000000e+00 -1.8428174194944066e-01 6.8709104650143071e-02 9.8046891767268973e-01 0 0 0 +73 1 2.5000000000000000e+00 9.0000000000000000e+00 3.6000000000000000e+01 0.0000000000000000e+00 -3.0602867088565661e-01 1.2090775615411221e-01 9.4431338394504194e-01 0 0 0 +93 1 2.5000000000000000e+00 1.2000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 -4.7013886220911938e-01 2.1357380845070770e-01 8.5636188529416413e-01 0 0 0 +113 1 2.5000000000000000e+00 1.5000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 -6.5421949001862323e-01 3.6081689881382251e-01 6.6468641058031896e-01 0 0 0 +133 1 2.5000000000000000e+00 1.8000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 -7.6968694425946660e-01 5.4725458628470525e-01 3.2877716713129751e-01 0 0 0 +153 1 2.5000000000000000e+00 2.1000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 -7.0472416296125850e-01 7.0472416296125850e-01 -8.2022608329090127e-02 0 0 0 +173 1 2.5000000000000000e+00 2.4000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 -4.6907708232882805e-01 7.8303583820847300e-01 -4.0843795968914076e-01 0 0 0 +193 1 2.5000000000000000e+00 2.7000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 -1.6077801357100108e-01 8.0506391360620244e-01 -5.7098382232881861e-01 0 0 0 +213 1 2.5000000000000000e+00 3.0000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 1.6077801357100091e-01 8.0506391360620277e-01 -5.7098382232881861e-01 0 0 0 +233 1 2.5000000000000000e+00 3.3000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 4.6907708232882794e-01 7.8303583820847300e-01 -4.0843795968914076e-01 0 0 0 +253 1 2.5000000000000000e+00 3.6000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 7.0472416296125850e-01 7.0472416296125850e-01 -8.2022608329090210e-02 0 0 0 +273 1 2.5000000000000000e+00 3.9000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 7.6968694425946649e-01 5.4725458628470525e-01 3.2877716713129740e-01 0 0 0 +293 1 2.5000000000000000e+00 4.2000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 6.5421949001862323e-01 3.6081689881382251e-01 6.6468641058031896e-01 0 0 0 +313 1 2.5000000000000000e+00 4.5000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 4.7013886220911949e-01 2.1357380845070775e-01 8.5636188529416413e-01 0 0 0 +333 1 2.5000000000000000e+00 4.8000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 3.0602867088565661e-01 1.2090775615411223e-01 9.4431338394504194e-01 0 0 0 +353 1 2.5000000000000000e+00 5.1000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 1.8428174194944069e-01 6.8709104650143099e-02 9.8046891767268973e-01 0 0 0 +373 1 2.5000000000000000e+00 5.4000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 9.7059251840902763e-02 4.1653952417990830e-02 9.9440658177630947e-01 0 0 0 +393 1 2.5000000000000000e+00 5.7000000000000000e+01 3.6000000000000000e+01 0.0000000000000000e+00 3.0163850736159133e-02 3.0237916900163159e-02 9.9908748890690535e-01 0 0 0 +14 1 2.5000000000000000e+00 0.0000000000000000e+00 3.9000000000000000e+01 0.0000000000000000e+00 -2.4270277420221101e-02 3.5235119566844240e-02 9.9908430073895960e-01 0 0 0 +34 1 2.5000000000000000e+00 3.0000000000000000e+00 3.9000000000000000e+01 0.0000000000000000e+00 -7.7312985281705854e-02 4.7535409319668036e-02 9.9587302763336372e-01 0 0 0 +54 1 2.5000000000000000e+00 6.0000000000000000e+00 3.9000000000000000e+01 0.0000000000000000e+00 -1.4398087111736474e-01 7.6126593015943766e-02 9.8664798717073854e-01 0 0 0 +74 1 2.5000000000000000e+00 9.0000000000000000e+00 3.9000000000000000e+01 0.0000000000000000e+00 -2.3284022614534142e-01 1.2975986317850727e-01 9.6381938504912923e-01 0 0 0 +94 1 2.5000000000000000e+00 1.2000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 -3.4758786972735517e-01 2.2234110900479689e-01 9.1090455266450199e-01 0 0 0 +114 1 2.5000000000000000e+00 1.5000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 -4.7476254409897917e-01 3.6852592591640326e-01 7.9924287212844314e-01 0 0 0 +134 1 2.5000000000000000e+00 1.8000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 -5.6571145299922609e-01 5.6571145299922598e-01 5.9995091790163058e-01 0 0 0 +154 1 2.5000000000000000e+00 2.1000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 -5.4725458628470514e-01 7.6968694425946649e-01 3.2877716713129751e-01 0 0 0 +174 1 2.5000000000000000e+00 2.4000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 -3.9048923819288139e-01 9.1777534868081279e-01 7.2156525757244475e-02 0 0 0 +194 1 2.5000000000000000e+00 2.7000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 -1.3991724696158014e-01 9.8714633419212094e-01 -7.7235217962726074e-02 0 0 0 +214 1 2.5000000000000000e+00 3.0000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 1.3991724696158006e-01 9.8714633419212106e-01 -7.7235217962726074e-02 0 0 0 +234 1 2.5000000000000000e+00 3.3000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 3.9048923819288128e-01 9.1777534868081290e-01 7.2156525757244516e-02 0 0 0 +254 1 2.5000000000000000e+00 3.6000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 5.4725458628470502e-01 7.6968694425946649e-01 3.2877716713129757e-01 0 0 0 +274 1 2.5000000000000000e+00 3.9000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 5.6571145299922598e-01 5.6571145299922598e-01 5.9995091790163058e-01 0 0 0 +294 1 2.5000000000000000e+00 4.2000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 4.7476254409897917e-01 3.6852592591640337e-01 7.9924287212844292e-01 0 0 0 +314 1 2.5000000000000000e+00 4.5000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 3.4758786972735523e-01 2.2234110900479689e-01 9.1090455266450188e-01 0 0 0 +334 1 2.5000000000000000e+00 4.8000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 2.3284022614534150e-01 1.2975986317850730e-01 9.6381938504912923e-01 0 0 0 +354 1 2.5000000000000000e+00 5.1000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 1.4398087111736474e-01 7.6126593015943780e-02 9.8664798717073843e-01 0 0 0 +374 1 2.5000000000000000e+00 5.4000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 7.7312985281705868e-02 4.7535409319668070e-02 9.9587302763336383e-01 0 0 0 +394 1 2.5000000000000000e+00 5.7000000000000000e+01 3.9000000000000000e+01 0.0000000000000000e+00 2.4270277420221108e-02 3.5235119566844240e-02 9.9908430073895971e-01 0 0 0 +15 1 2.5000000000000000e+00 0.0000000000000000e+00 4.2000000000000000e+01 0.0000000000000000e+00 -1.8429703183501411e-02 3.5634992015801829e-02 9.9919492261750498e-01 0 0 0 +35 1 2.5000000000000000e+00 3.0000000000000000e+00 4.2000000000000000e+01 0.0000000000000000e+00 -5.8031121465001799e-02 4.6947676140268450e-02 9.9721026100143129e-01 0 0 0 +55 1 2.5000000000000000e+00 6.0000000000000000e+00 4.2000000000000000e+01 0.0000000000000000e+00 -1.0567933713226436e-01 7.2649992877525812e-02 9.9174283775491956e-01 0 0 0 +75 1 2.5000000000000000e+00 9.0000000000000000e+00 4.2000000000000000e+01 0.0000000000000000e+00 -1.6561310406555052e-01 1.1922421797550635e-01 9.7895755046370747e-01 0 0 0 +95 1 2.5000000000000000e+00 1.2000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 -2.3830565311068272e-01 1.9646003525323200e-01 9.5111191257590177e-01 0 0 0 +115 1 2.5000000000000000e+00 1.5000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 -3.1460569929723275e-01 3.1460569929723275e-01 8.9557049300398384e-01 0 0 0 +135 1 2.5000000000000000e+00 1.8000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 -3.6852592591640337e-01 4.7476254409897900e-01 7.9924287212844303e-01 0 0 0 +155 1 2.5000000000000000e+00 2.1000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 -3.6081689881382245e-01 6.5421949001862312e-01 6.6468641058031908e-01 0 0 0 +175 1 2.5000000000000000e+00 2.4000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 -2.6598547494087144e-01 8.0744368404029221e-01 5.2657993146712301e-01 0 0 0 +195 1 2.5000000000000000e+00 2.7000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 -9.7873033584060104e-02 8.9330169771966939e-01 4.3867179775797061e-01 0 0 0 +215 1 2.5000000000000000e+00 3.0000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 9.7873033584060048e-02 8.9330169771966939e-01 4.3867179775797061e-01 0 0 0 +235 1 2.5000000000000000e+00 3.3000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 2.6598547494087144e-01 8.0744368404029221e-01 5.2657993146712312e-01 0 0 0 +255 1 2.5000000000000000e+00 3.6000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 3.6081689881382245e-01 6.5421949001862323e-01 6.6468641058031908e-01 0 0 0 +275 1 2.5000000000000000e+00 3.9000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 3.6852592591640332e-01 4.7476254409897917e-01 7.9924287212844303e-01 0 0 0 +295 1 2.5000000000000000e+00 4.2000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 3.1460569929723275e-01 3.1460569929723275e-01 8.9557049300398373e-01 0 0 0 +315 1 2.5000000000000000e+00 4.5000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 2.3830565311068272e-01 1.9646003525323200e-01 9.5111191257590177e-01 0 0 0 +335 1 2.5000000000000000e+00 4.8000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 1.6561310406555046e-01 1.1922421797550636e-01 9.7895755046370747e-01 0 0 0 +355 1 2.5000000000000000e+00 5.1000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 1.0567933713226434e-01 7.2649992877525826e-02 9.9174283775491967e-01 0 0 0 +375 1 2.5000000000000000e+00 5.4000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 5.8031121465001792e-02 4.6947676140268464e-02 9.9721026100143140e-01 0 0 0 +395 1 2.5000000000000000e+00 5.7000000000000000e+01 4.2000000000000000e+01 0.0000000000000000e+00 1.8429703183501421e-02 3.5634992015801836e-02 9.9919492261750509e-01 0 0 0 +16 1 2.5000000000000000e+00 0.0000000000000000e+00 4.5000000000000000e+01 0.0000000000000000e+00 -1.3362272507461697e-02 3.2364838887478299e-02 9.9938679542868891e-01 0 0 0 +36 1 2.5000000000000000e+00 3.0000000000000000e+00 4.5000000000000000e+01 0.0000000000000000e+00 -4.1569375222726877e-02 4.1631298256624177e-02 9.9826791095830592e-01 0 0 0 +56 1 2.5000000000000000e+00 6.0000000000000000e+00 4.5000000000000000e+01 0.0000000000000000e+00 -7.3954811425103587e-02 6.2196104012276252e-02 9.9532021506285684e-01 0 0 0 +76 1 2.5000000000000000e+00 9.0000000000000000e+00 4.5000000000000000e+01 0.0000000000000000e+00 -1.1214098437153222e-01 9.8127311868331527e-02 9.8883539089662387e-01 0 0 0 +96 1 2.5000000000000000e+00 1.2000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 -1.5508313718777622e-01 1.5508313718777625e-01 9.7565282817198595e-01 0 0 0 +116 1 2.5000000000000000e+00 1.5000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 -1.9646003525323200e-01 2.3830565311068266e-01 9.5111191257590189e-01 0 0 0 +136 1 2.5000000000000000e+00 1.8000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 -2.2234110900479692e-01 3.4758786972735517e-01 9.1090455266450188e-01 0 0 0 +156 1 2.5000000000000000e+00 2.1000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 -2.1357380845070770e-01 4.7013886220911938e-01 8.5636188529416413e-01 0 0 0 +176 1 2.5000000000000000e+00 2.4000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 -1.5692234237038313e-01 5.7886257432716870e-01 8.0018341554190919e-01 0 0 0 +196 1 2.5000000000000000e+00 2.7000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 -5.7920936211537842e-02 6.4295931380698867e-01 7.6370706814669809e-01 0 0 0 +216 1 2.5000000000000000e+00 3.0000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 5.7920936211537780e-02 6.4295931380698856e-01 7.6370706814669798e-01 0 0 0 +236 1 2.5000000000000000e+00 3.3000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 1.5692234237038313e-01 5.7886257432716870e-01 8.0018341554190919e-01 0 0 0 +256 1 2.5000000000000000e+00 3.6000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 2.1357380845070764e-01 4.7013886220911938e-01 8.5636188529416402e-01 0 0 0 +276 1 2.5000000000000000e+00 3.9000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 2.2234110900479681e-01 3.4758786972735523e-01 9.1090455266450177e-01 0 0 0 +296 1 2.5000000000000000e+00 4.2000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 1.9646003525323197e-01 2.3830565311068272e-01 9.5111191257590177e-01 0 0 0 +316 1 2.5000000000000000e+00 4.5000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 1.5508313718777625e-01 1.5508313718777628e-01 9.7565282817198595e-01 0 0 0 +336 1 2.5000000000000000e+00 4.8000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 1.1214098437153222e-01 9.8127311868331568e-02 9.8883539089662398e-01 0 0 0 +356 1 2.5000000000000000e+00 5.1000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 7.3954811425103573e-02 6.2196104012276258e-02 9.9532021506285684e-01 0 0 0 +376 1 2.5000000000000000e+00 5.4000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 4.1569375222726877e-02 4.1631298256624191e-02 9.9826791095830603e-01 0 0 0 +396 1 2.5000000000000000e+00 5.7000000000000000e+01 4.5000000000000000e+01 0.0000000000000000e+00 1.3362272507461703e-02 3.2364838887478306e-02 9.9938679542868891e-01 0 0 0 +17 1 2.5000000000000000e+00 0.0000000000000000e+00 4.8000000000000000e+01 0.0000000000000000e+00 -9.3989438861432541e-03 2.6644762521588483e-02 9.9960077855311480e-01 0 0 0 +37 1 2.5000000000000000e+00 3.0000000000000000e+00 4.8000000000000000e+01 0.0000000000000000e+00 -2.8894018478272422e-02 3.3534698701154803e-02 9.9901979944303410e-01 0 0 0 +57 1 2.5000000000000000e+00 6.0000000000000000e+00 4.8000000000000000e+01 0.0000000000000000e+00 -5.0241530269051239e-02 4.8498220596720300e-02 9.9755887607457838e-01 0 0 0 +77 1 2.5000000000000000e+00 9.0000000000000000e+00 4.8000000000000000e+01 0.0000000000000000e+00 -7.3771080474423129e-02 7.3771080474423115e-02 9.9454293792237680e-01 0 0 0 +97 1 2.5000000000000000e+00 1.2000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 -9.8127311868331568e-02 1.1214098437153222e-01 9.8883539089662398e-01 0 0 0 +117 1 2.5000000000000000e+00 1.5000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 -1.1922421797550634e-01 1.6561310406555049e-01 9.7895755046370736e-01 0 0 0 +137 1 2.5000000000000000e+00 1.8000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 -1.2975986317850727e-01 2.3284022614534133e-01 9.6381938504912912e-01 0 0 0 +157 1 2.5000000000000000e+00 2.1000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 -1.2090775615411221e-01 3.0602867088565655e-01 9.4431338394504194e-01 0 0 0 +177 1 2.5000000000000000e+00 2.4000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 -8.7191355151399738e-02 3.7026717261459713e-01 9.2482424734154467e-01 0 0 0 +197 1 2.5000000000000000e+00 2.7000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 -3.1922103301157183e-02 4.0821375936870380e-01 9.1232806927272625e-01 0 0 0 +217 1 2.5000000000000000e+00 3.0000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 3.1922103301157141e-02 4.0821375936870391e-01 9.1232806927272625e-01 0 0 0 +237 1 2.5000000000000000e+00 3.3000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 8.7191355151399710e-02 3.7026717261459707e-01 9.2482424734154489e-01 0 0 0 +257 1 2.5000000000000000e+00 3.6000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 1.2090775615411221e-01 3.0602867088565661e-01 9.4431338394504205e-01 0 0 0 +277 1 2.5000000000000000e+00 3.9000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 1.2975986317850727e-01 2.3284022614534139e-01 9.6381938504912912e-01 0 0 0 +297 1 2.5000000000000000e+00 4.2000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 1.1922421797550634e-01 1.6561310406555052e-01 9.7895755046370747e-01 0 0 0 +317 1 2.5000000000000000e+00 4.5000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 9.8127311868331568e-02 1.1214098437153222e-01 9.8883539089662398e-01 0 0 0 +337 1 2.5000000000000000e+00 4.8000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 7.3771080474423115e-02 7.3771080474423129e-02 9.9454293792237680e-01 0 0 0 +357 1 2.5000000000000000e+00 5.1000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 5.0241530269051225e-02 4.8498220596720300e-02 9.9755887607457838e-01 0 0 0 +377 1 2.5000000000000000e+00 5.4000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 2.8894018478272426e-02 3.3534698701154796e-02 9.9901979944303410e-01 0 0 0 +397 1 2.5000000000000000e+00 5.7000000000000000e+01 4.8000000000000000e+01 0.0000000000000000e+00 9.3989438861432593e-03 2.6644762521588490e-02 9.9960077855311480e-01 0 0 0 +18 1 2.5000000000000000e+00 0.0000000000000000e+00 5.1000000000000000e+01 0.0000000000000000e+00 -6.5828744882500166e-03 1.9561861499557524e-02 9.9978697697966856e-01 0 0 0 +38 1 2.5000000000000000e+00 3.0000000000000000e+00 5.1000000000000000e+01 0.0000000000000000e+00 -2.0009637034407939e-02 2.4184841732588204e-02 9.9950723251816498e-01 0 0 0 +58 1 2.5000000000000000e+00 6.0000000000000000e+00 5.1000000000000000e+01 0.0000000000000000e+00 -3.4047077037887570e-02 3.4047077037887563e-02 9.9884012388887966e-01 0 0 0 +78 1 2.5000000000000000e+00 9.0000000000000000e+00 5.1000000000000000e+01 0.0000000000000000e+00 -4.8498220596720300e-02 5.0241530269051239e-02 9.9755887607457827e-01 0 0 0 +98 1 2.5000000000000000e+00 1.2000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 -6.2196104012276252e-02 7.3954811425103573e-02 9.9532021506285684e-01 0 0 0 +118 1 2.5000000000000000e+00 1.5000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 -7.2649992877525812e-02 1.0567933713226434e-01 9.9174283775491956e-01 0 0 0 +138 1 2.5000000000000000e+00 1.8000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 -7.6126593015943753e-02 1.4398087111736468e-01 9.8664798717073843e-01 0 0 0 +158 1 2.5000000000000000e+00 2.1000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 -6.8709104650143085e-02 1.8428174194944066e-01 9.8046891767268962e-01 0 0 0 +178 1 2.5000000000000000e+00 2.4000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 -4.8457456104349608e-02 2.1884669159068451e-01 9.7455528346405618e-01 0 0 0 +198 1 2.5000000000000000e+00 2.7000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 -1.7543173966404604e-02 2.3902270727461422e-01 9.7085548999544669e-01 0 0 0 +218 1 2.5000000000000000e+00 3.0000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 1.7543173966404566e-02 2.3902270727461419e-01 9.7085548999544657e-01 0 0 0 +238 1 2.5000000000000000e+00 3.3000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 4.8457456104349608e-02 2.1884669159068451e-01 9.7455528346405618e-01 0 0 0 +258 1 2.5000000000000000e+00 3.6000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 6.8709104650143071e-02 1.8428174194944066e-01 9.8046891767268962e-01 0 0 0 +278 1 2.5000000000000000e+00 3.9000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 7.6126593015943766e-02 1.4398087111736474e-01 9.8664798717073843e-01 0 0 0 +298 1 2.5000000000000000e+00 4.2000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 7.2649992877525799e-02 1.0567933713226434e-01 9.9174283775491956e-01 0 0 0 +318 1 2.5000000000000000e+00 4.5000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 6.2196104012276245e-02 7.3954811425103587e-02 9.9532021506285684e-01 0 0 0 +338 1 2.5000000000000000e+00 4.8000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 4.8498220596720293e-02 5.0241530269051232e-02 9.9755887607457827e-01 0 0 0 +358 1 2.5000000000000000e+00 5.1000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 3.4047077037887570e-02 3.4047077037887570e-02 9.9884012388887977e-01 0 0 0 +378 1 2.5000000000000000e+00 5.4000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 2.0009637034407935e-02 2.4184841732588200e-02 9.9950723251816487e-01 0 0 0 +398 1 2.5000000000000000e+00 5.7000000000000000e+01 5.1000000000000000e+01 0.0000000000000000e+00 6.5828744882500193e-03 1.9561861499557524e-02 9.9978697697966856e-01 0 0 0 +19 1 2.5000000000000000e+00 0.0000000000000000e+00 5.4000000000000000e+01 0.0000000000000000e+00 -4.8145058779812486e-03 1.1868011343002475e-02 9.9991798205648519e-01 0 0 0 +39 1 2.5000000000000000e+00 3.0000000000000000e+00 5.4000000000000000e+01 0.0000000000000000e+00 -1.4489047587394143e-02 1.4489047587394136e-02 9.9979004545955585e-01 0 0 0 +59 1 2.5000000000000000e+00 6.0000000000000000e+00 5.4000000000000000e+01 0.0000000000000000e+00 -2.4184841732588200e-02 2.0009637034407932e-02 9.9950723251816498e-01 0 0 0 +79 1 2.5000000000000000e+00 9.0000000000000000e+00 5.4000000000000000e+01 0.0000000000000000e+00 -3.3534698701154803e-02 2.8894018478272433e-02 9.9901979944303421e-01 0 0 0 +99 1 2.5000000000000000e+00 1.2000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 -4.1631298256624205e-02 4.1569375222726870e-02 9.9826791095830603e-01 0 0 0 +119 1 2.5000000000000000e+00 1.5000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 -4.6947676140268450e-02 5.8031121465001771e-02 9.9721026100143129e-01 0 0 0 +139 1 2.5000000000000000e+00 1.8000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 -4.7535409319668043e-02 7.7312985281705840e-02 9.9587302763336372e-01 0 0 0 +159 1 2.5000000000000000e+00 2.1000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 -4.1653952417990810e-02 9.7059251840902694e-02 9.9440658177630958e-01 0 0 0 +179 1 2.5000000000000000e+00 2.4000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 -2.8752729368399278e-02 1.1365104497068095e-01 9.9310458690459180e-01 0 0 0 +199 1 2.5000000000000000e+00 2.7000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 -1.0293413501576094e-02 1.2321728304286254e-01 9.9232633079951105e-01 0 0 0 +219 1 2.5000000000000000e+00 3.0000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 1.0293413501576077e-02 1.2321728304286257e-01 9.9232633079951116e-01 0 0 0 +239 1 2.5000000000000000e+00 3.3000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 2.8752729368399284e-02 1.1365104497068095e-01 9.9310458690459180e-01 0 0 0 +259 1 2.5000000000000000e+00 3.6000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 4.1653952417990817e-02 9.7059251840902749e-02 9.9440658177630958e-01 0 0 0 +279 1 2.5000000000000000e+00 3.9000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 4.7535409319668036e-02 7.7312985281705868e-02 9.9587302763336383e-01 0 0 0 +299 1 2.5000000000000000e+00 4.2000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 4.6947676140268443e-02 5.8031121465001785e-02 9.9721026100143129e-01 0 0 0 +319 1 2.5000000000000000e+00 4.5000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 4.1631298256624191e-02 4.1569375222726877e-02 9.9826791095830603e-01 0 0 0 +339 1 2.5000000000000000e+00 4.8000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 3.3534698701154803e-02 2.8894018478272433e-02 9.9901979944303410e-01 0 0 0 +359 1 2.5000000000000000e+00 5.1000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 2.4184841732588204e-02 2.0009637034407932e-02 9.9950723251816498e-01 0 0 0 +379 1 2.5000000000000000e+00 5.4000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 1.4489047587394145e-02 1.4489047587394140e-02 9.9979004545955585e-01 0 0 0 +399 1 2.5000000000000000e+00 5.7000000000000000e+01 5.4000000000000000e+01 0.0000000000000000e+00 4.8145058779812486e-03 1.1868011343002480e-02 9.9991798205648519e-01 0 0 0 +20 1 2.5000000000000000e+00 0.0000000000000000e+00 5.7000000000000000e+01 0.0000000000000000e+00 -3.9693242391277937e-03 3.9693242391277764e-03 9.9998424434096445e-01 0 0 0 +40 1 2.5000000000000000e+00 3.0000000000000000e+00 5.7000000000000000e+01 0.0000000000000000e+00 -1.1868011343002482e-02 4.8145058779812460e-03 9.9991798205648519e-01 0 0 0 +60 1 2.5000000000000000e+00 6.0000000000000000e+00 5.7000000000000000e+01 0.0000000000000000e+00 -1.9561861499557517e-02 6.5828744882500097e-03 9.9978697697966856e-01 0 0 0 +80 1 2.5000000000000000e+00 9.0000000000000000e+00 5.7000000000000000e+01 0.0000000000000000e+00 -2.6644762521588487e-02 9.3989438861432437e-03 9.9960077855311491e-01 0 0 0 +100 1 2.5000000000000000e+00 1.2000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 -3.2364838887478306e-02 1.3362272507461690e-02 9.9938679542868891e-01 0 0 0 +120 1 2.5000000000000000e+00 1.5000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 -3.5634992015801822e-02 1.8429703183501404e-02 9.9919492261750509e-01 0 0 0 +140 1 2.5000000000000000e+00 1.8000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 -3.5235119566844240e-02 2.4270277420221090e-02 9.9908430073895971e-01 0 0 0 +160 1 2.5000000000000000e+00 2.1000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 -3.0237916900163146e-02 3.0163850736159105e-02 9.9908748890690546e-01 0 0 0 +180 1 2.5000000000000000e+00 2.4000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 -2.0551704657275894e-02 3.5058787503171394e-02 9.9917391321755789e-01 0 0 0 +200 1 2.5000000000000000e+00 2.7000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 -7.2971667669136028e-03 3.7860607272964010e-02 9.9925638640646086e-01 0 0 0 +220 1 2.5000000000000000e+00 3.0000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 7.2971667669136037e-03 3.7860607272964024e-02 9.9925638640646097e-01 0 0 0 +240 1 2.5000000000000000e+00 3.3000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 2.0551704657275890e-02 3.5058787503171394e-02 9.9917391321755777e-01 0 0 0 +260 1 2.5000000000000000e+00 3.6000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 3.0237916900163159e-02 3.0163850736159115e-02 9.9908748890690535e-01 0 0 0 +280 1 2.5000000000000000e+00 3.9000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 3.5235119566844234e-02 2.4270277420221094e-02 9.9908430073895960e-01 0 0 0 +300 1 2.5000000000000000e+00 4.2000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 3.5634992015801836e-02 1.8429703183501414e-02 9.9919492261750498e-01 0 0 0 +320 1 2.5000000000000000e+00 4.5000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 3.2364838887478299e-02 1.3362272507461701e-02 9.9938679542868891e-01 0 0 0 +340 1 2.5000000000000000e+00 4.8000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 2.6644762521588480e-02 9.3989438861432611e-03 9.9960077855311480e-01 0 0 0 +360 1 2.5000000000000000e+00 5.1000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 1.9561861499557527e-02 6.5828744882500097e-03 9.9978697697966845e-01 0 0 0 +380 1 2.5000000000000000e+00 5.4000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 1.1868011343002492e-02 4.8145058779812391e-03 9.9991798205648519e-01 0 0 0 +400 1 2.5000000000000000e+00 5.7000000000000000e+01 5.7000000000000000e+01 0.0000000000000000e+00 3.9693242391277937e-03 3.9693242391277851e-03 9.9998424434096445e-01 0 0 0 + +Velocities + +1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +41 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +61 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +81 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +101 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +121 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +141 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +161 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +181 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +201 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +221 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +241 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +261 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +281 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +301 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +321 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +341 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +361 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +381 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +42 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +62 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +82 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +102 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +122 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +142 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +162 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +182 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +202 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +222 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +242 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +262 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +282 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +302 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +322 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +342 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +362 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +382 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +43 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +63 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +83 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +103 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +123 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +143 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +163 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +183 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +203 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +223 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +243 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +263 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +283 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +303 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +323 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +343 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +363 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +383 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +44 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +64 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +84 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +104 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +124 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +144 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +164 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +184 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +204 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +224 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +244 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +264 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +284 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +304 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +324 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +344 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +364 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +384 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +45 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +65 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +85 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +105 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +125 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +145 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +165 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +185 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +205 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +225 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +245 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +265 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +285 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +305 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +325 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +345 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +365 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +385 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +46 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +66 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +86 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +106 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +126 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +146 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +166 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +186 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +206 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +226 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +246 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +266 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +286 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +306 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +326 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +346 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +366 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +386 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +47 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +67 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +87 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +107 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +127 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +147 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +167 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +187 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +207 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +227 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +247 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +267 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +287 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +307 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +327 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +347 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +367 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +387 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +48 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +68 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +88 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +108 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +128 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +148 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +168 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +188 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +208 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +228 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +248 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +268 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +288 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +308 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +328 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +348 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +368 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +388 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +49 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +69 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +89 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +109 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +129 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +149 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +169 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +189 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +209 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +229 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +249 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +269 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +289 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +309 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +329 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +349 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +369 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +389 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +30 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +50 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +70 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +90 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +110 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +130 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +150 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +170 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +190 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +210 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +230 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +250 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +270 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +290 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +310 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +330 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +350 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +370 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +390 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +31 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +51 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +71 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +91 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +111 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +131 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +151 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +171 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +191 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +211 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +231 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +251 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +271 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +291 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +311 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +331 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +351 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +371 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +391 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +32 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +52 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +72 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +92 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +112 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +132 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +152 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +172 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +192 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +232 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +252 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +272 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +292 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +312 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +332 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +352 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +372 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +392 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +33 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +53 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +73 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +93 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +113 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +133 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +153 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +173 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +193 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +213 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +233 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +253 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +273 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +293 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +313 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +333 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +353 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +373 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +393 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +34 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +54 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +74 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +94 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +114 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +134 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +154 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +174 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +194 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +214 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +234 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +254 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +274 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +294 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +314 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +334 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +354 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +374 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +394 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +35 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +55 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +75 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +95 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +115 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +135 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +155 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +175 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +195 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +215 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +235 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +255 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +275 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +295 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +315 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +335 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +355 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +375 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +395 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +36 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +56 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +76 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +96 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +116 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +136 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +156 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +176 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +196 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +216 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +236 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +256 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +276 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +296 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +316 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +336 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +356 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +376 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +396 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +37 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +57 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +77 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +97 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +117 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +137 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +157 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +177 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +197 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +217 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +237 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +257 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +277 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +297 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +317 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +337 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +357 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +377 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +397 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +38 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +58 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +78 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +98 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +118 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +138 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +158 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +178 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +198 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +218 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +238 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +258 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +278 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +298 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +318 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +338 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +358 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +378 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +398 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +39 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +59 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +79 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +99 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +119 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +139 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +159 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +179 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +199 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +219 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +239 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +259 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +279 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +299 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +319 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +339 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +359 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +379 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +399 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +40 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +60 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +80 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +100 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +120 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +140 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +160 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +180 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +200 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +220 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +240 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +260 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +280 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +300 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +320 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +340 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +360 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +380 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 +400 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 5dcd27ef2b..d981962a70 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -283,7 +283,7 @@ void NEB_spin::run() fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN " - "GradV0dottan ... GradVNdottan\n"); + "GradV0dottan DN0 ... GradVNdottan DNN\n"); } else { fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " @@ -296,7 +296,7 @@ void NEB_spin::run() fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN " - "GradV0dottan ... GradVNdottan\n"); + "GradV0dottan DN0 ... GradVNdottan DNN\n"); } else { fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... " @@ -368,7 +368,7 @@ void NEB_spin::run() fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN " - "GradV0dottan ... GradVNdottan\n"); + "GradV0dottan DN0... GradVNdottan DNN\n"); } else { fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc " @@ -381,7 +381,7 @@ void NEB_spin::run() fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN " - "GradV0dottan ... GradVNdottan\n"); + "GradV0dottan DN0 ... GradVNdottan DNN\n"); } else { fprintf(ulogfile,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc " @@ -873,8 +873,9 @@ void NEB_spin::print_status() for (int i = 0; i < nreplica; i++) fprintf(uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); if (verbose) { - for (int i = 0; i < nreplica; i++) - fprintf(uscreen,"%12.8g ",all[i][5]); + for (int i = 0; i < nreplica-1; i++) + fprintf(uscreen,"%12.8g %12.8g ",all[i][2],all[i][5]); + fprintf(uscreen,"%12.8g %12.8g ",NAN,all[nreplica-1][5]); } fprintf(uscreen,"\n"); } @@ -888,8 +889,9 @@ void NEB_spin::print_status() for (int i = 0; i < nreplica; i++) fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); if (verbose) { - for (int i = 0; i < nreplica; i++) - fprintf(ulogfile,"%12.8g ",all[i][5]); + for (int i = 0; i < nreplica-1; i++) + fprintf(ulogfile,"%12.8g %12.8g ",all[i][2],all[i][5]); + fprintf(ulogfile,"%12.8g %12.8g ",NAN,all[nreplica-1][5]); } fprintf(ulogfile,"\n"); fflush(ulogfile); From e45e92b1cbf0cb4823d80eed07d6049c136ee61a Mon Sep 17 00:00:00 2001 From: julient31 Date: Wed, 3 Apr 2019 11:24:37 -0600 Subject: [PATCH 21/35] Commit JT 040319 - improved examples - start rework gneb init. (Rodrigues' formula) --- examples/SPIN/gneb/README | 7 +- examples/SPIN/gneb/iron/in.gneb.iron | 2 +- examples/SPIN/gneb/skyrmion/in.gneb.skyrmion | 16 +- src/SPIN/neb_spin.cpp | 152 ++++++++++--------- 4 files changed, 89 insertions(+), 88 deletions(-) diff --git a/examples/SPIN/gneb/README b/examples/SPIN/gneb/README index 7d388d898e..6f5db6d388 100644 --- a/examples/SPIN/gneb/README +++ b/examples/SPIN/gneb/README @@ -1,5 +1,10 @@ +Perform geodesic NEB calculations for spin configurations. +The two examples are: +- the magnetic switching of an iron nanoisland +- the collapse of a magnetic skyrmion + Run those examples as: -mpirun -np 4 lmp_mpi -in in.gneb.iron -partition 4x1 +mpirun -np 3 lmp_mpi -in in.gneb.iron -partition 3x1 You should be able to use any number of replicas >= 3. diff --git a/examples/SPIN/gneb/iron/in.gneb.iron b/examples/SPIN/gneb/iron/in.gneb.iron index 4cfbd723b7..c794292cfb 100644 --- a/examples/SPIN/gneb/iron/in.gneb.iron +++ b/examples/SPIN/gneb/iron/in.gneb.iron @@ -1,4 +1,3 @@ -# bcc iron in a 3d periodic box units metal dimension 3 @@ -11,6 +10,7 @@ atom_modify map array read_data initial.iron_spin # setting mass, mag. moments, and interactions for bcc iron +# (mass not necessary for fixed lattice calculation) mass 1 55.845 diff --git a/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion b/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion index aab6376e98..cbab56631b 100644 --- a/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion +++ b/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion @@ -1,4 +1,3 @@ -# bcc iron in a 3d periodic box units metal dimension 3 @@ -8,17 +7,12 @@ atom_style spin # necessary for the serial algorithm (sametag) atom_modify map array -#lattice sc 3.0 -#region box block 0.0 20.0 0.0 20.0 0.0 1.0 -#create_box 1 box -#create_atoms 1 box - read_data initial.skyrmion # setting mass, mag. moments, and interactions for bcc iron +# (mass not necessary for fixed lattice calculation) mass 1 55.845 -#set group all spin 2.2 -1.0 0.0 0.0 pair_style hybrid/overlay spin/exchange 3.1 spin/dmi 3.1 pair_coeff * * spin/exchange exchange 3.1 0.01593 0.06626915552 1.211 @@ -31,10 +25,8 @@ fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 anisotropy 5e-05 0.0 0.0 1.0 fix_modify 1 energy yes fix 2 all langevin/spin 0.0 0.0 21 fix 3 all neb/spin 1.0 -#fix 4 all nve/spin lattice no timestep 0.0001 -#run 0 compute out_mag all spin variable magx equal c_out_mag[1] @@ -49,10 +41,8 @@ thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz variable u universe 1 2 3 4 -#dump 1 all custom 100 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7] dump 1 all custom 1 dump.$u type x y z c_outsp[1] c_outsp[2] c_outsp[3] min_style spin -min_modify alpha_damp 1.0 discret_factor 10.0 -neb/spin 1.0e-16 1.0e-16 1000 1000 10 final final.skyrmion -#neb/spin 1.0e-16 1.0e-16 10 10 10 final final.skyrmion +min_modify alpha_damp 1.0 discrete_factor 10.0 +neb/spin 1.0e-12 1.0e-12 10000 10000 10 final final.skyrmion diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index d981962a70..69c59e0484 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -637,52 +637,9 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) // initial, final and inter ang. values - double itheta,iphi,ftheta,fphi,ktheta,kphi; - double spix,spiy,spiz,spfx,spfy,spfz; - double spkx,spky,spkz,iknorm; - - spix = spi[0]; - spiy = spi[1]; - spiz = spi[2]; - - spfx = sploc[0]; - spfy = sploc[1]; - spfz = sploc[2]; - - iphi = itheta = fphi = ftheta = 0.0; - - iphi = acos(spiz); - if (sin(iphi) != 0.0) - itheta = acos(spix/sin(iphi)); - - fphi = acos(spfz); - if (sin(fphi) != 0.0) - ftheta = acos(spfx/sin(fphi)); - - kphi = iphi + fraction*(fphi-iphi); - ktheta = itheta + fraction*(ftheta-itheta); - - spkx = cos(ktheta)*sin(kphi); - spky = sin(ktheta)*sin(kphi); - spkz = cos(kphi); - - double knormsq = spkx*spkx + spky*spky + spkz*spkz; - if (knormsq != 0.0) - iknorm = 1.0/sqrt(knormsq); - - spkx *= iknorm; - spky *= iknorm; - spkz *= iknorm; - - //sploc[0] = spkx; - //sploc[1] = spky; - //sploc[2] = spkz; - - //double kx,ky,kz; + //double itheta,iphi,ftheta,fphi,ktheta,kphi; //double spix,spiy,spiz,spfx,spfy,spfz; - //double kcrossx,kcrossy,kcrossz,knormsq; - //double spkx,spky,spkz; - //double sdot,omega,iknorm; + //double spkx,spky,spkz,iknorm; //spix = spi[0]; //spiy = spi[1]; @@ -691,40 +648,89 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) //spfx = sploc[0]; //spfy = sploc[1]; //spfz = sploc[2]; - // - //kx = spiy*spfz - spiz*spfy; - //ky = spiz*spfx - spix*spfz; - //kz = spix*spfy - spiy*spfx; - //knormsq = kx*kx+ky*ky+kz*kz; - // - //if (knormsq != 0.0) { + //iphi = itheta = fphi = ftheta = 0.0; + + //iphi = acos(spiz); + //if (sin(iphi) != 0.0) + // itheta = acos(spix/sin(iphi)); + + //fphi = acos(spfz); + //if (sin(fphi) != 0.0) + // ftheta = acos(spfx/sin(fphi)); + + //kphi = iphi + fraction*(fphi-iphi); + //ktheta = itheta + fraction*(ftheta-itheta); + + //spkx = cos(ktheta)*sin(kphi); + //spky = sin(ktheta)*sin(kphi); + //spkz = cos(kphi); + + //double knormsq = spkx*spkx + spky*spky + spkz*spkz; + //if (knormsq != 0.0) // iknorm = 1.0/sqrt(knormsq); - // kx *= iknorm; - // ky *= iknorm; - // kz *= iknorm; - //} - // - //kcrossx = ky*spiz - kz*spiy; - //kcrossy = kz*spix - kx*spiz; - //kcrossz = kx*spiy - ky*spix; - - //sdot = spix*spfx + spiy*spfy + spiz*spfz; - - //omega = acos(sdot); - //omega *= fraction; - - //spkx = spix*cos(omega) + kcrossx*sin(omega); - //spky = spiy*cos(omega) + kcrossy*sin(omega); - //spkz = spiz*cos(omega) + kcrossz*sin(omega); - // - //iknorm = 1.0/sqrt(spkx*spkx+spky*spky+spkz*spkz); - //if (iknorm == 0.0) - // error->all(FLERR,"Incorrect rotation operation"); //spkx *= iknorm; //spky *= iknorm; //spkz *= iknorm; + + //sploc[0] = spkx; + //sploc[1] = spky; + //sploc[2] = spkz; + + double kx,ky,kz; + double spix,spiy,spiz,spfx,spfy,spfz; + double kcrossx,kcrossy,kcrossz,knormsq; + double kdots; + double spkx,spky,spkz; + double sdot,omega,iknorm,isnorm; + + spix = spi[0]; + spiy = spi[1]; + spiz = spi[2]; + + spfx = sploc[0]; + spfy = sploc[1]; + spfz = sploc[2]; + + kx = spiy*spfz - spiz*spfy; + ky = spiz*spfx - spix*spfz; + kz = spix*spfy - spiy*spfx; + + knormsq = kx*kx+ky*ky+kz*kz; + + if (knormsq != 0.0) { + iknorm = 1.0/sqrt(knormsq); + kx *= iknorm; + ky *= iknorm; + kz *= iknorm; + } + + kcrossx = ky*spiz - kz*spiy; + kcrossy = kz*spix - kx*spiz; + kcrossz = kx*spiy - ky*spix; + + kdots = kx*spix + ky*spiz + kz*spiz; + sdot = spix*spfx + spiy*spfy + spiz*spfz; + + omega = acos(sdot); + omega *= fraction; + + spkx = spix*cos(omega) + kcrossx*sin(omega); + spky = spiy*cos(omega) + kcrossy*sin(omega); + spkz = spiz*cos(omega) + kcrossz*sin(omega); + + spkx += kx*kdots*(1.0-cos(omega)); + spky += ky*kdots*(1.0-cos(omega)); + spkz += kz*kdots*(1.0-cos(omega)); + + isnorm = 1.0/sqrt(spkx*spkx+spky*spky+spkz*spkz); + if (isnorm == 0.0) + error->all(FLERR,"Incorrect rotation operation"); + + spkx *= isnorm; + spky *= isnorm; + spkz *= isnorm; sploc[0] = spkx; sploc[1] = spky; From da16a7e50ba74aee5d6d08fe49f41d673fe3c551 Mon Sep 17 00:00:00 2001 From: julient31 Date: Fri, 5 Apr 2019 13:22:46 -0600 Subject: [PATCH 22/35] Commit JT 040519 - initial rotation with Rodrigues' formula + exception - worked on neb_spin documentation - removed pair/spin warning for neb/spin --- doc/src/Eqs/neb_spin_k.jpg | Bin 0 -> 8348 bytes doc/src/Eqs/neb_spin_k.tex | 16 + doc/src/Eqs/neb_spin_rodrigues_formula.jpg | Bin 0 -> 20271 bytes doc/src/Eqs/neb_spin_rodrigues_formula.tex | 16 + doc/src/neb_spin.txt | 430 +++++++++++++++++++ examples/SPIN/gneb/iron/in.gneb.iron | 3 +- examples/SPIN/gneb/skyrmion/in.gneb.skyrmion | 3 +- src/SPIN/fix_neb_spin.h | 30 +- src/SPIN/neb_spin.cpp | 140 +++--- src/SPIN/neb_spin.h | 2 +- src/SPIN/pair_spin_dmi.cpp | 3 +- src/SPIN/pair_spin_exchange.cpp | 2 +- src/SPIN/pair_spin_magelec.cpp | 3 +- src/SPIN/pair_spin_neel.cpp | 3 +- 14 files changed, 560 insertions(+), 91 deletions(-) create mode 100644 doc/src/Eqs/neb_spin_k.jpg create mode 100644 doc/src/Eqs/neb_spin_k.tex create mode 100644 doc/src/Eqs/neb_spin_rodrigues_formula.jpg create mode 100644 doc/src/Eqs/neb_spin_rodrigues_formula.tex create mode 100644 doc/src/neb_spin.txt diff --git a/doc/src/Eqs/neb_spin_k.jpg b/doc/src/Eqs/neb_spin_k.jpg new file mode 100644 index 0000000000000000000000000000000000000000..add309694f9f0a0901b33bce69d7ef1bdce600a1 GIT binary patch literal 8348 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 I`Ni!20@5|3n*aa+ literal 0 HcmV?d00001 diff --git a/doc/src/Eqs/neb_spin_k.tex b/doc/src/Eqs/neb_spin_k.tex new file mode 100644 index 0000000000..f0ce8e180e --- /dev/null +++ b/doc/src/Eqs/neb_spin_k.tex @@ -0,0 +1,16 @@ +\documentclass[preview]{standalone} +\usepackage{varwidth} +\usepackage[utf8x]{inputenc} +\usepackage{amsmath, amssymb, graphics, setspace} + +\begin{document} +\begin{varwidth}{50in} + \begin{equation} + \vec{k}_i = + \frac{\vec{m}_i^I \times \vec{m}_i^F}{\left|\vec{m}_i^I + \times \vec{m}_i^F\right|} + %&{\rm ~if~}& \vec{m}_i^I \times \vec{m}_i^F + , \nonumber + \end{equation} +\end{varwidth} +\end{document} diff --git a/doc/src/Eqs/neb_spin_rodrigues_formula.jpg b/doc/src/Eqs/neb_spin_rodrigues_formula.jpg new file mode 100644 index 0000000000000000000000000000000000000000..66070f7bc5b8050ec71d8947d3f2da3ec4e8ed38 GIT binary patch literal 20271 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 literal 0 HcmV?d00001 diff --git a/doc/src/Eqs/neb_spin_rodrigues_formula.tex b/doc/src/Eqs/neb_spin_rodrigues_formula.tex new file mode 100644 index 0000000000..4a8347cd79 --- /dev/null +++ b/doc/src/Eqs/neb_spin_rodrigues_formula.tex @@ -0,0 +1,16 @@ +\documentclass[preview]{standalone} +\usepackage{varwidth} +\usepackage[utf8x]{inputenc} +\usepackage{amsmath, amssymb, graphics, setspace} + +\begin{document} +\begin{varwidth}{50in} + \begin{equation} + \vec{m}_i^{\nu} = \vec{m}_i^{I} \cos(\omega_i^{\nu}) + + (\vec{k}_i \times \vec{m}_i^{I}) \sin(\omega_i^{\nu}) + + (1.0-\cos(\omega_i^{\nu})) \vec{k}_i (\vec{k}_i\cdot + \vec{m}_i^{I}) + , \nonumber + \end{equation} +\end{varwidth} +\end{document} diff --git a/doc/src/neb_spin.txt b/doc/src/neb_spin.txt new file mode 100644 index 0000000000..33cb4cc2ed --- /dev/null +++ b/doc/src/neb_spin.txt @@ -0,0 +1,430 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Commands_all.html) + +:line + +neb command :h3 + +[Syntax:] + +neb/spin etol ttol N1 N2 Nevery file-style arg keyword :pre + +etol = stopping tolerance for energy (energy units) :ulb,l +ttol = stopping tolerance for torque ( units) :l +N1 = max # of iterations (timesteps) to run initial NEB :l +N2 = max # of iterations (timesteps) to run barrier-climbing NEB :l +Nevery = print replica energies and reaction coordinates every this many timesteps :l +file-style = {final} or {each} or {none} :l + {final} arg = filename + filename = file with initial coords for final replica + coords for intermediate replicas are linearly interpolated + between first and last replica + {each} arg = filename + filename = unique filename for each replica (except first) + with its initial coords + {none} arg = no argument all replicas assumed to already have + their initial coords :pre +keyword = {verbose} +:ule + +[Examples:] + +neb/spin 0.1 0.0 1000 500 50 final coords.final +neb/spin 0.0 0.001 1000 500 50 each coords.initial.$i +neb/spin 0.0 0.001 1000 500 50 none verbose :pre + +[Description:] + +Perform a geodesic nudged elastic band (GNEB) calculation using multiple +replicas of a system. Two or more replicas must be used; the first +and last are the end points of the transition path. + +GNEB is a method for finding both the spin configurations and height +of the energy barrier associated with a transition state, e.g. +spins to perform a collective rotation from one energy basin to +another. +The implementation in LAMMPS follows the discussion in the +following paper: "(Bessarab)"_#Bessarab. + +Each replica runs on a partition of one or more processors. Processor +partitions are defined at run-time using the "-partition command-line +switch"_Run_options.html. Note that if you have MPI installed, you +can run a multi-replica simulation with more replicas (partitions) +than you have physical processors, e.g you can run a 10-replica +simulation on just one or two processors. You will simply not get the +performance speed-up you would see with one or more physical +processors per replica. See the "Howto replica"_Howto_replica.html +doc page for further discussion. + +NOTE: As explained below, a GNEB calculation performs a damped dynamics +minimization across all the replicas. The "spin"_min_spin.html +style minimizer has to be defined in your input script. + +When a GNEB calculation is performed, it is assumed that each replica +is running the same system, though LAMMPS does not check for this. +I.e. the simulation domain, the number of magnetic atoms, the +interaction potentials, and the starting configuration when the neb +command is issued should be the same for every replica. + +In a GNEB calculation each replica is connected to other replicas by +inter-replica nudging forces. These forces are imposed by the "fix +neb/spin"_fix_neb_spin.html command, which must be used in conjunction +with the neb command. +The group used to define the fix neb/spin command defines the +GNEB magnetic atoms which are the only ones that inter-replica springs +are applied to. +If the group does not include all magnetic atoms, then non-GNEB +magnetic atoms have no inter-replica springs and the torques they feel +and their precessional motion is computed in the usual way due only +to other magnetic atoms within their replica. +Conceptually, the non-GNEB atoms provide a background force field for +the GNEB atoms. +Their magnetic spins can be allowed to precess during the GNEB +minimization procedure. + +The initial spin configuration for each of the replicas can be +specified in different manners via the {file-style} setting, as +discussed below. Only atomic spins whose initial coordinates should +differ from the current configuration need to be specified. + +Conceptually, the initial and final configurations for the first +replica should be states on either side of an energy barrier. + +As explained below, the initial configurations of intermediate +replicas can be spin coordinates interpolated in a linear fashion +between the first and last replicas. This is often adequate for +simple transitions. For more complex transitions, it may lead to slow +convergence or even bad results if the minimum energy path (MEP, see +below) of states over the barrier cannot be correctly converged to +from such an initial path. In this case, you will want to generate +initial states for the intermediate replicas that are geometrically +closer to the MEP and read them in. + +################################################################### + +:line + +For a {file-style} setting of {final}, a filename is specified which +contains atomic and spin coordinates for zero or more atoms, in the +format described below. +For each atom that appears in the file, the new coordinates are +assigned to that atom in the final replica. Each intermediate replica +also assigns a new spin to that atom in an interpolated manner. +This is done by using the current direction of the spin at the starting +point and the read-in direction as the final point. +The angular distance between them is calculated, and the new direction +is assigned to be a fraction of the angular distance. + +NOTE: The "angular distance" between the starting and final point is +evaluated in the geodesic sense, as described in "(Bessarab)"_#Bessarab. + +NOTE: The angular interpolation between the starting and final point +is achieved using Rodrigues formula: + +:c,image(Eqs/neb_spin_rodrigues_formula.jpg) + +with m_i^I is the initial spin configuration for the spin i, +where the rotation and k_i is defined as: + +:c,image(Eqs/neb_spin_k.jpg) + +The distance between them is calculated, and the new position +is assigned to be a fraction of the distance. E.g. if there are 10 +replicas, the 2nd replica will assign a position that is 10% of the +distance along a line between the starting and final point, and the +9th replica will assign a position that is 90% of the distance along +the line. Note that for this procedure to produce consistent +coordinates across all the replicas, the current coordinates need to +be the same in all replicas. LAMMPS does not check for this, but +invalid initial configurations will likely result if it is not the +case. + +NOTE: The "distance" between the starting and final point is +calculated in a minimum-image sense for a periodic simulation box. +This means that if the two positions are on opposite sides of a box +(periodic in that dimension), the distance between them will be small, +because the periodic image of one of the atoms is close to the other. +Similarly, even if the assigned position resulting from the +interpolation is outside the periodic box, the atom will be wrapped +back into the box when the NEB calculation begins. + +For a {file-style} setting of {each}, a filename is specified which is +assumed to be unique to each replica. This can be done by using a +variable in the filename, e.g. + +variable i equal part +neb 0.0 0.001 1000 500 50 each coords.initial.$i :pre + +which in this case will substitute the partition ID (0 to N-1) for the +variable I, which is also effectively the replica ID. See the +"variable"_variable.html command for other options, such as using +world-, universe-, or uloop-style variables. + +Each replica (except the first replica) will read its file, formatted +as described below, and for any atom that appears in the file, assign +the specified coordinates to its atom. The various files do not need +to contain the same set of atoms. + +For a {file-style} setting of {none}, no filename is specified. Each +replica is assumed to already be in its initial configuration at the +time the neb command is issued. This allows each replica to define +its own configuration by reading a replica-specific data or restart or +dump file, via the "read_data"_read_data.html, +"read_restart"_read_restart.html, or "read_dump"_read_dump.html +commands. The replica-specific names of these files can be specified +as in the discussion above for the {each} file-style. Also see the +section below for how a NEB calculation can produce restart files, so +that a long calculation can be restarted if needed. + +NOTE: None of the {file-style} settings change the initial +configuration of any atom in the first replica. The first replica +must thus be in the correct initial configuration at the time the neb +command is issued. + +:line + +A NEB calculation proceeds in two stages, each of which is a +minimization procedure, performed via damped dynamics. To enable +this, you must first define a damped dynamics +"min_style"_min_style.html, such as {quickmin} or {fire}. The {cg}, +{sd}, and {hftn} styles cannot be used, since they perform iterative +line searches in their inner loop, which cannot be easily synchronized +across multiple replicas. + +The minimizer tolerances for energy and force are set by {etol} and +{ftol}, the same as for the "minimize"_minimize.html command. + +A non-zero {etol} means that the NEB calculation will terminate if the +energy criterion is met by every replica. The energies being compared +to {etol} do not include any contribution from the inter-replica +nudging forces, since these are non-conservative. A non-zero {ftol} +means that the NEB calculation will terminate if the force criterion +is met by every replica. The forces being compared to {ftol} include +the inter-replica nudging forces. + +The maximum number of iterations in each stage is set by {N1} and +{N2}. These are effectively timestep counts since each iteration of +damped dynamics is like a single timestep in a dynamics +"run"_run.html. During both stages, the potential energy of each +replica and its normalized distance along the reaction path (reaction +coordinate RD) will be printed to the screen and log file every +{Nevery} timesteps. The RD is 0 and 1 for the first and last replica. +For intermediate replicas, it is the cumulative distance (normalized +by the total cumulative distance) between adjacent replicas, where +"distance" is defined as the length of the 3N-vector of differences in +atomic coordinates, where N is the number of NEB atoms involved in the +transition. These outputs allow you to monitor NEB's progress in +finding a good energy barrier. {N1} and {N2} must both be multiples +of {Nevery}. + +In the first stage of NEB, the set of replicas should converge toward +a minimum energy path (MEP) of conformational states that transition +over a barrier. The MEP for a transition is defined as a sequence of +3N-dimensional states, each of which has a potential energy gradient +parallel to the MEP itself. The configuration of highest energy along +a MEP corresponds to a saddle point. The replica states will also be +roughly equally spaced along the MEP due to the inter-replica nudging +force added by the "fix neb"_fix_neb.html command. + +In the second stage of NEB, the replica with the highest energy is +selected and the inter-replica forces on it are converted to a force +that drives its atom coordinates to the top or saddle point of the +barrier, via the barrier-climbing calculation described in +"(HenkelmanB)"_#HenkelmanB. As before, the other replicas rearrange +themselves along the MEP so as to be roughly equally spaced. + +When both stages are complete, if the NEB calculation was successful, +the configurations of the replicas should be along (close to) the MEP +and the replica with the highest energy should be an atomic +configuration at (close to) the saddle point of the transition. The +potential energies for the set of replicas represents the energy +profile of the transition along the MEP. + +:line + +A few other settings in your input script are required or advised to +perform a NEB calculation. See the NOTE about the choice of timestep +at the beginning of this doc page. + +An atom map must be defined which it is not by default for "atom_style +atomic"_atom_style.html problems. The "atom_modify +map"_atom_modify.html command can be used to do this. + +The minimizers in LAMMPS operate on all atoms in your system, even +non-NEB atoms, as defined above. To prevent non-NEB atoms from moving +during the minimization, you should use the "fix +setforce"_fix_setforce.html command to set the force on each of those +atoms to 0.0. This is not required, and may not even be desired in +some cases, but if those atoms move too far (e.g. because the initial +state of your system was not well-minimized), it can cause problems +for the NEB procedure. + +The damped dynamics "minimizers"_min_style.html, such as {quickmin} +and {fire}), adjust the position and velocity of the atoms via an +Euler integration step. Thus you must define an appropriate +"timestep"_timestep.html to use with NEB. As mentioned above, NEB +will often converge more quickly if you use a timestep about 10x +larger than you would normally use for dynamics simulations. + +:line + +Each file read by the neb command containing atomic coordinates used +to initialize one or more replicas must be formatted as follows. + +The file can be ASCII text or a gzipped text file (detected by a .gz +suffix). The file can contain initial blank lines or comment lines +starting with "#" which are ignored. The first non-blank, non-comment +line should list N = the number of lines to follow. The N successive +lines contain the following information: + +ID1 x1 y1 z1 +ID2 x2 y2 z2 +... +IDN xN yN zN :pre + +The fields are the atom ID, followed by the x,y,z coordinates. The +lines can be listed in any order. Additional trailing information on +the line is OK, such as a comment. + +Note that for a typical NEB calculation you do not need to specify +initial coordinates for very many atoms to produce differing starting +and final replicas whose intermediate replicas will converge to the +energy barrier. Typically only new coordinates for atoms +geometrically near the barrier need be specified. + +Also note there is no requirement that the atoms in the file +correspond to the NEB atoms in the group defined by the "fix +neb"_fix_neb.html command. Not every NEB atom need be in the file, +and non-NEB atoms can be listed in the file. + +:line + +Four kinds of output can be generated during a NEB calculation: energy +barrier statistics, thermodynamic output by each replica, dump files, +and restart files. + +When running with multiple partitions (each of which is a replica in +this case), the print-out to the screen and master log.lammps file +contains a line of output, printed once every {Nevery} timesteps. It +contains the timestep, the maximum force per replica, the maximum +force per atom (in any replica), potential gradients in the initial, +final, and climbing replicas, the forward and backward energy +barriers, the total reaction coordinate (RDT), and the normalized +reaction coordinate and potential energy of each replica. + +The "maximum force per replica" is the two-norm of the 3N-length force +vector for the atoms in each replica, maximized across replicas, which +is what the {ftol} setting is checking against. In this case, N is +all the atoms in each replica. The "maximum force per atom" is the +maximum force component of any atom in any replica. The potential +gradients are the two-norm of the 3N-length force vector solely due to +the interaction potential i.e. without adding in inter-replica +forces. + +The "reaction coordinate" (RD) for each replica is the two-norm of the +3N-length vector of distances between its atoms and the preceding +replica's atoms, added to the RD of the preceding replica. The RD of +the first replica RD1 = 0.0; the RD of the final replica RDN = RDT, +the total reaction coordinate. The normalized RDs are divided by RDT, +so that they form a monotonically increasing sequence from zero to +one. When computing RD, N only includes the atoms being operated on by +the fix neb command. + +The forward (reverse) energy barrier is the potential energy of the +highest replica minus the energy of the first (last) replica. + +Supplementary information for all replicas can be printed out to the +screen and master log.lammps file by adding the verbose keyword. This +information include the following. The "path angle" (pathangle) for +the replica i which is the angle between the 3N-length vectors (Ri-1 - +Ri) and (Ri+1 - Ri) (where Ri is the atomic coordinates of replica +i). A "path angle" of 180 indicates that replicas i-1, i and i+1 are +aligned. "angletangrad" is the angle between the 3N-length tangent +vector and the 3N-length force vector at image i. The tangent vector +is calculated as in "(HenkelmanA)"_#HenkelmanA for all intermediate +replicas and at R2 - R1 and RM - RM-1 for the first and last replica, +respectively. "anglegrad" is the angle between the 3N-length energy +gradient vector of replica i and that of replica i+1. It is not +defined for the final replica and reads nan. gradV is the norm of the +energy gradient of image i. ReplicaForce is the two-norm of the +3N-length force vector (including nudging forces) for replica i. +MaxAtomForce is the maximum force component of any atom in replica i. + +When a NEB calculation does not converge properly, the supplementary +information can help understanding what is going wrong. For instance +when the path angle becomes acute, the definition of tangent used in +the NEB calculation is questionable and the NEB cannot may diverge +"(Maras)"_#Maras2. + + +When running on multiple partitions, LAMMPS produces additional log +files for each partition, e.g. log.lammps.0, log.lammps.1, etc. For a +NEB calculation, these contain the thermodynamic output for each +replica. + +If "dump"_dump.html commands in the input script define a filename +that includes a {universe} or {uloop} style "variable"_variable.html, +then one dump file (per dump command) will be created for each +replica. At the end of the NEB calculation, the final snapshot in +each file will contain the sequence of snapshots that transition the +system over the energy barrier. Earlier snapshots will show the +convergence of the replicas to the MEP. + +Likewise, "restart"_restart.html filenames can be specified with a +{universe} or {uloop} style "variable"_variable.html, to generate +restart files for each replica. These may be useful if the NEB +calculation fails to converge properly to the MEP, and you wish to +restart the calculation from an intermediate point with altered +parameters. + +There are 2 Python scripts provided in the tools/python directory, +neb_combine.py and neb_final.py, which are useful in analyzing output +from a NEB calculation. Assume a NEB simulation with M replicas, and +the NEB atoms labeled with a specific atom type. + +The neb_combine.py script extracts atom coords for the NEB atoms from +all M dump files and creates a single dump file where each snapshot +contains the NEB atoms from all the replicas and one copy of non-NEB +atoms from the first replica (presumed to be identical in other +replicas). This can be visualized/animated to see how the NEB atoms +relax as the NEB calculation proceeds. + +The neb_final.py script extracts the final snapshot from each of the M +dump files to create a single dump file with M snapshots. This can be +visualized to watch the system make its transition over the energy +barrier. + +To illustrate, here are images from the final snapshot produced by the +neb_combine.py script run on the dump files produced by the two +example input scripts in examples/neb. Click on them to see a larger +image. + +:image(JPG/hop1_small.jpg,JPG/hop1.jpg) +:image(JPG/hop2_small.jpg,JPG/hop2.jpg) + +:line + +[Restrictions:] + +This command can only be used if LAMMPS was built with the SPIN +package. See the "Build package"_Build_package.html doc +page for more info. + +:line + +[Related commands:] + +"min/spin"_min_spin.html, "fix neb/spin"_fix_neb_spin.html + +[Default:] + +none + +:line + +:link(Bessarab) +[(Bessarab)] Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196, +335-347 (2015). diff --git a/examples/SPIN/gneb/iron/in.gneb.iron b/examples/SPIN/gneb/iron/in.gneb.iron index c794292cfb..95e7071cb0 100644 --- a/examples/SPIN/gneb/iron/in.gneb.iron +++ b/examples/SPIN/gneb/iron/in.gneb.iron @@ -7,11 +7,10 @@ atom_style spin # necessary for the serial algorithm (sametag) atom_modify map array -read_data initial.iron_spin - # setting mass, mag. moments, and interactions for bcc iron # (mass not necessary for fixed lattice calculation) +read_data initial.iron_spin mass 1 55.845 pair_style spin/exchange 3.5 diff --git a/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion b/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion index cbab56631b..cf55c9d1d4 100644 --- a/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion +++ b/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion @@ -7,11 +7,10 @@ atom_style spin # necessary for the serial algorithm (sametag) atom_modify map array -read_data initial.skyrmion - # setting mass, mag. moments, and interactions for bcc iron # (mass not necessary for fixed lattice calculation) +read_data initial.skyrmion mass 1 55.845 pair_style hybrid/overlay spin/exchange 3.1 spin/dmi 3.1 diff --git a/src/SPIN/fix_neb_spin.h b/src/SPIN/fix_neb_spin.h index 9bbacc8bf0..8e016b2e23 100644 --- a/src/SPIN/fix_neb_spin.h +++ b/src/SPIN/fix_neb_spin.h @@ -60,20 +60,20 @@ class FixNEB_spin : public Fix { double **spprev,**spnext,**fmnext; double **springF; double **tangent; - double **xsend,**xrecv; // coords to send/recv to/from other replica - double **fsend,**frecv; // coords to send/recv to/from other replica - double **spsend,**sprecv; // sp to send/recv to/from other replica - double **fmsend,**fmrecv; // fm to send/recv to/from other replica - tagint *tagsend,*tagrecv; // ditto for atom IDs + double **xsend,**xrecv; // coords to send/recv to/from other replica + double **fsend,**frecv; // coords to send/recv to/from other replica + double **spsend,**sprecv; // sp to send/recv to/from other replica + double **fmsend,**fmrecv; // fm to send/recv to/from other replica + tagint *tagsend,*tagrecv; // ditto for atom IDs - // info gathered from all procs in my replica - double **xsendall,**xrecvall; // coords to send/recv to/from other replica - double **fsendall,**frecvall; // force to send/recv to/from other replica - double **spsendall,**sprecvall; // sp to send/recv to/from other replica - double **fmsendall,**fmrecvall; // fm to send/recv to/from other replica - tagint *tagsendall,*tagrecvall; // ditto for atom IDs + // info gathered from all procs in my replica + double **xsendall,**xrecvall; // coords to send/recv to/from other replica + double **fsendall,**frecvall; // force to send/recv to/from other replica + double **spsendall,**sprecvall; // sp to send/recv to/from other replica + double **fmsendall,**fmrecvall; // fm to send/recv to/from other replica + tagint *tagsendall,*tagrecvall; // ditto for atom IDs - int *counts,*displacements; // used for MPI_Gather + int *counts,*displacements; // used for MPI_Gather double geodesic_distance(double *, double *); void inter_replica_comm(); @@ -97,16 +97,16 @@ E: Potential energy ID for fix neb does not exist Self-explanatory. -E: Too many active NEB atoms +E: Too many active GNEB atoms UNDOCUMENTED -E: Too many atoms for NEB +E: Too many atoms for GNEB UNDOCUMENTED U: Atom count changed in fix neb -This is not allowed in a NEB calculation. +This is not allowed in a GNEB calculation. */ diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 69c59e0484..77a94c5e84 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -111,6 +111,8 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, double **sp = atom->sp; int nlocal = atom->nlocal; + int temp_flag,rot_flag; + temp_flag = rot_flag = 0; int ii = 0; double spinit[3],spfinal[3]; for (int i = 0; i < nlocal; i++) { @@ -123,7 +125,7 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, spfinal[2] = buf_final[ii+2]; // interpolate intermediate spin states - + if (fraction == 0.0) { sp[i][0] = spinit[0]; sp[i][1] = spinit[1]; @@ -133,7 +135,8 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, sp[i][1] = spfinal[1]; sp[i][2] = spfinal[2]; } else { - initial_rotation(spinit,spfinal,fraction); + temp_flag = initial_rotation(spinit,spfinal,fraction); + rot_flag = MAX(temp_flag,rot_flag); sp[i][0] = spfinal[0]; sp[i][1] = spfinal[1]; sp[i][2] = spfinal[2]; @@ -141,6 +144,14 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, ii += 3; } + + // warning message if one or more couples (spi,spf) were aligned + // this breaks Rodrigues' formula, and an arbitrary rotation + // vector has to be chosen + + if ((rot_flag > 0) && (comm->me == 0)) + error->warning(FLERR,"arbitrary initial rotation of one or more spin(s)"); + } /* ---------------------------------------------------------------------- */ @@ -494,6 +505,8 @@ void NEB_spin::readfile(char *file, int flag) int ncount = 0; + int temp_flag,rot_flag; + temp_flag = rot_flag = 0; int nread = 0; while (nread < nlines) { nchunk = MIN(nlines-nread,CHUNK); @@ -566,7 +579,8 @@ void NEB_spin::readfile(char *file, int flag) sp[m][1] = spfinal[1]; sp[m][2] = spfinal[2]; } else { - initial_rotation(spinit,spfinal,fraction); + temp_flag = initial_rotation(spinit,spfinal,fraction); + rot_flag = MAX(temp_flag,rot_flag); sp[m][0] = spfinal[0]; sp[m][1] = spfinal[1]; sp[m][2] = spfinal[2]; @@ -588,6 +602,13 @@ void NEB_spin::readfile(char *file, int flag) nread += nchunk; } + // warning message if one or more couples (spi,spf) were aligned + // this breaks Rodrigues' formula, and an arbitrary rotation + // vector has to be chosen + + if ((rot_flag > 0) && (comm->me == 0)) + error->warning(FLERR,"arbitrary initial rotation of one or more spin(s)"); + // check that all atom IDs in file were found by a proc if (flag == 0) { @@ -621,69 +642,24 @@ void NEB_spin::readfile(char *file, int flag) } /* ---------------------------------------------------------------------- - initial configuration of spin sploc using Rodrigues' formula + initial configuration of intermediate spins using Rodrigues' formula interpolates between initial (spi) and final (stored in sploc) ------------------------------------------------------------------------- */ -void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) +int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) { - // implementing initial rotation using atan2 - // this may not be a sufficient routine, need more accurate verifications + // no interpolation for initial and final replica - // interpolation only for intermediate replica + if (fraction == 0.0 || fraction == 1.0) return 0; - if (fraction == 0.0 || fraction == 1.0) return; - - // initial, final and inter ang. values - - //double itheta,iphi,ftheta,fphi,ktheta,kphi; - //double spix,spiy,spiz,spfx,spfy,spfz; - //double spkx,spky,spkz,iknorm; - - //spix = spi[0]; - //spiy = spi[1]; - //spiz = spi[2]; - - //spfx = sploc[0]; - //spfy = sploc[1]; - //spfz = sploc[2]; - - //iphi = itheta = fphi = ftheta = 0.0; - - //iphi = acos(spiz); - //if (sin(iphi) != 0.0) - // itheta = acos(spix/sin(iphi)); - - //fphi = acos(spfz); - //if (sin(fphi) != 0.0) - // ftheta = acos(spfx/sin(fphi)); - - //kphi = iphi + fraction*(fphi-iphi); - //ktheta = itheta + fraction*(ftheta-itheta); - - //spkx = cos(ktheta)*sin(kphi); - //spky = sin(ktheta)*sin(kphi); - //spkz = cos(kphi); - - //double knormsq = spkx*spkx + spky*spky + spkz*spkz; - //if (knormsq != 0.0) - // iknorm = 1.0/sqrt(knormsq); - - //spkx *= iknorm; - //spky *= iknorm; - //spkz *= iknorm; - - //sploc[0] = spkx; - //sploc[1] = spky; - //sploc[2] = spkz; - + int rot_flag = 0; double kx,ky,kz; double spix,spiy,spiz,spfx,spfy,spfz; double kcrossx,kcrossy,kcrossz,knormsq; double kdots; double spkx,spky,spkz; - double sdot,omega,iknorm,isnorm; + double sidotsf,omega,iknorm,isnorm; spix = spi[0]; spiy = spi[1]; @@ -698,43 +674,73 @@ void NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) kz = spix*spfy - spiy*spfx; knormsq = kx*kx+ky*ky+kz*kz; - - if (knormsq != 0.0) { - iknorm = 1.0/sqrt(knormsq); - kx *= iknorm; - ky *= iknorm; - kz *= iknorm; + sidotsf = spix*spfx + spiy*spfy + spiz*spfz; + + // if knormsq == 0.0, init and final spins are aligned + // Rodrigues' formula breaks, needs to define another axis k + + if (knormsq == 0.0) { + if (sidotsf > 0.0) { // spins aligned and in same direction + return 0; + } else if (sidotsf < 0.0) { // spins aligned and in opposite directions + + // defining a rotation axis + // first guess, k = spi x [100] + // second guess, k = spi x [010] + + if (spiy*spiy + spiz*spiz != 0.0) { // spin not along [100] + kx = 0.0; + ky = spiz; + kz = -spiy; + } else if (spix*spix + spiz*spiz != 0.0) { // spin not along [010] + kx = -spiz; + ky = 0.0; + kz = spix; + } else error->all(FLERR,"Incorrect initial rotation operation"); + rot_flag = 1; + } } - + kcrossx = ky*spiz - kz*spiy; kcrossy = kz*spix - kx*spiz; kcrossz = kx*spiy - ky*spix; kdots = kx*spix + ky*spiz + kz*spiz; - sdot = spix*spfx + spiy*spfy + spiz*spfz; - omega = acos(sdot); + omega = acos(sidotsf); omega *= fraction; - spkx = spix*cos(omega) + kcrossx*sin(omega); - spky = spiy*cos(omega) + kcrossy*sin(omega); - spkz = spiz*cos(omega) + kcrossz*sin(omega); + // applying Rodrigues' formula + + spkx = spix*cos(omega); + spky = spiy*cos(omega); + spkz = spiz*cos(omega); + + spkx += kcrossx*sin(omega); + spky += kcrossy*sin(omega); + spkz += kcrossz*sin(omega); spkx += kx*kdots*(1.0-cos(omega)); spky += ky*kdots*(1.0-cos(omega)); spkz += kz*kdots*(1.0-cos(omega)); + // normalizing resulting spin vector + isnorm = 1.0/sqrt(spkx*spkx+spky*spky+spkz*spkz); if (isnorm == 0.0) - error->all(FLERR,"Incorrect rotation operation"); + error->all(FLERR,"Incorrect initial rotation operation"); spkx *= isnorm; spky *= isnorm; spkz *= isnorm; + // returns rotated spin + sploc[0] = spkx; sploc[1] = spky; sploc[2] = spkz; + + return rot_flag; } /* ---------------------------------------------------------------------- diff --git a/src/SPIN/neb_spin.h b/src/SPIN/neb_spin.h index 5988c04a3a..b7c20bc3a9 100644 --- a/src/SPIN/neb_spin.h +++ b/src/SPIN/neb_spin.h @@ -57,7 +57,7 @@ class NEB_spin : protected Pointers { double *fmaxatomInRepl; // force on an image void readfile(char *, int); - void initial_rotation(double *, double *, double); + int initial_rotation(double *, double *, double); void open(char *); void print_status(); }; diff --git a/src/SPIN/pair_spin_dmi.cpp b/src/SPIN/pair_spin_dmi.cpp index 5e9ff7a39e..41430d230f 100644 --- a/src/SPIN/pair_spin_dmi.cpp +++ b/src/SPIN/pair_spin_dmi.cpp @@ -171,10 +171,11 @@ void PairSpinDmi::init_style() 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) && (comm->me == 0)) - error->warning(FLERR,"Using pair/spin style without nve/spin"); + 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_exchange.cpp b/src/SPIN/pair_spin_exchange.cpp index 71b4c2ebf6..0260a611cf 100644 --- a/src/SPIN/pair_spin_exchange.cpp +++ b/src/SPIN/pair_spin_exchange.cpp @@ -162,7 +162,7 @@ void PairSpinExchange::init_style() ifix++; } if ((ifix == modify->nfix) && (comm->me == 0)) - error->warning(FLERR,"Using pair/spin style without nve/spin"); + 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_magelec.cpp b/src/SPIN/pair_spin_magelec.cpp index 6ff003521d..1f1488b93c 100644 --- a/src/SPIN/pair_spin_magelec.cpp +++ b/src/SPIN/pair_spin_magelec.cpp @@ -164,10 +164,11 @@ void PairSpinMagelec::init_style() 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) && (comm->me == 0)) - error->warning(FLERR,"Using pair/spin style without nve/spin"); + 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_neel.cpp b/src/SPIN/pair_spin_neel.cpp index a39d6f3461..03041da17f 100644 --- a/src/SPIN/pair_spin_neel.cpp +++ b/src/SPIN/pair_spin_neel.cpp @@ -171,10 +171,11 @@ void PairSpinNeel::init_style() 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) && (comm->me == 0)) - error->warning(FLERR,"Using pair/spin style without nve/spin"); + error->warning(FLERR,"Using pair/spin style without nve/spin or neb/spin"); // get the lattice_flag from nve/spin From f8018a8bbac14bd3c6e3a640b142eece5e5aa5f9 Mon Sep 17 00:00:00 2001 From: julient31 Date: Fri, 5 Apr 2019 16:44:23 -0600 Subject: [PATCH 23/35] Commit2 JT 040519 - added angle in doc - improved doc neb/spin --- doc/src/Eqs/neb_spin_angle.jpg | Bin 0 -> 9638 bytes doc/src/Eqs/neb_spin_angle.tex | 15 +++++++ doc/src/neb_spin.txt | 78 +++++++++++++-------------------- 3 files changed, 46 insertions(+), 47 deletions(-) create mode 100644 doc/src/Eqs/neb_spin_angle.jpg create mode 100644 doc/src/Eqs/neb_spin_angle.tex diff --git a/doc/src/Eqs/neb_spin_angle.jpg b/doc/src/Eqs/neb_spin_angle.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b7021c4f620bcc5e42b3b43ea9d9c1e3c648910c GIT binary patch literal 9638 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 fpE8MZ0 Date: Mon, 8 Apr 2019 07:24:18 -0600 Subject: [PATCH 24/35] Commit JT 040819 - improved documentation neb/spin --- doc/src/neb_spin.txt | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/doc/src/neb_spin.txt b/doc/src/neb_spin.txt index 965414c3a1..83c98eef20 100644 --- a/doc/src/neb_spin.txt +++ b/doc/src/neb_spin.txt @@ -187,8 +187,6 @@ means that the GNEB calculation will terminate if the torque criterion is met by every replica. The torques being compared to {ftol} include the inter-replica nudging forces. -################################################################### - The maximum number of iterations in each stage is set by {N1} and {N2}. These are effectively timestep counts since each iteration of damped dynamics is like a single timestep in a dynamics @@ -196,37 +194,41 @@ damped dynamics is like a single timestep in a dynamics replica and its normalized distance along the reaction path (reaction coordinate RD) will be printed to the screen and log file every {Nevery} timesteps. The RD is 0 and 1 for the first and last replica. -For intermediate replicas, it is the cumulative distance (normalized -by the total cumulative distance) between adjacent replicas, where -"distance" is defined as the length of the 3N-vector of differences in -atomic coordinates, where N is the number of NEB atoms involved in the -transition. These outputs allow you to monitor NEB's progress in +For intermediate replicas, it is the cumulative angular distance +(normalized by the total cumulative angular distance) between adjacent +replicas, where "distance" is defined as the length of the 3N-vector of +the geodesic distances in spin coordinates, with N the number of +GNEB spinsi involved (see equation (13) in "(Bessarab)"_#Bessarab). +These outputs allow you to monitor NEB's progress in finding a good energy barrier. {N1} and {N2} must both be multiples of {Nevery}. -In the first stage of NEB, the set of replicas should converge toward +In the first stage of GNEB, the set of replicas should converge toward a minimum energy path (MEP) of conformational states that transition over a barrier. The MEP for a transition is defined as a sequence of -3N-dimensional states, each of which has a potential energy gradient -parallel to the MEP itself. The configuration of highest energy along -a MEP corresponds to a saddle point. The replica states will also be -roughly equally spaced along the MEP due to the inter-replica nudging -force added by the "fix neb"_fix_neb.html command. +3N-dimensional spin states, each of which has a potential energy +gradient parallel to the MEP itself. +The configuration of highest energy along a MEP corresponds to a saddle +point. The replica states will also be roughly equally spaced along +the MEP due to the inter-replica nudging force added by the +"fix neb"_fix_neb.html command. -In the second stage of NEB, the replica with the highest energy is +In the second stage of GNEB, the replica with the highest energy is selected and the inter-replica forces on it are converted to a force -that drives its atom coordinates to the top or saddle point of the +that drives its spin coordinates to the top or saddle point of the barrier, via the barrier-climbing calculation described in -"(HenkelmanB)"_#HenkelmanB. As before, the other replicas rearrange +"(Bessarab)"_#Bessarab. As before, the other replicas rearrange themselves along the MEP so as to be roughly equally spaced. -When both stages are complete, if the NEB calculation was successful, +When both stages are complete, if the GNEB calculation was successful, the configurations of the replicas should be along (close to) the MEP -and the replica with the highest energy should be an atomic +and the replica with the highest energy should be a spin configuration at (close to) the saddle point of the transition. The potential energies for the set of replicas represents the energy profile of the transition along the MEP. +################################################################### + :line A few other settings in your input script are required or advised to From 57247142d22d115981dfad83a5590d22ece2483a Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 8 Apr 2019 11:08:06 -0600 Subject: [PATCH 25/35] Commit2 JT 040819 - finished doc (compiled and spell check) - compiled with -Wall -Wextra, unused var. removed --- doc/src/fix_neb_spin.txt | 76 +++++++++++++++++ doc/src/lammps.book | 2 + doc/src/neb_spin.txt | 175 +++++++++++++++----------------------- src/SPIN/fix_neb_spin.cpp | 8 +- src/SPIN/neb_spin.cpp | 20 ++++- 5 files changed, 163 insertions(+), 118 deletions(-) create mode 100644 doc/src/fix_neb_spin.txt diff --git a/doc/src/fix_neb_spin.txt b/doc/src/fix_neb_spin.txt new file mode 100644 index 0000000000..89420f451c --- /dev/null +++ b/doc/src/fix_neb_spin.txt @@ -0,0 +1,76 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Commands_all.html) + +:line + +fix neb/spin command :h3 + +[Syntax:] + +fix ID group-ID neb/spin Kspring :pre + +ID, group-ID are documented in "fix"_fix.html command :ulb,l +neb/spin = style name of this fix command :l +Kspring = spring constant for parallel nudging force +(force/distance units or force units, see parallel keyword) :pre,ule + +[Examples:] + +fix 1 active neb/spin 1.0 + +[Description:] + +Add nudging forces to spins in the group for a multi-replica +simulation run via the "neb/spin"_neb_spin.html command to perform a +geodesic nudged elastic band (GNEB) calculation for finding the +transition state. +Hi-level explanations of GNEB are given with the +"neb/spin"_neb_spin.html command and on the +"Howto replica"_Howto_replica.html doc page. +The fix neb/spin command must be used with the "neb/spin" command and +defines how inter-replica nudging forces are computed. A GNEB +calculation is divided in two stages. In the first stage n replicas +are relaxed toward a MEP until convergence. In the second stage, the +climbing image scheme is enabled, so that the replica having the highest +energy relaxes toward the saddle point (i.e. the point of highest energy +along the MEP), and a second relaxation is performed. + +The nudging forces are calculated as explained in +"(BessarabB)"_#BessarabB). +See this reference for more explanation about their expression. + +[Restart, fix_modify, output, run start/stop, minimize info:] + +No information about this fix is written to "binary restart +files"_restart.html. None of the "fix_modify"_fix_modify.html options +are relevant to this fix. No global or per-atom quantities are stored +by this fix for access by various "output commands"_Howto_output.html. +No parameter of this fix can be used with the {start/stop} keywords of +the "run"_run.html command. + +The forces due to this fix are imposed during an energy minimization, +as invoked by the "minimize"_minimize.html command via the +"neb/spin"_neb_spin.html command. + +[Restrictions:] + +This command can only be used if LAMMPS was built with the SPIN +package. See the "Build package"_Build_package.html doc +page for more info. + +[Related commands:] + +"neb_spin"_neb_spin.html + +[Default:] + +none + +:line + +:link(BessarabB) +[(BessarabB)] Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196, +335-347 (2015). diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 4e64446ec1..51f09ceee2 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -179,6 +179,7 @@ min_spin.html minimize.html molecule.html neb.html +neb_spin.html neigh_modify.html neighbor.html newton.html @@ -308,6 +309,7 @@ fix_mscg.html fix_msst.html fix_mvv_dpd.html fix_neb.html +fix_neb_spin.html fix_nh.html fix_nh_eff.html fix_nph_asphere.html diff --git a/doc/src/neb_spin.txt b/doc/src/neb_spin.txt index 83c98eef20..c2bb19ec46 100644 --- a/doc/src/neb_spin.txt +++ b/doc/src/neb_spin.txt @@ -47,7 +47,7 @@ of the energy barrier associated with a transition state, e.g. spins to perform a collective rotation from one energy basin to another. The implementation in LAMMPS follows the discussion in the -following paper: "(Bessarab)"_#Bessarab. +following paper: "(BessarabA)"_#BessarabA. Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the "-partition command-line @@ -78,11 +78,11 @@ GNEB magnetic atoms which are the only ones that inter-replica springs are applied to. If the group does not include all magnetic atoms, then non-GNEB magnetic atoms have no inter-replica springs and the torques they feel -and their precessional motion is computed in the usual way due only +and their precession motion is computed in the usual way due only to other magnetic atoms within their replica. Conceptually, the non-GNEB atoms provide a background force field for the GNEB atoms. -Their magnetic spins can be allowed to precess during the GNEB +Their magnetic spins can be allowed to evolve during the GNEB minimization procedure. The initial spin configuration for each of the replicas can be @@ -117,7 +117,8 @@ The "angular distance" between them is calculated, and the new direction is assigned to be a fraction of the angular distance. NOTE: The "angular distance" between the starting and final point is -evaluated in the geodesic sense, as described in "(Bessarab)"_#Bessarab. +evaluated in the geodesic sense, as described in +"(BessarabA)"_#BessarabA. NOTE: The angular interpolation between the starting and final point is achieved using Rodrigues formula: @@ -142,7 +143,7 @@ If they point toward the same direction, the intermediate images conserve the same orientation. If the initial and final spins are aligned, but point toward opposite directions, an arbitrary rotation vector belonging to -the plane perpandicular to initial and final spins is chosen. +the plane perpendicular to initial and final spins is chosen. In this case, a warning message is displayed. For a {file-style} setting of {each}, a filename is specified which is @@ -177,14 +178,14 @@ The other styles cannot be used, since they relax the lattice degrees of freedom instead of the spins. The minimizer tolerances for energy and force are set by {etol} and -{ftol}, the same as for the "minimize"_minimize.html command. +{ttol}, the same as for the "minimize"_minimize.html command. A non-zero {etol} means that the GNEB calculation will terminate if the energy criterion is met by every replica. The energies being compared to {etol} do not include any contribution from the inter-replica -nudging forces, since these are non-conservative. A non-zero {ftol} +nudging forces, since these are non-conservative. A non-zero {ttol} means that the GNEB calculation will terminate if the torque criterion -is met by every replica. The torques being compared to {ftol} include +is met by every replica. The torques being compared to {ttol} include the inter-replica nudging forces. The maximum number of iterations in each stage is set by {N1} and @@ -198,7 +199,7 @@ For intermediate replicas, it is the cumulative angular distance (normalized by the total cumulative angular distance) between adjacent replicas, where "distance" is defined as the length of the 3N-vector of the geodesic distances in spin coordinates, with N the number of -GNEB spinsi involved (see equation (13) in "(Bessarab)"_#Bessarab). +GNEB spins involved (see equation (13) in "(BessarabA)"_#BessarabA). These outputs allow you to monitor NEB's progress in finding a good energy barrier. {N1} and {N2} must both be multiples of {Nevery}. @@ -217,7 +218,7 @@ In the second stage of GNEB, the replica with the highest energy is selected and the inter-replica forces on it are converted to a force that drives its spin coordinates to the top or saddle point of the barrier, via the barrier-climbing calculation described in -"(Bessarab)"_#Bessarab. As before, the other replicas rearrange +"(BessarabA)"_#BessarabA. As before, the other replicas rearrange themselves along the MEP so as to be roughly equally spaced. When both stages are complete, if the GNEB calculation was successful, @@ -227,37 +228,22 @@ configuration at (close to) the saddle point of the transition. The potential energies for the set of replicas represents the energy profile of the transition along the MEP. -################################################################### - :line -A few other settings in your input script are required or advised to -perform a NEB calculation. See the NOTE about the choice of timestep -at the beginning of this doc page. - An atom map must be defined which it is not by default for "atom_style atomic"_atom_style.html problems. The "atom_modify map"_atom_modify.html command can be used to do this. -The minimizers in LAMMPS operate on all atoms in your system, even -non-NEB atoms, as defined above. To prevent non-NEB atoms from moving -during the minimization, you should use the "fix -setforce"_fix_setforce.html command to set the force on each of those -atoms to 0.0. This is not required, and may not even be desired in -some cases, but if those atoms move too far (e.g. because the initial -state of your system was not well-minimized), it can cause problems -for the NEB procedure. +An initial value can be defined for the timestep. Although, the {spin} +minimization algorithm is an adaptive timestep methodology, so that +this timestep is likely to evolve during the calculation. -The damped dynamics "minimizers"_min_style.html, such as {quickmin} -and {fire}), adjust the position and velocity of the atoms via an -Euler integration step. Thus you must define an appropriate -"timestep"_timestep.html to use with NEB. As mentioned above, NEB -will often converge more quickly if you use a timestep about 10x -larger than you would normally use for dynamics simulations. +The minimizers in LAMMPS operate on all spins in your system, even +non-GNEB atoms, as defined above. :line -Each file read by the neb command containing atomic coordinates used +Each file read by the neb/spin command containing spin coordinates used to initialize one or more replicas must be formatted as follows. The file can be ASCII text or a gzipped text file (detected by a .gz @@ -266,130 +252,103 @@ starting with "#" which are ignored. The first non-blank, non-comment line should list N = the number of lines to follow. The N successive lines contain the following information: -ID1 x1 y1 z1 -ID2 x2 y2 z2 +ID1 g1 x1 y1 z1 sx1 sy1 sz1 +ID2 g2 x2 y2 z2 sx2 sy2 sz2 ... -IDN xN yN zN :pre +IDN gN yN zN sxN syN szN :pre -The fields are the atom ID, followed by the x,y,z coordinates. The -lines can be listed in any order. Additional trailing information on +The fields are the atom ID, the norm of the associated magnetic spin, +followed by the {x,y,z} coordinates and the {sx,sy,sz} spin coordinates. +The lines can be listed in any order. Additional trailing information on the line is OK, such as a comment. -Note that for a typical NEB calculation you do not need to specify -initial coordinates for very many atoms to produce differing starting +Note that for a typical GNEB calculation you do not need to specify +initial spin coordinates for very many atoms to produce differing starting and final replicas whose intermediate replicas will converge to the -energy barrier. Typically only new coordinates for atoms +energy barrier. Typically only new spin coordinates for atoms geometrically near the barrier need be specified. Also note there is no requirement that the atoms in the file -correspond to the NEB atoms in the group defined by the "fix -neb"_fix_neb.html command. Not every NEB atom need be in the file, -and non-NEB atoms can be listed in the file. +correspond to the GNEB atoms in the group defined by the "fix +neb"_fix_neb.html command. Not every GNEB atom need be in the file, +and non-GNEB atoms can be listed in the file. :line -Four kinds of output can be generated during a NEB calculation: energy +Four kinds of output can be generated during a GNEB calculation: energy barrier statistics, thermodynamic output by each replica, dump files, and restart files. When running with multiple partitions (each of which is a replica in this case), the print-out to the screen and master log.lammps file contains a line of output, printed once every {Nevery} timesteps. It -contains the timestep, the maximum force per replica, the maximum -force per atom (in any replica), potential gradients in the initial, +contains the timestep, the maximum torque per replica, the maximum +torque per atom (in any replica), potential gradients in the initial, final, and climbing replicas, the forward and backward energy barriers, the total reaction coordinate (RDT), and the normalized reaction coordinate and potential energy of each replica. -The "maximum force per replica" is the two-norm of the 3N-length force -vector for the atoms in each replica, maximized across replicas, which -is what the {ftol} setting is checking against. In this case, N is -all the atoms in each replica. The "maximum force per atom" is the -maximum force component of any atom in any replica. The potential -gradients are the two-norm of the 3N-length force vector solely due to -the interaction potential i.e. without adding in inter-replica -forces. +The "maximum torque per replica" is the two-norm of the +3N-length vector given by the cross product of a spin by its +precession vector omega, in each replica, maximized across replicas, +which is what the {ttol} setting is checking against. In this case, N is +all the atoms in each replica. The "maximum torque per atom" is the +maximum torque component of any atom in any replica. The potential +gradients are the two-norm of the 3N-length magnetic precession vector +solely due to the interaction potential i.e. without adding in +inter-replica forces, and projected along the path tangent (as detailed +in Appendix D of "(BessarabA)"_#BessarabA). The "reaction coordinate" (RD) for each replica is the two-norm of the -3N-length vector of distances between its atoms and the preceding -replica's atoms, added to the RD of the preceding replica. The RD of -the first replica RD1 = 0.0; the RD of the final replica RDN = RDT, -the total reaction coordinate. The normalized RDs are divided by RDT, -so that they form a monotonically increasing sequence from zero to -one. When computing RD, N only includes the atoms being operated on by -the fix neb command. +3N-length vector of geodesic distances between its spins and the preceding +replica's spins (see equation (13) of "(BessarabA)"_#BessarabA), added to +the RD of the preceding replica. The RD of the first replica RD1 = 0.0; +the RD of the final replica RDN = RDT, the total reaction coordinate. +The normalized RDs are divided by RDT, so that they form a monotonically +increasing sequence from zero to one. When computing RD, N only includes +the spins being operated on by the fix neb/spin command. The forward (reverse) energy barrier is the potential energy of the highest replica minus the energy of the first (last) replica. Supplementary information for all replicas can be printed out to the screen and master log.lammps file by adding the verbose keyword. This -information include the following. The "path angle" (pathangle) for -the replica i which is the angle between the 3N-length vectors (Ri-1 - -Ri) and (Ri+1 - Ri) (where Ri is the atomic coordinates of replica -i). A "path angle" of 180 indicates that replicas i-1, i and i+1 are -aligned. "angletangrad" is the angle between the 3N-length tangent -vector and the 3N-length force vector at image i. The tangent vector -is calculated as in "(HenkelmanA)"_#HenkelmanA for all intermediate -replicas and at R2 - R1 and RM - RM-1 for the first and last replica, -respectively. "anglegrad" is the angle between the 3N-length energy -gradient vector of replica i and that of replica i+1. It is not -defined for the final replica and reads nan. gradV is the norm of the -energy gradient of image i. ReplicaForce is the two-norm of the -3N-length force vector (including nudging forces) for replica i. -MaxAtomForce is the maximum force component of any atom in replica i. +information include the following. +The "GradVidottan" are the projections of the potential gradient for +the replica i on its tangent vector (as detailed in Appendix D of +"(BessarabA)"_#BessarabA). +The "DNi" are the non normalized geodesic distances (see equation (13) +of "(BessarabA)"_#BessarabA), between a replica i and the next replica +i+1. For the last replica, this distance is not defined and a "NAN" +value is the corresponding output. When a NEB calculation does not converge properly, the supplementary -information can help understanding what is going wrong. For instance -when the path angle becomes acute, the definition of tangent used in -the NEB calculation is questionable and the NEB cannot may diverge -"(Maras)"_#Maras2. - +information can help understanding what is going wrong. When running on multiple partitions, LAMMPS produces additional log files for each partition, e.g. log.lammps.0, log.lammps.1, etc. For a -NEB calculation, these contain the thermodynamic output for each +GNEB calculation, these contain the thermodynamic output for each replica. If "dump"_dump.html commands in the input script define a filename that includes a {universe} or {uloop} style "variable"_variable.html, then one dump file (per dump command) will be created for each -replica. At the end of the NEB calculation, the final snapshot in +replica. At the end of the GNEB calculation, the final snapshot in each file will contain the sequence of snapshots that transition the system over the energy barrier. Earlier snapshots will show the convergence of the replicas to the MEP. Likewise, "restart"_restart.html filenames can be specified with a {universe} or {uloop} style "variable"_variable.html, to generate -restart files for each replica. These may be useful if the NEB +restart files for each replica. These may be useful if the GNEB calculation fails to converge properly to the MEP, and you wish to restart the calculation from an intermediate point with altered parameters. -There are 2 Python scripts provided in the tools/python directory, -neb_combine.py and neb_final.py, which are useful in analyzing output -from a NEB calculation. Assume a NEB simulation with M replicas, and -the NEB atoms labeled with a specific atom type. - -The neb_combine.py script extracts atom coords for the NEB atoms from -all M dump files and creates a single dump file where each snapshot -contains the NEB atoms from all the replicas and one copy of non-NEB -atoms from the first replica (presumed to be identical in other -replicas). This can be visualized/animated to see how the NEB atoms -relax as the NEB calculation proceeds. - -The neb_final.py script extracts the final snapshot from each of the M -dump files to create a single dump file with M snapshots. This can be -visualized to watch the system make its transition over the energy -barrier. - -To illustrate, here are images from the final snapshot produced by the -neb_combine.py script run on the dump files produced by the two -example input scripts in examples/neb. Click on them to see a larger -image. - -:image(JPG/hop1_small.jpg,JPG/hop1.jpg) -:image(JPG/hop2_small.jpg,JPG/hop2.jpg) +A c file script in provided in the examples/SPIN/gneb/interpolate +directory, that interpolates the MEP given the information provided +by the verbose output option (as detailed in Appendix D of +"(BessarabA)"_#BessarabA). :line @@ -411,6 +370,6 @@ none :line -:link(Bessarab) -[(Bessarab)] Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196, +:link(BessarabA) +[(BessarabA)] Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196, 335-347 (2015). diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index 017085a9a8..1da39c1db8 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -310,7 +310,6 @@ void FixNEB_spin::min_post_force(int /*vflag*/) int nlocal = atom->nlocal; int *mask = atom->mask; - double **x = atom->x; double **sp = atom->sp; double dot = 0.0; double prefactor = 0.0; @@ -322,7 +321,8 @@ void FixNEB_spin::min_post_force(int /*vflag*/) nlen = 0.0; double tlen = 0.0; double gradnextlen = 0.0; - double delndots, delpdots; + double delndots = 0.0; + double delpdots = 0.0; dotgrad = gradlen = dotpath = dottangrad = 0.0; @@ -584,10 +584,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) if (ireplica == 0 || ireplica == nreplica-1) return ; - double AngularContr; dotpath = dotpath/(plen*nlen); - AngularContr = 0.5 *(1+cos(MY_PI * dotpath)); - for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -620,7 +617,6 @@ void FixNEB_spin::min_post_force(int /*vflag*/) fm[i][2] = 0; } prefactor = kspring*(nlen-plen); - AngularContr=0; } } diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 77a94c5e84..a2d126b86c 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -88,7 +88,6 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, int n2steps_in, int nevery_in, double *buf_init, double *buf_final) : Pointers(lmp) { - double delspx,delspy,delspz; etol = etol_in; ttol = ftol_in; @@ -450,7 +449,7 @@ void NEB_spin::readfile(char *file, int flag) tagint tag; char *eof,*start,*next,*buf; char line[MAXLINE]; - double xx,yy,zz,delx,dely,delz; + double xx,yy,zz; double musp,spx,spy,spz; if (me_universe == 0 && screen) @@ -701,6 +700,20 @@ int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) } } + // knormsq should not be 0 anymore + + if (knormsq == 0.0) + error->all(FLERR,"Incorrect initial rotation operation"); + + // normalize k vector + + iknorm = 1.0/sqrt(knormsq); + kx *= iknorm; + ky *= iknorm; + kz *= iknorm; + + // calc. k x spi and total rotation angle + kcrossx = ky*spiz - kz*spiy; kcrossy = kz*spix - kx*spiz; kcrossz = kx*spiy - ky*spix; @@ -710,7 +723,7 @@ int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) omega = acos(sidotsf); omega *= fraction; - // applying Rodrigues' formula + // apply Rodrigues' formula spkx = spix*cos(omega); spky = spiy*cos(omega); @@ -873,7 +886,6 @@ void NEB_spin::print_status() } if (me_universe == 0) { - const double todeg=180.0/MY_PI; FILE *uscreen = universe->uscreen; FILE *ulogfile = universe->ulogfile; if (uscreen) { From 1501e9ba8a6944fb16f16a59ffe1dbbde92a8657 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 8 Apr 2019 11:22:02 -0600 Subject: [PATCH 26/35] Commit3 JT 040819 - README and interpolate.c for in examples/SPIN/gneb/interpolate/ --- examples/SPIN/gneb/README | 3 +++ examples/SPIN/gneb/interpolate/README | 26 ++++++++++++++++++- examples/SPIN/gneb/interpolate/interpolate.c | 3 +-- ...c_coords_iron_verbose.dat => neb_init.dat} | 0 4 files changed, 29 insertions(+), 3 deletions(-) rename examples/SPIN/gneb/interpolate/{reac_coords_iron_verbose.dat => neb_init.dat} (100%) diff --git a/examples/SPIN/gneb/README b/examples/SPIN/gneb/README index 6f5db6d388..9d43c775b6 100644 --- a/examples/SPIN/gneb/README +++ b/examples/SPIN/gneb/README @@ -8,3 +8,6 @@ Run those examples as: mpirun -np 3 lmp_mpi -in in.gneb.iron -partition 3x1 You should be able to use any number of replicas >= 3. + +In the interpolate/ directory, a c routine is provided to +interpolate the MEP. diff --git a/examples/SPIN/gneb/interpolate/README b/examples/SPIN/gneb/interpolate/README index d0f75226c5..5cfd267a86 100644 --- a/examples/SPIN/gneb/interpolate/README +++ b/examples/SPIN/gneb/interpolate/README @@ -1,7 +1,31 @@ Interpolate.x tries to perform a cubic polynomial interpolation -of the MEP found +of the MEP. Compile the program with: gcc interpolate.c -o interpolate.x -lm -lgsl +and then run it as: +./interpolate.x +Enter N-1 (with N the number of replica). +The program reads the "neb_init.dat", in which you need to +replace the current values by your GNEB outputs. + +Each line corresponds to a replica, and has to respectively +contain: + +Reac. coords /tab/ pot. energy /tab/ fm dot tangent /tab/ +geodesic dist to next replica + +All those information can be provided by the verbose output of +a neb/spin calculation + +The progam outputs the interpolation result, and the +interpolated MEP in "interpolation_result.dat". + +This code is a courtesy of Aleksei Ivanov, University of +Iceland. +For more explanation about this calculation, see Appendix D +of the following reference: +Bessarab, P. F., Uzdin, V. M., & Jónsson, H. (2015). +Computer Physics Communications, 196, 335-347. diff --git a/examples/SPIN/gneb/interpolate/interpolate.c b/examples/SPIN/gneb/interpolate/interpolate.c index 48804d53a2..39b1b2e192 100644 --- a/examples/SPIN/gneb/interpolate/interpolate.c +++ b/examples/SPIN/gneb/interpolate/interpolate.c @@ -67,8 +67,7 @@ int main() { // reading input file - if((data=fopen("reac_coords_iron_verbose.dat","r")) == NULL) { - //if((data=fopen("neb_init.dat","r")) == NULL) { + if((data=fopen("neb_init.dat","r")) == NULL) { printf("Incorrect input file name."); return 0; } diff --git a/examples/SPIN/gneb/interpolate/reac_coords_iron_verbose.dat b/examples/SPIN/gneb/interpolate/neb_init.dat similarity index 100% rename from examples/SPIN/gneb/interpolate/reac_coords_iron_verbose.dat rename to examples/SPIN/gneb/interpolate/neb_init.dat From b8ae46699961ac15b0a1bfe82b852e219285f72b Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 8 Apr 2019 14:00:49 -0600 Subject: [PATCH 27/35] Commit4 JT 040819 - added unknown names/acronyms in doc/utils/sphinx-config/false_positives.txt --- doc/utils/sphinx-config/false_positives.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index a845673715..7160800c50 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -200,6 +200,7 @@ Berkowitz berlin Berne Bertotti +Bessarab Beutler bgq Bh @@ -592,6 +593,7 @@ Dmax dmg dmi dnf +DNi Dobson Dodds dodgerblue @@ -963,6 +965,8 @@ gmail gmake gmask Gmask +gneb +GNEB googlemail Gordan GPa @@ -2368,6 +2372,7 @@ rNEMD ro Rochus Rockett +Rodrigues Rohart Ronchetti Rosati @@ -2772,6 +2777,7 @@ tt Tt TThis ttm +ttol tu Tuckerman tue @@ -2844,6 +2850,7 @@ utsa Uttormark uvm uwo +Uzdin vacf valent Valeriu @@ -2943,7 +2950,7 @@ wB Wbody webpage Weckner -WeinenE +WeinanE Wennberg Westview wget From 7c3f619e137b6952078bf6c431b0d9a2848838fd Mon Sep 17 00:00:00 2001 From: julient31 Date: Thu, 25 Apr 2019 09:18:33 -0600 Subject: [PATCH 28/35] Commit JT 042519 - moved examples/SPIN/gneb/interpolate/ toward tools/spin/interpolate/gneb - added gneb in the command files in doc/src - modified the error messages in neb_spin.h/cpp --- doc/src/Commands_all.txt | 1 + doc/src/Commands_category.txt | 1 + doc/src/Commands_fix.txt | 1 + doc/src/Howto_replica.txt | 1 + doc/src/Packages_details.txt | 1 + doc/src/commands_list.txt | 1 + doc/src/fixes.txt | 1 + doc/src/neb_spin.txt | 2 +- src/SPIN/neb_spin.cpp | 14 +++++++------- src/SPIN/neb_spin.h | 8 ++++---- .../spin/interpolate_gneb}/README | 0 .../spin/interpolate_gneb}/interpolate.c | 0 .../spin/interpolate_gneb}/neb_init.dat | 0 13 files changed, 19 insertions(+), 12 deletions(-) rename {examples/SPIN/gneb/interpolate => tools/spin/interpolate_gneb}/README (100%) rename {examples/SPIN/gneb/interpolate => tools/spin/interpolate_gneb}/interpolate.c (100%) rename {examples/SPIN/gneb/interpolate => tools/spin/interpolate_gneb}/neb_init.dat (100%) diff --git a/doc/src/Commands_all.txt b/doc/src/Commands_all.txt index 66c348ee30..52c2e67e2e 100644 --- a/doc/src/Commands_all.txt +++ b/doc/src/Commands_all.txt @@ -83,6 +83,7 @@ An alphabetic list of all general LAMMPS commands. "molecule"_molecule.html, "ndx2group"_group2ndx.html, "neb"_neb.html, +"neb_spin"_neb_spin.html, "neigh_modify"_neigh_modify.html, "neighbor"_neighbor.html, "newton"_newton.html, diff --git a/doc/src/Commands_category.txt b/doc/src/Commands_category.txt index 134dae82bb..14a328b227 100644 --- a/doc/src/Commands_category.txt +++ b/doc/src/Commands_category.txt @@ -116,6 +116,7 @@ Actions: "minimize"_minimize.html, "neb"_neb.html, +"neb_spin"_neb_spin.html, "prd"_prd.html, "rerun"_rerun.html, "run"_run.html, diff --git a/doc/src/Commands_fix.txt b/doc/src/Commands_fix.txt index 14de1d06dd..d2d781d4b2 100644 --- a/doc/src/Commands_fix.txt +++ b/doc/src/Commands_fix.txt @@ -107,6 +107,7 @@ OPT. "mvv/edpd"_fix_mvv_dpd.html, "mvv/tdpd"_fix_mvv_dpd.html, "neb"_fix_neb.html, +"neb_spin"_fix_neb_spin.html, "nph (ko)"_fix_nh.html, "nph/asphere (o)"_fix_nph_asphere.html, "nph/body"_fix_nph_body.html, diff --git a/doc/src/Howto_replica.txt b/doc/src/Howto_replica.txt index 29d1aa02fd..505967c1b8 100644 --- a/doc/src/Howto_replica.txt +++ b/doc/src/Howto_replica.txt @@ -17,6 +17,7 @@ periodically. These are the relevant commands: "neb"_neb.html for nudged elastic band calculations +"neb_spin"_neb_spin.html for magnetic nudged elastic band calculations "prd"_prd.html for parallel replica dynamics "tad"_tad.html for temperature accelerated dynamics "temper"_temper.html for parallel tempering diff --git a/doc/src/Packages_details.txt b/doc/src/Packages_details.txt index 0ab1b5e4fd..352a38af84 100644 --- a/doc/src/Packages_details.txt +++ b/doc/src/Packages_details.txt @@ -918,6 +918,7 @@ src/SPIN: filenames -> commands "fix nve/spin"_fix_nve_spin.html "fix precession/spin"_fix_precession_spin.html "compute spin"_compute_spin.html +"neb/spin"_neb_spin.html examples/SPIN :ul :line diff --git a/doc/src/commands_list.txt b/doc/src/commands_list.txt index 6f90d9c93a..3725bce8b0 100644 --- a/doc/src/commands_list.txt +++ b/doc/src/commands_list.txt @@ -67,6 +67,7 @@ Commands :h1 minimize molecule neb + neb/spin neigh_modify neighbor newton diff --git a/doc/src/fixes.txt b/doc/src/fixes.txt index d77acf946d..d966b9a225 100644 --- a/doc/src/fixes.txt +++ b/doc/src/fixes.txt @@ -84,6 +84,7 @@ Fixes :h1 fix_msst fix_mvv_dpd fix_neb + fix_neb_spin fix_nh fix_nh_eff fix_nh_uef diff --git a/doc/src/neb_spin.txt b/doc/src/neb_spin.txt index c2bb19ec46..70c0fe2ab5 100644 --- a/doc/src/neb_spin.txt +++ b/doc/src/neb_spin.txt @@ -345,7 +345,7 @@ calculation fails to converge properly to the MEP, and you wish to restart the calculation from an intermediate point with altered parameters. -A c file script in provided in the examples/SPIN/gneb/interpolate +A c file script in provided in the tool/spin/interpolate_gneb directory, that interpolates the MEP given the information provided by the verbose output option (as detailed in Appendix D of "(BessarabA)"_#BessarabA). diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index a2d126b86c..10acb2b512 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -464,7 +464,7 @@ void NEB_spin::readfile(char *file, int flag) open(file); while (1) { eof = fgets(line,MAXLINE,fp); - if (eof == NULL) error->one(FLERR,"Unexpected end of neb file"); + if (eof == NULL) error->one(FLERR,"Unexpected end of neb/spin file"); start = &line[strspn(line," \t\n\v\f\r")]; if (*start != '\0' && *start != '#') break; } @@ -478,7 +478,7 @@ void NEB_spin::readfile(char *file, int flag) open(file); while (1) { eof = fgets(line,MAXLINE,fp); - if (eof == NULL) error->one(FLERR,"Unexpected end of neb file"); + if (eof == NULL) error->one(FLERR,"Unexpected end of neb/spin file"); start = &line[strspn(line," \t\n\v\f\r")]; if (*start != '\0' && *start != '#') break; } @@ -513,7 +513,7 @@ void NEB_spin::readfile(char *file, int flag) eofflag = comm->read_lines_from_file_universe(fp,nchunk,MAXLINE,buffer); else eofflag = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer); - if (eofflag) error->all(FLERR,"Unexpected end of neb file"); + if (eofflag) error->all(FLERR,"Unexpected end of neb/spin file"); buf = buffer; next = strchr(buf,'\n'); @@ -522,7 +522,7 @@ void NEB_spin::readfile(char *file, int flag) *next = '\n'; if (nwords != ATTRIBUTE_PERLINE) - error->all(FLERR,"Incorrect atom format in neb file"); + error->all(FLERR,"Incorrect atom format in neb/spin file"); // loop over lines of atom coords // tokenize the line into values @@ -614,12 +614,12 @@ void NEB_spin::readfile(char *file, int flag) int ntotal; MPI_Allreduce(&ncount,&ntotal,1,MPI_INT,MPI_SUM,uworld); if (ntotal != nreplica*nlines) - error->universe_all(FLERR,"Invalid atom IDs in neb file"); + error->universe_all(FLERR,"Invalid atom IDs in neb/spin file"); } else { int ntotal; MPI_Allreduce(&ncount,&ntotal,1,MPI_INT,MPI_SUM,world); if (ntotal != nlines) - error->all(FLERR,"Invalid atom IDs in neb file"); + error->all(FLERR,"Invalid atom IDs in neb/spin file"); } // clean up @@ -700,7 +700,7 @@ int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) } } - // knormsq should not be 0 anymore + // knormsq should not be 0 if (knormsq == 0.0) error->all(FLERR,"Incorrect initial rotation operation"); diff --git a/src/SPIN/neb_spin.h b/src/SPIN/neb_spin.h index b7c20bc3a9..6fb36feb5d 100644 --- a/src/SPIN/neb_spin.h +++ b/src/SPIN/neb_spin.h @@ -30,7 +30,7 @@ class NEB_spin : protected Pointers { NEB_spin(class LAMMPS *); NEB_spin(class LAMMPS *, double, double, int, int, int, double *, double *); ~NEB_spin(); - void command(int, char **); // process neb command + void command(int, char **); // process neb/spin command void run(); // run NEB_spin double ebf,ebr; // forward and reverse energy barriers @@ -104,15 +104,15 @@ E: Too many timesteps The cumulative timesteps must fit in a 64-bit integer. -E: Unexpected end of neb file +E: Unexpected end of neb/spin file A read operation from the file failed. -E: Incorrect atom format in neb file +E: Incorrect atom format in neb/spin file The number of fields per line is not what expected. -E: Invalid atom IDs in neb file +E: Invalid atom IDs in neb/spin file An ID in the file was not found in the system. diff --git a/examples/SPIN/gneb/interpolate/README b/tools/spin/interpolate_gneb/README similarity index 100% rename from examples/SPIN/gneb/interpolate/README rename to tools/spin/interpolate_gneb/README diff --git a/examples/SPIN/gneb/interpolate/interpolate.c b/tools/spin/interpolate_gneb/interpolate.c similarity index 100% rename from examples/SPIN/gneb/interpolate/interpolate.c rename to tools/spin/interpolate_gneb/interpolate.c diff --git a/examples/SPIN/gneb/interpolate/neb_init.dat b/tools/spin/interpolate_gneb/neb_init.dat similarity index 100% rename from examples/SPIN/gneb/interpolate/neb_init.dat rename to tools/spin/interpolate_gneb/neb_init.dat From 16fd5904edd2d0b7c98cd59275312860f22be9c4 Mon Sep 17 00:00:00 2001 From: julient31 Date: Thu, 25 Apr 2019 09:31:57 -0600 Subject: [PATCH 29/35] Commit2 JT 042519 - slight correction in doc/src/command_list.txt --- doc/src/commands_list.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/commands_list.txt b/doc/src/commands_list.txt index 3725bce8b0..cf716df9ac 100644 --- a/doc/src/commands_list.txt +++ b/doc/src/commands_list.txt @@ -67,7 +67,7 @@ Commands :h1 minimize molecule neb - neb/spin + neb_spin neigh_modify neighbor newton From 6fc2bda01c251043695c9b5583230d75e5754e4a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 27 Apr 2019 07:52:25 -0400 Subject: [PATCH 30/35] some whitespace cleanup --- src/SPIN/fix_neb_spin.cpp | 306 +++++++++++++++++++------------------- src/SPIN/fix_nve_spin.h | 2 +- src/SPIN/min_spin.h | 2 +- src/SPIN/neb_spin.cpp | 62 ++++---- 4 files changed, 186 insertions(+), 186 deletions(-) diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index 1da39c1db8..714335c885 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -15,9 +15,9 @@ Contributing authors: Julien Tranchida (SNL) Please cite the related publication: - Bessarab, P. F., Uzdin, V. M., & Jónsson, H. (2015). - Method for finding mechanism and activation energy of magnetic transitions, - applied to skyrmion and antivortex annihilation. + Bessarab, P. F., Uzdin, V. M., & Jónsson, H. (2015). + Method for finding mechanism and activation energy of magnetic transitions, + applied to skyrmion and antivortex annihilation. Computer Physics Communications, 196, 335-347. ------------------------------------------------------------------------- */ @@ -50,12 +50,12 @@ enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; /* ---------------------------------------------------------------------- */ FixNEB_spin::FixNEB_spin(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), id_pe(NULL), pe(NULL), nlenall(NULL), xprev(NULL), - xnext(NULL), fnext(NULL), spprev(NULL), spnext(NULL), fmnext(NULL), springF(NULL), - tangent(NULL), xsend(NULL), xrecv(NULL), fsend(NULL), frecv(NULL), spsend(NULL), - sprecv(NULL), fmsend(NULL), fmrecv(NULL), tagsend(NULL), tagrecv(NULL), - xsendall(NULL), xrecvall(NULL), fsendall(NULL), frecvall(NULL), spsendall(NULL), - sprecvall(NULL), fmsendall(NULL), fmrecvall(NULL), tagsendall(NULL), tagrecvall(NULL), + Fix(lmp, narg, arg), id_pe(NULL), pe(NULL), nlenall(NULL), xprev(NULL), + xnext(NULL), fnext(NULL), spprev(NULL), spnext(NULL), fmnext(NULL), springF(NULL), + tangent(NULL), xsend(NULL), xrecv(NULL), fsend(NULL), frecv(NULL), spsend(NULL), + sprecv(NULL), fmsend(NULL), fmrecv(NULL), tagsend(NULL), tagrecv(NULL), + xsendall(NULL), xrecvall(NULL), fsendall(NULL), frecvall(NULL), spsendall(NULL), + sprecvall(NULL), fmsendall(NULL), fmrecvall(NULL), tagsendall(NULL), tagrecvall(NULL), counts(NULL), displacements(NULL) { @@ -68,15 +68,15 @@ FixNEB_spin::FixNEB_spin(LAMMPS *lmp, int narg, char **arg) : NEBLongRange = false; // see if needed (comb. with pppm/spin?) StandardNEB = true; // only option for now - PerpSpring = FreeEndIni = FreeEndFinal = false; + PerpSpring = FreeEndIni = FreeEndFinal = false; FreeEndFinalWithRespToEIni = FinalAndInterWithRespToEIni = false; kspringPerp = 0.0; kspringIni = 1.0; kspringFinal = 1.0; - SpinLattice = false; // no spin-lattice neb for now + SpinLattice = false; // no spin-lattice neb for now // no available fix neb/spin options for now - + int iarg = 4; while (iarg < narg) { if (strcmp(arg[iarg],"parallel") == 0) { @@ -91,7 +91,7 @@ FixNEB_spin::FixNEB_spin(LAMMPS *lmp, int narg, char **arg) : iarg += 2; } else error->all(FLERR,"Illegal fix neb command"); } - + // nreplica = number of partitions // ireplica = which world I am in universe // nprocs_universe = # of procs in all replicase @@ -288,12 +288,12 @@ void FixNEB_spin::min_post_force(int /*vflag*/) MPI_Bcast(&vnext,1,MPI_DOUBLE,0,world); } - if (FreeEndFinal && ireplica == nreplica-1 && (update->ntimestep == 0)) + if (FreeEndFinal && ireplica == nreplica-1 && (update->ntimestep == 0)) error->all(FLERR,"NEB_spin Free End option not yet active"); if (ireplica == 0) vIni=veng; - if (FreeEndFinalWithRespToEIni) + if (FreeEndFinalWithRespToEIni) error->all(FLERR,"NEB_spin Free End option not yet active"); if (FreeEndIni && ireplica == 0 && (update->ntimestep == 0)) @@ -328,124 +328,124 @@ void FixNEB_spin::min_post_force(int /*vflag*/) // computation of the tangent vector - if (ireplica == nreplica-1) { // final replica - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - - // tangent vector - - delspxp = sp[i][0] - spprev[i][0]; - delspyp = sp[i][1] - spprev[i][1]; - delspzp = sp[i][2] - spprev[i][2]; - - // project delp vector on tangent space - - delpdots = delspxp*sp[i][0]+delspyp*sp[i][1]+delspzp*sp[i][2]; - delspxp -= delpdots*sp[i][0]; - delspyp -= delpdots*sp[i][1]; - delspzp -= delpdots*sp[i][2]; - - // calc. geodesic length - - spi[0] = sp[i][0]; - spi[1] = sp[i][1]; - spi[2] = sp[i][2]; - spj[0] = spprev[i][0]; - spj[1] = spprev[i][1]; - spj[2] = spprev[i][2]; - templen = geodesic_distance(spi,spj); - plen += templen*templen; - dottangrad += delspxp*fm[i][0]+ delspyp*fm[i][1]+delspzp*fm[i][2]; - gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; - - // no free end option for now - - if (FreeEndFinal||FreeEndFinalWithRespToEIni) - error->all(FLERR,"Free End option not yet active"); - - } - } else if (ireplica == 0) { // initial replica + if (ireplica == nreplica-1) { // final replica for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - // tangent vector - - delspxn = spnext[i][0]- sp[i][0]; - delspyn = spnext[i][1]- sp[i][1]; - delspzn = spnext[i][2]- sp[i][2]; + // tangent vector + + delspxp = sp[i][0] - spprev[i][0]; + delspyp = sp[i][1] - spprev[i][1]; + delspzp = sp[i][2] - spprev[i][2]; + + // project delp vector on tangent space + + delpdots = delspxp*sp[i][0]+delspyp*sp[i][1]+delspzp*sp[i][2]; + delspxp -= delpdots*sp[i][0]; + delspyp -= delpdots*sp[i][1]; + delspzp -= delpdots*sp[i][2]; + + // calc. geodesic length + + spi[0] = sp[i][0]; + spi[1] = sp[i][1]; + spi[2] = sp[i][2]; + spj[0] = spprev[i][0]; + spj[1] = spprev[i][1]; + spj[2] = spprev[i][2]; + templen = geodesic_distance(spi,spj); + plen += templen*templen; + dottangrad += delspxp*fm[i][0]+ delspyp*fm[i][1]+delspzp*fm[i][2]; + gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; + + // no free end option for now + + if (FreeEndFinal||FreeEndFinalWithRespToEIni) + error->all(FLERR,"Free End option not yet active"); + + } + } else if (ireplica == 0) { // initial replica + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + + // tangent vector + + delspxn = spnext[i][0]- sp[i][0]; + delspyn = spnext[i][1]- sp[i][1]; + delspzn = spnext[i][2]- sp[i][2]; // project deln vector on tangent space - - delndots = delspxn*sp[i][0]+delspyn*sp[i][1]+delspzn*sp[i][2]; - delspxn -= delndots*sp[i][0]; - delspyn -= delndots*sp[i][1]; - delspzn -= delndots*sp[i][2]; - - // calc. geodesic length - - spi[0]=sp[i][0]; - spi[1]=sp[i][1]; - spi[2]=sp[i][2]; - spj[0]=spnext[i][0]; - spj[1]=spnext[i][1]; - spj[2]=spnext[i][2]; - templen = geodesic_distance(spi,spj); - nlen += templen*templen; - dottangrad += delspxn*fm[i][0] + delspyn*fm[i][1] + delspzn*fm[i][2]; + + delndots = delspxn*sp[i][0]+delspyn*sp[i][1]+delspzn*sp[i][2]; + delspxn -= delndots*sp[i][0]; + delspyn -= delndots*sp[i][1]; + delspzn -= delndots*sp[i][2]; + + // calc. geodesic length + + spi[0]=sp[i][0]; + spi[1]=sp[i][1]; + spi[2]=sp[i][2]; + spj[0]=spnext[i][0]; + spj[1]=spnext[i][1]; + spj[2]=spnext[i][2]; + templen = geodesic_distance(spi,spj); + nlen += templen*templen; + dottangrad += delspxn*fm[i][0] + delspyn*fm[i][1] + delspzn*fm[i][2]; gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; - - // no free end option for now - - if (FreeEndIni) - error->all(FLERR,"Free End option not yet active"); + + // no free end option for now + + if (FreeEndIni) + error->all(FLERR,"Free End option not yet active"); } - } else { // intermediate replica + } else { // intermediate replica double vmax = MAX(fabs(vnext-veng),fabs(vprev-veng)); double vmin = MIN(fabs(vnext-veng),fabs(vprev-veng)); for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - - // calc. delp vector - delspxp = sp[i][0] - spprev[i][0]; + // calc. delp vector + + delspxp = sp[i][0] - spprev[i][0]; delspyp = sp[i][1] - spprev[i][1]; delspzp = sp[i][2] - spprev[i][2]; - - // project delp vector on tangent space - delndots = delspxp*sp[i][0]+delspyp*sp[i][1]+delspzp*sp[i][2]; - delspxp -= delpdots*sp[i][0]; - delspyp -= delpdots*sp[i][1]; - delspzp -= delpdots*sp[i][2]; + // project delp vector on tangent space - // calc. prev. geodesic length + delndots = delspxp*sp[i][0]+delspyp*sp[i][1]+delspzp*sp[i][2]; + delspxp -= delpdots*sp[i][0]; + delspyp -= delpdots*sp[i][1]; + delspzp -= delpdots*sp[i][2]; - spi[0]=sp[i][0]; - spi[1]=sp[i][1]; - spi[2]=sp[i][2]; - spj[0]=spprev[i][0]; - spj[1]=spprev[i][1]; - spj[2]=spprev[i][2]; - templen = geodesic_distance(spi, spj); - plen += templen*templen; + // calc. prev. geodesic length - // calc. deln vector + spi[0]=sp[i][0]; + spi[1]=sp[i][1]; + spi[2]=sp[i][2]; + spj[0]=spprev[i][0]; + spj[1]=spprev[i][1]; + spj[2]=spprev[i][2]; + templen = geodesic_distance(spi, spj); + plen += templen*templen; - delspxn = spnext[i][0] - sp[i][0]; + // calc. deln vector + + delspxn = spnext[i][0] - sp[i][0]; delspyn = spnext[i][1] - sp[i][1]; delspzn = spnext[i][2] - sp[i][2]; - - // project deln vector on tangent space - delndots = delspxn*sp[i][0]+delspyn*sp[i][1]+delspzn*sp[i][2]; - delspxn -= delndots*sp[i][0]; - delspyn -= delndots*sp[i][1]; - delspzn -= delndots*sp[i][2]; + // project deln vector on tangent space - // evaluate best path tangent + delndots = delspxn*sp[i][0]+delspyn*sp[i][1]+delspzn*sp[i][2]; + delspxn -= delndots*sp[i][0]; + delspyn -= delndots*sp[i][1]; + delspzn -= delndots*sp[i][2]; + + // evaluate best path tangent if (vnext > veng && veng > vprev) { tangent[i][0] = delspxn; @@ -472,40 +472,40 @@ void FixNEB_spin::min_post_force(int /*vflag*/) } // project tangent vector on tangent space - - double sdottan; - sdottan = sp[i][0]*tangent[i][0] + sp[i][1]*tangent[i][1] + - sp[i][2]*tangent[i][2]; - tangent[i][0] -= sdottan*sp[i][0]; - tangent[i][1] -= sdottan*sp[i][1]; - tangent[i][2] -= sdottan*sp[i][2]; - - // calc. next geodesic length - - spi[0]=sp[i][0]; - spi[1]=sp[i][1]; - spi[2]=sp[i][2]; - spj[0]=spnext[i][0]; - spj[1]=spnext[i][1]; - spj[2]=spnext[i][2]; - templen = geodesic_distance(spi, spj); - nlen += templen*templen; - - tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + - tangent[i][2]*tangent[i][2]; + + double sdottan; + sdottan = sp[i][0]*tangent[i][0] + sp[i][1]*tangent[i][1] + + sp[i][2]*tangent[i][2]; + tangent[i][0] -= sdottan*sp[i][0]; + tangent[i][1] -= sdottan*sp[i][1]; + tangent[i][2] -= sdottan*sp[i][2]; + + // calc. next geodesic length + + spi[0]=sp[i][0]; + spi[1]=sp[i][1]; + spi[2]=sp[i][2]; + spj[0]=spnext[i][0]; + spj[1]=spnext[i][1]; + spj[2]=spnext[i][2]; + templen = geodesic_distance(spi, spj); + nlen += templen*templen; + + tlen += tangent[i][0]*tangent[i][0] + tangent[i][1]*tangent[i][1] + + tangent[i][2]*tangent[i][2]; gradlen += fm[i][0]*fm[i][0] + fm[i][1]*fm[i][1] + fm[i][2]*fm[i][2]; dotpath += delspxp*delspxn + delspyp*delspyn + delspzp*delspzn; - dottangrad += tangent[i][0]*fm[i][0] + tangent[i][1]*fm[i][1] + - tangent[i][2]*fm[i][2]; + dottangrad += tangent[i][0]*fm[i][0] + tangent[i][1]*fm[i][1] + + tangent[i][2]*fm[i][2]; gradnextlen += fnext[i][0]*fnext[i][0] + fnext[i][1]*fnext[i][1] + - fnext[i][2]*fnext[i][2]; + fnext[i][2]*fnext[i][2]; dotgrad += fm[i][0]*fnext[i][0] + fm[i][1]*fnext[i][1] + fm[i][2]*fnext[i][2]; // no Perpendicular nudging force option active yet - - if (kspringPerp != 0.0) - error->all(FLERR,"NEB_spin Perpendicular spring force not yet active"); + + if (kspringPerp != 0.0) + error->all(FLERR,"NEB_spin Perpendicular spring force not yet active"); } } @@ -531,7 +531,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) dottangrad = bufout[6]; dotgrad = bufout[7]; - // check projection of tangent vector on tangent space + // check projection of tangent vector on tangent space // and normalize it double buftan[3]; @@ -539,7 +539,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { tandots = tangent[i][0]*sp[i][0]+tangent[i][1]*sp[i][1]+ - tangent[i][2]*sp[i][2]; + tangent[i][2]*sp[i][2]; buftan[0] = tangent[i][0]-tandots*sp[i][0]; buftan[1] = tangent[i][1]-tandots*sp[i][1]; buftan[2] = tangent[i][2]-tandots*sp[i][2]; @@ -548,7 +548,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) tangent[i][2] = buftan[2]; if (tlen > 0.0) { - double tleninv = 1.0/tlen; + double tleninv = 1.0/tlen; tangent[i][0] *= tleninv; tangent[i][1] *= tleninv; tangent[i][2] *= tleninv; @@ -567,17 +567,17 @@ void FixNEB_spin::min_post_force(int /*vflag*/) dotgrad = dotgrad /(gradlen*gradnextlen); // no Free End options active yet - - if (FreeEndIni && ireplica == 0) + + if (FreeEndIni && ireplica == 0) error->all(FLERR,"NEB_spin Free End option not yet active"); - if (FreeEndFinal && ireplica == nreplica -1) + if (FreeEndFinal && ireplica == nreplica -1) error->all(FLERR,"NEB_spin Free End option not yet active"); - if (FreeEndFinalWithRespToEIni&&ireplica == nreplica -1) + if (FreeEndFinalWithRespToEIni&&ireplica == nreplica -1) error->all(FLERR,"NEB_spin Free End option not yet active"); - // no NEB_spin long range option - - if (NEBLongRange) + // no NEB_spin long range option + + if (NEBLongRange) error->all(FLERR,"NEB_spin long range option not yet active"); // exit calc. if first or last replica (no gneb force) @@ -586,14 +586,14 @@ void FixNEB_spin::min_post_force(int /*vflag*/) dotpath = dotpath/(plen*nlen); - for (int i = 0; i < nlocal; i++) + for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { dot += fm[i][0]*tangent[i][0] + fm[i][1]*tangent[i][1] + fm[i][2]*tangent[i][2]; } // gather all dot for this replica - + double dotall; MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world); dot=dotall; @@ -601,9 +601,9 @@ void FixNEB_spin::min_post_force(int /*vflag*/) // for intermediate replica // calc. GNEB force prefactor - if (ireplica == rclimber) prefactor = -2.0*dot; // for climbing replica + if (ireplica == rclimber) prefactor = -2.0*dot; // for climbing replica else { - if (NEBLongRange) { + if (NEBLongRange) { error->all(FLERR,"Long Range NEB_spin climber option not yet active"); } else if (StandardNEB) { prefactor = -dot + kspring*(nlen-plen); @@ -626,14 +626,14 @@ void FixNEB_spin::min_post_force(int /*vflag*/) fm[i][1] += prefactor*tangent[i][1]; fm[i][2] += prefactor*tangent[i][2]; } - + // project GNEB force on tangent space double fdots; for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { fdots = fm[i][0]*sp[i][0] + fm[i][1]*sp[i][1] + - fm[i][2]*sp[i][2]; + fm[i][2]*sp[i][2]; fm[i][0] -= fdots*sp[i][0]; fm[i][1] -= fdots*sp[i][1]; fm[i][2] -= fdots*sp[i][2]; @@ -656,15 +656,15 @@ double FixNEB_spin::geodesic_distance(double spi[3], double spj[3]) crossy = spi[2]*spj[0]-spi[0]*spj[2]; crossz = spi[0]*spj[1]-spi[1]*spj[0]; normcross = sqrt(crossx*crossx + crossy*crossy + crossz*crossz); - + dotx = spi[0]*spj[0]; doty = spi[1]*spj[1]; dotz = spi[2]*spj[2]; dots = dotx+doty+dotz; - if (normcross == 0.0 && dots == 0.0) + if (normcross == 0.0 && dots == 0.0) error->all(FLERR,"Incorrect calc. of geodesic_distance in Fix NEB/spin"); - + dist = atan2(normcross,dots); return dist; diff --git a/src/SPIN/fix_nve_spin.h b/src/SPIN/fix_nve_spin.h index afc1db14d6..ee60feb073 100644 --- a/src/SPIN/fix_nve_spin.h +++ b/src/SPIN/fix_nve_spin.h @@ -27,7 +27,7 @@ FixStyle(nve/spin,FixNVESpin) namespace LAMMPS_NS { class FixNVESpin : public Fix { -friend class PairSpin; +friend class PairSpin; public: FixNVESpin(class LAMMPS *, int, char **); virtual ~FixNVESpin(); diff --git a/src/SPIN/min_spin.h b/src/SPIN/min_spin.h index 224d205000..fbc624a9cc 100644 --- a/src/SPIN/min_spin.h +++ b/src/SPIN/min_spin.h @@ -40,7 +40,7 @@ class MinSpin : public Min { private: // global and spin timesteps - + double dt; double dts; diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 10acb2b512..44e67eb014 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -15,9 +15,9 @@ Contributing authors: Julien Tranchida (SNL) Please cite the related publication: - Bessarab, P. F., Uzdin, V. M., & Jónsson, H. (2015). - Method for finding mechanism and activation energy of magnetic transitions, - applied to skyrmion and antivortex annihilation. + Bessarab, P. F., Uzdin, V. M., & Jónsson, H. (2015). + Method for finding mechanism and activation energy of magnetic transitions, + applied to skyrmion and antivortex annihilation. Computer Physics Communications, 196, 335-347. ------------------------------------------------------------------------- */ @@ -124,7 +124,7 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, spfinal[2] = buf_final[ii+2]; // interpolate intermediate spin states - + if (fraction == 0.0) { sp[i][0] = spinit[0]; sp[i][1] = spinit[1]; @@ -147,7 +147,7 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, // warning message if one or more couples (spi,spf) were aligned // this breaks Rodrigues' formula, and an arbitrary rotation // vector has to be chosen - + if ((rot_flag > 0) && (comm->me == 0)) error->warning(FLERR,"arbitrary initial rotation of one or more spin(s)"); @@ -195,7 +195,7 @@ void NEB_spin::command(int narg, char **arg) uworld = universe->uworld; MPI_Comm_rank(world,&me); - // check metal units and spin atom/style + // check metal units and spin atom/style if (!atom->sp_flag) error->all(FLERR,"neb/spin requires atom/spin style"); @@ -242,7 +242,7 @@ void NEB_spin::run() MPI_Comm_split(uworld,color,0,&roots); // search for neb_spin fix, allocate it - + int ineb; for (ineb = 0; ineb < modify->nfix; ineb++) if (strcmp(modify->fix[ineb]->style,"neb/spin") == 0) break; @@ -264,17 +264,17 @@ void NEB_spin::run() lmp->init(); // check if correct minimizer is setup - + if (update->minimize->searchflag) error->all(FLERR,"NEB_spin requires damped dynamics minimizer"); if (strcmp(update->minimize_style,"spin") != 0) error->all(FLERR,"NEB_spin requires spin minimizer"); // setup regular NEB_spin minimization - + FILE *uscreen = universe->uscreen; FILE *ulogfile = universe->ulogfile; - + if (me_universe == 0 && uscreen) fprintf(uscreen,"Setting up regular NEB_spin ...\n"); @@ -284,9 +284,9 @@ void NEB_spin::run() update->max_eval = n1steps; if (update->laststep < 0) error->all(FLERR,"Too many timesteps for NEB_spin"); - + update->minimize->setup(); - + if (me_universe == 0) { if (uscreen) { if (verbose) { @@ -329,7 +329,7 @@ void NEB_spin::run() print_status(); if (update->minimize->stop_condition) break; } - + timer->barrier_stop(); update->minimize->cleanup(); @@ -558,14 +558,14 @@ void NEB_spin::readfile(char *file, int flag) spz = atof(values[7]); if (flag == 0) { - + spinit[0] = sp[m][0]; spinit[1] = sp[m][1]; spinit[2] = sp[m][2]; spfinal[0] = spx; spfinal[1] = spy; spfinal[2] = spz; - + // interpolate intermediate spin states sp[m][3] = musp; @@ -590,8 +590,8 @@ void NEB_spin::readfile(char *file, int flag) x[m][1] = yy; x[m][2] = zz; sp[m][0] = spx; - sp[m][1] = spy; - sp[m][2] = spz; + sp[m][1] = spy; + sp[m][2] = spz; } } @@ -604,7 +604,7 @@ void NEB_spin::readfile(char *file, int flag) // warning message if one or more couples (spi,spf) were aligned // this breaks Rodrigues' formula, and an arbitrary rotation // vector has to be chosen - + if ((rot_flag > 0) && (comm->me == 0)) error->warning(FLERR,"arbitrary initial rotation of one or more spin(s)"); @@ -642,12 +642,12 @@ void NEB_spin::readfile(char *file, int flag) /* ---------------------------------------------------------------------- initial configuration of intermediate spins using Rodrigues' formula - interpolates between initial (spi) and final (stored in sploc) + interpolates between initial (spi) and final (stored in sploc) ------------------------------------------------------------------------- */ int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) { - + // no interpolation for initial and final replica if (fraction == 0.0 || fraction == 1.0) return 0; @@ -667,7 +667,7 @@ int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) spfx = sploc[0]; spfy = sploc[1]; spfz = sploc[2]; - + kx = spiy*spfz - spiz*spfy; ky = spiz*spfx - spix*spfz; kz = spix*spfy - spiy*spfx; @@ -682,7 +682,7 @@ int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) if (sidotsf > 0.0) { // spins aligned and in same direction return 0; } else if (sidotsf < 0.0) { // spins aligned and in opposite directions - + // defining a rotation axis // first guess, k = spi x [100] // second guess, k = spi x [010] @@ -725,13 +725,13 @@ int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) // apply Rodrigues' formula - spkx = spix*cos(omega); - spky = spiy*cos(omega); - spkz = spiz*cos(omega); + spkx = spix*cos(omega); + spky = spiy*cos(omega); + spkz = spiz*cos(omega); - spkx += kcrossx*sin(omega); - spky += kcrossy*sin(omega); - spkz += kcrossz*sin(omega); + spkx += kcrossx*sin(omega); + spky += kcrossy*sin(omega); + spkz += kcrossz*sin(omega); spkx += kx*kdots*(1.0-cos(omega)); spky += ky*kdots*(1.0-cos(omega)); @@ -746,7 +746,7 @@ int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) spkx *= isnorm; spky *= isnorm; spkz *= isnorm; - + // returns rotated spin sploc[0] = spkx; @@ -804,7 +804,7 @@ void NEB_spin::print_status() double **fm = atom->fm; // calc. magnetic torques - + tnorm2 = local_norm_inf = temp_inf = 0.0; for (int i = 0; i < nlocal; i++) { tx = (fm[i][1]*sp[i][2] - fm[i][2]*sp[i][1]); @@ -818,7 +818,7 @@ void NEB_spin::print_status() double fmaxreplica; MPI_Allreduce(&tnorm2,&fmaxreplica,1,MPI_DOUBLE,MPI_MAX,roots); - + double fnorminf = 0.0; MPI_Allreduce(&local_norm_inf,&fnorminf,1,MPI_DOUBLE,MPI_MAX,world); double fmaxatom; From 930748f6f26306acfe05f498cf767d16ccd0d18a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 27 Apr 2019 13:16:37 -0400 Subject: [PATCH 31/35] change neb/spin class names to better match the conventions used in the rest of LAMMPS --- src/SPIN/fix_neb_spin.cpp | 38 +++++++++--------- src/SPIN/fix_neb_spin.h | 8 ++-- src/SPIN/neb_spin.cpp | 82 +++++++++++++++++++-------------------- src/SPIN/neb_spin.h | 36 ++++++++--------- 4 files changed, 82 insertions(+), 82 deletions(-) diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index 714335c885..2a368d5dc9 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -49,7 +49,7 @@ enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; /* ---------------------------------------------------------------------- */ -FixNEB_spin::FixNEB_spin(LAMMPS *lmp, int narg, char **arg) : +FixNEBSpin::FixNEBSpin(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), id_pe(NULL), pe(NULL), nlenall(NULL), xprev(NULL), xnext(NULL), fnext(NULL), spprev(NULL), spnext(NULL), fmnext(NULL), springF(NULL), tangent(NULL), xsend(NULL), xrecv(NULL), fsend(NULL), frecv(NULL), spsend(NULL), @@ -144,7 +144,7 @@ FixNEB_spin::FixNEB_spin(LAMMPS *lmp, int narg, char **arg) : /* ---------------------------------------------------------------------- */ -FixNEB_spin::~FixNEB_spin() +FixNEBSpin::~FixNEBSpin() { modify->delete_compute(id_pe); delete [] id_pe; @@ -192,7 +192,7 @@ FixNEB_spin::~FixNEB_spin() /* ---------------------------------------------------------------------- */ -int FixNEB_spin::setmask() +int FixNEBSpin::setmask() { int mask = 0; mask |= MIN_POST_FORCE; @@ -201,7 +201,7 @@ int FixNEB_spin::setmask() /* ---------------------------------------------------------------------- */ -void FixNEB_spin::init() +void FixNEBSpin::init() { int icompute = modify->find_compute(id_pe); if (icompute < 0) @@ -251,7 +251,7 @@ void FixNEB_spin::init() /* ---------------------------------------------------------------------- */ -void FixNEB_spin::min_setup(int vflag) +void FixNEBSpin::min_setup(int vflag) { min_post_force(vflag); @@ -262,7 +262,7 @@ void FixNEB_spin::min_setup(int vflag) /* ---------------------------------------------------------------------- */ -void FixNEB_spin::min_post_force(int /*vflag*/) +void FixNEBSpin::min_post_force(int /*vflag*/) { double vprev,vnext; double delspxp,delspyp,delspzp; @@ -289,15 +289,15 @@ void FixNEB_spin::min_post_force(int /*vflag*/) } if (FreeEndFinal && ireplica == nreplica-1 && (update->ntimestep == 0)) - error->all(FLERR,"NEB_spin Free End option not yet active"); + error->all(FLERR,"NEBSpin Free End option not yet active"); if (ireplica == 0) vIni=veng; if (FreeEndFinalWithRespToEIni) - error->all(FLERR,"NEB_spin Free End option not yet active"); + error->all(FLERR,"NEBSpin Free End option not yet active"); if (FreeEndIni && ireplica == 0 && (update->ntimestep == 0)) - error->all(FLERR,"NEB_spin Free End option not yet active"); + error->all(FLERR,"NEBSpin Free End option not yet active"); // communicate atoms to/from adjacent replicas to fill xprev,xnext @@ -505,7 +505,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) // no Perpendicular nudging force option active yet if (kspringPerp != 0.0) - error->all(FLERR,"NEB_spin Perpendicular spring force not yet active"); + error->all(FLERR,"NEBSpin Perpendicular spring force not yet active"); } } @@ -569,16 +569,16 @@ void FixNEB_spin::min_post_force(int /*vflag*/) // no Free End options active yet if (FreeEndIni && ireplica == 0) - error->all(FLERR,"NEB_spin Free End option not yet active"); + error->all(FLERR,"NEBSpin Free End option not yet active"); if (FreeEndFinal && ireplica == nreplica -1) - error->all(FLERR,"NEB_spin Free End option not yet active"); + error->all(FLERR,"NEBSpin Free End option not yet active"); if (FreeEndFinalWithRespToEIni&&ireplica == nreplica -1) - error->all(FLERR,"NEB_spin Free End option not yet active"); + error->all(FLERR,"NEBSpin Free End option not yet active"); - // no NEB_spin long range option + // no NEBSpin long range option if (NEBLongRange) - error->all(FLERR,"NEB_spin long range option not yet active"); + error->all(FLERR,"NEBSpin long range option not yet active"); // exit calc. if first or last replica (no gneb force) @@ -604,7 +604,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) if (ireplica == rclimber) prefactor = -2.0*dot; // for climbing replica else { if (NEBLongRange) { - error->all(FLERR,"Long Range NEB_spin climber option not yet active"); + error->all(FLERR,"Long Range NEBSpin climber option not yet active"); } else if (StandardNEB) { prefactor = -dot + kspring*(nlen-plen); } @@ -645,7 +645,7 @@ void FixNEB_spin::min_post_force(int /*vflag*/) geodesic distance calculation (Vincenty's formula) ------------------------------------------------------------------------- */ -double FixNEB_spin::geodesic_distance(double spi[3], double spj[3]) +double FixNEBSpin::geodesic_distance(double spi[3], double spj[3]) { double dist; double crossx,crossy,crossz; @@ -676,7 +676,7 @@ double FixNEB_spin::geodesic_distance(double spi[3], double spj[3]) replicas 0 and N-1 send but do not receive any atoms ------------------------------------------------------------------------- */ -void FixNEB_spin::inter_replica_comm() +void FixNEBSpin::inter_replica_comm() { int i,m; MPI_Request request; @@ -956,7 +956,7 @@ void FixNEB_spin::inter_replica_comm() reallocate communication arrays if necessary ------------------------------------------------------------------------- */ -void FixNEB_spin::reallocate() +void FixNEBSpin::reallocate() { maxlocal = atom->nmax; diff --git a/src/SPIN/fix_neb_spin.h b/src/SPIN/fix_neb_spin.h index 8e016b2e23..7ac83ddce7 100644 --- a/src/SPIN/fix_neb_spin.h +++ b/src/SPIN/fix_neb_spin.h @@ -13,7 +13,7 @@ #ifdef FIX_CLASS -FixStyle(neb/spin,FixNEB_spin) +FixStyle(neb/spin,FixNEBSpin) #else @@ -24,13 +24,13 @@ FixStyle(neb/spin,FixNEB_spin) namespace LAMMPS_NS { -class FixNEB_spin : public Fix { +class FixNEBSpin : public Fix { public: double veng,plen,nlen,dotpath,dottangrad,gradlen,dotgrad; int rclimber; - FixNEB_spin(class LAMMPS *, int, char **); - ~FixNEB_spin(); + FixNEBSpin(class LAMMPS *, int, char **); + ~FixNEBSpin(); int setmask(); void init(); void min_setup(int); diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 44e67eb014..db8469ed63 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -76,15 +76,15 @@ static const char cite_neb_spin[] = /* ---------------------------------------------------------------------- */ -NEB_spin::NEB_spin(LAMMPS *lmp) : Pointers(lmp) { +NEBSpin::NEBSpin(LAMMPS *lmp) : Pointers(lmp) { if (lmp->citeme) lmp->citeme->add(cite_neb_spin); } /* ---------------------------------------------------------------------- - internal NEB_spin constructor, called from TAD + internal NEBSpin constructor, called from TAD ------------------------------------------------------------------------- */ -NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, +NEBSpin::NEBSpin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, int n2steps_in, int nevery_in, double *buf_init, double *buf_final) : Pointers(lmp) { @@ -155,7 +155,7 @@ NEB_spin::NEB_spin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, /* ---------------------------------------------------------------------- */ -NEB_spin::~NEB_spin() +NEBSpin::~NEBSpin() { MPI_Comm_free(&roots); memory->destroy(all); @@ -163,15 +163,15 @@ NEB_spin::~NEB_spin() } /* ---------------------------------------------------------------------- - perform NEB_spin on multiple replicas + perform NEBSpin on multiple replicas ------------------------------------------------------------------------- */ -void NEB_spin::command(int narg, char **arg) +void NEBSpin::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR,"NEB_spin command before simulation box is defined"); + error->all(FLERR,"NEBSpin command before simulation box is defined"); - if (narg < 6) error->universe_all(FLERR,"Illegal NEB_spin command"); + if (narg < 6) error->universe_all(FLERR,"Illegal NEBSpin command"); etol = force->numeric(FLERR,arg[0]); ttol = force->numeric(FLERR,arg[1]); @@ -181,11 +181,11 @@ void NEB_spin::command(int narg, char **arg) // error checks - if (etol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); - if (ttol < 0.0) error->all(FLERR,"Illegal NEB_spin command"); - if (nevery <= 0) error->universe_all(FLERR,"Illegal NEB_spin command"); + if (etol < 0.0) error->all(FLERR,"Illegal NEBSpin command"); + if (ttol < 0.0) error->all(FLERR,"Illegal NEBSpin command"); + if (nevery <= 0) error->universe_all(FLERR,"Illegal NEBSpin command"); if (n1steps % nevery || n2steps % nevery) - error->universe_all(FLERR,"Illegal NEB_spin command"); + error->universe_all(FLERR,"Illegal NEBSpin command"); // replica info @@ -204,23 +204,23 @@ void NEB_spin::command(int narg, char **arg) // error checks - if (nreplica == 1) error->all(FLERR,"Cannot use NEB_spin with a single replica"); + if (nreplica == 1) error->all(FLERR,"Cannot use NEBSpin with a single replica"); if (atom->map_style == 0) - error->all(FLERR,"Cannot use NEB_spin unless atom map exists"); + error->all(FLERR,"Cannot use NEBSpin unless atom map exists"); // process file-style setting to setup initial configs for all replicas if (strcmp(arg[5],"final") == 0) { - if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEB_spin command"); + if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEBSpin command"); infile = arg[6]; readfile(infile,0); } else if (strcmp(arg[5],"each") == 0) { - if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEB_spin command"); + if (narg != 7 && narg !=8) error->universe_all(FLERR,"Illegal NEBSpin command"); infile = arg[6]; readfile(infile,1); } else if (strcmp(arg[5],"none") == 0) { - if (narg != 6 && narg !=7) error->universe_all(FLERR,"Illegal NEB_spin command"); - } else error->universe_all(FLERR,"Illegal NEB_spin command"); + if (narg != 6 && narg !=7) error->universe_all(FLERR,"Illegal NEBSpin command"); + } else error->universe_all(FLERR,"Illegal NEBSpin command"); verbose=false; if (strcmp(arg[narg-1],"verbose") == 0) verbose=true; @@ -229,10 +229,10 @@ void NEB_spin::command(int narg, char **arg) } /* ---------------------------------------------------------------------- - run NEB_spin on multiple replicas + run NEBSpin on multiple replicas ------------------------------------------------------------------------- */ -void NEB_spin::run() +void NEBSpin::run() { // create MPI communicator for root proc from each world @@ -246,9 +246,9 @@ void NEB_spin::run() int ineb; for (ineb = 0; ineb < modify->nfix; ineb++) if (strcmp(modify->fix[ineb]->style,"neb/spin") == 0) break; - if (ineb == modify->nfix) error->all(FLERR,"NEB_spin requires use of fix neb/spin"); + if (ineb == modify->nfix) error->all(FLERR,"NEBSpin requires use of fix neb/spin"); - fneb = (FixNEB_spin *) modify->fix[ineb]; + fneb = (FixNEBSpin *) modify->fix[ineb]; if (verbose) numall =7; else numall = 4; memory->create(all,nreplica,numall,"neb:all"); @@ -266,24 +266,24 @@ void NEB_spin::run() // check if correct minimizer is setup if (update->minimize->searchflag) - error->all(FLERR,"NEB_spin requires damped dynamics minimizer"); + error->all(FLERR,"NEBSpin requires damped dynamics minimizer"); if (strcmp(update->minimize_style,"spin") != 0) - error->all(FLERR,"NEB_spin requires spin minimizer"); + error->all(FLERR,"NEBSpin requires spin minimizer"); - // setup regular NEB_spin minimization + // setup regular NEBSpin minimization FILE *uscreen = universe->uscreen; FILE *ulogfile = universe->ulogfile; if (me_universe == 0 && uscreen) - fprintf(uscreen,"Setting up regular NEB_spin ...\n"); + fprintf(uscreen,"Setting up regular NEBSpin ...\n"); update->beginstep = update->firststep = update->ntimestep; update->endstep = update->laststep = update->firststep + n1steps; update->nsteps = n1steps; update->max_eval = n1steps; if (update->laststep < 0) - error->all(FLERR,"Too many timesteps for NEB_spin"); + error->all(FLERR,"Too many timesteps for NEBSpin"); update->minimize->setup(); @@ -316,8 +316,8 @@ void NEB_spin::run() } print_status(); - // perform regular NEB_spin for n1steps or until replicas converge - // retrieve PE values from fix NEB_spin and print every nevery iterations + // perform regular NEBSpin for n1steps or until replicas converge + // retrieve PE values from fix NEBSpin and print every nevery iterations // break out of while loop early if converged // damped dynamic min styles insure all replicas converge together @@ -337,7 +337,7 @@ void NEB_spin::run() Finish finish(lmp); finish.end(1); - // switch fix NEB_spin to climbing mode + // switch fix NEBSpin to climbing mode // top = replica that becomes hill climber double vmax = all[0][0]; @@ -348,7 +348,7 @@ void NEB_spin::run() top = m; } - // setup climbing NEB_spin minimization + // setup climbing NEBSpin minimization // must reinitialize minimizer so it re-creates its fix MINIMIZE if (me_universe == 0 && uscreen) @@ -402,8 +402,8 @@ void NEB_spin::run() } print_status(); - // perform climbing NEB_spin for n2steps or until replicas converge - // retrieve PE values from fix NEB_spin and print every nevery iterations + // perform climbing NEBSpin for n2steps or until replicas converge + // retrieve PE values from fix NEBSpin and print every nevery iterations // break induced if converged // damped dynamic min styles insure all replicas converge together @@ -443,7 +443,7 @@ void NEB_spin::run() initial replica does nothing ------------------------------------------------------------------------- */ -void NEB_spin::readfile(char *file, int flag) +void NEBSpin::readfile(char *file, int flag) { int i,j,m,nchunk,eofflag,nlines; tagint tag; @@ -453,7 +453,7 @@ void NEB_spin::readfile(char *file, int flag) double musp,spx,spy,spz; if (me_universe == 0 && screen) - fprintf(screen,"Reading NEB_spin coordinate file(s) ...\n"); + fprintf(screen,"Reading NEBSpin coordinate file(s) ...\n"); // flag = 0, universe root reads header of file, bcast to universe // flag = 1, each replica's root reads header of file, bcast to world @@ -645,7 +645,7 @@ void NEB_spin::readfile(char *file, int flag) interpolates between initial (spi) and final (stored in sploc) ------------------------------------------------------------------------- */ -int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) +int NEBSpin::initial_rotation(double *spi, double *sploc, double fraction) { // no interpolation for initial and final replica @@ -757,11 +757,11 @@ int NEB_spin::initial_rotation(double *spi, double *sploc, double fraction) } /* ---------------------------------------------------------------------- - universe proc 0 opens NEB_spin data file + universe proc 0 opens NEBSpin data file test if gzipped ------------------------------------------------------------------------- */ -void NEB_spin::open(char *file) +void NEBSpin::open(char *file) { compressed = 0; char *suffix = file + strlen(file) - 3; @@ -791,11 +791,11 @@ void NEB_spin::open(char *file) } /* ---------------------------------------------------------------------- - query fix NEB_spin for info on each replica - universe proc 0 prints current NEB_spin status + query fix NEBSpin for info on each replica + universe proc 0 prints current NEBSpin status ------------------------------------------------------------------------- */ -void NEB_spin::print_status() +void NEBSpin::print_status() { int nlocal = atom->nlocal; double tx,ty,tz; diff --git a/src/SPIN/neb_spin.h b/src/SPIN/neb_spin.h index 6fb36feb5d..966f617033 100644 --- a/src/SPIN/neb_spin.h +++ b/src/SPIN/neb_spin.h @@ -13,7 +13,7 @@ #ifdef COMMAND_CLASS -CommandStyle(neb/spin,NEB_spin) +CommandStyle(neb/spin,NEBSpin) #else @@ -25,13 +25,13 @@ CommandStyle(neb/spin,NEB_spin) namespace LAMMPS_NS { -class NEB_spin : protected Pointers { +class NEBSpin : protected Pointers { public: - NEB_spin(class LAMMPS *); - NEB_spin(class LAMMPS *, double, double, int, int, int, double *, double *); - ~NEB_spin(); + NEBSpin(class LAMMPS *); + NEBSpin(class LAMMPS *, double, double, int, int, int, double *, double *); + ~NEBSpin(); void command(int, char **); // process neb/spin command - void run(); // run NEB_spin + void run(); // run NEBSpin double ebf,ebr; // forward and reverse energy barriers @@ -49,7 +49,7 @@ class NEB_spin : protected Pointers { int nevery; // output interval char *infile; // name of file containing final state - class FixNEB_spin *fneb; + class FixNEBSpin *fneb; int numall; // per-replica dimension of array all double **all; // PE,plen,nlen,gradvnorm from each replica double *rdist; // normalize reaction distance, 0 to 1 @@ -69,7 +69,7 @@ class NEB_spin : protected Pointers { /* ERROR/WARNING messages: -E: NEB_spin command before simulation box is defined +E: NEBSpin command before simulation box is defined Self-explanatory. @@ -79,26 +79,26 @@ Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. -E: Cannot use NEB_spin with a single replica +E: Cannot use NEBSpin with a single replica Self-explanatory. -E: Cannot use NEB_spin unless atom map exists +E: Cannot use NEBSpin unless atom map exists Use the atom_modify command to create an atom map. -E: NEB_spin requires use of fix neb +E: NEBSpin requires use of fix neb Self-explanatory. -E: NEB_spin requires damped dynamics minimizer +E: NEBSpin requires damped dynamics minimizer Use a different minimization style. -E: Too many timesteps for NEB_spin +E: Too many timesteps for NEBSpin You must use a number of timesteps that fit in a 32-bit integer -for NEB_spin. +for NEBSpin. E: Too many timesteps @@ -127,12 +127,12 @@ The specified file cannot be opened. Check that the path and name are correct. If the file is a compressed file, also check that the gzip executable can be found and run. -U: Can only use NEB_spin with 1-processor replicas +U: Can only use NEBSpin with 1-processor replicas -This is current restriction for NEB_spin as implemented in LAMMPS. +This is current restriction for NEBSpin as implemented in LAMMPS. -U: Cannot use NEB_spin with atom_modify sort enabled +U: Cannot use NEBSpin with atom_modify sort enabled -This is current restriction for NEB_spin implemented in LAMMPS. +This is current restriction for NEBSpin implemented in LAMMPS. */ From d190b76075df87b9776ea3df28735e75a75cb0e0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 27 Apr 2019 13:22:14 -0400 Subject: [PATCH 32/35] remove unused custom constructor --- src/SPIN/neb_spin.cpp | 73 ------------------------------------------- src/SPIN/neb_spin.h | 1 - 2 files changed, 74 deletions(-) diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index db8469ed63..366af20e3f 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -80,79 +80,6 @@ NEBSpin::NEBSpin(LAMMPS *lmp) : Pointers(lmp) { if (lmp->citeme) lmp->citeme->add(cite_neb_spin); } -/* ---------------------------------------------------------------------- - internal NEBSpin constructor, called from TAD -------------------------------------------------------------------------- */ - -NEBSpin::NEBSpin(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, - int n2steps_in, int nevery_in, double *buf_init, double *buf_final) - : Pointers(lmp) -{ - - etol = etol_in; - ttol = ftol_in; - n1steps = n1steps_in; - n2steps = n2steps_in; - nevery = nevery_in; - - // replica info - - nreplica = universe->nworlds; - ireplica = universe->iworld; - me_universe = universe->me; - uworld = universe->uworld; - MPI_Comm_rank(world,&me); - - // fraction to interpolate intermediate replica - - double fraction = ireplica/(nreplica-1.0); - - double **sp = atom->sp; - int nlocal = atom->nlocal; - - int temp_flag,rot_flag; - temp_flag = rot_flag = 0; - int ii = 0; - double spinit[3],spfinal[3]; - for (int i = 0; i < nlocal; i++) { - - spinit[0] = buf_init[ii]; - spinit[1] = buf_init[ii+1]; - spinit[2] = buf_init[ii+2]; - spfinal[0] = buf_final[ii]; - spfinal[1] = buf_final[ii+1]; - spfinal[2] = buf_final[ii+2]; - - // interpolate intermediate spin states - - if (fraction == 0.0) { - sp[i][0] = spinit[0]; - sp[i][1] = spinit[1]; - sp[i][2] = spinit[2]; - } else if (fraction == 1.0) { - sp[i][0] = spfinal[0]; - sp[i][1] = spfinal[1]; - sp[i][2] = spfinal[2]; - } else { - temp_flag = initial_rotation(spinit,spfinal,fraction); - rot_flag = MAX(temp_flag,rot_flag); - sp[i][0] = spfinal[0]; - sp[i][1] = spfinal[1]; - sp[i][2] = spfinal[2]; - } - - ii += 3; - } - - // warning message if one or more couples (spi,spf) were aligned - // this breaks Rodrigues' formula, and an arbitrary rotation - // vector has to be chosen - - if ((rot_flag > 0) && (comm->me == 0)) - error->warning(FLERR,"arbitrary initial rotation of one or more spin(s)"); - -} - /* ---------------------------------------------------------------------- */ NEBSpin::~NEBSpin() diff --git a/src/SPIN/neb_spin.h b/src/SPIN/neb_spin.h index 966f617033..5acd034e95 100644 --- a/src/SPIN/neb_spin.h +++ b/src/SPIN/neb_spin.h @@ -28,7 +28,6 @@ namespace LAMMPS_NS { class NEBSpin : protected Pointers { public: NEBSpin(class LAMMPS *); - NEBSpin(class LAMMPS *, double, double, int, int, int, double *, double *); ~NEBSpin(); void command(int, char **); // process neb/spin command void run(); // run NEBSpin From 0fac0e18d15392fd78ce0eddc6bc49fe54949cda Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 27 Apr 2019 17:50:12 -0400 Subject: [PATCH 33/35] no need for libm or GSL to compile the interpolate code --- tools/spin/interpolate_gneb/README | 2 +- tools/spin/interpolate_gneb/interpolate.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/spin/interpolate_gneb/README b/tools/spin/interpolate_gneb/README index 5cfd267a86..ab30373249 100644 --- a/tools/spin/interpolate_gneb/README +++ b/tools/spin/interpolate_gneb/README @@ -2,7 +2,7 @@ Interpolate.x tries to perform a cubic polynomial interpolation of the MEP. Compile the program with: -gcc interpolate.c -o interpolate.x -lm -lgsl +gcc interpolate.c -o interpolate.x and then run it as: ./interpolate.x diff --git a/tools/spin/interpolate_gneb/interpolate.c b/tools/spin/interpolate_gneb/interpolate.c index 39b1b2e192..32734ee224 100644 --- a/tools/spin/interpolate_gneb/interpolate.c +++ b/tools/spin/interpolate_gneb/interpolate.c @@ -9,8 +9,6 @@ ------------------------------------------------------------------------- */ #include -#include -#include #include #include From 0bb2e004abdc1cf2d0ee651fea559bf2d9af1d6d Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 29 Apr 2019 08:08:56 -0600 Subject: [PATCH 34/35] Commit JT 042919 - corrections Axel 1 --- src/SPIN/fix_neb_spin.cpp | 18 ++++++++++++------ src/SPIN/neb_spin.cpp | 2 ++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index 2a368d5dc9..a8cb0cd2ca 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -708,27 +708,33 @@ void FixNEBSpin::inter_replica_comm() // direct comm of x -> xprev and x -> xnext if (cmode == SINGLE_PROC_DIRECT) { - if (ireplica > 0) + if (ireplica > 0) { MPI_Irecv(xprev[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld,&request); MPI_Irecv(spprev[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld,&request); - if (ireplica < nreplica-1) + } + if (ireplica < nreplica-1) { MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld); MPI_Send(sp[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld); + } if (ireplica > 0) MPI_Wait(&request,MPI_STATUS_IGNORE); - if (ireplica < nreplica-1) + if (ireplica < nreplica-1) { MPI_Irecv(xnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); MPI_Irecv(spnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); - if (ireplica > 0) + } + if (ireplica > 0) { MPI_Send(x[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); MPI_Send(sp[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); + } if (ireplica < nreplica-1) MPI_Wait(&request,MPI_STATUS_IGNORE); - if (ireplica < nreplica-1) + if (ireplica < nreplica-1) { MPI_Irecv(fnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); MPI_Irecv(fmnext[0],3*nlocal,MPI_DOUBLE,procnext,0,uworld,&request); - if (ireplica > 0) + } + if (ireplica > 0) { MPI_Send(f[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); MPI_Send(fm[0],3*nlocal,MPI_DOUBLE,procprev,0,uworld); + } if (ireplica < nreplica-1) MPI_Wait(&request,MPI_STATUS_IGNORE); return; diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 366af20e3f..126cfb09e3 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -618,10 +618,12 @@ int NEBSpin::initial_rotation(double *spi, double *sploc, double fraction) kx = 0.0; ky = spiz; kz = -spiy; + knormsq = ky*ky + kz*kz; } else if (spix*spix + spiz*spiz != 0.0) { // spin not along [010] kx = -spiz; ky = 0.0; kz = spix; + knormsq = kx*kx + kz*kz; } else error->all(FLERR,"Incorrect initial rotation operation"); rot_flag = 1; } From 97baee49319f82e484fab84d26596ee94f7117c0 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 29 Apr 2019 08:23:57 -0600 Subject: [PATCH 35/35] Commit2 JT 042919 - modified energy/torque tolerance for faster convergence in examples/SPIN/gneb/skyrmion/in.gneb.skyrmion --- examples/SPIN/gneb/skyrmion/in.gneb.skyrmion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion b/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion index cf55c9d1d4..37075c2e30 100644 --- a/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion +++ b/examples/SPIN/gneb/skyrmion/in.gneb.skyrmion @@ -44,4 +44,4 @@ dump 1 all custom 1 dump.$u type x y z c_outsp[1] c_outsp[2] c_outsp[3] min_style spin min_modify alpha_damp 1.0 discrete_factor 10.0 -neb/spin 1.0e-12 1.0e-12 10000 10000 10 final final.skyrmion +neb/spin 1.0e-9 1.0e-9 10000 10000 10 final final.skyrmion