Permalink
Browse files

For SOMO, draw only alpha orbitals. Handle higher spins.

  • Loading branch information...
PeterKraus committed Sep 6, 2018
1 parent 58cf72e commit 3ec890fdcfccaa93b4251bcec4cd9cae13c82324
Showing with 6 additions and 36 deletions.
  1. +6 −36 psi4/src/psi4/libcubeprop/cubeprop.cc
@@ -171,58 +171,28 @@ void CubeProperties::raw_compute_properties() {
indsa0.push_back(nalpha_);
labelsa.push_back(std::to_string(std::get<1>(info_a_[nalpha_]) + 1) + "-" +
ct.gamma(std::get<2>(info_a_[nalpha_])).symbol() + "_LUMO");
} else if (nalpha_ - nbeta_ == 1) {
} else {
int orb_index = nalpha_;
indsa0.push_back(orb_index);
labelsa.push_back(std::to_string(std::get<1>(info_a_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_a_[orb_index])).symbol() + "_LUMO");
orb_index = nbeta_ + 1;
indsb0.push_back(orb_index);
labelsb.push_back(std::to_string(std::get<1>(info_b_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_b_[orb_index])).symbol() + "_LUMO");
orb_index = nalpha_ - 1;
indsa0.push_back(orb_index);
labelsa.push_back(std::to_string(std::get<1>(info_a_[orb_index]) + 1) + "-" +
for (int i = 1; i <= nalpha_ - nbeta_; i++) {
orb_index = nalpha_ - i;
indsa0.push_back(orb_index);
labelsa.push_back(std::to_string(std::get<1>(info_a_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_a_[orb_index])).symbol() + "_SOMO");
orb_index = nbeta_;
indsb0.push_back(orb_index);
labelsb.push_back(std::to_string(std::get<1>(info_b_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_b_[orb_index])).symbol() + "_SOMO");
orb_index = nalpha_ - 2;
indsa0.push_back(orb_index);
labelsa.push_back(std::to_string(std::get<1>(info_a_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_a_[orb_index])).symbol() + "_DOMO");
}
orb_index = nbeta_ - 1;
indsb0.push_back(orb_index);
labelsb.push_back(std::to_string(std::get<1>(info_b_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_b_[orb_index])).symbol() + "_DOMO");
} else if (nalpha_ - nbeta_ == 2) {
int orb_index = nalpha_;
indsa0.push_back(orb_index);
labelsa.push_back(std::to_string(std::get<1>(info_a_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_a_[orb_index])).symbol() + "_LUMO");
orb_index = nbeta_ + 2;
indsb0.push_back(orb_index);
labelsb.push_back(std::to_string(std::get<1>(info_b_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_b_[orb_index])).symbol() + "_LUMO");
orb_index = nalpha_ - 1;
indsa0.push_back(orb_index);
labelsa.push_back(std::to_string(std::get<1>(info_a_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_a_[orb_index])).symbol() + "_SOMO");
orb_index = nalpha_ - 2;
indsa0.push_back(orb_index);
labelsa.push_back(std::to_string(std::get<1>(info_a_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_a_[orb_index])).symbol() + "_SOMO");
orb_index = nalpha_ - 3;
indsa0.push_back(orb_index);
labelsa.push_back(std::to_string(std::get<1>(info_a_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_a_[orb_index])).symbol() + "_DOMO");
orb_index = nbeta_ - 1;
indsb0.push_back(orb_index);
labelsb.push_back(std::to_string(std::get<1>(info_b_[orb_index]) + 1) + "-" +
ct.gamma(std::get<2>(info_b_[orb_index])).symbol() + "_DOMO");
} else {
throw PSIEXCEPTION(task + "is not implemented for high spin systems");
}
if (indsa0.size()) compute_orbitals(Ca_, indsa0, labelsa, "Psi_a");
if (indsb0.size()) compute_orbitals(Cb_, indsb0, labelsb, "Psi_b");

0 comments on commit 3ec890f

Please sign in to comment.