21#include <boost/format.hpp>
46 }
else if (
method_ ==
"loewdin") {
48 }
else if (
method_ ==
"CHELPG") {
52 if (options.
exists(
".constraints")) {
53 std::vector<tools::Property*> prop_region =
54 options.
Select(
".constraints.region");
57 std::string indices = prop->get(
"indices").as<std::string>();
60 reg.value() = prop->get(
"charge").as<
double>();
65 std::vector<tools::Property*> prop_pair =
66 options.
Select(
".constraints.pair");
68 std::vector<Index> pairvec = prop->as<std::vector<Index>>();
71 <<
" constrained to be equal." << flush;
77 if (options.
exists(
".svd")) {
87 Eigen::Vector3d classical_dip = seg.
CalcDipole();
90 <<
"El Dipole from fitted charges [e*bohr]:\n\t\t"
92 " dx = %1$+1.4f dy = %2$+1.4f dz = %3$+1.4f |d|^2 = %4$+1.4f") %
93 classical_dip.x() % classical_dip.y() % classical_dip.z() %
94 classical_dip.squaredNorm()
98 <<
"El Dipole from exact qm density [e*bohr]:\n\t\t"
100 " dx = %1$+1.4f dy = %2$+1.4f dz = %3$+1.4f |d|^2 = %4$+1.4f") %
101 qm_dip.x() % qm_dip.y() % qm_dip.z() % qm_dip.squaredNorm()
107 <<
" threads ===== " << flush;
Eigen::Vector3d CalcDipole() const
std::vector< std::pair< Index, Index > > pairconstraint_
std::vector< QMFragment< double > > regionconstraint_
void Initialize(tools::Property &options)
void PrintDipoles(const Orbitals &orbitals, const StaticSegment &seg) const
StaticSegment Extractingcharges(const Orbitals &orbitals) const
void setRegionConstraint(std::vector< QMFragment< double > > regionconstraint)
void setUseSVD(double conditionnumber)
StaticSegment Fit2Density(const Orbitals &orbitals, const QMState &state, std::string gridsize)
void setPairConstraint(std::vector< std::pair< Index, Index > > pairconstraint)
container for molecular orbitals
Eigen::Vector3d CalcElDipole(const QMState &state) const
StaticSegment CalcChargeperAtom(const Orbitals &orbitals, const QMState &state) const
Identifier for QMstates. Strings like S1 are converted into enum +zero indexed int.
#define XTP_LOG(level, log)
base class for all analysis tools