From f1c3b9d0bf3fd4f27711e81eb11dbb70d79da5fb Mon Sep 17 00:00:00 2001 From: julient31 Date: Tue, 23 Jul 2019 11:24:52 -0600 Subject: [PATCH] Commit2 JT 072319 - corrected some mistakes in doc files - modified oso examples to match new line options --- doc/src/min_modify.txt | 10 +++++----- doc/src/min_spin.txt | 5 +++-- doc/src/neb_spin.txt | 4 ++-- examples/SPIN/spinmin/in.spinmin_cg.bfo | 2 +- examples/SPIN/spinmin/in.spinmin_lbfgs.bfo | 2 +- src/SPIN/neb_spin.cpp | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/src/min_modify.txt b/doc/src/min_modify.txt index da7b593d16..c59e2b474b 100644 --- a/doc/src/min_modify.txt +++ b/doc/src/min_modify.txt @@ -13,7 +13,7 @@ min_modify command :h3 min_modify keyword values ... :pre one or more keyword/value pairs may be listed :ulb,l -keyword = {dmax} or {line} or {alpha_damp} or {discrete_factor} or {spin_cubic} or {spin_none} +keyword = {dmax} or {line} or {alpha_damp} or {discrete_factor} {dmax} value = max max = maximum distance for line search to move (distance units) {line} value = {backtrack} or {quadratic} or {forcezero} or {spin_cubic} or {spin_none} @@ -81,9 +81,9 @@ quantities. Default values are {alpha_damp} = 1.0 and {discrete_factor} = 10.0. The choice of a line search algorithm for the {spin_oso_cg} and -{spin_oso_lbfgs} can be specified via the {line} keyword. -The {spin_cubic} and {spin_none} only make sense when those two -when one of those two minimization styles is declared. +{spin_oso_lbfgs} styles can be specified via the {line} keyword. +The {spin_cubic} and {spin_none} only make sense when one of those +two minimization styles is declared. The {spin_cubic} keyword activates the line search procedure when the {spin_oso_cg} algorithm is used. @@ -93,7 +93,7 @@ the {spin_oso_lbfgs} algorithm is used. [Restrictions:] The line search procedure of styles {spin_oso_cg} and {spin_oso_lbfgs} cannot be used for magnetic -NEB calculations. See "neb/spin"_neb_spin.html for more +GNEB calculations. See "neb/spin"_neb_spin.html for more explanation. [Related commands:] diff --git a/doc/src/min_spin.txt b/doc/src/min_spin.txt index 6883a4197c..2a85427c56 100644 --- a/doc/src/min_spin.txt +++ b/doc/src/min_spin.txt @@ -18,7 +18,7 @@ min_style spin_oso_lbfgs :pre [Examples:] min_style spin_oso_lbfgs -min_modify discrete_factor 10.0 line_search 0 :pre +min_modify discrete_factor 10.0 line spin_none :pre [Description:] @@ -62,7 +62,8 @@ Style {spin_oso_lbfgs} defines an orthogonal spin optimization (LBFGS) algorithm. By default, style {spin_oso_lbfgs} uses a line search procedure. The "min_modify"_min_modify.html command can be used to -deactivate the line search procedure. +deactivate the line search procedure, and to modify the +discretization factor {discrete_factor}. For more information about styles {spin_oso_cg} and {spin_oso_lbfgs}, see their implementation reported in "(Ivanov)"_#Ivanov1. diff --git a/doc/src/neb_spin.txt b/doc/src/neb_spin.txt index 46478b1219..27e835276e 100644 --- a/doc/src/neb_spin.txt +++ b/doc/src/neb_spin.txt @@ -60,8 +60,8 @@ 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. +minimization across all the replicas. One of the "spin"_min_spin.html +style minimizers 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. diff --git a/examples/SPIN/spinmin/in.spinmin_cg.bfo b/examples/SPIN/spinmin/in.spinmin_cg.bfo index cd6ec485ad..901b04e5fd 100644 --- a/examples/SPIN/spinmin/in.spinmin_cg.bfo +++ b/examples/SPIN/spinmin/in.spinmin_cg.bfo @@ -50,5 +50,5 @@ 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 spin/oso_cg -min_modify discrete_factor 10.0 line_search 0 +min_modify discrete_factor 10.0 line spin_cubic minimize 1.0e-10 1.0e-10 10000 1000 diff --git a/examples/SPIN/spinmin/in.spinmin_lbfgs.bfo b/examples/SPIN/spinmin/in.spinmin_lbfgs.bfo index 5db44522e1..4edd1a053e 100644 --- a/examples/SPIN/spinmin/in.spinmin_lbfgs.bfo +++ b/examples/SPIN/spinmin/in.spinmin_lbfgs.bfo @@ -50,5 +50,5 @@ 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 spin/oso_lbfgs -min_modify discrete_factor 10.0 line_search 1 +min_modify discrete_factor 10.0 line spin_none minimize 1.0e-15 1.0e-10 10000 1000 diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 12d1d2a956..4fa1f4467b 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -650,7 +650,7 @@ int NEBSpin::initial_rotation(double *spi, double *sploc, double fraction) kcrossy = kz*spix - kx*spiz; kcrossz = kx*spiy - ky*spix; - kdots = kx*spix + ky*spiz + kz*spiz; + kdots = kx*spix + ky*spiy + kz*spiz; omega = acos(sidotsf); omega *= fraction;