Skip to content

Commit

Permalink
byb updates...EJB
Browse files Browse the repository at this point in the history
  • Loading branch information
ebylaska committed Nov 21, 2024
1 parent 92db111 commit d3d14a0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Nwpw/nwpwlib/Control/Control2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 10 additions & 9 deletions Nwpw/nwpwlib/parse/parse_pwdft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions Nwpw/pspw/minimizer/pspw_bomd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
4 changes: 2 additions & 2 deletions Nwpw/pspw/minimizer/pspw_geovib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
4 changes: 2 additions & 2 deletions Nwpw/pspw/minimizer/pspw_minimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit d3d14a0

Please sign in to comment.