votca 2024.2-dev
Loading...
Searching...
No Matches
orbitals.h
Go to the documentation of this file.
1
2/*
3 * Copyright 2009-2023 The VOTCA Development Team
4 * (http://www.votca.org)
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License")
7 *
8 * You may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 */
20
21#pragma once
22#ifndef VOTCA_XTP_ORBITALS_H
23#define VOTCA_XTP_ORBITALS_H
24
25// VOTCA includes
26#include <votca/tools/globals.h>
28
29// Local VOTCA includes
30#include "aobasis.h"
31#include "checkpoint.h"
32#include "classicalsegment.h"
33#include "eigen.h"
34#include "qmmolecule.h"
35#include "qmstate.h"
36
37namespace votca {
38namespace xtp {
39
46class Orbitals {
47 public:
48 Orbitals();
49
50 bool hasBasisSetSize() const {
51 return (dftbasis_.AOBasisSize() > 0) ? true : false;
52 }
53
55
57
58 void setTruncMOsFullBasis(const Eigen::MatrixXd &expandedMOs) {
59 expandedMOs_ = expandedMOs;
60 }
61
62 const Eigen::MatrixXd getTruncMOsFullBasis() const { return expandedMOs_; }
63
65
66 Index getLumo() const { return occupied_levels_; }
67
68 Index getHomo() const { return occupied_levels_ - 1; }
69
70 // access to DFT number of levels, new, tested
71 bool hasNumberOfLevels() const {
72 return ((occupied_levels_ > 0) ? true : false);
73 }
74 bool hasNumberOfLevelsBeta() const {
75 return ((occupied_levels_beta_ > 0) ? true : false);
76 }
77
78 void setNumberOfOccupiedLevels(Index occupied_levels) {
79 occupied_levels_ = occupied_levels;
80 }
81 void setNumberOfOccupiedLevelsBeta(Index occupied_levels_beta) {
82 occupied_levels_beta_ = occupied_levels_beta;
83 }
84
85 // access to DFT number of electrons, new, tested
87 return (number_alpha_electrons_ > 0) ? true : false;
88 }
90 return (number_beta_electrons_ > 0) ? true : false;
91 }
92
95
97 number_alpha_electrons_ = electrons;
98 }
100 number_beta_electrons_ = electrons;
101 }
102 bool hasECPName() const { return (ECP_ != "") ? true : false; }
103
104 const std::string &getECPName() const { return ECP_; };
105
106 void setECPName(const std::string &ECP) { ECP_ = ECP; };
107
108 // access to QM package name, new, tested
109
110 bool hasQMpackage() const { return (!qm_package_.empty()); }
111
112 const std::string &getQMpackage() const { return qm_package_; }
113
114 void setQMpackage(const std::string &qmpackage) { qm_package_ = qmpackage; }
115
116 // access to DFT molecular orbital energies, new, tested
117 bool hasMOs() const { return (mos_.eigenvalues().size() > 0) ? true : false; }
118 bool hasBetaMOs() const {
119 return (mos_beta_.eigenvalues().size() > 0) ? true : false;
120 }
121
122 const tools::EigenSystem &MOs() const { return mos_; }
124
125 const Eigen::MatrixXd &Occupations() const { return occupations_; }
126 Eigen::MatrixXd &Occupations() { return occupations_; }
127
128 const tools::EigenSystem &MOs_beta() const { return mos_beta_; }
130
131 // determine (pseudo-)degeneracy of a DFT molecular orbital
132 std::vector<Index> CheckDegeneracy(Index level,
133 double energy_difference) const;
134
136 switch (type.Type()) {
138 return Index(BSE_singlet_.eigenvalues().size());
139 break;
141 return Index(BSE_triplet_.eigenvalues().size());
142 break;
144 return Index(mos_.eigenvalues().size());
145 break;
147 return Index(QPpert_energies_.size());
148 break;
150 return Index(QPdiag_.eigenvalues().size());
151 break;
152 default:
153 return 1;
154 break;
155 }
156 }
157
158 void setCalculationType(std::string CalcType) { CalcType_ = CalcType; }
159 std::string getCalculationType() const { return CalcType_; }
160
161 void setChargeAndSpin(Index charge, Index spin) {
162 total_charge_ = charge;
163 total_spin_ = spin;
164 }
165
166 Index getSpin() const { return total_spin_; }
167 Index getCharge() const { return total_charge_; }
168 bool isOpenShell() const { return (total_spin_ > 1) ? true : false; }
169
170 bool hasQMAtoms() const { return (atoms_.size() > 0) ? true : false; }
171
172 const QMMolecule &QMAtoms() const { return atoms_; }
173
174 QMMolecule &QMAtoms() { return atoms_; }
175
176 void updateAtomPostion(Index atom_index, Eigen::Vector3d new_position) {
177 this->QMAtoms()[atom_index].setPos(new_position);
180 }
181
182 void setXCFunctionalName(std::string functionalname) {
183 functionalname_ = functionalname;
184 }
185 const std::string &getXCFunctionalName() const { return functionalname_; }
186
187 void setXCGrid(std::string grid) { grid_quality_ = grid; }
188 const std::string &getXCGrid() const { return grid_quality_; }
189
190 // access to QM total energy, new, tested
191 bool hasQMEnergy() const { return (qm_energy_ != 0.0) ? true : false; }
192
193 double getDFTTotalEnergy() const { return qm_energy_; }
194
195 void setQMEnergy(double qmenergy) { qm_energy_ = qmenergy; }
196
197 // access to DFT basis set name
198 bool hasDFTbasisName() const {
199 return (!dftbasis_.Name().empty()) ? true : false;
200 }
201
202 const std::string &getDFTbasisName() const { return dftbasis_.Name(); }
203
204 void SetupDftBasis(std::string basis_name);
205
206 void SetupAuxBasis(std::string aux_basis_name);
207
208 const AOBasis &getDftBasis() const {
209 if (dftbasis_.AOBasisSize() == 0) {
210 throw std::runtime_error(
211 "Requested the DFT basis, but no basis is present. Make sure "
212 "SetupDftBasis is called.");
213 } else {
214 return dftbasis_;
215 }
216 }
217
218 const AOBasis &getAuxBasis() const {
219 if (auxbasis_.AOBasisSize() == 0) {
220 throw std::runtime_error(
221 "Requested the Aux basis, but no basis is present. Make sure "
222 "SetupAuxBasis is called.");
223 } else {
224 return auxbasis_;
225 }
226 }
227
228 /*
229 * ======= GW-BSE related functions =======
230 */
231
232 // access to auxiliary basis set name
233
234 bool hasAuxbasisName() const {
235 return (!auxbasis_.Name().empty()) ? true : false;
236 }
237
238 const std::string getAuxbasisName() const { return auxbasis_.Name(); }
239
240 // access to list of indices used in GWA
241
242 bool hasGWAindices() const { return (qpmax_ > 0) ? true : false; }
243
244 void setGWindices(Index qpmin, Index qpmax) {
245 qpmin_ = qpmin;
246 qpmax_ = qpmax;
247 }
248
249 Index getGWAmin() const { return qpmin_; }
250
251 Index getGWAmax() const { return qpmax_; }
252
253 // access to list of indices used in RPA
254
255 bool hasRPAindices() const { return (rpamax_ > 0) ? true : false; }
256
257 void setRPAindices(Index rpamin, Index rpamax) {
258 rpamin_ = rpamin;
259 rpamax_ = rpamax;
260 }
261
262 Index getRPAmin() const { return rpamin_; }
263
264 Index getRPAmax() const { return rpamax_; }
265
266 // access to list of indices used in BSE
267
268 void setTDAApprox(bool usedTDA) { useTDA_ = usedTDA; }
269 bool getTDAApprox() const { return useTDA_; }
270
271 bool hasBSEindices() const { return (bse_cmax_ > 0) ? true : false; }
272
273 void setBSEindices(Index vmin, Index cmax) {
274 bse_vmin_ = vmin;
275 bse_vmax_ = getHomo();
276 bse_cmin_ = getLumo();
277 bse_cmax_ = cmax;
281 return;
282 }
283
284 Index getBSEvmin() const { return bse_vmin_; }
285
286 Index getBSEvmax() const { return bse_vmax_; }
287
288 Index getBSEcmin() const { return bse_cmin_; }
289
290 Index getBSEcmax() const { return bse_cmax_; }
291
292 double getScaHFX() const { return ScaHFX_; }
293
294 void setScaHFX(double ScaHFX) { ScaHFX_ = ScaHFX; }
295
296 // access to perturbative QP energies
297 bool hasRPAInputEnergies() const { return (rpa_inputenergies_.size() > 0); }
298
299 const Eigen::VectorXd &RPAInputEnergies() const { return rpa_inputenergies_; }
300
301 Eigen::VectorXd &RPAInputEnergies() { return rpa_inputenergies_; }
302
303 // access to RPA input energies energies
304 bool hasQPpert() const {
305 return (QPpert_energies_.size() > 0) ? true : false;
306 }
307
308 const Eigen::VectorXd &QPpertEnergies() const { return QPpert_energies_; }
309
310 Eigen::VectorXd &QPpertEnergies() { return QPpert_energies_; }
311
312 // access to diagonalized QP energies and wavefunctions
313
314 bool hasQPdiag() const {
315 return (QPdiag_.eigenvalues().size() > 0) ? true : false;
316 }
317 const tools::EigenSystem &QPdiag() const { return QPdiag_; }
319
320 bool hasBSETriplets() const {
321 return (BSE_triplet_.eigenvectors().cols() > 0) ? true : false;
322 }
323
324 const tools::EigenSystem &BSETriplets() const { return BSE_triplet_; }
325
327
328 // access to singlet energies and wave function coefficients
329
330 bool hasBSESinglets() const {
331 return (BSE_singlet_.eigenvectors().cols() > 0) ? true : false;
332 }
333
334 const tools::EigenSystem &BSESinglets() const { return BSE_singlet_; }
335
337
338 // access to BSE energies with dynamical screening
340 return (BSE_singlet_energies_dynamic_.size() > 0) ? true : false;
341 }
342
343 const Eigen::VectorXd &BSESinglets_dynamic() const {
345 }
346
347 Eigen::VectorXd &BSESinglets_dynamic() {
349 }
350
352 return (BSE_triplet_energies_dynamic_.size() > 0) ? true : false;
353 }
354
355 const Eigen::VectorXd &BSETriplets_dynamic() const {
357 }
358
359 Eigen::VectorXd &BSETriplets_dynamic() {
361 }
362
363 // access to transition dipole moments
364
365 bool hasTransitionDipoles() const {
366 return (transition_dipoles_.size() > 0) ? true : false;
367 }
368
369 const std::vector<Eigen::Vector3d> &TransitionDipoles() const {
370 return transition_dipoles_;
371 }
372
373 Eigen::VectorXd Oscillatorstrengths() const;
374
375 Eigen::Vector3d CalcElDipole(const QMState &state) const;
376
377 // Calculates full electron density for state or transition density, if you
378 // want to calculate only the density contribution of hole or electron use
379 // DensityMatrixExcitedState
380 Eigen::MatrixXd DensityMatrixFull(const QMState &state) const;
381 Eigen::MatrixXd DensityMatrixWithoutGS(const QMState &state) const;
382
383 // functions for calculating density matrices
384 Eigen::MatrixXd DensityMatrixGroundState() const;
385 std::array<Eigen::MatrixXd, 2> DensityMatrixExcitedState(
386 const QMState &state) const;
387 Eigen::MatrixXd DensityMatrixQuasiParticle(const QMState &state) const;
388 Eigen::MatrixXd DensityMatrixKSstate(const QMState &state) const;
389 Eigen::MatrixXd CalculateQParticleAORepresentation() const;
390 double getTotalStateEnergy(const QMState &state) const; // Hartree
391 double getExcitedStateEnergy(const QMState &state) const; // Hartree
392
393 void OrderMOsbyEnergy();
394
395 void PrepareDimerGuess(const Orbitals &orbitalsA, const Orbitals &orbitalsB);
396
398
399 void WriteToCpt(const std::string &filename) const;
400
401 void ReadFromCpt(const std::string &filename);
402
403 void WriteToCpt(CheckpointWriter w) const;
407
408 bool GetFlagUseHqpOffdiag() const { return use_Hqp_offdiag_; };
409 void SetFlagUseHqpOffdiag(bool flag) { use_Hqp_offdiag_ = flag; };
410
411 const Eigen::MatrixXd &getLMOs() const { return lmos_; };
412 void setLMOs(const Eigen::MatrixXd &matrix) { lmos_ = matrix; }
413
414 const Eigen::VectorXd &getLMOs_energies() const { return lmos_energies_; };
415 void setLMOs_energies(const Eigen::VectorXd &energies) {
416 lmos_energies_ = energies;
417 }
418
420 void setNumofActiveElectrons(const Index active_electrons) {
421 active_electrons_ = active_electrons;
422 }
423
424 const Eigen::MatrixXd &getInactiveDensity() const { return inactivedensity_; }
425 void setInactiveDensity(Eigen::MatrixXd inactivedensity) {
426 inactivedensity_ = inactivedensity;
427 }
428
429 private:
430 std::array<Eigen::MatrixXd, 3> CalcFreeTransition_Dipoles() const;
431
432 // returns indeces of a re-sorted vector of energies from lowest to highest
433 std::vector<Index> SortEnergies();
434
435 void WriteToCpt(CheckpointFile f) const;
436
438 Eigen::MatrixXd TransitionDensityMatrix(const QMState &state) const;
439 std::array<Eigen::MatrixXd, 2> DensityMatrixExcitedState_R(
440 const QMState &state) const;
441 std::array<Eigen::MatrixXd, 2> DensityMatrixExcitedState_AR(
442 const QMState &state) const;
443 Eigen::MatrixXd CalcAuxMat_cc(const Eigen::VectorXd &coeffs) const;
444 Eigen::MatrixXd CalcAuxMat_vv(const Eigen::VectorXd &coeffs) const;
445
450 std::string ECP_ = "";
452
453 std::string CalcType_ = "NoEmbedding";
454
457 Eigen::MatrixXd occupations_;
458
460
461 Eigen::MatrixXd lmos_;
462 Eigen::VectorXd lmos_energies_;
464 Eigen::MatrixXd inactivedensity_;
465 Eigen::MatrixXd expandedMOs_;
466
468
471
472 double qm_energy_ = 0;
473
476
477 // new variables for GW-BSE storage
480
490
491 double ScaHFX_ = 0;
492
493 std::string functionalname_ = "";
494 std::string grid_quality_ = "";
495 std::string qm_package_ = "";
496
497 Eigen::VectorXd rpa_inputenergies_;
498 // perturbative quasiparticle energies
499 Eigen::VectorXd QPpert_energies_;
500
501 // quasiparticle energies and coefficients after diagonalization
503
505 std::vector<Eigen::Vector3d> transition_dipoles_;
507
508 // singlet and triplet energies after perturbative dynamical screening
511
512 bool use_Hqp_offdiag_ = true;
513
514 // Version 2: adds BSE energies after perturbative dynamical screening
515 // Version 3: changed shell ordering
516 // Version 4: added vxc grid quality
517 // Version 5: added the dft and aux basisset
518 // Version 6: added spin in dft
519 static constexpr int orbitals_version() { return 6; }
520};
521
522} // namespace xtp
523} // namespace votca
524
525#endif // VOTCA_XTP_ORBITALS_H
const Eigen::VectorXd & eigenvalues() const
Definition eigensystem.h:30
const Eigen::MatrixXd & eigenvectors() const
Definition eigensystem.h:33
Container to hold Basisfunctions for all atoms.
Definition aobasis.h:42
void UpdateShellPositions(const QMMolecule &mol)
Definition aobasis.cc:128
Index AOBasisSize() const
Definition aobasis.h:46
const std::string & Name() const
Definition aobasis.h:81
container for molecular orbitals
Definition orbitals.h:46
Index getBSEvmax() const
Definition orbitals.h:286
const Eigen::MatrixXd getTruncMOsFullBasis() const
Definition orbitals.h:62
void setScaHFX(double ScaHFX)
Definition orbitals.h:294
void setCalculationType(std::string CalcType)
Definition orbitals.h:158
const tools::EigenSystem & BSETriplets() const
Definition orbitals.h:324
bool GetFlagUseHqpOffdiag() const
Definition orbitals.h:408
Index getNumOfActiveElectrons()
Definition orbitals.h:419
Index number_beta_electrons_
Definition orbitals.h:449
void CalcCoupledTransition_Dipoles()
Definition orbitals.cc:526
bool hasQPdiag() const
Definition orbitals.h:314
Index getCharge() const
Definition orbitals.h:167
Eigen::MatrixXd occupations_
Definition orbitals.h:457
Index getBSEcmin() const
Definition orbitals.h:288
bool hasRPAindices() const
Definition orbitals.h:255
Eigen::VectorXd rpa_inputenergies_
Definition orbitals.h:497
const tools::EigenSystem & QPdiag() const
Definition orbitals.h:317
Index getHomo() const
Definition orbitals.h:68
void ReadBasisSetsFromCpt(CheckpointReader r)
Definition orbitals.cc:703
Eigen::MatrixXd TransitionDensityMatrix(const QMState &state) const
Definition orbitals.cc:262
double getDFTTotalEnergy() const
Definition orbitals.h:193
bool hasBSESinglets_dynamic() const
Definition orbitals.h:339
void setInactiveDensity(Eigen::MatrixXd inactivedensity)
Definition orbitals.h:425
bool hasBSEindices() const
Definition orbitals.h:271
bool hasAuxbasisName() const
Definition orbitals.h:234
Index getSpin() const
Definition orbitals.h:166
Eigen::MatrixXd CalculateQParticleAORepresentation() const
Definition orbitals.cc:217
std::array< Eigen::MatrixXd, 2 > DensityMatrixExcitedState_R(const QMState &state) const
Definition orbitals.cc:320
const tools::EigenSystem & MOs_beta() const
Definition orbitals.h:128
void setNumofActiveElectrons(const Index active_electrons)
Definition orbitals.h:420
Eigen::VectorXd lmos_energies_
Definition orbitals.h:462
const tools::EigenSystem & BSESinglets() const
Definition orbitals.h:334
Index getBSEcmax() const
Definition orbitals.h:290
Eigen::VectorXd & BSESinglets_dynamic()
Definition orbitals.h:347
const Eigen::VectorXd & QPpertEnergies() const
Definition orbitals.h:308
bool getTDAApprox() const
Definition orbitals.h:269
tools::EigenSystem BSE_singlet_
Definition orbitals.h:504
void PrepareDimerGuess(const Orbitals &orbitalsA, const Orbitals &orbitalsB)
Guess for a dimer based on monomer orbitals.
Definition orbitals.cc:571
bool hasNumberOfLevelsBeta() const
Definition orbitals.h:74
tools::EigenSystem mos_beta_
Definition orbitals.h:456
std::string grid_quality_
Definition orbitals.h:494
bool hasMOs() const
Definition orbitals.h:117
void setTruncMOsFullBasis(const Eigen::MatrixXd &expandedMOs)
Definition orbitals.h:58
bool hasBSESinglets() const
Definition orbitals.h:330
double getTotalStateEnergy(const QMState &state) const
Definition orbitals.cc:442
Eigen::VectorXd BSE_triplet_energies_dynamic_
Definition orbitals.h:510
const Eigen::MatrixXd & Occupations() const
Definition orbitals.h:125
bool hasRPAInputEnergies() const
Definition orbitals.h:297
std::vector< Index > CheckDegeneracy(Index level, double energy_difference) const
Definition orbitals.cc:47
tools::EigenSystem & BSETriplets()
Definition orbitals.h:326
const AOBasis & getAuxBasis() const
Definition orbitals.h:218
Eigen::MatrixXd inactivedensity_
Definition orbitals.h:464
Index getNumberOfAlphaElectrons() const
Definition orbitals.h:93
void setLMOs_energies(const Eigen::VectorXd &energies)
Definition orbitals.h:415
std::string getCalculationType() const
Definition orbitals.h:159
bool hasQMAtoms() const
Definition orbitals.h:170
std::array< Eigen::MatrixXd, 3 > CalcFreeTransition_Dipoles() const
Definition orbitals.cc:508
void setLMOs(const Eigen::MatrixXd &matrix)
Definition orbitals.h:412
bool hasNumberOfBetaElectrons() const
Definition orbitals.h:89
const std::string & getQMpackage() const
Definition orbitals.h:112
QMMolecule & QMAtoms()
Definition orbitals.h:174
Eigen::MatrixXd CalcAuxMat_cc(const Eigen::VectorXd &coeffs) const
Definition orbitals.cc:369
void setRPAindices(Index rpamin, Index rpamax)
Definition orbitals.h:257
bool hasNumberOfLevels() const
Definition orbitals.h:71
Eigen::MatrixXd expandedMOs_
Definition orbitals.h:465
void setNumberOfAlphaElectrons(Index electrons)
Definition orbitals.h:96
Index getBSEvmin() const
Definition orbitals.h:284
void updateAtomPostion(Index atom_index, Eigen::Vector3d new_position)
Definition orbitals.h:176
Eigen::VectorXd & RPAInputEnergies()
Definition orbitals.h:301
Eigen::VectorXd Oscillatorstrengths() const
Definition orbitals.cc:428
std::vector< Eigen::Vector3d > transition_dipoles_
Definition orbitals.h:505
static constexpr int orbitals_version()
Definition orbitals.h:519
std::string functionalname_
Definition orbitals.h:493
Eigen::MatrixXd lmos_
Definition orbitals.h:461
Eigen::MatrixXd & Occupations()
Definition orbitals.h:126
Eigen::MatrixXd DensityMatrixWithoutGS(const QMState &state) const
Definition orbitals.cc:112
void WriteBasisSetsToCpt(CheckpointWriter w) const
Definition orbitals.cc:626
bool hasGWAindices() const
Definition orbitals.h:242
tools::EigenSystem & MOs()
Definition orbitals.h:123
bool hasQMEnergy() const
Definition orbitals.h:191
Eigen::MatrixXd DensityMatrixFull(const QMState &state) const
Definition orbitals.cc:140
bool hasTransitionDipoles() const
Definition orbitals.h:365
const Eigen::MatrixXd & getLMOs() const
Definition orbitals.h:411
Eigen::MatrixXd CalcAuxMat_vv(const Eigen::VectorXd &coeffs) const
Definition orbitals.cc:363
tools::EigenSystem & MOs_beta()
Definition orbitals.h:129
tools::EigenSystem & QPdiag()
Definition orbitals.h:318
void SetupAuxBasis(std::string aux_basis_name)
Definition orbitals.cc:99
std::string qm_package_
Definition orbitals.h:495
void setNumberOfBetaElectrons(Index electrons)
Definition orbitals.h:99
tools::EigenSystem BSE_triplet_
Definition orbitals.h:506
Index getRPAmax() const
Definition orbitals.h:264
void setBSEindices(Index vmin, Index cmax)
Definition orbitals.h:273
bool hasBasisSetSize() const
Definition orbitals.h:50
const Eigen::MatrixXd & getInactiveDensity() const
Definition orbitals.h:424
void setGWindices(Index qpmin, Index qpmax)
Definition orbitals.h:244
std::vector< Index > SortEnergies()
Definition orbitals.cc:72
std::array< Eigen::MatrixXd, 2 > DensityMatrixExcitedState_AR(const QMState &state) const
Definition orbitals.cc:375
bool hasQMpackage() const
Definition orbitals.h:110
double getExcitedStateEnergy(const QMState &state) const
Definition orbitals.cc:451
tools::EigenSystem & BSESinglets()
Definition orbitals.h:336
void setECPName(const std::string &ECP)
Definition orbitals.h:106
void setXCGrid(std::string grid)
Definition orbitals.h:187
void setNumberOfOccupiedLevels(Index occupied_levels)
Definition orbitals.h:78
const std::vector< Eigen::Vector3d > & TransitionDipoles() const
Definition orbitals.h:369
Index occupied_levels_beta_
Definition orbitals.h:447
tools::EigenSystem mos_
Definition orbitals.h:455
tools::EigenSystem QPdiag_
Definition orbitals.h:502
bool hasBSETriplets() const
Definition orbitals.h:320
Eigen::MatrixXd DensityMatrixKSstate(const QMState &state) const
Definition orbitals.cc:199
bool hasBSETriplets_dynamic() const
Definition orbitals.h:351
const std::string getAuxbasisName() const
Definition orbitals.h:238
Eigen::MatrixXd DensityMatrixQuasiParticle(const QMState &state) const
Definition orbitals.cc:226
bool hasQPpert() const
Definition orbitals.h:304
double getScaHFX() const
Definition orbitals.h:292
Index getBasisSetSize() const
Definition orbitals.h:64
void setQMEnergy(double qmenergy)
Definition orbitals.h:195
const Eigen::VectorXd & RPAInputEnergies() const
Definition orbitals.h:299
const std::string & getXCGrid() const
Definition orbitals.h:188
Eigen::VectorXd BSE_singlet_energies_dynamic_
Definition orbitals.h:509
Index getGWAmin() const
Definition orbitals.h:249
Eigen::VectorXd & QPpertEnergies()
Definition orbitals.h:310
bool hasECPName() const
Definition orbitals.h:102
const Eigen::VectorXd & BSETriplets_dynamic() const
Definition orbitals.h:355
const tools::EigenSystem & MOs() const
Definition orbitals.h:122
void setQMpackage(const std::string &qmpackage)
Definition orbitals.h:114
Eigen::VectorXd & BSETriplets_dynamic()
Definition orbitals.h:359
Eigen::MatrixXd DensityMatrixGroundState() const
Definition orbitals.cc:183
std::string CalcType_
Definition orbitals.h:453
const QMMolecule & QMAtoms() const
Definition orbitals.h:172
tools::EigenSystem mos_embedding_
Definition orbitals.h:459
const std::string & getXCFunctionalName() const
Definition orbitals.h:185
Index getGWAmax() const
Definition orbitals.h:251
void SetFlagUseHqpOffdiag(bool flag)
Definition orbitals.h:409
void ReadFromCpt(const std::string &filename)
Definition orbitals.cc:692
void setEmbeddedMOs(tools::EigenSystem &system)
Definition orbitals.h:54
void setNumberOfOccupiedLevelsBeta(Index occupied_levels_beta)
Definition orbitals.h:81
void setChargeAndSpin(Index charge, Index spin)
Definition orbitals.h:161
Eigen::VectorXd QPpert_energies_
Definition orbitals.h:499
void WriteToCpt(const std::string &filename) const
Definition orbitals.cc:615
bool hasDFTbasisName() const
Definition orbitals.h:198
const std::string & getECPName() const
Definition orbitals.h:104
const std::string & getDFTbasisName() const
Definition orbitals.h:202
bool hasBetaMOs() const
Definition orbitals.h:118
void SetupDftBasis(std::string basis_name)
Definition orbitals.cc:90
void setTDAApprox(bool usedTDA)
Definition orbitals.h:268
std::array< Eigen::MatrixXd, 2 > DensityMatrixExcitedState(const QMState &state) const
Definition orbitals.cc:302
bool isOpenShell() const
Definition orbitals.h:168
const Eigen::VectorXd & BSESinglets_dynamic() const
Definition orbitals.h:343
std::string ECP_
Definition orbitals.h:450
Index number_alpha_electrons_
Definition orbitals.h:448
const tools::EigenSystem & getEmbeddedMOs() const
Definition orbitals.h:56
Index NumberofStates(QMStateType type) const
Definition orbitals.h:135
Index getRPAmin() const
Definition orbitals.h:262
Eigen::Vector3d CalcElDipole(const QMState &state) const
Definition orbitals.cc:242
Index getNumberOfBetaElectrons() const
Definition orbitals.h:94
const AOBasis & getDftBasis() const
Definition orbitals.h:208
const Eigen::VectorXd & getLMOs_energies() const
Definition orbitals.h:414
QMMolecule atoms_
Definition orbitals.h:467
bool hasNumberOfAlphaElectrons() const
Definition orbitals.h:86
Index getLumo() const
Definition orbitals.h:66
void setXCFunctionalName(std::string functionalname)
Definition orbitals.h:182
statetype Type() const
Definition qmstate.h:51
Identifier for QMstates. Strings like S1 are converted into enum +zero indexed int.
Definition qmstate.h:132
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26