22#include <boost/filesystem.hpp>
23#include <boost/format.hpp>
48 const std::string key_xtpdft =
"xtpdft";
51 if (options.
exists(
".auxbasisset")) {
58 options.
get(key_xtpdft +
".fock_matrix_reset").
as<
Index>();
60 if (options.
exists(
".ecp")) {
66 grid_name_ = options.
get(key_xtpdft +
".integration_grid").
as<std::string>();
69 if (options.
exists(key_xtpdft +
".externaldensity")) {
72 options.
get(key_xtpdft +
".externaldensity.orbfile").
as<std::string>();
76 options.
get(key_xtpdft +
".externaldensity.state").
as<std::string>();
79 if (options.
exists(
".externalfield")) {
85 options.
get(key_xtpdft +
".convergence.energy").
as<
double>();
87 options.
get(key_xtpdft +
".convergence.error").
as<
double>();
89 options.
get(key_xtpdft +
".convergence.max_iterations").
as<
Index>();
92 options.
get(key_xtpdft +
".convergence.method").
as<std::string>();
93 if (method ==
"DIIS") {
95 }
else if (method ==
"mixing") {
103 options.
get(key_xtpdft +
".convergence.mixing").
as<
double>();
105 options.
get(key_xtpdft +
".convergence.levelshift").
as<
double>();
107 options.
get(key_xtpdft +
".convergence.levelshift_end").
as<
double>();
109 options.
get(key_xtpdft +
".convergence.DIIS_maxout").
as<
bool>();
111 options.
get(key_xtpdft +
".convergence.DIIS_length").
as<
Index>();
113 options.
get(key_xtpdft +
".convergence.DIIS_start").
as<
double>();
115 options.
get(key_xtpdft +
".convergence.ADIIS_start").
as<
double>();
117 if (options.
exists(key_xtpdft +
".dft_in_dft.activeatoms")) {
119 options.
get(key_xtpdft +
".dft_in_dft.activeatoms").
as<std::string>();
121 options.
get(key_xtpdft +
".dft_in_dft.threshold").
as<
double>();
123 options.
get(key_xtpdft +
".dft_in_dft.levelshift").
as<
double>();
125 options.
get(key_xtpdft +
".dft_in_dft.truncate_basis").
as<
bool>();
128 options.
get(key_xtpdft +
".dft_in_dft.truncation_threshold")
135 XTP_LOG(level, *
pLog_) <<
" Orbital energies: " << std::flush;
136 XTP_LOG(level, *
pLog_) <<
" index occupation energy(Hartree) " << std::flush;
137 for (
Index i = 0; i < MOEnergies.size(); i++) {
142 XTP_LOG(level, *
pLog_) << (boost::format(
" %1$5d %2$1d %3$+1.10f") %
143 i % occupancy % MOEnergies(i))
154 <<
TimeStamp() <<
" Electric Dipole is[e*bohr]:\n\t\t dx=" << result[0]
155 <<
"\n\t\t dy=" << result[1] <<
"\n\t\t dz=" << result[2] << std::flush;
160 const Eigen::MatrixXd& MOCoeff,
const Eigen::MatrixXd& Dmat,
161 double error)
const {
175 double error)
const {
194 <<
TimeStamp() <<
" Filled DFT Vxc matrix " << std::flush;
199 std::array<Eigen::MatrixXd, 2> both =
220 <<
TimeStamp() <<
" Reading guess from orbitals object/file"
233 throw std::runtime_error(
"Initial guess method not known/implemented");
239 <<
TimeStamp() <<
" Guess Matrix gives N=" << std::setprecision(9)
244 <<
TimeStamp() <<
" STARTING SCF cycle" << std::flush;
246 <<
" ----------------------------------------------"
247 "----------------------------"
250 Eigen::MatrixXd J = Eigen::MatrixXd::Zero(Dmat.rows(), Dmat.cols());
253 K = Eigen::MatrixXd::Zero(Dmat.rows(), Dmat.cols());
256 double start_incremental_F_threshold = 1
e-4;
258 start_incremental_F_threshold = 0.0;
270 <<
TimeStamp() <<
" Filled DFT Vxc matrix " << std::flush;
273 double Eone = Dmat.cwiseProduct(H0.
matrix()).sum();
274 double Etwo = e_vxc.
energy();
282 double integral_error =
289 Etwo += 0.5 * Dmat.cwiseProduct(J).sum();
292 exx = 0.25 *
ScaHFX_ * Dmat.cwiseProduct(K).sum();
294 <<
TimeStamp() <<
" Filled F+K matrix " << std::flush;
298 <<
TimeStamp() <<
" Filled F matrix " << std::flush;
300 Etwo += 0.5 * Dmat.cwiseProduct(J).sum();
304 double totenergy = Eone + H0.
energy() + Etwo;
306 << std::setprecision(12) << Eone << std::flush;
308 << std::setprecision(12) << Etwo << std::flush;
310 <<
TimeStamp() << std::setprecision(12) <<
" Local Exc contribution "
311 << e_vxc.
energy() << std::flush;
315 <<
" Non local Ex contribution " << exx << std::flush;
318 <<
TimeStamp() <<
" Total Energy " << std::setprecision(12) << totenergy
334 <<
TimeStamp() <<
" Total Energy has converged to "
336 <<
"[Ha] after " << this_iter + 1
337 <<
" iterations. DIIS error is converged up to "
340 <<
TimeStamp() <<
" Final Single Point Energy "
341 << std::setprecision(12) << totenergy <<
" Ha" << std::flush;
343 <<
" Final Local Exc contribution "
344 << e_vxc.
energy() <<
" Ha" << std::flush;
347 <<
" Final Non Local Ex contribution "
348 << exx <<
" Ha" << std::flush;
358 <<
TimeStamp() <<
" DFT calculation has not converged after "
360 <<
" iterations. Use more iterations or another convergence "
361 "acceleration scheme."
375 <<
TimeStamp() <<
" Filled DFT Kinetic energy matrix ." << std::flush;
380 <<
TimeStamp() <<
" Filled DFT nuclear potential matrix." << std::flush;
382 Eigen::MatrixXd H0 = dftAOkinetic.
Matrix() + dftAOESP.
Matrix();
384 <<
TimeStamp() <<
" Constructed independent particle hamiltonian "
388 << std::setprecision(9) << E0 << std::flush;
395 <<
TimeStamp() <<
" Filled DFT ECP matrix" << std::flush;
400 <<
" External sites" << std::flush;
401 bool has_quadrupoles = std::any_of(
403 [](
const std::unique_ptr<StaticSite>& s) { return s->getRank() == 2; });
405 " Name Coordinates[a0] charge[e] dipole[e*a0] ";
406 if (has_quadrupoles) {
407 header +=
" quadrupole[e*a0^2]";
413 if (counter == limit) {
417 (boost::format(
" %1$s"
418 " %2$+1.4f %3$+1.4f %4$+1.4f"
420 site->getElement() % site->getPos()[0] % site->getPos()[1] %
421 site->getPos()[2] % site->getCharge())
423 const Eigen::Vector3d& dipole = site->getDipole();
424 output += (boost::format(
" %1$+1.4f %2$+1.4f %3$+1.4f") % dipole[0] %
425 dipole[1] % dipole[2])
427 if (site->getRank() > 1) {
428 Eigen::VectorXd quadrupole = site->Q().tail<5>();
430 (boost::format(
" %1$+1.4f %2$+1.4f %3$+1.4f %4$+1.4f %5$+1.4f") %
431 quadrupole[0] % quadrupole[1] % quadrupole[2] % quadrupole[3] %
438 if (counter == limit) {
441 <<
" sites not displayed)\n"
448 <<
TimeStamp() <<
" Nuclei-external site interaction energy "
449 << std::setprecision(9) << ext_multipoles.
energy() << std::flush;
450 E0 += ext_multipoles.
energy();
451 H0 += ext_multipoles.
matrix();
458 E0 += extdensity_result.
energy();
460 <<
TimeStamp() <<
" Nuclei-external density interaction energy "
461 << std::setprecision(9) << extdensity_result.
energy() << std::flush;
462 H0 += extdensity_result.
matrix();
468 <<
TimeStamp() <<
" Integrating external electric field with F[Hrt]="
479 <<
TimeStamp() <<
" Filled DFT Overlap matrix." << std::flush;
491 <<
TimeStamp() <<
" Inverted AUX Coulomb matrix, removed "
496 <<
" Setup invariant parts of Electron Repulsion integrals "
500 <<
TimeStamp() <<
" Calculating 4c diagonals. " << std::flush;
503 <<
TimeStamp() <<
" Calculated 4c diagonals. " << std::flush;
510 const QMAtom& uniqueAtom)
const {
522 dftbasis.
Fill(basisset, atom);
532 ecp.
Fill(ecps, atom);
539 if ((numofelectrons % 2) != 0) {
540 alpha_e = numofelectrons / 2 + numofelectrons % 2;
541 beta_e = numofelectrons / 2;
543 alpha_e = numofelectrons / 2;
555 dftAOoverlap.
Fill(dftbasis);
556 dftAOkinetic.
Fill(dftbasis);
585 Eigen::MatrixXd H0 = dftAOkinetic.
Matrix() + dftAOESP.
Matrix();
592 Eigen::MatrixXd dftAOdmat_alpha = Convergence_alpha.
DensityMatrix(MOs_alpha);
594 return dftAOdmat_alpha;
597 Eigen::MatrixXd dftAOdmat_beta = Convergence_beta.
DensityMatrix(MOs_beta);
600 for (
Index this_iter = 0; this_iter < maxiter; this_iter++) {
602 Eigen::MatrixXd H_alpha = H0;
603 Eigen::MatrixXd H_beta = H_alpha;
605 double E_two_alpha = 0.0;
606 double E_two_beta = 0.0;
608 double integral_error = std::min(1
e-5 * 0.5 *
613 std::array<Eigen::MatrixXd, 2> both_alpha =
616 std::array<Eigen::MatrixXd, 2> both_beta =
618 Eigen::MatrixXd Hartree = both_alpha[0] + both_beta[0];
619 E_two_alpha += Hartree.cwiseProduct(dftAOdmat_alpha).sum();
620 E_two_beta += Hartree.cwiseProduct(dftAOdmat_beta).sum();
621 E_two_alpha += 0.5 * both_alpha[1].cwiseProduct(dftAOdmat_alpha).sum();
622 E_two_beta += 0.5 * both_beta[1].cwiseProduct(dftAOdmat_beta).sum();
623 H_alpha += Hartree +
ScaHFX_ * both_alpha[1];
624 H_beta += Hartree +
ScaHFX_ * both_beta[1];
628 dftAOdmat_alpha + dftAOdmat_beta, integral_error);
629 E_two_alpha += Hartree.cwiseProduct(dftAOdmat_alpha).sum();
630 E_two_beta += Hartree.cwiseProduct(dftAOdmat_beta).sum();
636 H_alpha += e_vxc_alpha.
matrix();
637 E_two_alpha += e_vxc_alpha.
energy();
640 H_beta += e_vxc_beta.
matrix();
641 E_two_beta += e_vxc_beta.
energy();
643 double E_one_alpha = dftAOdmat_alpha.cwiseProduct(H0).sum();
644 double E_one_beta = dftAOdmat_beta.cwiseProduct(H0).sum();
645 double E_alpha = E_one_alpha + E_two_alpha;
646 double E_beta = E_one_beta + E_two_beta;
647 double totenergy = E_alpha + E_beta;
650 Convergence_alpha.
Iterate(dftAOdmat_alpha, H_alpha, MOs_alpha, E_alpha);
653 Convergence_beta.
Iterate(dftAOdmat_beta, H_beta, MOs_beta, E_beta);
656 <<
TimeStamp() <<
" Iter " << this_iter <<
" of " << maxiter <<
" Etot "
657 << totenergy <<
" diise_a " << Convergence_alpha.
getDIIsError()
658 <<
" diise_b " << Convergence_beta.
getDIIsError() <<
"\n\t\t a_gap "
664 << dftAOoverlap.
Matrix().cwiseProduct(dftAOdmat_alpha).sum()
665 <<
" Nbeta=" << dftAOoverlap.
Matrix().cwiseProduct(dftAOdmat_beta).sum()
670 if (converged || this_iter == maxiter - 1) {
674 <<
TimeStamp() <<
" Converged after " << this_iter + 1
675 <<
" iterations" << std::flush;
678 <<
TimeStamp() <<
" Not converged after " << this_iter + 1
679 <<
" iterations. Unconverged density.\n\t\t\t"
680 <<
" DIIsError_alpha=" << Convergence_alpha.
getDIIsError()
681 <<
" DIIsError_beta=" << Convergence_beta.
getDIIsError()
687 Eigen::MatrixXd avgmatrix =
691 <<
" gives N=" << std::setprecision(9)
692 << avgmatrix.cwiseProduct(dftAOoverlap.
Matrix()).sum() <<
" electrons."
701 <<
TimeStamp() <<
" Scanning molecule of size " << mol.
size()
702 <<
" for unique elements" << std::flush;
704 for (
auto element : elements) {
709 <<
" unique elements found" << std::flush;
710 std::vector<Eigen::MatrixXd> uniqueatom_guesses;
711 for (
QMAtom& unique_atom : uniqueelements) {
713 <<
TimeStamp() <<
" Calculating atom density for "
714 << unique_atom.getElement() << std::flush;
716 uniqueatom_guesses.push_back(dmat_unrestricted);
719 Eigen::MatrixXd guess =
722 for (
const QMAtom& atom : mol) {
724 for (; index < uniqueelements.
size(); index++) {
725 if (atom.getElement() == uniqueelements[index].getElement()) {
729 Eigen::MatrixXd& dmat_unrestricted = uniqueatom_guesses[index];
730 guess.block(start, start, dmat_unrestricted.rows(),
731 dmat_unrestricted.cols()) = dmat_unrestricted;
732 start += dmat_unrestricted.rows();
743 throw std::runtime_error(
744 (boost::format(
"Basisset Name in guess orb file "
745 "and in dftengine option file differ %1% vs %2%") %
753 "Orbital file has no basisset information,"
754 "using it as a guess might work or not for calculation with "
774 throw std::runtime_error(
775 (boost::format(
"ECPs in orb file: %1% and options %2% differ") %
781 throw std::runtime_error(
782 (boost::format(
"Number of electron in guess orb file: %1% and in "
783 "dftengine: %2% differ.") %
788 throw std::runtime_error(
789 (boost::format(
"Number of levels in guess orb file: "
790 "%1% and in dftengine: %2% differ.") %
810 <<
TimeStamp() <<
" Using MKL overload for Eigen " << std::flush;
814 <<
" Using native Eigen implementation, no BLAS overload "
819 for (
const QMAtom& atom : mol) {
821 std::string output = (boost::format(
" %1$s"
822 " %2$+1.4f %3$+1.4f %4$+1.4f") %
823 atom.getElement() % pos[0] % pos[1] % pos[2])
850 std::vector<std::string> results =
ecp_.
Fill(ecpbasisset, mol);
852 <<
TimeStamp() <<
" Filled ECP Basis" << std::flush;
853 if (results.size() > 0) {
854 std::string message =
"";
855 for (
const std::string& element : results) {
856 message +=
" " + element;
859 <<
TimeStamp() <<
" Found no ECPs for elements" << message
863 if (numofelectrons < 0) {
864 for (
const QMAtom& atom : mol) {
898 <<
" divided into " << grid.
getBoxesSize() <<
" boxes" << std::flush;
903 double E_nucnuc = 0.0;
906 const Eigen::Vector3d& r1 = mol[i].
getPos();
907 double charge1 = double(mol[i].getNuccharge());
908 for (
Index j = 0; j < i; j++) {
909 const Eigen::Vector3d& r2 = mol[j].
getPos();
910 double charge2 = double(mol[j].getNuccharge());
911 E_nucnuc += charge1 * charge2 / (r1 - r2).norm();
919 const Eigen::MatrixXd& dmat,
const AOBasis& dftbasis)
const {
920 Eigen::MatrixXd avdmat = Eigen::MatrixXd::Zero(dmat.rows(), dmat.cols());
921 for (
const AOShell& shellrow : dftbasis) {
922 Index size_row = shellrow.getNumFunc();
923 Index start_row = shellrow.getStartIndex();
924 for (
const AOShell& shellcol : dftbasis) {
925 Index size_col = shellcol.getNumFunc();
926 Index start_col = shellcol.getStartIndex();
927 Eigen::MatrixXd shelldmat =
928 dmat.block(start_row, start_col, size_row, size_col);
929 if (shellrow.getL() == shellcol.getL()) {
930 double diagavg = shelldmat.diagonal().sum() / double(shelldmat.rows());
931 Index offdiagelements =
932 shelldmat.rows() * shelldmat.cols() - shelldmat.cols();
933 double offdiagavg = (shelldmat.sum() - shelldmat.diagonal().sum()) /
934 double(offdiagelements);
935 avdmat.block(start_row, start_col, size_row, size_col).array() =
937 avdmat.block(start_row, start_col, size_row, size_col)
941 double avg = shelldmat.sum() / double(shelldmat.size());
942 avdmat.block(start_row, start_col, size_row, size_col).array() = avg;
951 const std::vector<std::unique_ptr<StaticSite> >& multipoles)
const {
953 if (multipoles.size() == 0) {
959 for (
const QMAtom& atom : mol) {
962 if ((site->getPos() - nucleus.
getPos()).norm() < 1
e-7) {
964 <<
" External site sits on nucleus, "
965 "interaction between them is ignored."
980 Eigen::MatrixXd result =
982 for (
Index i = 0; i < 3; i++) {
990 const std::vector<std::unique_ptr<StaticSite> >& multipoles)
const {
997 <<
TimeStamp() <<
" Filled DFT external multipole potential matrix"
1018 <<
TimeStamp() <<
" Calculated external density" << std::flush;
1021 <<
TimeStamp() <<
" Calculated potential from electron density"
1026 double nuc_energy = 0.0;
1027 for (
const QMAtom& atom : mol) {
1031 const double dist = (atom.getPos() - extatom.getPos()).norm();
1033 double(atom.getNuccharge()) * double(extatom.getNuccharge()) / dist;
1037 <<
TimeStamp() <<
" Calculated potential from nuclei" << std::flush;
1039 <<
TimeStamp() <<
" Electrostatic: " << nuc_energy << std::flush;
1044 const Eigen::MatrixXd& GuessMOs)
const {
1045 Eigen::MatrixXd nonortho =
1047 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> es(nonortho);
1048 Eigen::MatrixXd result = GuessMOs * es.operatorInverseSqrt();
Container to hold Basisfunctions for all atoms.
Index AOBasisSize() const
void Fill(const BasisSet &bs, const QMMolecule &atoms)
void setCenter(const Eigen::Vector3d &r)
const std::array< Eigen::MatrixXd, 3 > & Matrix() const
void Fill(const AOBasis &aobasis) final
void FillPotential(const AOBasis &aobasis, const ECPAOBasis &ecp)
void Fill(const AOBasis &aobasis) final
const Eigen::MatrixXd & Matrix() const
void FillPotential(const AOBasis &aobasis, const QMMolecule &atoms)
void Fill(const AOBasis &aobasis) final
const Eigen::MatrixXd & Matrix() const
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & Matrix() const
void push_back(const T &atom)
std::vector< std::string > FindUniqueElements() const
const Eigen::Vector3d & getPos() const
void Load(const std::string &name)
Eigen::MatrixXd DensityMatrix(const tools::EigenSystem &MOs) const
void Configure(const ConvergenceAcc::options &opt)
void setLogger(Logger *log)
Eigen::MatrixXd Iterate(const Eigen::MatrixXd &dmat, Eigen::MatrixXd &H, tools::EigenSystem &MOs, double totE)
double getDIIsError() const
bool getUseMixing() const
tools::EigenSystem SolveFockmatrix(const Eigen::MatrixXd &H) const
void PrintConfigOptions() const
void setOverlap(AOOverlap &S, double etol)
Eigen::MatrixXd CalcERIs(const Eigen::MatrixXd &Dmat, double error) const
std::string auxbasis_name_
tools::EigenSystem ModelPotentialGuess(const Mat_p_Energy &H0, const QMMolecule &mol, const Vxc_Potential< Vxc_Grid > &vxcpotential) const
Mat_p_Energy IntegrateExternalMultipoles(const QMMolecule &mol, const std::vector< std::unique_ptr< StaticSite > > &multipoles) const
tools::EigenSystem IndependentElectronGuess(const Mat_p_Energy &H0) const
std::string dftbasis_name_
double truncation_threshold_
Mat_p_Energy IntegrateExternalDensity(const QMMolecule &mol, const Orbitals &extdensity) const
Eigen::MatrixXd RunAtomicDFT_unrestricted(const QMAtom &uniqueAtom) const
void Prepare(Orbitals &orb, Index numofelectrons=-1)
std::string initial_guess_
Eigen::MatrixXd AtomicGuess(const QMMolecule &mol) const
Eigen::MatrixXd IntegrateExternalField(const QMMolecule &mol) const
Eigen::Vector3d extfield_
std::array< Eigen::MatrixXd, 2 > CalcERIs_EXX(const Eigen::MatrixXd &MOCoeff, const Eigen::MatrixXd &Dmat, double error) const
void Initialize(tools::Property &options)
std::string xc_functional_name_
void CalcElDipole(const Orbitals &orb) const
double ExternalRepulsion(const QMMolecule &mol, const std::vector< std::unique_ptr< StaticSite > > &multipoles) const
ConvergenceAcc::options conv_opt_
void SetupInvariantMatrices()
std::string active_atoms_as_string_
void ConfigOrbfile(Orbitals &orb)
bool integrate_ext_density_
void PrintMOs(const Eigen::VectorXd &MOEnergies, Log::Level level)
Mat_p_Energy SetupH0(const QMMolecule &mol) const
Eigen::MatrixXd OrthogonalizeGuess(const Eigen::MatrixXd &GuessMOs) const
Eigen::MatrixXd SphericalAverageShells(const Eigen::MatrixXd &dmat, const AOBasis &dftbasis) const
bool Evaluate(Orbitals &orb)
std::vector< std::unique_ptr< StaticSite > > * externalsites_
Vxc_Potential< Vxc_Grid > SetupVxc(const QMMolecule &mol)
bool integrate_ext_field_
double NuclearRepulsion(const QMMolecule &mol) const
ConvergenceAcc conv_accelerator_
double IntegratePotential(const Eigen::Vector3d &rvector) const
double IntegrateDensity(const Eigen::MatrixXd &density_matrix)
Container to hold ECPs for all atoms.
std::vector< std::string > Fill(const ECPBasisSet &bs, QMMolecule &atoms)
void Load(const std::string &name)
Takes a density matrix and and an auxiliary basis set and calculates the electron repulsion integrals...
Eigen::MatrixXd CalculateERIs_3c(const Eigen::MatrixXd &DMAT) const
Index Removedfunctions() const
std::array< Eigen::MatrixXd, 2 > CalculateERIs_EXX_4c(const Eigen::MatrixXd &DMAT, double error) const
void Initialize_4c(const AOBasis &dftbasis)
std::array< Eigen::MatrixXd, 2 > CalculateERIs_EXX_3c(const Eigen::MatrixXd &occMos, const Eigen::MatrixXd &DMAT) const
void Initialize(const AOBasis &dftbasis, const AOBasis &auxbasis)
Eigen::MatrixXd CalculateERIs_4c(const Eigen::MatrixXd &DMAT, double error) const
void UpdateDmats(const Eigen::MatrixXd &dmat, double DiisError, Index Iteration)
void Configure(const Eigen::MatrixXd &dmat)
void resetMatrices(Eigen::MatrixXd &J, Eigen::MatrixXd &K, const Eigen::MatrixXd &dmat)
void Start(Index iteration, double DiisError)
void UpdateCriteria(double DiisError, Index Iteration)
const Eigen::MatrixXd & getDmat_diff() const
Logger is used for thread-safe output of messages.
Eigen::MatrixXd & matrix()
container for molecular orbitals
void setScaHFX(double ScaHFX)
Index getNumberOfAlphaElectrons() const
void setNumberOfAlphaElectrons(Index electrons)
Eigen::MatrixXd DensityMatrixFull(const QMState &state) const
void SetupAuxBasis(std::string aux_basis_name)
void setECPName(const std::string &ECP)
void setXCGrid(std::string grid)
void setNumberOfOccupiedLevels(Index occupied_levels)
Index getBasisSetSize() const
void setQMEnergy(double qmenergy)
const tools::EigenSystem & MOs() const
const QMMolecule & QMAtoms() const
void ReadFromCpt(const std::string &filename)
void setChargeAndSpin(Index charge, Index spin)
bool hasDFTbasisName() const
const std::string & getECPName() const
const std::string & getDFTbasisName() const
void SetupDftBasis(std::string basis_name)
Eigen::Vector3d CalcElDipole(const QMState &state) const
const AOBasis & getDftBasis() const
void setXCFunctionalName(std::string functionalname)
const std::string & getElement() const
Index getNuccharge() const
Identifier for QMstates. Strings like S1 are converted into enum +zero indexed int.
Class to represent Atom/Site in electrostatic.
const Eigen::Vector3d & getPos() const
Timestamp returns the current time as a string Example: cout << TimeStamp()
Index getGridSize() const
void GridSetup(const std::string &type, const QMMolecule &atoms, const AOBasis &basis)
Index getBoxesSize() const
Mat_p_Energy IntegrateVXC(const Eigen::MatrixXd &density_matrix) const
void setXCfunctional(const std::string &functional)
static double getExactExchange(const std::string &functional)
Mediates interaction between polar and static sites.
double CalcStaticEnergy_site(const StaticSite &site1, const StaticSite &site2) const
#define XTP_LOG(level, log)
bool XTP_HAS_MKL_OVERLOAD()
base class for all analysis tools