23#include <boost/algorithm/string.hpp>
24#include <boost/format.hpp>
47 Index ignored_corelevels = 0;
50 basis.
Load(
"corelevels");
51 Index coreElectrons = 0;
52 for (
const auto& atom :
orbitals_.QMAtoms()) {
55 ignored_corelevels = coreElectrons / 2;
57 return ignored_corelevels;
70 const bool is_uks =
orbitals_.hasUnrestrictedOrbitals();
78 num_of_occlevels = std::max(
orbitals_.getNumberOfAlphaElectrons(),
82 std::string ranges = options.
get(
".ranges").
as<std::string>();
86 if (ranges ==
"factor") {
88 double rpamaxfactor = options.
get(
".rpamax").
as<
double>();
89 rpamax =
Index(rpamaxfactor *
double(num_of_levels)) -
92 double qpminfactor = options.
get(
".qpmin").
as<
double>();
94 num_of_occlevels -
Index(qpminfactor *
double(num_of_occlevels)) - 1;
96 double qpmaxfactor = options.
get(
".qpmax").
as<
double>();
98 num_of_occlevels +
Index(qpmaxfactor *
double(num_of_occlevels)) - 1;
100 double bseminfactor = options.
get(
".bsemin").
as<
double>();
102 num_of_occlevels -
Index(bseminfactor *
double(num_of_occlevels)) - 1;
104 double bsemaxfactor = options.
get(
".bsemax").
as<
double>();
106 num_of_occlevels +
Index(bsemaxfactor *
double(num_of_occlevels)) - 1;
108 }
else if (ranges ==
"explicit") {
113 bse_vmin = options.
get(
".bsemin").
as<
Index>();
114 bse_cmax = options.
get(
".bsemax").
as<
Index>();
115 }
else if (ranges ==
"default") {
116 rpamax = num_of_levels - 1;
118 qpmax = 3 * homo + 1;
120 bse_cmax = 3 * homo + 1;
121 }
else if (ranges ==
"full") {
122 rpamax = num_of_levels - 1;
124 qpmax = num_of_levels - 1;
126 bse_cmax = num_of_levels - 1;
128 std::string ignore_corelevels =
129 options.
get(
".ignore_corelevels").
as<std::string>();
131 if (ignore_corelevels ==
"RPA" || ignore_corelevels ==
"GW" ||
132 ignore_corelevels ==
"BSE") {
134 if (ignore_corelevels ==
"RPA") {
135 rpamin = ignored_corelevels;
137 if (ignore_corelevels ==
"GW" || ignore_corelevels ==
"RPA") {
138 if (qpmin < ignored_corelevels) {
139 qpmin = ignored_corelevels;
142 if (ignore_corelevels ==
"GW" || ignore_corelevels ==
"RPA" ||
143 ignore_corelevels ==
"BSE") {
144 if (bse_vmin < ignored_corelevels) {
145 bse_vmin = ignored_corelevels;
150 <<
TimeStamp() <<
" Ignoring " << ignored_corelevels
151 <<
" core levels for " << ignore_corelevels <<
" and beyond." << flush;
155 if (rpamax >= num_of_levels) {
156 rpamax = num_of_levels - 1;
158 if (qpmax >= num_of_levels) {
159 qpmax = num_of_levels - 1;
161 if (bse_cmax >= num_of_levels) {
162 bse_cmax = num_of_levels - 1;
171 Index bse_vmax = homo;
172 Index bse_cmin = homo + 1;
174 if (rpamin < 0 || rpamax < 0 || rpamin > rpamax) {
175 throw std::runtime_error(
"Invalid RPA level range after setup/clamping.");
177 if (qpmin < 0 || qpmax < 0 || qpmin > qpmax) {
178 throw std::runtime_error(
"Invalid GW level range after setup/clamping.");
180 if (bse_vmin < 0 || bse_vmax < 0 || bse_vmin > bse_vmax) {
181 throw std::runtime_error(
182 "Invalid BSE occupied level range after setup/clamping.");
184 if (bse_cmin < 0 || bse_cmax < 0 || bse_cmin > bse_cmax) {
185 throw std::runtime_error(
186 "Invalid BSE virtual level range after setup/clamping.");
188 if (bse_vmax >= num_of_levels || bse_cmax >= num_of_levels) {
189 throw std::runtime_error(
190 "BSE level range exceeds available orbital indices.");
192 if (bse_vmax >= bse_cmin) {
193 throw std::runtime_error(
"BSE occupied and virtual level ranges overlap.");
212 orbitals_.setBSEindices(bse_vmin, bse_cmax);
216 Index bse_vtotal = bse_vmax - bse_vmin + 1;
217 Index bse_ctotal = bse_cmax - bse_cmin + 1;
218 Index bse_size = bse_vtotal * bse_ctotal;
221 <<
":" << rpamax <<
"]" << flush;
223 <<
":" << qpmax <<
"]" << flush;
225 <<
TimeStamp() <<
" BSE level range occ[" << bse_vmin <<
":" << bse_vmax
226 <<
"] virt[" << bse_cmin <<
":" << bse_cmax <<
"]" << flush;
236 options.
get(
"bse.davidson.correction").
as<std::string>();
239 options.
get(
"bse.davidson.tolerance").
as<std::string>();
242 options.
get(
"bse.davidson.update").
as<std::string>();
254 Index full_bse_size = (
bseopt_.useTDA) ? bse_size : 2 * bse_size;
256 << full_bse_size <<
"x" << full_bse_size << flush;
258 bseopt_.use_Hqp_offdiag = options.
get(
"bse.use_Hqp_offdiag").
as<
bool>();
261 if (!
bseopt_.use_Hqp_offdiag) {
263 <<
" BSE without Hqp offdiagonal elements" << flush;
266 <<
" BSE with Hqp offdiagonal elements" << flush;
270 bseopt_.dyn_tolerance = options.
get(
"bse.dyn_screen_tol").
as<
double>();
271 if (
bseopt_.max_dyn_iter > 0) {
281 }
else if (options.
exists(
".auxbasisset")) {
288 }
catch (std::runtime_error&) {
290 "There is no auxbasis from the dftcalculation nor did you specify an "
291 "auxbasisset for the gwbse calculation. Also no auxiliary basisset "
296 <<
" Could not find an auxbasisset using " <<
auxbasis_name_ << flush;
299 std::string mode = options.
get(
"gw.mode").
as<std::string>();
300 if (mode ==
"G0W0") {
301 gwopt_.gw_sc_max_iterations = 1;
302 }
else if (mode ==
"evGW") {
310 gwopt_.shift = options.
get(
"gw.scissor_shift").
as<
double>();
312 options.
get(
"gw.qp_sc_limit").
as<
double>();
315 gwopt_.g_sc_max_iterations =
321 if (mode ==
"evGW") {
326 options.
get(
"gw.sc_limit").
as<
double>();
329 <<
" qp_sc_limit [Hartree]: " <<
gwopt_.g_sc_limit << flush;
330 if (
gwopt_.gw_sc_max_iterations > 1) {
332 <<
" gw_sc_limit [Hartree]: " <<
gwopt_.gw_sc_limit << flush;
334 bseopt_.min_print_weight = options.
get(
"bse.print_weight").
as<
double>();
338 std::string tasks_string = options.
get(
".tasks").
as<std::string>();
339 boost::algorithm::to_lower(tasks_string);
341 if (tasks_string.find(
"gw") != std::string::npos) {
346 if (tasks_string.find(
"excitons") != std::string::npos ||
347 tasks_string.find(
"exciton_uks") != std::string::npos) {
352 if (tasks_string.find(
"singlets") != std::string::npos ||
353 tasks_string.find(
"triplets") != std::string::npos) {
354 throw std::runtime_error(
355 "Invalid gwbse task for UKS reference: 'singlets' and 'triplets' "
356 "are not defined for open-shell systems.\n"
357 "Use 'exciton_uks' (or 'excitons') instead.");
360 if (tasks_string.find(
"all") != std::string::npos) {
370 if (tasks_string.find(
"singlets") != std::string::npos) {
373 if (tasks_string.find(
"triplets") != std::string::npos) {
392 if (options.
exists(
"bse.fragments")) {
393 std::vector<tools::Property*> prop_region =
394 options.
Select(
"bse.fragments.fragment");
397 std::string indices = prop->get(
"indices").as<std::string>();
403 gwopt_.sigma_integration =
404 options.
get(
"gw.sigma_integrator").
as<std::string>();
406 <<
" Sigma integration: " <<
gwopt_.sigma_integration << flush;
409 if (
gwopt_.sigma_integration ==
"exact") {
411 <<
" RPA Hamiltonian size: " << (homo + 1 - rpamin) * (rpamax - homo)
414 if (
gwopt_.sigma_integration ==
"cda") {
417 <<
" Quadrature integration order : " <<
gwopt_.order << flush;
418 gwopt_.quadrature_scheme =
419 options.
get(
"gw.quadrature_scheme").
as<std::string>();
421 <<
" Quadrature integration scheme : " <<
gwopt_.quadrature_scheme
423 gwopt_.alpha = options.
get(
"gw.alpha").
as<
double>();
425 <<
" Alpha smoothing parameter : " <<
gwopt_.alpha << flush;
427 gwopt_.qp_solver = options.
get(
"gw.qp_solver").
as<std::string>();
430 if (
gwopt_.qp_solver ==
"grid") {
439 if (options.
exists(
"gw.qp_full_window_half_width")) {
440 gwopt_.qp_full_window_half_width =
441 options.
get(
"gw.qp_full_window_half_width").
as<
double>();
443 if (options.
exists(
"gw.qp_dense_spacing")) {
444 gwopt_.qp_dense_spacing = options.
get(
"gw.qp_dense_spacing").
as<
double>();
446 if (options.
exists(
"gw.qp_adaptive_shell_width")) {
447 gwopt_.qp_adaptive_shell_width =
448 options.
get(
"gw.qp_adaptive_shell_width").
as<
double>();
450 if (options.
exists(
"gw.qp_adaptive_shell_count")) {
451 gwopt_.qp_adaptive_shell_count =
452 options.
get(
"gw.qp_adaptive_shell_count").
as<
Index>();
457 const bool has_legacy_steps = options.
exists(
"gw.qp_grid_steps");
458 const bool has_legacy_spacing = options.
exists(
"gw.qp_grid_spacing");
460 if (has_legacy_steps != has_legacy_spacing) {
461 throw std::runtime_error(
462 "Deprecated gw.qp_grid_steps and gw.qp_grid_spacing must be given "
463 "together if either is used.");
466 if (has_legacy_steps && has_legacy_spacing) {
468 gwopt_.qp_grid_spacing = options.
get(
"gw.qp_grid_spacing").
as<
double>();
470 const double legacy_half_width =
472 const double legacy_shell_width =
475 if (
gwopt_.qp_full_window_half_width <= 0.0) {
476 gwopt_.qp_full_window_half_width = legacy_half_width;
478 if (
gwopt_.qp_dense_spacing <= 0.0) {
481 if (
gwopt_.qp_adaptive_shell_count <= 0 &&
482 gwopt_.qp_adaptive_shell_width <= 0.0) {
483 gwopt_.qp_adaptive_shell_width = legacy_shell_width;
487 <<
" Deprecated GW QP options detected: "
488 <<
"qp_grid_steps=" <<
gwopt_.qp_grid_steps
489 <<
" qp_grid_spacing=" <<
gwopt_.qp_grid_spacing
490 <<
" -> mapped to qp_full_window_half_width="
491 <<
gwopt_.qp_full_window_half_width
492 <<
" qp_dense_spacing=" <<
gwopt_.qp_dense_spacing
493 <<
" qp_adaptive_shell_width=" <<
gwopt_.qp_adaptive_shell_width
502 <<
" QP full window half-width: " <<
gwopt_.qp_full_window_half_width
505 <<
" QP dense spacing: " <<
gwopt_.qp_dense_spacing << flush;
507 <<
" QP adaptive shell width: " <<
gwopt_.qp_adaptive_shell_width
510 <<
" QP adaptive shell count: " <<
gwopt_.qp_adaptive_shell_count
513 gwopt_.qp_root_finder = options.
get(
"gw.qp_root_finder").
as<std::string>();
515 <<
" QP root finder: "
516 <<
gwopt_.qp_root_finder << flush;
525 gwopt_.gw_mixing_alpha = options.
get(
"gw.mixing_alpha").
as<
double>();
526 gwopt_.qp_grid_search_mode =
527 options.
get(
"gw.qp_grid_search_mode").
as<std::string>();
528 gwopt_.qp_restrict_search = options.
get(
"gw.qp_restrict_search").
as<
bool>();
529 gwopt_.qp_zero_margin = options.
get(
"gw.qp_zero_margin").
as<
double>();
530 gwopt_.qp_virtual_min_energy =
531 options.
get(
"gw.qp_virtual_min_energy").
as<
double>();
532 if (mode ==
"evGW") {
533 if (
gwopt_.gw_mixing_order == 0) {
535 }
else if (
gwopt_.gw_mixing_order == 1) {
537 <<
gwopt_.gw_mixing_alpha << std::flush;
540 <<
gwopt_.gw_mixing_order <<
" using alpha "
541 <<
gwopt_.gw_mixing_alpha << std::flush;
545 if (options.
exists(
"gw.sigma_plot")) {
550 options.
get(
"gw.sigma_plot.filename").
as<std::string>();
571 (boost::format(
"%1$+1.6f ") % (
orbitals_.getDFTTotalEnergy() * hrt2ev))
574 if (
orbitals_.hasUnrestrictedOrbitals()) {
575 gwbse_summary.
add(
"dft_alpha",
"");
576 gwbse_summary.
add(
"dft_beta",
"");
590 (boost::format(
"%1$+1.6f ") %
593 level_alpha.
add(
"gw_energy",
594 (boost::format(
"%1$+1.6f ") %
595 (
orbitals_.QPpertEnergiesAlpha()(state) * hrt2ev))
599 (boost::format(
"%1$+1.6f ") %
600 (
orbitals_.QPdiagAlpha().eigenvalues()(state) * hrt2ev))
607 (boost::format(
"%1$+1.6f ") %
611 level_beta.
add(
"gw_energy",
612 (boost::format(
"%1$+1.6f ") %
613 (
orbitals_.QPpertEnergiesBeta()(state) * hrt2ev))
615 level_beta.
add(
"qp_energy",
616 (boost::format(
"%1$+1.6f ") %
617 (
orbitals_.QPdiagBeta().eigenvalues()(state) * hrt2ev))
630 (boost::format(
"%1$+1.6f ") %
633 level_summary.
add(
"gw_energy",
634 (boost::format(
"%1$+1.6f ") %
635 (
orbitals_.QPpertEnergies()(state) * hrt2ev))
637 level_summary.
add(
"qp_energy",
638 (boost::format(
"%1$+1.6f ") %
639 (
orbitals_.QPdiag().eigenvalues()(state) * hrt2ev))
650 "omega", (boost::format(
"%1$+1.6f ") %
651 (
orbitals_.BSESinglets().eigenvalues()(state) * hrt2ev))
655 const Eigen::Vector3d& dipoles = (
orbitals_.TransitionDipoles())[state];
656 double f = 2 * dipoles.squaredNorm() *
657 orbitals_.BSESinglets().eigenvalues()(state) / 3.0;
659 level_summary.
add(
"f", (boost::format(
"%1$+1.6f ") % f).str());
661 "Trdipole", (boost::format(
"%1$+1.4f %2$+1.4f %3$+1.4f") %
662 dipoles.x() % dipoles.y() % dipoles.z())
675 "omega", (boost::format(
"%1$+1.6f ") %
676 (
orbitals_.BSETriplets().eigenvalues()(state) * hrt2ev))
683 const bool has_dipoles =
orbitals_.hasTransitionDipoles();
684 Eigen::VectorXd oscs = Eigen::VectorXd::Zero(0);
690 for (
Index state = 0;
696 level_summary.
add(
"omega",
697 (boost::format(
"%1$+1.6f ") %
698 (
orbitals_.BSEUKS().eigenvalues()(state) * hrt2ev))
702 const Index nosc =
static_cast<Index>(oscs.size());
704 if (has_dipoles && state < ndip && state < nosc) {
705 const Eigen::Vector3d& dipoles =
orbitals_.TransitionDipoles()[state];
707 level_summary.
add(
"f",
708 (boost::format(
"%1$+1.6f ") % oscs(state)).str());
711 "Trdipole", (boost::format(
"%1$+1.4f %2$+1.4f %3$+1.4f") %
712 dipoles.x() % dipoles.y() % dipoles.z())
734 if (
orbitals_.getXCFunctionalName().empty()) {
738 throw std::runtime_error(
"Functionals from DFT " +
739 orbitals_.getXCFunctionalName() +
" GWBSE " +
747 <<
TimeStamp() <<
" Setup grid for integration with gridsize: " <<
grid_
748 <<
" with " << grid.
getGridSize() <<
" points, divided into "
755 Eigen::MatrixXd DMAT =
orbitals_.DensityMatrixGroundState();
762 Eigen::MatrixXd mos =
765 Eigen::MatrixXd vxc = mos.transpose() * e_vxc_ao.
matrix() * mos;
767 <<
TimeStamp() <<
" Calculated exchange-correlation expectation values "
775 if (
orbitals_.getXCFunctionalName().empty()) {
778 throw std::runtime_error(
"Functionals from DFT " +
779 orbitals_.getXCFunctionalName() +
" GWBSE " +
788 auto dmats =
orbitals_.DensityMatrixGroundStateSpinResolved();
792 Eigen::MatrixXd mos_alpha =
794 Eigen::MatrixXd mos_beta =
797 Eigen::MatrixXd vxc_alpha =
798 mos_alpha.transpose() * e_vxc_ao.vxc_alpha * mos_alpha;
799 Eigen::MatrixXd vxc_beta =
800 mos_beta.transpose() * e_vxc_ao.vxc_beta * mos_beta;
802 return std::make_pair(vxc_alpha, vxc_beta);
813 <<
TimeStamp() <<
" Using MKL overload for Eigen " << flush;
817 <<
" Using native Eigen implementation, no BLAS overload " << flush;
822 <<
TimeStamp() <<
" Using CUDA support for tensor multiplication with "
823 << nogpus <<
" GPUs." << flush;
827 <<
TimeStamp() <<
" Molecule Coordinates [A] " << flush;
829 std::string output = (boost::format(
"%5d"
831 " %1.4f %1.4f %1.4f") %
832 atom.getId() % atom.getElement() %
841 std::string dft_package =
orbitals_.getQMpackage();
843 <<
TimeStamp() <<
" DFT data was created by " << dft_package << flush;
866 <<
" size:" << frag.size() << flush;
874 throw std::runtime_error(
875 "You want no GW calculation but the orb file has no matching QP "
879 const bool is_uks =
orbitals_.hasUnrestrictedOrbitals();
890 <<
TimeStamp() <<
" Calculating alpha spin Mmn " << flush;
893 <<
TimeStamp() <<
" Calculating beta spin Mmn " << flush;
899 <<
TimeStamp() <<
" Calculating Mmn (3-center-repulsion x orbitals) "
901 Mmn.
Fill(auxbasis, dftbasis,
orbitals_.MOs().eigenvectors());
904 <<
" functions from Aux Coulomb matrix to avoid near linear "
908 <<
TimeStamp() <<
" Calculated Mmn (3-center-repulsion x orbitals) "
913 Eigen::MatrixXd Hqp_alpha;
914 Eigen::MatrixXd Hqp_beta;
917 std::chrono::time_point<std::chrono::system_clock> start =
918 std::chrono::system_clock::now();
972 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> es_alpha =
974 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> es_beta =
976 orbitals_.QPdiagAlpha().eigenvectors() = es_alpha.eigenvectors();
977 orbitals_.QPdiagAlpha().eigenvalues() = es_alpha.eigenvalues();
978 orbitals_.QPdiagBeta().eigenvectors() = es_beta.eigenvectors();
979 orbitals_.QPdiagBeta().eigenvalues() = es_beta.eigenvalues();
980 std::chrono::duration<double> elapsed_time =
981 std::chrono::system_clock::now() - start;
983 <<
TimeStamp() <<
" UKS GW calculation took " << elapsed_time.count()
984 <<
" seconds." << flush;
1001 <<
TimeStamp() <<
" Calculating offdiagonal part of Sigma " << flush;
1004 <<
TimeStamp() <<
" Calculated offdiagonal part of Sigma " << flush;
1008 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> es =
1010 if (es.info() == Eigen::ComputationInfo::Success) {
1012 <<
TimeStamp() <<
" Diagonalized QP Hamiltonian " << flush;
1015 orbitals_.QPdiag().eigenvectors() = es.eigenvectors();
1016 orbitals_.QPdiag().eigenvalues() = es.eigenvalues();
1017 std::chrono::duration<double> elapsed_time =
1018 std::chrono::system_clock::now() - start;
1020 <<
TimeStamp() <<
" GW calculation took " << elapsed_time.count()
1021 <<
" seconds." << flush;
1029 throw std::runtime_error(
1030 "The ranges for GW and RPA do not agree with the ranges from the "
1031 ".orb file, rerun your GW calculation");
1035 const Eigen::MatrixXd& qpcoeff_alpha =
1037 const Eigen::MatrixXd& qpcoeff_beta =
1040 Hqp_alpha = qpcoeff_alpha *
1041 orbitals_.QPdiagAlpha().eigenvalues().asDiagonal() *
1042 qpcoeff_alpha.transpose();
1043 Hqp_beta = qpcoeff_beta *
1044 orbitals_.QPdiagBeta().eigenvalues().asDiagonal() *
1045 qpcoeff_beta.transpose();
1047 const Eigen::MatrixXd& qpcoeff =
orbitals_.QPdiag().eigenvectors();
1049 Hqp = qpcoeff *
orbitals_.QPdiag().eigenvalues().asDiagonal() *
1050 qpcoeff.transpose();
1057 std::chrono::time_point<std::chrono::system_clock> start =
1058 std::chrono::system_clock::now();
1070 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> es_bse(
1073 Eigen::VectorXd epsilon_0_inv_bse =
1074 Eigen::VectorXd::Zero(es_bse.eigenvalues().size());
1075 for (
Index i = 0; i < es_bse.eigenvalues().size(); ++i) {
1076 if (es_bse.eigenvalues()(i) > 1
e-8) {
1077 epsilon_0_inv_bse(i) = 1.0 / es_bse.eigenvalues()(i);
1104 Hqp_alpha, Hqp_beta, epsilon_0_inv_bse, es_bse.eigenvectors());
1108 <<
TimeStamp() <<
" Solved combined UKS BSE exciton problem "
1123 <<
TimeStamp() <<
" Solved BSE for triplets " << flush;
1130 <<
TimeStamp() <<
" Solved BSE for singlets " << flush;
1147 std::chrono::duration<double> elapsed_time =
1148 std::chrono::system_clock::now() - start;
1150 << elapsed_time.count() <<
" seconds." << flush;
1153 <<
TimeStamp() <<
" GWBSE calculation finished " << flush;
Container to hold Basisfunctions for all atoms.
Index AOBasisSize() const
void configure_with_precomputed_screening(const options &opt, Index homo_alpha, Index homo_beta, const Eigen::VectorXd &RPAInputEnergiesAlpha, const Eigen::VectorXd &RPAInputEnergiesBeta, const Eigen::MatrixXd &Hqp_alpha_in, const Eigen::MatrixXd &Hqp_beta_in, const Eigen::VectorXd &epsilon_0_inv, const Eigen::MatrixXd &epsilon_eigenvectors)
void Perturbative_DynamicalScreening(Orbitals &orb)
void Solve_excitons_uks(Orbitals &orb) const
void Analyze_excitons_uks(std::vector< QMFragment< BSE_Population > > fragments, const Orbitals &orb) const
void Solve_singlets(Orbitals &orb) const
void Analyze_singlets(std::vector< QMFragment< BSE_Population > > fragments, const Orbitals &orb) const
void Perturbative_DynamicalScreening(const QMStateType &type, Orbitals &orb)
void Analyze_triplets(std::vector< QMFragment< BSE_Population > > fragments, const Orbitals &orb) const
void configure(const options &opt, const Eigen::VectorXd &RPAEnergies, const Eigen::MatrixXd &Hqp_in)
void Solve_triplets(Orbitals &orb) const
void Load(const std::string &name)
void Load(const std::string &name)
const ECPElement & getElement(std::string element_type) const
std::pair< Eigen::MatrixXd, Eigen::MatrixXd > CalculateVXCSpinResolved(const AOBasis &dftbasis)
std::vector< QMFragment< BSE_Population > > fragments_
std::string sigma_plot_states_
void addoutput(tools::Property &summary)
std::string auxbasis_name_
Eigen::MatrixXd CalculateVXC(const AOBasis &dftbasis)
std::string dftbasis_name_
void Initialize(tools::Property &options)
double sigma_plot_spacing_
std::string sigma_plot_filename_
bool do_dynamical_screening_bse_
Eigen::SelfAdjointEigenSolver< Eigen::MatrixXd > DiagonalizeQPHamiltonianAlpha() const
Eigen::VectorXd getGWAResultsAlpha() const
const Eigen::VectorXd & RPAInputEnergiesAlpha() const
const Eigen::VectorXd & RPAInputEnergiesBeta() const
Eigen::MatrixXd getHQPBeta() const
Eigen::VectorXd getGWAResultsBeta() const
Eigen::MatrixXd getHQPAlpha() const
Eigen::SelfAdjointEigenSolver< Eigen::MatrixXd > DiagonalizeQPHamiltonianBeta() const
void configure(const options &opt)
void CalculateGWPerturbation()
void PlotSigma(std::string filename, Index steps, double spacing, std::string states) const
Eigen::SelfAdjointEigenSolver< Eigen::MatrixXd > DiagonalizeQPHamiltonian() const
void configure(const options &opt)
Eigen::MatrixXd getHQP() const
Eigen::VectorXd getGWAResults() const
Eigen::VectorXd RPAInputEnergies() const
void CalculateGWPerturbation()
Eigen::MatrixXd & matrix()
Unrestricted RPA helper for spin-resolved GW screening.
void setRPAInputEnergies(const Eigen::VectorXd &rpaenergies_alpha, const Eigen::VectorXd &rpaenergies_beta)
Set alpha and beta RPA input energies directly.
void configure(Index homo_alpha, Index homo_beta, Index rpamin, Index rpamax)
Configure orbital window and spin-resolved HOMO indices.
Eigen::MatrixXd calculate_epsilon_r(double frequency) const
Dielectric matrix on the real frequency axis.
void Fill(const AOBasis &auxbasis, const AOBasis &dftbasis, const Eigen::MatrixXd &dft_orbitals)
void Initialize(Index basissize, Index mmin, Index mmax, Index nmin, Index nmax)
Index Removedfunctions() 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)
SpinResult IntegrateVXCSpin(const Eigen::MatrixXd &dmat_alpha, const Eigen::MatrixXd &dmat_beta) const
#define XTP_LOG(level, log)
double LegacyAdaptiveShellWidth(const Opt &opt)
void NormalizeGridSearchOptions(Opt &opt)
double LegacyFullWindowHalfWidth(const Opt &opt)
Charge transport classes.
bool XTP_HAS_MKL_OVERLOAD()
Provides a means for comparing floating point numbers.
std::string davidson_update
std::string davidson_tolerance
std::string davidson_correction
Index qp_adaptive_shell_count
double qp_virtual_min_energy
std::string quadrature_scheme
double qp_full_window_half_width
std::string qp_grid_search_mode
std::string sigma_integration
Index g_sc_max_iterations
std::string qp_root_finder
Index gw_sc_max_iterations
double qp_adaptive_shell_width