From d3d14a0f5a94bb6583ce9ca7421cc35132e57933 Mon Sep 17 00:00:00 2001 From: eric bylaska Date: Thu, 21 Nov 2024 11:37:03 -0800 Subject: [PATCH] byb updates...EJB --- Nwpw/nwpwlib/Control/Control2.cpp | 2 +- Nwpw/nwpwlib/parse/parse_pwdft.cpp | 19 ++++++++++--------- Nwpw/pspw/minimizer/pspw_bomd.cpp | 4 ++-- Nwpw/pspw/minimizer/pspw_geovib.cpp | 4 ++-- Nwpw/pspw/minimizer/pspw_minimizer.cpp | 4 ++-- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Nwpw/nwpwlib/Control/Control2.cpp b/Nwpw/nwpwlib/Control/Control2.cpp index 31d3bcd4..4ae09209 100644 --- a/Nwpw/nwpwlib/Control/Control2.cpp +++ b/Nwpw/nwpwlib/Control/Control2.cpp @@ -526,7 +526,7 @@ Control2::Control2(const int np0, const std::string rtdbstring) pfractional = rtdbjson["nwpw"]["fractional"]; if (rtdbjson["nwpw"]["scf_extra_rotate"].is_boolean()) - pscf_extra_rotate = rtdbjson["nwpw"]["pscf_extra_rotate"]; + pscf_extra_rotate = rtdbjson["nwpw"]["scf_extra_rotate"]; ploop[0] = 10; diff --git a/Nwpw/nwpwlib/parse/parse_pwdft.cpp b/Nwpw/nwpwlib/parse/parse_pwdft.cpp index 7d504352..06c8f6cc 100644 --- a/Nwpw/nwpwlib/parse/parse_pwdft.cpp +++ b/Nwpw/nwpwlib/parse/parse_pwdft.cpp @@ -1574,6 +1574,16 @@ static json parse_nwpw(json nwpwjson, int *curptr, nwpwjson["ks_maxit_orbs"] = std::stoi(mystring_trim(mystring_split(line, "outer_iterations")[1])); if (mystring_contains(line, "diis_histories")) nwpwjson["diis_histories"] = std::stoi(mystring_trim(mystring_split(line, "diis_histories")[1])); + if (mystring_contains(line, "extra_rotate")) + { + nwpwjson["scf_extra_rotate"] = true; + if (mystring_contains(line, "off")) nwpwjson["scf_extra_rotate"] = false; + if (mystring_contains(line, "no")) nwpwjson["scf_extra_rotate"] = false; + if (mystring_contains(line, "false")) nwpwjson["scf_extra_rotate"] = false; + if (mystring_contains(line, "on")) nwpwjson["scf_extra_rotate"] = true; + if (mystring_contains(line, "yes")) nwpwjson["scf_extra_rotate"] = true; + if (mystring_contains(line, "true")) nwpwjson["scf_extra_rotate"] = true; + } // smear @@ -1619,15 +1629,6 @@ static json parse_nwpw(json nwpwjson, int *curptr, nwpwjson["fractional_temperature"] = temperature; } - } else if (mystring_contains(line, "scf_extra_rotate")) { - nwpwjson["scf_extra_rotate"] = true; - if (mystring_contains(line, "off")) nwpwjson["scf_extra_rotate"] = false; - if (mystring_contains(line, "no")) nwpwjson["scf_extra_rotate"] = false; - if (mystring_contains(line, "false")) nwpwjson["scf_extra_rotate"] = false; - if (mystring_contains(line, "on")) nwpwjson["scf_extra_rotate"] = true; - if (mystring_contains(line, "yes")) nwpwjson["scf_extra_rotate"] = true; - if (mystring_contains(line, "true")) nwpwjson["scf_extra_rotate"] = true; - } else if (mystring_contains(line, "vectors")) { if (mystring_contains(line, " input")) nwpwjson["input_wavefunction_filename"] = mystring_split0( diff --git a/Nwpw/pspw/minimizer/pspw_bomd.cpp b/Nwpw/pspw/minimizer/pspw_bomd.cpp index 6aa5b73a..674003ea 100644 --- a/Nwpw/pspw/minimizer/pspw_bomd.cpp +++ b/Nwpw/pspw/minimizer/pspw_bomd.cpp @@ -409,12 +409,12 @@ int pspw_bomd(MPI_Comm comm_world0,std::string &rtdbstring,std::ostream &coutput if (control.scf_algorithm()==4) coutput << " SCF algorithm = Thomas-Fermi mixing\n"; if (control.minimizer()==5) coutput << " SCF mixing type = potential\n"; if (control.minimizer()==8) coutput << " SCF mixing type = density\n"; + if (control.scf_extra_rotate()) coutput << " SCF extra rotate\n"; if (control.scf_algorithm()==4) coutput << " SCF mixing parameters: alpha=" << control.scf_alpha() << " beta=" << control.scf_beta() << std::endl; else coutput << " SCF mixing parameter: alpha= " << control.scf_alpha() << std::endl; - coutput << " Kerker damping = " << control.kerker_g0() << std::endl; - if (control.scf_extra_rotate()) coutput << " SCF extra rotate\n"; + if (control.kerker_g0() > 0.0) coutput << " Kerker damping = " << control.kerker_g0() << std::endl; coutput << std::endl; if (control.fractional()) { diff --git a/Nwpw/pspw/minimizer/pspw_geovib.cpp b/Nwpw/pspw/minimizer/pspw_geovib.cpp index 777d9e6d..86a5d7b9 100644 --- a/Nwpw/pspw/minimizer/pspw_geovib.cpp +++ b/Nwpw/pspw/minimizer/pspw_geovib.cpp @@ -389,12 +389,12 @@ int pspw_geovib(MPI_Comm comm_world0, std::string &rtdbstring, std::ostream &cou if (control.scf_algorithm()==4) coutput << " SCF algorithm = Thomas-Fermi mixing\n"; if (control.minimizer()==5) coutput << " SCF mixing type = potential\n"; if (control.minimizer()==8) coutput << " SCF mixing type = density\n"; + if (control.scf_extra_rotate()) coutput << " SCF extra rotate\n"; if (control.scf_algorithm()==4) coutput << " SCF mixing parameters: alpha=" << control.scf_alpha() << " beta=" << control.scf_beta() << std::endl; else coutput << " SCF mixing parameter: alpha= " << control.scf_alpha() << std::endl; - coutput << " Kerker damping = " << control.kerker_g0() << std::endl; - if (control.scf_extra_rotate()) coutput << " SCF extra rotate\n"; + if (control.kerker_g0()>0.0) coutput << " Kerker damping = " << control.kerker_g0() << std::endl; coutput << std::endl; if (control.fractional()) { diff --git a/Nwpw/pspw/minimizer/pspw_minimizer.cpp b/Nwpw/pspw/minimizer/pspw_minimizer.cpp index 3f339fc1..4ed8c312 100644 --- a/Nwpw/pspw/minimizer/pspw_minimizer.cpp +++ b/Nwpw/pspw/minimizer/pspw_minimizer.cpp @@ -356,12 +356,12 @@ int pspw_minimizer(MPI_Comm comm_world0, std::string &rtdbstring, std::ostream & if (control.scf_algorithm()==4) coutput << " SCF algorithm = Thomas-Fermi mixing\n"; if (control.minimizer()==5) coutput << " SCF mixing type = potential\n"; if (control.minimizer()==8) coutput << " SCF mixing type = density\n"; + if (control.scf_extra_rotate()) coutput << " SCF extra rotate\n"; if (control.scf_algorithm()==4) coutput << " SCF mixing parameters: alpha=" << control.scf_alpha() << " beta=" << control.scf_beta() << std::endl; else coutput << " SCF mixing parameter: alpha= " << control.scf_alpha() << std::endl; - coutput << " Kerker damping = " << control.kerker_g0() << std::endl; - if (control.scf_extra_rotate()) coutput << " SCF extra rotate\n"; + if (control.kerker_g0()>0.0) coutput << " Kerker damping = " << control.kerker_g0() << std::endl; coutput << std::endl; if (control.fractional())