Permalink
Browse files

Merge pull request #1322 from robertodr/modernize-use-bool-literals

clang-tidy apply modernize-use-bool-literals fixes
  • Loading branch information...
dgasmith committed Oct 31, 2018
2 parents 20563da + 6c322d0 commit ca51fe6a009c3c0b175866cc36231fd94a4b5a14
Showing with 89 additions and 89 deletions.
  1. +1 −1 psi4/src/psi4/dcft/dcft_scf_RHF.cc
  2. +3 −3 psi4/src/psi4/dcft/dcft_scf_UHF.cc
  3. +2 −2 psi4/src/psi4/dcft/dcft_sort_mo_tpdm.cc
  4. +1 −1 psi4/src/psi4/detci/mitrush_iter.cc
  5. +1 −1 psi4/src/psi4/fnocc/frozen_natural_orbitals.cc
  6. +2 −2 psi4/src/psi4/libfock/DiskJK.cc
  7. +1 −1 psi4/src/psi4/libmints/basisset.cc
  8. +2 −2 psi4/src/psi4/libmints/petitelist.cc
  9. +1 −1 psi4/src/psi4/libqt/pople.cc
  10. +2 −2 psi4/src/psi4/libsapt_solver/sapt.cc
  11. +1 −1 psi4/src/psi4/libtrans/integraltransform_functors.h
  12. +1 −1 psi4/src/psi4/libtrans/integraltransform_moinfo.cc
  13. +1 −1 psi4/src/psi4/libtrans/integraltransform_oei.cc
  14. +4 −4 psi4/src/psi4/libtrans/integraltransform_sort_mo_tpdm.cc
  15. +3 −3 psi4/src/psi4/libtrans/integraltransform_tei_2nd_half.cc
  16. +2 −2 psi4/src/psi4/mcscf/scf_read_so_tei.cc
  17. +1 −1 psi4/src/psi4/occ/trans_ints_rhf.cc
  18. +1 −1 psi4/src/psi4/occ/trans_ints_rmp2.cc
  19. +1 −1 psi4/src/psi4/occ/trans_ints_uhf.cc
  20. +1 −1 psi4/src/psi4/occ/trans_ints_ump2.cc
  21. +2 −2 psi4/src/psi4/optking/IRC_data.h
  22. +3 −3 psi4/src/psi4/optking/frag_disp.cc
  23. +1 −1 psi4/src/psi4/optking/interfrag_orient.cc
  24. +3 −3 psi4/src/psi4/optking/lindh_guess.cc
  25. +2 −2 psi4/src/psi4/optking/linear_algebra.cc
  26. +26 −26 psi4/src/psi4/optking/molecule.cc
  27. +14 −14 psi4/src/psi4/optking/molecule_irc_step.cc
  28. +2 −2 psi4/src/psi4/optking/molecule_nr_step.cc
  29. +2 −2 psi4/src/psi4/optking/molecule_prfo_step.cc
  30. +2 −2 psi4/src/psi4/optking/opt_data.cc
@@ -411,7 +411,7 @@ void DCFTSolver::process_so_ints_RHF() {
} /* end loop through current buffer */
if (!lastBuffer) iwl->fetch();
} while (!lastBuffer);
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
if (buildTensors) {
if (print_ > 1) {
@@ -891,7 +891,7 @@ void DCFTSolver::process_so_ints() {
} /* end loop through current buffer */
if (!lastBuffer) iwl->fetch();
} while (!lastBuffer);
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
if (buildTensors) {
if (print_ > 1) {
@@ -1289,7 +1289,7 @@ void DCFTSolver::build_AO_tensors() {
} /* end loop through current buffer */
if (!lastBuffer) iwl->fetch();
} while (!lastBuffer);
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
if (print_ > 1) {
outfile->Printf("Processed %d SO integrals each for AA, BB, and AB\n", counter);
@@ -1715,7 +1715,7 @@ void DCFTSolver::build_G() {
} /* end loop through current buffer */
if (!lastBuffer) iwl->fetch();
} while (!lastBuffer);
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
// Build the Fock matrices from the H and G matrices
@@ -161,7 +161,7 @@ void DCFTSolver::presort_mo_tpdm_AB() {
dpdFiller(p, q, r, s, value);
} /* end loop through current buffer */
} while (!lastbuf); /* end loop over reading buffers */
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
for (int h = 0; h < nirrep_; ++h) {
@@ -315,7 +315,7 @@ void DCFTSolver::presort_mo_tpdm_AA() {
} /* end loop through current buffer */
} while (!lastbuf); /* end loop over reading buffers */
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
for (int h = 0; h < nirrep_; ++h) {
@@ -319,7 +319,7 @@ void CIWavefunction::mitrush_iter(CIvect &Hd, struct stringwr **alplist, struct
last = 0;
}
while (1) {
while (true) {
Cvec.buf_lock(buffer1);
Sigma.buf_lock(buffer2);
Cvec.read(curr, 0);
@@ -699,7 +699,7 @@ void DFFrozenNO::FourIndexIntegrals() {
}
}
iwl->flush(1);
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
free(Qmo);
@@ -464,7 +464,7 @@ void DiskJK::compute_JK()
if (K_[N]->symmetry()) K_[N]->transpose_this();
}
}
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
if(do_wK_){
@@ -590,7 +590,7 @@ void DiskJK::compute_JK()
for (size_t N = 0; N < wK_.size(); N++) {
if (wK_[N]->symmetry()) wK_[N]->transpose_this();
}
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
}
}
@@ -120,7 +120,7 @@ BasisSet::BasisSet() {
shell_center_[0] = 0;
center_to_nshell_[0] = 1;
center_to_shell_[0] = 0;
puream_ = 0;
puream_ = false;
max_am_ = 0;
max_nprimitive_ = 1;
xyz_[0] = 0.0;
@@ -442,15 +442,15 @@ void PetiteList::init(double tol) {
group_ = ct.bits();
// initialize private members
c1_ = 0;
c1_ = false;
ng_ = ct.order();
natom_ = mol.natom();
nshell_ = gbs.nshell(); // full number of shells
nirrep_ = ct.nirrep();
// if point group is C1, then zero everything
if (ng_ == 1) {
c1_ = 1;
c1_ = true;
nblocks_ = 1;
p1_ = nullptr;
@@ -254,7 +254,7 @@ int pople(double **A, double *x, int dimen, int /*num_vecs*/, double tolerance,
for (I = 0; I < dimen; I++) Bmat[L + 1][I] /= norm;
/* check orthogonality of subspace */
if (0) {
if (false) {
for (i = 0; i <= L + 1; i++) {
for (j = 0; j <= i; j++) {
// dot_arr(Bmat[i], Bmat[j], dimen, &tval);
@@ -105,9 +105,9 @@ void SAPT::initialize(SharedWavefunction MonomerA, SharedWavefunction MonomerB)
// Compare pointers
if (ribasis_ == elstbasis_) {
elst_basis_ = 0;
elst_basis_ = false;
} else {
elst_basis_ = 1;
elst_basis_ = true;
}
zero_ = std::shared_ptr<BasisSet>(BasisSet::zero_ao_basis_set());
@@ -569,7 +569,7 @@ void iwl_integrals(IWL *iwl, DPDFunctor &dpd, FockFunctor &fock) {
} /* end loop through current buffer */
if (!lastBuffer) iwl->fetch();
} while (!lastBuffer);
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
}
} // namespace psi
@@ -46,7 +46,7 @@ void IntegralTransform::common_initialize() {
abIntName_ = "";
bbIntName_ = "";
keepHtInts_ = 0;
keepHtInts_ = false;
nTriSo_ = nso_ * (nso_ + 1) / 2;
nTriMo_ = nmo_ * (nmo_ + 1) / 2;
@@ -324,7 +324,7 @@ void IntegralTransform::generate_oei() {
aFzcOp, bFzcOp, aD, bD, aFock, bFock);
} /* end loop through current buffer */
} /* end loop over reading buffers */
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
double *moInts = init_array(nTriMo_);
@@ -163,7 +163,7 @@ void IntegralTransform::presort_mo_tpdm_restricted() {
dpdFiller(p, q, r, s, value);
} /* end loop through current buffer */
} while (!lastbuf); /* end loop over reading buffers */
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
for (int h = 0; h < nirreps_; ++h) {
@@ -313,7 +313,7 @@ void IntegralTransform::presort_mo_tpdm_unrestricted() {
aaDpdFiller(p, q, r, s, value);
} /* end loop through current buffer */
} while (!lastbuf); /* end loop over reading buffers */
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
for (int h = 0; h < nirreps_; ++h) {
@@ -361,7 +361,7 @@ void IntegralTransform::presort_mo_tpdm_unrestricted() {
abDpdFiller(p, q, r, s, value);
} /* end loop through current buffer */
} while (!lastbuf); /* end loop over reading buffers */
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
for (int h = 0; h < nirreps_; ++h) {
@@ -407,7 +407,7 @@ void IntegralTransform::presort_mo_tpdm_unrestricted() {
bbDpdFiller(p, q, r, s, value);
} /* end loop through current buffer */
} while (!lastbuf); /* end loop over reading buffers */
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
delete iwl;
for (int h = 0; h < nirreps_; ++h) {
@@ -208,7 +208,7 @@ void IntegralTransform::transform_tei_second_half(const std::shared_ptr<MOSpace>
if (useIWL_) {
iwl->flush(1);
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
// This closes the file too
delete iwl;
}
@@ -322,7 +322,7 @@ void IntegralTransform::transform_tei_second_half(const std::shared_ptr<MOSpace>
if (useIWL_) {
iwl->flush(1);
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
// This closes the file too
delete iwl;
}
@@ -443,7 +443,7 @@ void IntegralTransform::transform_tei_second_half(const std::shared_ptr<MOSpace>
if (useIWL_) {
iwl->flush(1);
iwl->set_keep_flag(1);
iwl->set_keep_flag(true);
// This closes the file too
delete iwl;
}
@@ -137,7 +137,7 @@ void SCF::read_so_tei_form_PK() {
int ilsti, nbuf, fi, index;
IWL ERIIN(psio_.get(), PSIF_SO_TEI, 0.0, 1, 1);
ERIIN.set_keep_flag(1);
ERIIN.set_keep_flag(true);
do {
ilsti = ERIIN.last_buffer();
nbuf = ERIIN.buffer_count();
@@ -215,7 +215,7 @@ void SCF::read_so_tei_form_PK_and_K() {
int ilsti, nbuf, fi, index;
IWL ERIIN(psio_.get(), PSIF_SO_TEI, 0.0, 1, 1);
ERIIN.set_keep_flag(1);
ERIIN.set_keep_flag(true);
do {
ilsti = ERIIN.last_buffer();
@@ -48,7 +48,7 @@ void OCCWave::trans_ints_rhf()
/********************************************************************************************/
ints->update_orbitals();
ints->set_print(print_ - 2 >= 0 ? print_ - 2 : 0);
ints->set_keep_dpd_so_ints(1);
ints->set_keep_dpd_so_ints(true);
// Trans (OO|OO)
timer_on("Trans (OO|OO)");
@@ -45,7 +45,7 @@ void OCCWave::trans_ints_rmp2()
/********************************************************************************************/
ints->update_orbitals();
ints->set_print(print_ - 2 >= 0 ? print_ - 2 : 0);
ints->set_keep_dpd_so_ints(1);
ints->set_keep_dpd_so_ints(true);
// Trans (OV|OV)
timer_on("Trans (OV|OV)");
@@ -46,7 +46,7 @@ void OCCWave::trans_ints_uhf()
/********************************************************************************************/
ints->update_orbitals();
ints->set_print(print_ - 2 >= 0 ? print_ - 2 : 0);
ints->set_keep_dpd_so_ints(1);
ints->set_keep_dpd_so_ints(true);
// Trans (OO|OO)
timer_on("Trans (OO|OO)");
@@ -45,7 +45,7 @@ void OCCWave::trans_ints_ump2()
/********************************************************************************************/
ints->update_orbitals();
ints->set_print(print_ - 2 >= 0 ? print_ - 2 : 0);
ints->set_keep_dpd_so_ints(1);
ints->set_keep_dpd_so_ints(true);
// Trans (OV|OV)
timer_on("Trans (OV|OV)");
@@ -112,8 +112,8 @@ class IRC_DATA {
IRC_DATA() {
sphere_step = 0;
go = 1;
in_min_range = 0;
go = true;
in_min_range = false;
step_dist = 0;
arc_dist = 0;
line_dist = 0;
@@ -285,12 +285,12 @@ bool FRAG::displace_util(double *dq, bool focus_on_constraints) {
// dx = Bt (B Bt)^-1 dq
// dx = Bt G^-1 dq, where G = B B^t.
compute_B(B,0,0);
opt_matrix_mult(B, 0, B, 1, G, 0, Nints, Ncarts, Nints, 0);
opt_matrix_mult(B, false, B, true, G, false, Nints, Ncarts, Nints, false);
// u B^t (G_inv dq) = dx
G_inv = symm_matrix_inv(G, Nints, true);
opt_matrix_mult(G_inv, 0, &dq, 1, &tmp_v_Nints, 1, Nints, Nints, 1, 0);
opt_matrix_mult(B, 1, &tmp_v_Nints, 1, &dx, 1, Ncarts, Nints, 1, 0);
opt_matrix_mult(G_inv, false, &dq, true, &tmp_v_Nints, true, Nints, Nints, 1, false);
opt_matrix_mult(B, true, &tmp_v_Nints, true, &dx, true, Ncarts, Nints, 1, false);
free_matrix(G_inv);
for (i=0; i<Ncarts; ++i)
@@ -364,7 +364,7 @@ void rotate_vecs(double *w, double phi, double **v, int num_v) {
R[2][2] = cos(phi) + wz*wz*cp;
v_new = init_matrix(num_v,3);
opt_matrix_mult(R, 0, v, 1, v_new, 1, 3, 3, num_v, 0);
opt_matrix_mult(R, false, v, true, v_new, true, 3, 3, num_v, false);
for (int i=0; i<num_v; ++i)
for (int j=0; j<3; ++j)
@@ -263,7 +263,7 @@ in this set of internals. */
//oprint_array_out(g_x,3*natom);
double *temp_arr = init_array(Nintco);
opt_matrix_mult(B, 0, &g_x, 1, &temp_arr, 1, Nintco, 3*natom, 1, 0);
opt_matrix_mult(B, false, &g_x, true, &temp_arr, true, Nintco, 3*natom, 1, false);
free_array(g_x);
double **G = init_matrix(Nintco, Nintco);
@@ -272,11 +272,11 @@ in this set of internals. */
for (int j=0; j<Nintco; ++j)
G[i][j] += B[i][k] * B[j][k];
free_matrix(B);
double **G_inv = symm_matrix_inv(G, Nintco, 1);
double **G_inv = symm_matrix_inv(G, Nintco, true);
free_matrix(G);
double *g_q = init_array(Nintco);
opt_matrix_mult(G_inv, 0, &temp_arr, 1, &g_q, 1, Nintco, Nintco, 1, 0);
opt_matrix_mult(G_inv, false, &temp_arr, true, &g_q, true, Nintco, Nintco, 1, false);
free_matrix(G_inv);
free_array(temp_arr);
// Done computing g_q
@@ -253,8 +253,8 @@ double ** symm_matrix_inv(double **A, int dim, bool redundant) {
double ** A_temp = init_matrix(dim, dim);
// A^-1 = P^t D^-1 P
opt_matrix_mult(A_inv, 0, A_evects, 0, A_temp, 0, dim, dim, dim,0);
opt_matrix_mult(A_evects, 1, A_temp, 0, A_inv, 0, dim, dim, dim, 0);
opt_matrix_mult(A_inv, false, A_evects, false, A_temp, false, dim, dim, dim,false);
opt_matrix_mult(A_evects, true, A_temp, false, A_inv, false, dim, dim, dim, false);
free_matrix(A_temp);
free_array(evals);
Oops, something went wrong.

0 comments on commit ca51fe6

Please sign in to comment.