Skip to content

Commit

Permalink
bug in disjoin and adjoin when spin paired
Browse files Browse the repository at this point in the history
  • Loading branch information
gitpeterwind committed Aug 24, 2023
1 parent dd656a5 commit f607fe1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/initial_guess/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ bool initial_guess::core::setup(OrbitalVector &Phi, double prec, const Nuclei &n
initial_guess::core::rotate_orbitals(Phi, prec, U, Psi);
initial_guess::core::rotate_orbitals(Phi_a, prec, U, Psi);
initial_guess::core::rotate_orbitals(Phi_b, prec, U, Psi);
Phi = orbital::adjoin(Phi_a, Phi_b);
Phi = orbital::adjoin(Phi, Phi_a);
Phi = orbital::adjoin(Phi, Phi_b);

V.clear();
p.clear();
Expand Down
3 changes: 2 additions & 1 deletion src/initial_guess/cube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ bool initial_guess::cube::setup(OrbitalVector &Phi, double prec, const std::stri
success &= initial_guess::cube::project_mo(Phi_b, prec, file_b);

// Collect orbitals into one vector
Phi = orbital::adjoin(Phi_a, Phi_b);
Phi = orbital::adjoin(Phi, Phi_a);
Phi = orbital::adjoin(Phi, Phi_b);

return success;
}
Expand Down
3 changes: 2 additions & 1 deletion src/initial_guess/gto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ bool initial_guess::gto::setup(OrbitalVector &Phi, double prec, double screen, c
initial_guess::gto::project_mo(Phi_b, prec, bas_file, mob_file, screen);

// Collect orbitals into one vector
Phi = orbital::adjoin(Phi_a, Phi_b);
Phi = orbital::adjoin(Phi, Phi_a);
Phi = orbital::adjoin(Phi, Phi_b);

return true;
}
Expand Down
3 changes: 2 additions & 1 deletion src/initial_guess/mw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ bool initial_guess::mw::setup(OrbitalVector &Phi, double prec, const std::string
success &= initial_guess::mw::project_mo(Phi_b, prec, file_b);

// Collect orbitals into one vector
Phi = orbital::adjoin(Phi_a, Phi_b);
Phi = orbital::adjoin(Phi, Phi_a);
Phi = orbital::adjoin(Phi, Phi_b);

return success;
}
Expand Down
6 changes: 4 additions & 2 deletions src/initial_guess/sad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ bool initial_guess::sad::setup(OrbitalVector &Phi, double prec, double screen, c
initial_guess::core::rotate_orbitals(Phi, prec, U, Psi);
initial_guess::core::rotate_orbitals(Phi_a, prec, U, Psi);
initial_guess::core::rotate_orbitals(Phi_b, prec, U, Psi);
Phi = orbital::adjoin(Phi_a, Phi_b);
Phi = orbital::adjoin(Phi, Phi_a);
Phi = orbital::adjoin(Phi, Phi_b);
p.clear();
V.clear();

Expand Down Expand Up @@ -207,7 +208,8 @@ bool initial_guess::sad::setup(OrbitalVector &Phi, double prec, double screen, c
initial_guess::core::rotate_orbitals(Phi, prec, U, Psi);
initial_guess::core::rotate_orbitals(Phi_a, prec, U, Psi);
initial_guess::core::rotate_orbitals(Phi_b, prec, U, Psi);
Phi = orbital::adjoin(Phi_a, Phi_b);
Phi = orbital::adjoin(Phi, Phi_a);
Phi = orbital::adjoin(Phi, Phi_b);
p.clear();
V.clear();

Expand Down

0 comments on commit f607fe1

Please sign in to comment.