Psi4
wavefunction.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef _psi_src_lib_libmints_wavefunction_h
30 #define _psi_src_lib_libmints_wavefunction_h
31 
32 #include "typedefs.h"
35 
36 #include <stddef.h>
37 #include <vector>
38 #include <memory>
39 #include <map>
40 
41 #define MAX_IOFF 30000
42 extern size_t ioff[MAX_IOFF];
43 
44 #define MAX_DF 500
45 extern double df[MAX_DF];
46 
47 #define MAX_BC 20
48 extern double bc[MAX_BC][MAX_BC];
49 
50 #define MAX_FAC 100
51 extern double fac[MAX_FAC];
52 
53 #if !defined( EXPLICIT_IOFF )
54 # define EXPLICIT_IOFF(i) ( (i) * ((i) + 1) / 2 )
55 #endif
56 
57 #if !defined( INDEX2 )
58 # define INDEX2(i, j) ( (i) >= (j) ? EXPLICIT_IOFF(i) + (j) : EXPLICIT_IOFF(j) + (i) )
59 #endif
60 
61 #if !defined( INDEX4 )
62 # define INDEX4(i, j, k, l) ( INDEX2( INDEX2((i), (j)), INDEX2((k), (l)) ) )
63 #endif
64 
65 
66 namespace psi {
67 
68 class Molecule;
69 class BasisSet;
70 class IntegralFactory;
71 class Matrix;
72 class Vector;
73 class MatrixFactory;
74 class Options;
75 class SOBasisSet;
76 class PSIO;
77 class OrbitalSpace;
78 class ExternalPotential;
79 
84 class Wavefunction : public std::enable_shared_from_this<Wavefunction>
85 {
86 protected:
88  std::string name_;
89 
91  std::map<std::string, std::shared_ptr<BasisSet>> basissets_;
92 
94  std::shared_ptr<BasisSet> basisset_;
95 
97  std::shared_ptr<SOBasisSet> sobasisset_;
98 
101 
103  std::shared_ptr<Molecule> molecule_;
104 
107 
108  // PSI file access variables
109  std::shared_ptr<PSIO> psio_;
110 
112  std::shared_ptr<IntegralFactory> integral_;
113 
115  std::shared_ptr<MatrixFactory> factory_;
116 
117  std::shared_ptr<Wavefunction> reference_wavefunction_;
118 
120  long int memory_;
121 
123  size_t debug_;
125  size_t print_;
126 
129 
131  int nfrzc_;
132 
145 
150 
153 
155  double energy_;
156 
158  double efzc_;
159 
161  int nso_;
163  int nmo_;
165  int nirrep_;
166 
169 
172 
177 
182 
185 
190 
195 
198 
201 
204  const std::string& basis, const std::string& subset);
205  SharedMatrix F_subset_helper(SharedMatrix F, SharedMatrix C, const std::string& basis);
207  const std::string& basis, const std::string& subset);
208  std::vector<std::vector<int>> subset_occupation(const Dimension& noccpi,
209  const std::string& subset);
210 
212  std::shared_ptr<std::vector<double>> atomic_point_charges_;
213 
216 
219 
223 
224  // The external potenital
225  std::shared_ptr<ExternalPotential> external_pot_;
226 
227  // Collection of variables
228  std::map<std::string, double> variables_;
229  std::map<std::string, SharedMatrix> arrays_;
230 
231 private:
232  // Wavefunction() {}
233  void common_init();
234 
235 public:
236 
238  Wavefunction(std::shared_ptr<Molecule> molecule,
239  std::shared_ptr<BasisSet> basis,
240  Options& options);
241 
243  Wavefunction(std::shared_ptr<Molecule> molecule,
244  std::shared_ptr<BasisSet> basis);
245 
248 
257  void shallow_copy(SharedWavefunction other);
258  void shallow_copy(const Wavefunction* other);
259 
267  void deep_copy(SharedWavefunction other);
268  void deep_copy(const Wavefunction* other);
269 
270  virtual ~Wavefunction();
271 
273  virtual double compute_energy() {throw PSIEXCEPTION("Compute energy has not been implemented for this wavefunction.");}
274 
276  virtual SharedMatrix compute_gradient() {throw PSIEXCEPTION("Analytic gradients are not available for this wavefunction.");}
277 
279  virtual SharedMatrix compute_hessian() {throw PSIEXCEPTION("Analytic Hessians are not available for this wavefunction.");}
280 
282  bool same_a_b_orbs() const { return same_a_b_orbs_; }
283  bool same_a_b_dens() const { return same_a_b_dens_; }
284 
287  Dimension map_irreps(const Dimension &dimpi);
288 
290  std::shared_ptr<Molecule> molecule() const;
291  std::shared_ptr<PSIO> psio() const;
292  Options& options() const;
293 
295  std::shared_ptr<IntegralFactory> integral() const;
297  std::shared_ptr<BasisSet> basisset() const;
299  std::shared_ptr<SOBasisSet> sobasisset() const;
300 
302  std::shared_ptr<BasisSet> get_basisset(std::string label);
303  void set_basisset(std::string label, std::shared_ptr<BasisSet> basis);
304  bool basisset_exists(std::string label);
305 
306 
308  std::shared_ptr<MatrixFactory> matrix_factory() const;
310  std::shared_ptr<Wavefunction> reference_wavefunction() const;
312  void set_reference_wavefunction(const std::shared_ptr<Wavefunction> wfn);
313 
315  bool density_fitted() const { return density_fitted_; }
316 
318  int get_print() const { return print_; }
319  static void initialize_singletons();
320 
322  const Dimension& doccpi() const { return doccpi_; }
324  const Dimension& soccpi() const { return soccpi_; }
326  const Dimension& nsopi() const { return nsopi_; }
328  const Dimension& nmopi() const { return nmopi_; }
330  const Dimension& nalphapi() const { return nalphapi_; }
332  const Dimension& nbetapi() const { return nbetapi_; }
334  const Dimension& frzcpi() const { return frzcpi_; }
336  const Dimension& frzvpi() const { return frzvpi_; }
337 
338  void set_doccpi(const Dimension& doccpi);
339  void set_soccpi(const Dimension& soccpi);
340 
342  void set_frzvpi(const Dimension& frzvpi);
343 
345  int nfrzc() const { return nfrzc_; }
347  int nalpha() const { return nalpha_; }
349  int nbeta() const { return nbeta_; }
351  int nso() const { return nso_; }
353  int nmo() const { return nmo_; }
355  int nirrep() const { return nirrep_; }
357  double reference_energy () const { return energy_; }
359  double efzc() const { return efzc_; }
361  void set_efzc(double efzc) { efzc_ = efzc; }
362 
364  SharedMatrix S() const { return S_; }
365 
367  SharedMatrix H() const { return H_; }
368 
370  SharedMatrix Ca() const;
372  SharedMatrix Cb() const;
374  SharedMatrix Fa() const;
376  SharedMatrix Fb() const;
378  SharedVector epsilon_a() const;
380  SharedVector epsilon_b() const;
382  SharedMatrix Lagrangian() const;
383 
384  SharedMatrix aotoso() const { return AO2SO_; }
385 
387  const SharedMatrix Da() const;
389  SharedMatrix Db() const;
390 
399  SharedMatrix Ca_subset(const std::string& basis = "SO", const std::string& subset = "ALL");
400 
409  SharedMatrix Cb_subset(const std::string& basis = "SO", const std::string& subset = "ALL");
410 
420  OrbitalSpace alpha_orbital_space(const std::string& id, const std::string& basis = "SO", const std::string& subset = "ALL");
430  OrbitalSpace beta_orbital_space(const std::string& id, const std::string& basis = "SO", const std::string& subset = "ALL");
431 
438  SharedMatrix Da_subset(const std::string& basis = "SO");
439 
446  SharedMatrix Db_subset(const std::string& basis = "SO");
447 
456  SharedMatrix D_subset_helper(SharedMatrix D, SharedMatrix C, const std::string& basis);
457 
465  SharedVector epsilon_a_subset(const std::string& basis = "SO", const std::string& subset = "ALL");
466 
474  SharedVector epsilon_b_subset(const std::string& basis = "SO", const std::string& subset = "ALL");
475 
485  std::shared_ptr<BasisSet> old_basis,
486  std::shared_ptr<BasisSet> new_basis);
487 
489  SharedMatrix X() const;
490 
492  SharedMatrix gradient() const;
494  void set_gradient(SharedMatrix& grad);
495 
497  SharedMatrix hessian() const;
499  void set_hessian(SharedMatrix& hess);
500 
502  std::shared_ptr<std::vector<double>> atomic_point_charges()const{
503  return atomic_point_charges_;
504  }
507 
509  void set_atomic_point_charges(const std::shared_ptr<std::vector<double>>& apcs){
511  }
512 
514  SharedVector frequencies() const;
516  void set_frequencies(SharedVector& freqs);
517 
519  SharedVector normalmodes() const;
521  void set_normalmodes(SharedVector& norms);
522 
524  void set_name(const std::string& name) { name_ = name; }
525 
527  const std::string& name() const { return name_; }
528 
529  // Set the print flag level
530  void set_print(size_t print) { print_ = print; }
531 
532  // Set the debug flag level
533  void set_debug(size_t debug) { debug_ = debug; }
534 
536  virtual void save() const;
537 
538  // Set the external potential
539  void set_external_potential(std::shared_ptr<ExternalPotential> external) { external_pot_ = external; }
540 
542  double get_variable(const std::string key);
543  void set_variable(const std::string key, double value) { variables_[key] = value; }
544  std::map<std::string, double> variables(void) { return variables_; }
545 
547  SharedMatrix get_array(const std::string key);
548  void set_array(const std::string key, SharedMatrix value) { arrays_[key] = value; }
549  std::map<std::string, SharedMatrix> arrays(void) { return arrays_; }
550 };
551 
552 }
553 
554 #endif
#define MAX_BC
Definition: wavefunction.h:47
double reference_energy() const
Returns the reference energy.
Definition: wavefunction.h:357
SharedVector epsilon_a_
Alpha orbital eneriges.
Definition: wavefunction.h:192
SharedMatrix S_
Overlap matrix.
Definition: wavefunction.h:168
const Dimension & frzvpi() const
Returns the frozen virtual orbitals per irrep array.
Definition: wavefunction.h:336
const Dimension & nsopi() const
Returns the number of SOs per irrep array.
Definition: wavefunction.h:326
OrbitalSpace beta_orbital_space(const std::string &id, const std::string &basis="SO", const std::string &subset="ALL")
Creates an OrbitalSpace object containing information about the request beta orbital space...
Definition: wavefunction.cc:917
std::shared_ptr< Molecule > molecule() const
Returns the molecule object that pertains to this wavefunction.
Definition: wavefunction.cc:402
Options & options() const
Definition: wavefunction.cc:412
SharedMatrix AO2SO_
AO2SO conversion matrix (AO in rows, SO in cols)
Definition: wavefunction.h:100
std::shared_ptr< PSIO > psio_
Definition: wavefunction.h:109
SharedMatrix S() const
Returns the overlap matrix.
Definition: wavefunction.h:364
SharedVector epsilon_b_subset(const std::string &basis="SO", const std::string &subset="ALL")
Definition: wavefunction.cc:947
int nmo_
Total number of MOs.
Definition: wavefunction.h:163
Dimension soccpi_
Number of singly occupied per irrep.
Definition: wavefunction.h:136
int nbeta_
Definition: wavefunction.h:128
std::shared_ptr< PSIO > psio() const
Definition: wavefunction.cc:407
std::shared_ptr< BasisSet > basis
Definition: dx_write.cc:59
SharedMatrix H_
Core Hamiltonian matrix.
Definition: wavefunction.h:171
void set_frzvpi(const Dimension &frzvpi)
Sets the frozen virtual orbitals per irrep array.
Definition: wavefunction.cc:475
SharedMatrix Cb() const
Returns the beta electrons MO coefficients.
Definition: wavefunction.cc:492
void set_name(const std::string &name)
Set the wavefunction name (e.g. &quot;RHF&quot;, &quot;ROHF&quot;, &quot;UHF&quot;, &quot;CCEnergyWavefunction&quot;)
Definition: wavefunction.h:524
void set_print(size_t print)
Definition: wavefunction.h:530
Dimension frzcpi_
Number of frozen core per irrep.
Definition: wavefunction.h:138
std::vector< std::vector< int > > subset_occupation(const Dimension &noccpi, const std::string &subset)
Definition: wavefunction.cc:503
SharedMatrix Da_subset(const std::string &basis="SO")
Definition: wavefunction.cc:932
SharedMatrix get_array(const std::string key)
Get and set arrays dictionary.
Definition: wavefunction.cc:1057
void set_array(const std::string key, SharedMatrix value)
Definition: wavefunction.h:548
void set_normalmodes(SharedVector &norms)
Set the normalmodes for the wavefunction.
Definition: wavefunction.cc:1027
bool same_a_b_dens() const
Definition: wavefunction.h:283
std::shared_ptr< MatrixFactory > factory_
Matrix factory for creating standard sized matrices.
Definition: wavefunction.h:115
double efzc_
Frozen-core energy associated with this wavefunction.
Definition: wavefunction.h:158
double df[MAX_DF]
Definition: wavefunction.cc:61
const Dimension & soccpi() const
Returns the SOCC per irrep array.
Definition: wavefunction.h:324
size_t print_
Print flag.
Definition: wavefunction.h:125
std::shared_ptr< std::vector< double > > atomic_point_charges() const
Returns the atomic point charges.
Definition: wavefunction.h:502
SharedMatrix Lagrangian_
Lagrangian matrix.
Definition: wavefunction.h:184
double efzc() const
Returns the frozen-core energy.
Definition: wavefunction.h:359
void set_hessian(SharedMatrix &hess)
Set the Hessian for the wavefunction.
Definition: wavefunction.cc:1007
long int memory_
How much memory you have access to.
Definition: wavefunction.h:120
std::shared_ptr< IntegralFactory > integral_
Integral factory.
Definition: wavefunction.h:112
void set_debug(size_t debug)
Definition: wavefunction.h:533
void set_efzc(double efzc)
Sets the frozen-core energy.
Definition: wavefunction.h:361
void set_doccpi(const Dimension &doccpi)
double energy_
The energy associated with this wavefunction.
Definition: wavefunction.h:155
bool basisset_exists(std::string label)
Definition: wavefunction.cc:447
Dimension map_irreps(const Dimension &dimpi)
Definition: wavefunction.cc:351
void set_reference_wavefunction(const std::shared_ptr< Wavefunction > wfn)
Sets the reference wavefunction.
Definition: wavefunction.cc:470
#define MAX_FAC
Definition: wavefunction.h:50
int get_print() const
Returns the print level.
Definition: wavefunction.h:318
void set_frequencies(SharedVector &freqs)
Set the frequencies for the wavefunction.
Definition: wavefunction.cc:1022
std::map< std::string, double > variables_
Definition: wavefunction.h:228
int nalpha_
Total alpha and beta electrons.
Definition: wavefunction.h:128
std::shared_ptr< BasisSet > basisset() const
Returns the basis set object that pertains to this wavefunction.
Definition: wavefunction.cc:422
void set_gradient(SharedMatrix &grad)
Set the gradient for the wavefunction.
Definition: wavefunction.cc:997
void deep_copy(SharedWavefunction other)
Definition: wavefunction.cc:155
SharedMatrix Db_subset(const std::string &basis="SO")
Definition: wavefunction.cc:937
SharedMatrix basis_projection(SharedMatrix Cold, Dimension noccpi, std::shared_ptr< BasisSet > old_basis, std::shared_ptr< BasisSet > new_basis)
Definition: wavefunction.cc:774
SharedMatrix Ca() const
Returns the alpha electrons MO coefficients.
Definition: wavefunction.cc:481
SharedVector epsilon_b() const
Returns the beta orbital energies.
Definition: wavefunction.cc:972
void set_soccpi(const Dimension &soccpi)
double bc[MAX_BC][MAX_BC]
Definition: wavefunction.cc:62
bool same_a_b_dens_
Same orbs or dens.
Definition: wavefunction.h:221
SharedMatrix F_subset_helper(SharedMatrix F, SharedMatrix C, const std::string &basis)
Definition: wavefunction.cc:635
const Dimension & nmopi() const
Returns the number of MOs per irrep array.
Definition: wavefunction.h:328
#define MAX_DF
Definition: wavefunction.h:44
static void initialize_singletons()
Definition: wavefunction.cc:371
std::map< std::string, double > variables(void)
Definition: wavefunction.h:544
void shallow_copy(SharedWavefunction other)
Definition: wavefunction.cc:89
SharedMatrix Cb_subset(const std::string &basis="SO", const std::string &subset="ALL")
Definition: wavefunction.cc:927
const SharedMatrix Da() const
Returns the alpha OPDM for the wavefunction.
Definition: wavefunction.cc:977
int nfrzc_
Total frozen core orbitals.
Definition: wavefunction.h:131
int nalpha() const
Return the number of alpha electrons.
Definition: wavefunction.h:347
void set_basisset(std::string label, std::shared_ptr< BasisSet > basis)
Definition: wavefunction.cc:439
int nso_
Total number of SOs.
Definition: wavefunction.h:161
std::shared_ptr< std::vector< double > > atomic_point_charges_
If atomic point charges are available they will be here.
Definition: wavefunction.h:212
SharedMatrix Ca_
Alpha MO coefficients.
Definition: wavefunction.h:174
virtual ~Wavefunction()
Definition: wavefunction.cc:85
SharedMatrix Cb_
Beta MO coefficients.
Definition: wavefunction.h:176
size_t debug_
Debug flag.
Definition: wavefunction.h:123
void common_init()
Definition: wavefunction.cc:235
std::string name_
Name of the wavefunction.
Definition: wavefunction.h:88
const Dimension & doccpi() const
Returns the DOCC per irrep array.
Definition: wavefunction.h:322
bool density_fitted_
Whether this wavefunction was obtained using density fitting.
Definition: wavefunction.h:152
std::shared_ptr< MatrixFactory > matrix_factory() const
Returns the MatrixFactory object that pertains to this wavefunction.
Definition: wavefunction.cc:460
SharedMatrix hessian_
If a Hessian is available it will be here:
Definition: wavefunction.h:200
std::shared_ptr< Wavefunction > reference_wavefunction_
Definition: wavefunction.h:117
double get_variable(const std::string key)
Get and set variables dictionary.
Definition: wavefunction.cc:1047
Options & options_
Options object.
Definition: wavefunction.h:106
SharedMatrix gradient() const
Returns the gradient.
Definition: wavefunction.cc:992
SharedVector epsilon_a() const
Returns the alpha orbital energies.
Definition: wavefunction.cc:967
Definition: dimension.h:38
SharedMatrix hessian() const
Returns the Hessian.
Definition: wavefunction.cc:1002
virtual SharedMatrix compute_hessian()
Compute Hessian. Subclasses override this function to compute the Hessian.
Definition: wavefunction.h:279
std::shared_ptr< IntegralFactory > integral() const
An integral factory with basisset() on each center.
Definition: wavefunction.cc:417
SharedMatrix H() const
Returns the core Hamiltonian matrix.
Definition: wavefunction.h:367
std::shared_ptr< BasisSet > get_basisset(std::string label)
Getters and setters for other basis sets.
Definition: wavefunction.cc:427
Definition: liboptions.h:355
int nso() const
Returns the number of SOs.
Definition: wavefunction.h:351
virtual double compute_energy()
Compute energy. Subclasses override this function to compute its energy.
Definition: wavefunction.h:273
std::shared_ptr< BasisSet > basisset_
The ORBITAL basis.
Definition: wavefunction.h:94
void set_external_potential(std::shared_ptr< ExternalPotential > external)
Definition: wavefunction.h:539
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
SharedVector normalmodes() const
Returns the normalmodes.
Definition: wavefunction.cc:1017
std::shared_ptr< Wavefunction > wfn
Definition: dx_write.cc:60
double fac[MAX_FAC]
Definition: wavefunction.cc:63
std::shared_ptr< Wavefunction > reference_wavefunction() const
Returns the reference wavefunction.
Definition: wavefunction.cc:465
SharedVector get_atomic_point_charges() const
Returns the atomic point charges in Vector form for python output.
Definition: wavefunction.cc:1036
SharedVector epsilon_subset_helper(SharedVector epsilon, const Dimension &noccpi, const std::string &basis, const std::string &subset)
Definition: wavefunction.cc:591
Simple wavefunction base class.
Definition: wavefunction.h:84
SharedMatrix D_subset_helper(SharedMatrix D, SharedMatrix C, const std::string &basis)
Definition: wavefunction.cc:692
bool same_a_b_orbs_
Definition: wavefunction.h:222
#define MAX_IOFF
Definition: wavefunction.h:41
SharedVector normalmodes_
If normal modes are available, they will be here:
Definition: wavefunction.h:218
std::map< std::string, std::shared_ptr< BasisSet > > basissets_
DF/RI/F12/etc basis sets.
Definition: wavefunction.h:91
Dimension frzvpi_
Number of frozen virtuals per irrep.
Definition: wavefunction.h:140
Wavefunction(std::shared_ptr< Molecule > molecule, std::shared_ptr< BasisSet > basis, Options &options)
Constructor for an entirely new wavefunction with an existing basis.
Definition: wavefunction.cc:65
std::shared_ptr< Molecule > molecule_
Molecule that this wavefunction is run on.
Definition: wavefunction.h:103
SharedVector frequencies() const
Returns the frequencies.
Definition: wavefunction.cc:1012
SharedMatrix Lagrangian() const
Returns the SO basis Lagrangian.
Definition: wavefunction.cc:962
int nfrzc() const
Return the number of frozen core orbitals.
Definition: wavefunction.h:345
int nmo() const
Returns the number of MOs.
Definition: wavefunction.h:353
virtual void save() const
Save the wavefunction to checkpoint.
Definition: wavefunction.cc:1032
SharedMatrix Fa_
Alpha Fock matrix.
Definition: wavefunction.h:187
void set_variable(const std::string key, double value)
Definition: wavefunction.h:543
std::shared_ptr< SOBasisSet > sobasisset_
Primary basis set for SO integrals.
Definition: wavefunction.h:97
const Dimension & nbetapi() const
Returns the number of beta electrons per irrep array.
Definition: wavefunction.h:332
SharedMatrix Da_
Alpha density matrix.
Definition: wavefunction.h:179
std::shared_ptr< ExternalPotential > external_pot_
Definition: wavefunction.h:225
const std::string & name() const
Returns the wavefunction name.
Definition: wavefunction.h:527
The OrbitalSpace class.
Definition: orbitalspace.h:48
SharedVector frequencies_
If frequencies are available, they will be here:
Definition: wavefunction.h:215
int nbeta() const
Return the number of beta electrons.
Definition: wavefunction.h:349
void set_atomic_point_charges(const std::shared_ptr< std::vector< double >> &apcs)
Sets the atomic point charges.
Definition: wavefunction.h:509
SharedVector epsilon_a_subset(const std::string &basis="SO", const std::string &subset="ALL")
Definition: wavefunction.cc:942
std::shared_ptr< SOBasisSet > sobasisset() const
Returns the SO basis set object that pertains to this wavefunction.
Definition: wavefunction.cc:455
bool density_fitted() const
Returns whether this wavefunction was obtained using density fitting or not.
Definition: wavefunction.h:315
SharedVector epsilon_b_
Beta orbital energies.
Definition: wavefunction.h:194
int nirrep_
Number of irreps.
Definition: wavefunction.h:165
EXTERN int * ioff
Definition: ccresponse/globals.h:48
SharedMatrix aotoso() const
Definition: wavefunction.h:384
bool same_a_b_orbs() const
Is this a restricted wavefunction?
Definition: wavefunction.h:282
const Dimension & nalphapi() const
Returns the number of alpha electrons per irrep array.
Definition: wavefunction.h:330
SharedMatrix Db_
Beta density matrix.
Definition: wavefunction.h:181
const Dimension & frzcpi() const
Returns the frozen core orbitals per irrep array.
Definition: wavefunction.h:334
Dimension nmopi_
Number of mo per irrep.
Definition: wavefunction.h:149
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:54
std::map< std::string, SharedMatrix > arrays_
Definition: wavefunction.h:229
SharedMatrix Fb_
Beta Fock matrix.
Definition: wavefunction.h:189
Dimension nbetapi_
Number of beta electrons per irrep.
Definition: wavefunction.h:144
#define PSIEXCEPTION(message)
Definition: exception.h:48
SharedMatrix Ca_subset(const std::string &basis="SO", const std::string &subset="ALL")
Definition: wavefunction.cc:922
Dimension nalphapi_
Number of alpha electrons per irrep.
Definition: wavefunction.h:142
SharedMatrix Db() const
Returns the beta OPDM for the wavefunction.
Definition: wavefunction.cc:982
int nirrep() const
Returns the number of irreps.
Definition: wavefunction.h:355
SharedMatrix Fa() const
Returns the (SO basis) alpha Fock matrix.
Definition: wavefunction.cc:952
SharedMatrix X() const
Returns the Lagrangian in SO basis for the wavefunction.
Definition: wavefunction.cc:987
OrbitalSpace alpha_orbital_space(const std::string &id, const std::string &basis="SO", const std::string &subset="ALL")
Creates an OrbitalSpace object containing information about the request alpha orbital space...
Definition: wavefunction.cc:912
virtual SharedMatrix compute_gradient()
Compute gradient. Subclasses override this function to compute the gradient.
Definition: wavefunction.h:276
std::shared_ptr< Vector > SharedVector
Definition: adc.h:51
Dimension nsopi_
Number of so per irrep.
Definition: wavefunction.h:147
SharedMatrix Fb() const
Returns the (SO basis) beta Fock matrix.
Definition: wavefunction.cc:957
std::map< std::string, SharedMatrix > arrays(void)
Definition: wavefunction.h:549
SharedMatrix gradient_
If a gradient is available it will be here:
Definition: wavefunction.h:197
SharedMatrix C_subset_helper(SharedMatrix C, const Dimension &noccpi, SharedVector epsilon, const std::string &basis, const std::string &subset)
Helpers for C/D/epsilon transformers.
Definition: wavefunction.cc:541
Dimension doccpi_
Number of doubly occupied per irrep.
Definition: wavefunction.h:134