Permalink
Browse files

Merge pull request #1194 from andysim/fmtlibscfsolver

fmt: clang-format libscf_solver
  • Loading branch information...
dgasmith committed Sep 6, 2018
2 parents feb8d80 + 3043c12 commit 0f90ac26eff463f5debb37c77129f203def2546e
@@ -403,5 +403,5 @@ std::shared_ptr<CUHF> CUHF::c1_deep_copy(std::shared_ptr<BasisSet> basis) {
return hf_wfn;
}
}
}
} // namespace scf
} // namespace psi
@@ -108,7 +108,7 @@ class CUHF : public HF {
std::shared_ptr<CUHF> c1_deep_copy(std::shared_ptr<BasisSet> basis);
};
}
}
} // namespace scf
} // namespace psi
#endif
@@ -290,5 +290,5 @@ void HF::compute_spin_contamination() {
}
outfile->Printf("\n");
}
}
}
} // namespace scf
} // namespace psi
@@ -115,8 +115,6 @@ void HF::common_init() {
energies_["Total Energy"] = 0.0;
// Read in DOCC and SOCC from memory
int nirreps = factory_->nirrep();
input_docc_ = false;
@@ -356,7 +354,8 @@ void HF::integrals() {
// Build the JK from options, symmetric type
// try {
size_t effective_memory = (size_t)(options_.get_double("SCF_MEM_SAFETY_FACTOR")*(Process::environment.get_memory() / 8L));
size_t effective_memory =
(size_t)(options_.get_double("SCF_MEM_SAFETY_FACTOR") * (Process::environment.get_memory() / 8L));
if (options_.get_str("SCF_TYPE") == "GTFOCK") {
#ifdef HAVE_JK_FACTORY
// DGAS is adding to the ghetto, this Python -> C++ -> C -> C++ -> back to C is FUBAR
@@ -371,7 +370,8 @@ void HF::integrals() {
throw PSIEXCEPTION("GTFock was not compiled in this version.\n");
#endif
} else {
jk_ = JK::build_JK(get_basisset("ORBITAL"), get_basisset("DF_BASIS_SCF"), options_, functional_->is_x_lrc(), effective_memory);
jk_ = JK::build_JK(get_basisset("ORBITAL"), get_basisset("DF_BASIS_SCF"), options_, functional_->is_x_lrc(),
effective_memory);
}
// Tell the JK to print
@@ -1060,7 +1060,8 @@ void HF::guess() {
}
if ((guess_Ca_->nirrep() != nirrep_) || (guess_Cb_->nirrep() != nirrep_)) {
throw PSIEXCEPTION("Number of guess of the input orbitals do not match number of irreps of the wavefunction.");
throw PSIEXCEPTION(
"Number of guess of the input orbitals do not match number of irreps of the wavefunction.");
}
if ((guess_Ca_->rowspi() != nsopi_) || (guess_Cb_->rowspi() != nsopi_)) {
throw PSIEXCEPTION("Nso of the guess orbitals do not match Nso of the wavefunction.");
@@ -1356,5 +1357,5 @@ bool HF::stability_analysis() {
throw PSIEXCEPTION("Stability analysis hasn't been implemented yet for this wfn type.");
return false;
}
}
}
} // namespace scf
} // namespace psi
@@ -410,7 +410,7 @@ class HF : public Wavefunction {
void clear_external_potentials() { external_potentials_.clear(); }
void push_back_external_potential(const SharedMatrix& V) { external_potentials_.push_back(V); }
};
}
} // Namespaces
} // namespace scf
} // namespace psi
#endif
@@ -759,5 +759,5 @@ void HF::MOM() {
}
Cb_old_->copy(Cb_);
}
}
}
} // namespace scf
} // namespace psi
@@ -829,8 +829,9 @@ bool RHF::stability_analysis() {
std::vector<std::shared_ptr<MOSpace> > spaces;
spaces.push_back(MOSpace::occ);
spaces.push_back(MOSpace::vir);
IntegralTransform ints(shared_from_this(), spaces, IntegralTransform::TransformationType::Restricted, IntegralTransform::OutputType::DPDOnly,
IntegralTransform::MOOrdering::QTOrder, IntegralTransform::FrozenOrbitals::None);
IntegralTransform ints(shared_from_this(), spaces, IntegralTransform::TransformationType::Restricted,
IntegralTransform::OutputType::DPDOnly, IntegralTransform::MOOrdering::QTOrder,
IntegralTransform::FrozenOrbitals::None);
ints.set_keep_dpd_so_ints(true);
ints.transform_tei(MOSpace::occ, MOSpace::vir, MOSpace::occ, MOSpace::vir);
ints.transform_tei(MOSpace::occ, MOSpace::occ, MOSpace::vir, MOSpace::vir);
@@ -962,5 +963,5 @@ std::shared_ptr<RHF> RHF::c1_deep_copy(std::shared_ptr<BasisSet> basis) {
return hf_wfn;
}
}
}
} // namespace scf
} // namespace psi
@@ -87,7 +87,7 @@ class RHF : public HF {
std::shared_ptr<RHF> c1_deep_copy(std::shared_ptr<BasisSet> basis);
};
}
}
} // namespace scf
} // namespace psi
#endif
@@ -592,7 +592,7 @@ void ROHF::Hx(SharedMatrix x, SharedMatrix ret) {
Cr.clear();
// If scf_type is DF we can do some extra JK voodo
if ((options_.get_str("SCF_TYPE").find("DF") != std::string::npos) || (options_.get_str("SCF_TYPE") == "CD")){
if ((options_.get_str("SCF_TYPE").find("DF") != std::string::npos) || (options_.get_str("SCF_TYPE") == "CD")) {
SharedMatrix Cdocc = Ca_->get_block({dim_zero, nsopi_}, {dim_zero, doccpi_});
Cdocc->set_name("Cdocc");
@@ -980,8 +980,8 @@ void ROHF::form_G() {
}
bool ROHF::stability_analysis() {
if(functional_->needs_xc()) {
throw PSIEXCEPTION("Stability analysis not yet supported for XC functionals.");
if (functional_->needs_xc()) {
throw PSIEXCEPTION("Stability analysis not yet supported for XC functionals.");
}
if (scf_type_ == "DF" || scf_type_ == "CD") {
throw PSIEXCEPTION("Stability analysis has not been implemented for density fitted wavefunctions yet.");
@@ -1053,8 +1053,9 @@ bool ROHF::stability_analysis() {
spaces.push_back(MOSpace::occ);
spaces.push_back(MOSpace::vir);
#define ID(x) ints.DPD_ID(x)
IntegralTransform ints(shared_from_this(), spaces, IntegralTransform::TransformationType::Restricted, IntegralTransform::OutputType::DPDOnly,
IntegralTransform::MOOrdering::QTOrder, IntegralTransform::FrozenOrbitals::None);
IntegralTransform ints(shared_from_this(), spaces, IntegralTransform::TransformationType::Restricted,
IntegralTransform::OutputType::DPDOnly, IntegralTransform::MOOrdering::QTOrder,
IntegralTransform::FrozenOrbitals::None);
ints.set_keep_dpd_so_ints(true);
ints.transform_tei(MOSpace::occ, MOSpace::vir, MOSpace::occ, MOSpace::vir);
ints.transform_tei(MOSpace::occ, MOSpace::occ, MOSpace::vir, MOSpace::vir);
@@ -1321,5 +1322,5 @@ std::shared_ptr<ROHF> ROHF::c1_deep_copy(std::shared_ptr<BasisSet> basis) {
return hf_wfn;
}
}
}
} // namespace scf
} // namespace psi
@@ -92,7 +92,7 @@ class ROHF : public HF {
std::shared_ptr<ROHF> c1_deep_copy(std::shared_ptr<BasisSet> basis);
};
}
}
} // namespace scf
} // namespace psi
#endif
@@ -667,5 +667,5 @@ void HF::compute_SAD_guess() {
energies_["Total Energy"] = 0.0; // This is the -1th iteration
}
}
}
} // namespace scf
} // namespace psi
@@ -85,7 +85,7 @@ class SADGuess {
void set_print(int print) { print_ = print; }
void set_debug(int debug) { debug_ = debug; }
};
}
}
} // namespace scf
} // namespace psi
#endif
@@ -284,11 +284,12 @@ void UStab::preiterations() {
outfile->Printf(" Reusing JK object from SCF.\n\n");
} else {
size_t effective_memory = (size_t)(0.125 * options_.get_double("CPHF_MEM_SAFETY_FACTOR") * memory_);
jk_ = JK::build_JK(basis_, reference_wavefunction_->get_basisset("DF_BASIS_SCF"), options_, false, effective_memory);
jk_ = JK::build_JK(basis_, reference_wavefunction_->get_basisset("DF_BASIS_SCF"), options_, false,
effective_memory);
jk_->set_memory(effective_memory);
jk_->initialize();
}
}
}
}
} // End namespaces
} // namespace scf
} // namespace psi
@@ -1042,5 +1042,5 @@ std::shared_ptr<UHF> UHF::c1_deep_copy(std::shared_ptr<BasisSet> basis) {
return hf_wfn;
}
}
}
} // namespace scf
} // namespace psi
@@ -96,7 +96,7 @@ class UHF : public HF {
std::shared_ptr<UHF> c1_deep_copy(std::shared_ptr<BasisSet> basis);
};
}
}
} // namespace scf
} // namespace psi
#endif

0 comments on commit 0f90ac2

Please sign in to comment.