Psi4
dcft.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 program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef _PSI4_SRC_BIN_DCFT_DCFT_H_
29 #define _PSI4_SRC_BIN_DCFT_DCFT_H_
30 
31 #include "psi4/libmints/matrix.h"
32 #include "psi4/libmints/vector.h"
34 #include "psi4/libdpd/dpd.h"
35 #include "psi4/libciomr/libciomr.h"
37 
38 #define DCFT_TIMER
39 
40 // Handy mints timer macros, requires libqt to be included
41 #ifdef DCFT_TIMER
42 # include "psi4/libqt/qt.h"
43 
44 # define dcft_timer_on(a) timer_on((a));
45 # define dcft_timer_off(a) timer_off((a));
46 #else
47 # define dcft_timer_on(a)
48 # define dcft_timer_off(a)
49 #endif
50 
51 namespace psi{
52 
53 class Options;
54 class PSIO;
55 class Chkpt;
56 class Matrix;
57 class Vector;
58 class IntegralTransform;
59 
60 namespace dcft{
61 
63 {
64 public:
66  ~DCFTSolver();
67 
68  double compute_energy();
69 
70 protected:
72 
73  void mp2_guess();
74  void scf_guess();
75  void finalize();
76  void transform_integrals();
78  void sort_OOOO_integrals();
79  void sort_OOVV_integrals();
80  void sort_VVVV_integrals();
81  void sort_OVOV_integrals();
82  void sort_OVVV_integrals();
83  void sort_OOOV_integrals();
84  void init();
85  void compute_dcft_energy();
86  void compute_cepa0_energy();
88  void compute_scf_energy();
90  void build_tau();
91  void transform_tau();
92  void build_gtau();
93  void print_opdm();
97  void process_so_ints();
98  void build_G();
99  void build_AO_tensors();
100  void build_denominators();
101  void update_fock();
102  void dump_density();
103  void dpd_buf4_add(dpdbuf4 *A, dpdbuf4 *B, double alpha);
105  int *mospi_left, int *mospi_right, int **so_row, int **mo_row,
106  bool backwards, double alpha, double beta);
107  void file2_transform(dpdfile2 *A, dpdfile2 *B, SharedMatrix C, bool backwards);
108  void AO_contribute(dpdbuf4 *tau1_AO, dpdbuf4 *tau2_AO, int p, int q,
109  int r, int s, double value, dpdfile2* = NULL, dpdfile2* = NULL, dpdfile2* = NULL);
110  //void AO_contribute(dpdfile2 *tau1_AO, dpdfile2 *tau2_AO, int p, int q,
111  // int r, int s, double value);
112  bool correct_mo_phases(bool dieOnError = true);
113  double compute_cumulant_residual();
114  double compute_scf_error_vector();
115  double update_scf_density(bool damp = false);
116  void run_twostep_dcft();
119  void run_simult_dcft();
120  void run_simult_dcft_oo();
121  // DCFT analytic gradient subroutines
122  virtual SharedMatrix compute_gradient();
123  void compute_gradient_dc();
124  void compute_gradient_odc();
125  void response_guess();
126  void gradient_init();
127  void compute_lagrangian_OV();
128  void compute_lagrangian_VO();
130  void orbital_response_guess();
132  double update_orbital_response();
133  double compute_response_coupling();
136  void build_perturbed_tau();
140  void compute_lagrangian_OO();
141  void compute_lagrangian_VV();
142  void compute_ewdm_dc();
143  void compute_ewdm_odc();
148  void compute_TPDM_trace();
149  // Quadratically-convergent DCFT
150  void run_qc_dcft();
152  void form_idps();
153  void compute_sigma_vector();
159  int iterate_nr_jacobi();
160  void check_qc_convergence();
162  void update_cumulant_nr();
163  void run_davidson();
164  void davidson_guess();
165  // Exact Tau
166  void refine_tau();
168  // Cumulant residual intermediates
169  void compute_G_intermediate();
170  void compute_F_intermediate();
171  void compute_V_intermediate();
172  void compute_W_intermediate();
173  void compute_H_intermediate();
174  void compute_I_intermediate();
175  void compute_J_intermediate();
176  void compute_K_intermediate();
177  void compute_L_intermediate();
178  void compute_O_intermediate();
179  void compute_M_intermediate();
180  void compute_N_intermediate();
181 
182  // Orbital-optimized DCFT
183  void run_simult_dc_guess();
184  double compute_orbital_residual();
192  void rotate_orbitals();
193  void compute_oe_properties();
194  void write_molden_file();
195  // Three-particle cumulant contributions
197  void dcft_semicanonicalize();
199  void dump_semicanonical();
202  void semicanonicalize_dc();
203  double compute_triples_aaa();
204  double compute_triples_aab();
205  double compute_triples_abb();
206  double compute_triples_bbb();
207 
208  // RHF-reference DCFT
209  double compute_energy_RHF();
210  void scf_guess_RHF();
211  double update_scf_density_RHF(bool damp = false);
213  void build_denominators_RHF();
214  void mp2_guess_RHF();
223  void run_simult_dcft_oo_RHF();
224  void run_simult_dcft_RHF();
225  void build_tau_RHF();
226  void refine_tau_RHF();
227  void transform_tau_RHF();
228  void process_so_ints_RHF();
234  void compute_scf_energy_RHF();
238  void rotate_orbitals_RHF();
245  void compute_gradient_RHF();
246  void gradient_init_RHF();
250  void compute_ewdm_odc_RHF();
251  void print_opdm_RHF();
252  void compute_R_AA_and_BB();
253  void presort_mo_tpdm_AB();
254  void presort_mo_tpdm_AA();
255 
256  // UHF-reference DCFT
257  void compute_gradient_UHF();
258  double compute_energy_UHF();
259 
260  bool augment_b(double *vec, double tol);
274  int print_;
276  int ntriso_;
278  int nalpha_;
280  int nbeta_;
282  int navir_;
284  int nbvir_;
286  int maxdiis_;
290  int maxiter_;
292  int iter_;
293  // Quadratically-convergent DCFT
295  int nidp_;
311  int dim_;
321  int nguess_;
323  int b_dim_;
327  int n_add_;
329  int nevals_;
341  int *aocc_off_;
343  int *avir_off_;
345  int *bocc_off_;
347  int *bvir_off_;
349  double enuc_;
371  double scf_energy_;
379  double regularizer_;
383  double vec_add_tol_;
386 
461  // Quadratically-convergent DCFT
492 
493 
495  std::string indent;
496 
497 
498  // Density-Fitting DCFT
500  void df_build_b_ao();
502  void df_memory();
504  void build_DF_tensors_RHF();
505  void build_DF_tensors_UHF();
507  void formJm12(std::shared_ptr<BasisSet> auxiliary, std::shared_ptr<BasisSet> zero);
508  void formJm12_scf(std::shared_ptr<BasisSet> auxiliary, std::shared_ptr<BasisSet> zero);
510  void formb_ao(std::shared_ptr<BasisSet> primary, std::shared_ptr<BasisSet> auxiliary, std::shared_ptr<BasisSet> zero);
511  void formb_ao_scf(std::shared_ptr<BasisSet> primary, std::shared_ptr<BasisSet> auxiliary, std::shared_ptr<BasisSet> zero);
513  void transform_b();
515  void transform_b_ao2so();
516  void transform_b_ao2so_scf();
518  void formb_oo();
519  void formb_oo_scf();
521  void formb_ov();
523  void formb_vv();
525  void formb_pq();
526  void formb_pq_scf();
527 
529  void form_df_g_ovov();
531  void form_df_g_oooo();
533  void form_df_g_vvoo();
535  void form_df_g_vooo();
537  void form_df_g_ovvv();
539  void form_df_g_vvvv();
541  void build_gbarGamma_RHF();
542  void build_gbarGamma_UHF();
544  void build_gbarKappa_RHF();
545  void build_gbarKappa_UHF();
549 
550  // Density-Fitting DCFT
552  std::shared_ptr<BasisSet> auxiliary_;
554  std::shared_ptr<BasisSet> auxiliary_scf_;
556  std::shared_ptr<BasisSet> primary_;
558  int nn_;
560  int nQ_;
561  int nQ_scf_;
563  int naocc_;
565  double **Jm12_;
566  double **Jm12_scf_;
577 
592 
604 };
605 
606 }} // Namespaces
607 
608 #endif // Header guard
bool orbitalsDone_
Controls convergence of the orbital updates.
Definition: dcft.h:262
void transform_tau_RHF()
Definition: dcft_tau_RHF.cc:259
double compute_energy()
Definition: dcft_compute.cc:44
void half_transform(dpdbuf4 *A, dpdbuf4 *B, SharedMatrix &C1, SharedMatrix &C2, int *mospi_left, int *mospi_right, int **so_row, int **mo_row, bool backwards, double alpha, double beta)
Definition: half_transform.cc:58
void build_gbarlambda_UHF_v3mem()
Definition: dcft_df_tensor.cc:1818
void sort_OVVV_integrals()
Definition: dcft_integrals_UHF.cc:460
void run_qc_dcft()
Definition: dcft_qc.cc:39
double old_total_energy_
The previous total energy.
Definition: dcft.h:375
void compute_sigma_vector()
Definition: dcft_qc.cc:548
double regularizer_
The Tikhonow regularizer used to remove singularities (c.f. Taube and Bartlett, JCP, 2009)
Definition: dcft.h:379
void process_so_ints()
Definition: dcft_scf_UHF.cc:475
void form_density_weighted_fock()
Definition: dcft_intermediates_UHF.cc:540
SharedMatrix Fa_
The alpha Fock matrix in the SO basis.
Definition: dcft.h:428
double compute_cumulant_residual()
Definition: dcft_lambda_UHF.cc:45
void response_guess()
Definition: dcft_gradient_UHF.cc:337
bool cumulantDone_
Controls convergence of the decnsity cumulant updates.
Definition: dcft.h:264
Options & options() const
Definition: wavefunction.cc:400
void build_DF_tensors_RHF()
Build density-fitted &lt;VV||VV&gt;, &lt;vv||vv&gt;, and &lt;Vv|Vv&gt; tensors in G intermediate.
Definition: dcft_df_tensor.cc:1388
void form_idps()
Definition: dcft_qc.cc:322
void transform_core_integrals_RHF()
Definition: dcft_integrals_RHF.cc:248
void build_gbarKappa_UHF()
Definition: dcft_df_tensor.cc:2328
SharedMatrix bocc_tau_
The Tau matrix in the MO basis (beta occupied)
Definition: dcft.h:402
void dcft_semicanonicalize()
Definition: dcft_triples.cc:64
int nn_
Number of total primary basis functions.
Definition: dcft.h:558
void form_df_g_vooo()
Form density-fitted MO-basis TEI g(VO|OO) in chemists&#39; notation.
Definition: dcft_df_tensor.cc:1047
int b_dim_
The dimension of the subspace in the Davidson diagonalization.
Definition: dcft.h:323
void process_so_ints_RHF()
Definition: dcft_scf_RHF.cc:125
void sort_OVOV_integrals()
Definition: dcft_integrals_UHF.cc:139
double compute_triples_aaa()
Definition: dcft_triples.cc:766
void sort_VVVV_integrals()
Definition: dcft_integrals_UHF.cc:344
SharedVector Q_
The new element of Krylov subspace vector in the IDP basis for conjugate gradient procedure...
Definition: dcft.h:481
SharedMatrix scf_error_a_
The alpha SCF error vector.
Definition: dcft.h:458
void form_df_g_vvvv()
Form density-fitted MO-basis TEI g&lt;VV|VV&gt; in physists&#39; notation.
Definition: dcft_df_tensor.cc:1321
SharedMatrix kappa_so_a_
The alpha kappa matrix in the SO basis.
Definition: dcft.h:446
void presort_mo_tpdm_AA()
Definition: dcft_sort_mo_tpdm.cc:201
void compute_F_intermediate_RHF()
Definition: dcft_intermediates_RHF.cc:218
SharedMatrix bQpqB_mo_
Definition: dcft.h:589
SharedMatrix kappa_mo_a_
The Kappa in the MO basis (alpha occupied)
Definition: dcft.h:416
SharedMatrix aocc_tau_
The Tau matrix in the MO basis (alpha occupied)
Definition: dcft.h:400
~DCFTSolver()
Definition: dcft.cc:112
SharedVector D_
The conjugate direction vector in the IDP basis for conjugate gradient procedure. ...
Definition: dcft.h:475
double compute_orbital_residual_RHF()
Definition: dcft_oo_RHF.cc:214
void run_twostep_dcft_orbital_updates()
Definition: dcft_compute_UHF.cc:346
int n_add_
The number of vectors that can be added during the iteration in the Davidson diagonalization.
Definition: dcft.h:327
SharedMatrix mo_gammaB_
Definition: dcft.h:603
void formb_pq()
Form MO-basis b(Q, pq)
Definition: dcft_df_tensor.cc:729
bool energyConverged_
Controls convergence of the DCFT energy.
Definition: dcft.h:268
double diis_start_thresh_
The convergence that must be achieved before DIIS extrapolation starts.
Definition: dcft.h:369
double new_total_energy_
The updated total energy.
Definition: dcft.h:377
void sort_OVOV_integrals_RHF()
Definition: dcft_integrals_RHF.cc:156
double compute_cumulant_response_residual()
Definition: dcft_gradient_UHF.cc:3082
void AO_contribute(dpdbuf4 *tau1_AO, dpdbuf4 *tau2_AO, int p, int q, int r, int s, double value, dpdfile2 *=NULL, dpdfile2 *=NULL, dpdfile2 *=NULL)
Definition: dcft/AO_contribute.cc:40
SharedMatrix orbital_gradient_b_
The orbital gradient in the MO basis (Beta spin)
Definition: dcft.h:465
void mp2_guess_RHF()
Definition: dcft_mp2_RHF.cc:47
void compute_I_intermediate()
Definition: dcft_intermediates_UHF.cc:1910
SharedMatrix bQmn_ao_scf_
Definition: dcft.h:570
void transform_b_ao2so()
Transform b(Q|mu,nu) from AO basis to SO basis.
Definition: dcft_df_tensor.cc:380
void compute_W_intermediate()
Definition: dcft_intermediates_UHF.cc:2449
void gradient_init_RHF()
Definition: dcft_gradient_RHF.cc:52
SharedMatrix bQabB_mo_
Definition: dcft.h:586
void presort_mo_tpdm_AB()
Definition: dcft_sort_mo_tpdm.cc:50
double response_coupling_rms_
The RMS value of the change in the coupling of orbital and cumulant response.
Definition: dcft.h:361
void dump_semicanonical()
Definition: dcft_triples.cc:131
void print_opdm_RHF()
Definition: dcft_tau_RHF.cc:321
void compute_dcft_energy_RHF()
Definition: dcft_energy_RHF.cc:40
int * avir_off_
Alpha virtual MO offset.
Definition: dcft.h:343
double ** Jm12_
J^-1/2 Matrix.
Definition: dcft.h:565
void compute_H_intermediate()
Definition: dcft_intermediates_UHF.cc:1811
SharedMatrix bQmn_so_
Definition: dcft.h:569
SharedMatrix mo_gbarGamma_A_
MO-based (Gbar Tau + Gbar Kappa)
Definition: dcft.h:597
int nevals_
The number of eigenvalues requested in the stability check.
Definition: dcft.h:329
SharedMatrix bvir_ptau_
The perturbed Tau matrix in the MO basis (beta virtual)
Definition: dcft.h:414
void formb_oo_scf()
Definition: dcft_df_tensor.cc:2731
void print_orbital_energies()
Definition: dcft_scf_UHF.cc:228
void update_cumulant_response()
Definition: dcft_gradient_UHF.cc:3192
void compute_sigma_vector_orb_cum()
Definition: dcft_qc.cc:882
virtual SharedMatrix compute_gradient()
Compute gradient. Subclasses override this function to compute the gradient.
Definition: dcft_gradient.cc:38
void sort_OOOO_integrals_RHF()
Definition: dcft_integrals_RHF.cc:166
void transform_b()
Transform AO-basis b(Q, mn) to MO-basis b(Q, pq)
Definition: dcft_df_tensor.cc:365
SharedMatrix g_tau_a_
The alpha external potential in the SO basis.
Definition: dcft.h:450
void compute_orbital_rotation_nr()
Definition: dcft_qc.cc:1960
void compute_relaxed_density_OOVV()
Definition: dcft_density_UHF.cc:1334
SharedMatrix X_a_
Generator of the orbital rotations (Alpha) with respect to the orbitals from the previous update...
Definition: dcft.h:485
void build_gbarGamma_UHF()
Definition: dcft_df_tensor.cc:2162
bool exact_tau_
Whether the user requested the DCFT functional that computes the non-idempotent part of the OPDM exac...
Definition: dcft.h:272
SharedMatrix bQiaA_mo_
b(Q|i, a)
Definition: dcft.h:579
int dim_orbitals_
The maximum number of IDPs possible for orbital updates.
Definition: dcft.h:313
void init()
Definition: dcft_memory.cc:50
void compute_cumulant_response_intermediates()
Definition: dcft_gradient_UHF.cc:2330
double compute_scf_error_vector()
Definition: dcft_scf_UHF.cc:378
SharedMatrix bvir_tau_
The Tau matrix in the MO basis (beta virtual)
Definition: dcft.h:406
void form_df_g_oooo()
Form density-fitted MO-basis TEI g(OO|OO) in chemists&#39; notation.
Definition: dcft_df_tensor.cc:882
void sort_OOVV_integrals_RHF()
Definition: dcft_integrals_RHF.cc:175
void transform_core_integrals()
Definition: dcft_integrals_UHF.cc:523
SharedMatrix g_tau_b_
The beta external potential in the SO basis.
Definition: dcft.h:452
SharedMatrix bQaiB_mo_
Definition: dcft.h:583
bool orbital_optimized_
Whether the user requested the DCFT functional that is variationally orbitally-optimized.
Definition: dcft.h:270
Definition: dcft.h:62
void transform_integrals_triples()
Definition: dcft_triples.cc:96
void scf_guess_RHF()
Definition: dcft_scf_RHF.cc:50
void build_gbarGamma_RHF()
Form MO-based Gbar*Gamma.
Definition: dcft_df_tensor.cc:1547
SharedMatrix old_ca_
The old full alpha MO coefficients.
Definition: dcft.h:442
int orbital_idp_
The total number of orbital independent pairs for the current NR step.
Definition: dcft.h:301
void compute_R_AA_and_BB()
Definition: dcft_lambda_RHF.cc:130
void sort_OOOO_integrals()
Definition: dcft_integrals_UHF.cc:221
void compute_L_intermediate()
Definition: dcft_intermediates_UHF.cc:2210
SharedMatrix mo_gammaA_
MO-based Gamma &lt;r|s&gt;
Definition: dcft.h:602
int nQ_
Number of total auxilliary basis functions.
Definition: dcft.h:560
double compute_three_particle_energy()
Definition: dcft_triples.cc:38
void form_df_g_vvoo()
Form density-fitted MO-basis TEI g(VV|OO) in chemists&#39; notation.
Definition: dcft_df_tensor.cc:945
Enter brief description of file here.
void compute_ewdm_dc()
Definition: dcft_gradient_UHF.cc:3795
void build_gtau()
Definition: dcft_integrals_UHF.cc:842
void update_cumulant_jacobi_RHF()
Definition: dcft_lambda_RHF.cc:87
void mp2_guess()
Definition: dcft_mp2_UHF.cc:48
SharedMatrix moFb_
The beta Fock matrix in the MO basis.
Definition: dcft.h:434
void build_cumulant_intermediates()
Definition: dcft_intermediates_UHF.cc:40
int nidp_
The total number of independent pairs for the current NR step.
Definition: dcft.h:295
void semicanonicalize_gbar_ooov()
Definition: dcft_triples.cc:403
double vec_add_tol_
The threshold for the norm of the residual part of the subspace (|b&#39;&gt; = |b&#39;&gt; - |b&gt;&lt;b|b&#39;&gt;) that is use...
Definition: dcft.h:383
double compute_triples_bbb()
Definition: dcft_triples.cc:2532
void davidson_guess()
Definition: dcft_qc.cc:2259
void compute_cepa0_energy()
Definition: dcft_energy_UHF.cc:163
double enuc_
The nuclear repulsion energy in Hartree.
Definition: dcft.h:349
int maxdiis_
The maximum size of the DIIS subspace.
Definition: dcft.h:286
SharedMatrix aocc_c_
The alpha occupied eigenvectors, per irrep.
Definition: dcft.h:388
int cumulant_idp_bb_
The number of cumulant independent pairs for the current NR step (Beta-Beta spin) ...
Definition: dcft.h:307
int max_space_
The maximum size of the subspace in stability check.
Definition: dcft.h:331
void compute_dcft_energy()
Definition: dcft_energy_UHF.cc:40
int * bocc_off_
Beta occupied MO offset.
Definition: dcft.h:345
void iterate_cumulant_response()
Definition: dcft_gradient_UHF.cc:1966
SharedMatrix mo_gbarKappa_B_
Definition: dcft.h:600
void update_cumulant_nr()
Definition: dcft_qc.cc:2001
int print_
The amount of information to print.
Definition: dcft.h:274
void formb_ao_scf(std::shared_ptr< BasisSet > primary, std::shared_ptr< BasisSet > auxiliary, std::shared_ptr< BasisSet > zero)
Definition: dcft_df_tensor.cc:2575
void compute_K_intermediate()
Definition: dcft_intermediates_UHF.cc:2033
double compute_cumulant_residual_RHF()
Definition: dcft_lambda_RHF.cc:45
SharedMatrix moFa_
The alpha Fock matrix in the MO basis.
Definition: dcft.h:432
SharedMatrix avir_ptau_
The perturbed Tau matrix in the MO basis (alpha virtual)
Definition: dcft.h:412
void compute_unrelaxed_density_VVVV_RHF()
Definition: dcft_density_RHF.cc:290
double compute_energy_UHF()
Definition: dcft_compute_UHF.cc:45
int nbvir_
The number of virtual beta orbitals.
Definition: dcft.h:284
double energy_level_shift_
Level shift applied to the diagonal of the density-weighted Fock operator.
Definition: dcft.h:385
double cumulant_convergence_
The RMS value of the change in lambda after the lambda iterations.
Definition: dcft.h:355
std::shared_ptr< BasisSet > auxiliary_
Auxiliary basis.
Definition: dcft.h:552
void transform_integrals_RHF()
Definition: dcft_integrals_RHF.cc:43
void compute_N_intermediate()
Definition: dcft_intermediates_UHF.cc:3760
void compute_gradient_dc()
Definition: dcft_gradient_UHF.cc:52
void compute_sigma_vector_orb_orb()
Definition: dcft_qc.cc:790
void formb_ov()
Form MO-basis b(Q, ia)
Definition: dcft_df_tensor.cc:536
void df_memory()
Calculate memory required for density-fitting.
Definition: dcft_df_tensor.cc:311
void sort_OOOV_integrals()
Definition: dcft_integrals_UHF.cc:371
double update_scf_density_RHF(bool damp=false)
Definition: dcft_scf_RHF.cc:87
SharedMatrix bQmn_so_scf_
Definition: dcft.h:571
void compute_gradient_odc_RHF()
Definition: dcft_gradient_RHF.cc:89
void gradient_init()
Definition: dcft_gradient_UHF.cc:258
SharedMatrix s_half_inv_
The inverse square root overlap matrix in the SO basis.
Definition: dcft.h:440
void refine_tau_RHF()
Definition: dcft_tau_RHF.cc:129
void compute_relaxed_density_VVVV()
Definition: dcft_density_UHF.cc:1697
void sort_OVVV_integrals_RHF()
Definition: dcft_integrals_RHF.cc:237
bool correct_mo_phases(bool dieOnError=true)
Definition: dcft_scf_UHF.cc:53
void semicanonicalize_dc()
Definition: dcft_triples.cc:614
SharedMatrix bQijA_mo_scf_
Definition: dcft.h:575
Dimension naoccpi_
The number of occupied alpha orbitals per irrep.
Definition: dcft.h:333
void run_simult_dcft_oo_RHF()
Definition: dcft_oo_RHF.cc:45
void compute_ewdm_odc()
Definition: dcft_gradient_UHF.cc:4740
SharedMatrix so_h_
The one-electron integrals in the SO basis.
Definition: dcft.h:422
void compute_oe_properties()
Definition: dcft_density_UHF.cc:2041
void iterate_orbital_response()
Definition: dcft_gradient_UHF.cc:1145
SharedMatrix Xtotal_a_
Generator of the orbital rotations (Alpha) with respect to the reference orbitals.
Definition: dcft.h:489
void compute_unrelaxed_density_OOOO_RHF()
Definition: dcft_density_RHF.cc:39
void build_gbarKappa_RHF()
Form MO-based Gbar*Kappa.
Definition: dcft_df_tensor.cc:1653
void compute_F_intermediate()
Definition: dcft_intermediates_UHF.cc:410
double update_scf_density(bool damp=false)
Definition: dcft_scf_UHF.cc:426
SharedVector S_
The search direction vector in the IDP basis for conjugate gradient procedure.
Definition: dcft.h:479
SharedMatrix bQijB_mo_
Definition: dcft.h:574
double r_convergence_
Convergence of the residual in the Davidson diagonalization.
Definition: dcft.h:325
Dimension navirpi_
The number of virtual alpha orbitals per irrep.
Definition: dcft.h:337
SharedMatrix bocc_ptau_
The perturbed Tau matrix in the MO basis (beta occupied)
Definition: dcft.h:410
void update_cumulant_jacobi()
Definition: dcft_lambda_UHF.cc:204
void build_gbarlambda_RHF_v3mem()
Form gbar&lt;ab|cd&gt; * lambda &lt;ij|cd&gt;
Definition: dcft_df_tensor.cc:1425
void formb_ao(std::shared_ptr< BasisSet > primary, std::shared_ptr< BasisSet > auxiliary, std::shared_ptr< BasisSet > zero)
Form AO basis b(Q|mu,nu)
Definition: dcft_df_tensor.cc:212
double compute_orbital_residual()
Definition: dcft_oo_UHF.cc:234
void build_tau_fourth_order()
Definition: dcft_tau_UHF.cc:170
SharedVector gradient_
Orbital and cumulant gradient in the basis of IDP.
Definition: dcft.h:467
void compute_orbital_response_intermediates()
Definition: dcft_gradient_UHF.cc:1270
void semicanonicalize_gbar_ovvv()
Definition: dcft_triples.cc:219
void run_simult_dc_guess()
Definition: dcft_oo_UHF.cc:201
int ntriso_
The number of unique pairs of symmetrized atomic orbitals.
Definition: dcft.h:276
SharedMatrix tau_so_b_
The Tau matrix in the AO basis, stored by irrep, to perturb the beta Fock matrix. ...
Definition: dcft.h:398
void build_perturbed_tau()
Definition: dcft_gradient_UHF.cc:2114
void compute_orbital_rotation_jacobi_RHF()
Definition: dcft_oo_RHF.cc:591
void compute_unrelaxed_density_OOVV()
Definition: dcft_density_UHF.cc:222
void run_simult_dcft_oo()
Definition: dcft_oo_UHF.cc:39
SharedMatrix b_
The subspace vector in the Davidson diagonalization procedure.
Definition: dcft.h:483
SharedMatrix bQmn_ao_
b(Q|mu,nu)
Definition: dcft.h:568
void form_density_weighted_fock_RHF()
Definition: dcft_intermediates_RHF.cc:255
int orbital_idp_a_
The number of orbital independent pairs for the current NR step (Alpha spin)
Definition: dcft.h:297
SharedMatrix tau_so_a_
The Tau matrix in the AO basis, stored by irrep, to perturb the alpha Fock matrix.
Definition: dcft.h:396
SharedVector sigma_
Sigma vector in the basis of IDP (the product of the off-diagonal part of the Hessian with the step v...
Definition: dcft.h:473
void update_fock()
Definition: dcft_scf_UHF.cc:1050
int nQ_scf_
Definition: dcft.h:561
void formb_oo()
Form MO-basis b(Q, ij)
Definition: dcft_df_tensor.cc:437
void transform_b_ao2so_scf()
Definition: dcft_df_tensor.cc:2674
SharedMatrix orbital_gradient_a_
The orbital gradient in the MO basis (Alpha spin)
Definition: dcft.h:463
bool augment_b(double *vec, double tol)
Definition: dcft_qc.cc:2276
void compute_scf_energy_RHF()
Definition: dcft_scf_RHF.cc:491
void compute_J_intermediate()
Definition: dcft_intermediates_UHF.cc:1972
void orbital_response_guess()
Definition: dcft_gradient_UHF.cc:1216
void run_twostep_dcft()
Definition: dcft_compute_UHF.cc:174
SharedMatrix ao_s_
The overlap matrix in the AO basis.
Definition: dcft.h:420
void formJm12(std::shared_ptr< BasisSet > auxiliary, std::shared_ptr< BasisSet > zero)
Form J(P|Q)^-1/2.
Definition: dcft_df_tensor.cc:125
double orbitals_convergence_
The RMS value of the error vector after the SCF iterations.
Definition: dcft.h:353
SharedMatrix mo_tauA_
The Tau in the MO basis (All)
Definition: dcft.h:594
int dim_cumulant_
The maximum number of IDPs possible for cumulant updates.
Definition: dcft.h:315
void finalize()
Definition: dcft_memory.cc:203
SharedMatrix Fb_
The beta Fock matrix in the SO basis.
Definition: dcft.h:430
void compute_unrelaxed_density_VVVV()
Definition: dcft_density_UHF.cc:1007
void transform_tau()
Definition: dcft_tau_UHF.cc:637
int naocc_
Number of alpha occupied orbitals.
Definition: dcft.h:563
void compute_lagrangian_VV()
Definition: dcft_gradient_UHF.cc:3553
double cumulant_response_rms_
The RMS value of the change in the cumulant response.
Definition: dcft.h:359
int run_twostep_dcft_cumulant_updates()
Definition: dcft_compute_UHF.cc:227
Definition: dimension.h:39
int nguess_
The number of the guess subspace vectors for the Davidson diagonalization.
Definition: dcft.h:321
void compute_orbital_rotation_jacobi()
Definition: dcft_oo_UHF.cc:893
double compute_energy_RHF()
Definition: dcft_compute_RHF.cc:45
void write_molden_file()
Definition: dcft_density_UHF.cc:2103
Dimension nbvirpi_
The number of virtual beta orbitals per irrep.
Definition: dcft.h:339
SharedMatrix moF0b_
The beta Fock matrix (without Tau contribution) in the MO basis.
Definition: dcft.h:426
SharedMatrix bQpqA_mo_scf_
Definition: dcft.h:590
SharedMatrix mo_gbarKappa_A_
Definition: dcft.h:599
Definition: liboptions.h:359
void run_davidson()
Definition: dcft_qc.cc:2075
int dim_
The maximum number of IDPs ever possible.
Definition: dcft.h:311
void compute_orbital_gradient_VO_RHF()
Definition: dcft_oo_RHF.cc:445
double compute_scf_error_vector_RHF()
Definition: dcft_scf_RHF.cc:514
Header file for the Quantum Trio LibraryDavid Sherrill 1994.
void build_AO_tensors()
Definition: dcft_scf_UHF.cc:1136
SharedMatrix bQijA_mo_
b(Q|i, j)
Definition: dcft.h:573
void dpd_buf4_add(dpdbuf4 *A, dpdbuf4 *B, double alpha)
Definition: dcft.cc:92
Definition: libdpd/dpd.h:139
SharedMatrix bQpqB_mo_scf_
Definition: dcft.h:591
double lambda_energy_
The Lambda component of the energy.
Definition: dcft.h:373
double compute_triples_abb()
Definition: dcft_triples.cc:1935
double orbital_response_rms_
The RMS value of the change in the orbital response.
Definition: dcft.h:357
double energy_threshold_
The convergence criterion for energy.
Definition: dcft.h:367
void build_G()
Definition: dcft_scf_UHF.cc:1459
void compute_V_intermediate()
Definition: dcft_intermediates_UHF.cc:738
void compute_orbital_gradient()
Definition: dcft_qc.cc:206
void form_df_g_ovov()
Form density-fitted MO-basis TEI g(OV|OV) in chemists&#39; notation.
Definition: dcft_df_tensor.cc:819
IntegralTransform * _ints
Definition: dcft.h:71
int cumulant_idp_aa_
The number of cumulant independent pairs for the current NR step (Alpha-Alpha spin) ...
Definition: dcft.h:303
void print_opdm()
Definition: dcft_tau_UHF.cc:720
void sort_OOVV_integrals()
Definition: dcft_integrals_UHF.cc:248
int maxiter_
The maximum number of iterations.
Definition: dcft.h:290
SharedMatrix Ftilde_a_
The alpha density-weighted Fock matrix in the MO basis.
Definition: dcft.h:436
double compute_triples_aab()
Definition: dcft_triples.cc:1323
SharedMatrix mo_gbarGamma_B_
Definition: dcft.h:598
std::shared_ptr< BasisSet > auxiliary_scf_
Auxiliary basis for SCF terms in DCT.
Definition: dcft.h:554
SharedMatrix Xtotal_b_
Generator of the orbital rotations (Beta) with respect to the reference orbitals. ...
Definition: dcft.h:491
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
int * bvir_off_
Beta virtual MO offset.
Definition: dcft.h:347
void dump_density()
Definition: dcft_n_representability.cc:40
void sort_OOOV_integrals_RHF()
Definition: dcft_integrals_RHF.cc:226
SharedMatrix bocc_c_
The beta occupied eigenvectors, per irrep.
Definition: dcft.h:390
DCFTSolver(SharedWavefunction ref_wfn, Options &options)
Definition: dcft.cc:44
SharedVector R_
The residual vector in the IDP basis for conjugate gradient procedure.
Definition: dcft.h:477
Dimension nboccpi_
The number of occupied beta orbitals per irrep.
Definition: dcft.h:335
double update_orbital_response()
Definition: dcft_gradient_UHF.cc:1407
double cumulant_threshold_
The convergence criterion for the lambda iterations.
Definition: dcft.h:363
void scf_guess()
Definition: dcft_scf_UHF.cc:309
Simple wavefunction base class.
Definition: wavefunction.h:85
int * lookup_orbitals_
The lookup array that determines which compound indices belong to orbital IDPs and which don&#39;t...
Definition: dcft.h:317
int mindiisvecs_
The number of DIIS vectors needed for extrapolation.
Definition: dcft.h:288
void compute_sigma_vector_cum_orb()
Definition: dcft_qc.cc:1437
void compute_O_intermediate()
Definition: dcft_intermediates_UHF.cc:2402
double orbital_level_shift_
Level shift for denominators in orbital updates.
Definition: dcft.h:381
void form_df_g_ovvv()
Form density-fitted MO-basis TEI g(OV|VV) in chemists&#39; notation.
Definition: dcft_df_tensor.cc:1235
SharedVector X_
The step vector in the IDP basis.
Definition: dcft.h:471
Definition: libdpd/dpd.h:104
SharedMatrix bQabA_mo_
b(Q|a, b)
Definition: dcft.h:585
int iterate_nr_jacobi()
Definition: dcft_qc.cc:1885
void compute_lagrangian_OV()
Definition: dcft_gradient_UHF.cc:384
void df_build_b_ao()
Density-fitted MP2 (DF-MP2) guess.
Definition: dcft_df_tensor.cc:75
void compute_orbital_gradient_OV()
Definition: dcft_oo_UHF.cc:304
void transform_integrals()
Definition: dcft_integrals_UHF.cc:43
SharedMatrix old_cb_
The old full beta MO coefficients.
Definition: dcft.h:444
void compute_M_intermediate()
Definition: dcft_intermediates_UHF.cc:3705
void compute_gradient_RHF()
Definition: dcft_gradient_RHF.cc:38
void compute_G_intermediate()
Definition: dcft_intermediates_UHF.cc:64
SharedMatrix moF0a_
The alpha Fock matrix (without Tau contribution) in the MO basis.
Definition: dcft.h:424
void build_tau()
Definition: dcft_tau_UHF.cc:47
void formb_pq_scf()
Definition: dcft_df_tensor.cc:2830
void compute_gradient_odc()
Definition: dcft_gradient_UHF.cc:243
double compute_response_coupling()
Definition: dcft_gradient_UHF.cc:1521
void run_simult_dcft_RHF()
Definition: dcft_compute_RHF.cc:135
void compute_unrelaxed_density_OOOO()
Definition: dcft_density_UHF.cc:43
Definition: pointgrp.h:112
void compute_orbital_gradient_VO()
Definition: dcft_oo_UHF.cc:640
void compute_unrelaxed_density_OVOV_RHF()
Definition: dcft_density_RHF.cc:148
void compute_sigma_vector_cum_cum()
Definition: dcft_qc.cc:1120
bool densityConverged_
Controls convergence of the idempotent one-particle density.
Definition: dcft.h:266
void compute_relaxed_density_OVOV()
Definition: dcft_density_UHF.cc:1401
SharedMatrix aocc_ptau_
The perturbed Tau matrix in the MO basis (alpha occupied)
Definition: dcft.h:408
SharedMatrix kappa_mo_b_
The Kappa in the MO basis (beta occupied)
Definition: dcft.h:418
void compute_unrelaxed_density_OVOV()
Definition: dcft_density_UHF.cc:786
void compute_lagrangian_VV_RHF()
Definition: dcft_gradient_RHF.cc:298
int nbeta_
The number of active beta electrons.
Definition: dcft.h:280
void run_simult_dcft()
Definition: dcft_compute_UHF.cc:431
void rotate_orbitals_RHF()
Definition: dcft_oo_RHF.cc:617
SharedMatrix mo_tauB_
Definition: dcft.h:595
std::string indent
Used to align things in the output.
Definition: dcft.h:495
SharedMatrix kappa_so_b_
The beta kappa matrix in the SO basis.
Definition: dcft.h:448
void build_cumulant_intermediates_RHF()
Definition: dcft_intermediates_RHF.cc:40
void check_qc_convergence()
Definition: dcft_qc.cc:1939
Definition: PsiFileImpl.h:38
void sort_VVVV_integrals_RHF()
Definition: dcft_integrals_RHF.cc:217
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:50
SharedWavefunction dcft(SharedWavefunction, Options &)
Definition: dcft/main.cc:41
Definition: integraltransform.h:58
std::shared_ptr< BasisSet > primary_
Primary basis.
Definition: dcft.h:556
SharedMatrix bQaiA_mo_
b(Q|a, i)
Definition: dcft.h:582
SharedMatrix bQiaB_mo_
Definition: dcft.h:580
void compute_scf_energy()
Definition: dcft_scf_UHF.cc:344
void compute_orbital_gradient_OV_RHF()
Definition: dcft_oo_RHF.cc:260
SharedMatrix moG_tau_b_
The beta external potential in the MO basis (only needed in two-step algorithm)
Definition: dcft.h:456
void compute_lagrangian_VO()
Definition: dcft_gradient_UHF.cc:890
void formb_vv()
Form MO-basis b(Q, ab)
Definition: dcft_df_tensor.cc:630
double ** Jm12_scf_
Definition: dcft.h:566
void compute_lagrangian_OO_RHF()
Definition: dcft_gradient_RHF.cc:102
void build_tau_RHF()
Definition: dcft_tau_RHF.cc:46
void cumulant_response_guess()
Definition: dcft_gradient_UHF.cc:2059
void compute_unrelaxed_density_OOVV_RHF()
Definition: dcft_density_RHF.cc:110
SharedMatrix bvir_c_
The beta virtual eigenvectors, per irrep.
Definition: dcft.h:394
void compute_TPDM_trace()
Definition: dcft_density_UHF.cc:1860
SharedMatrix moG_tau_a_
The alpha external potential in the MO basis (only needed in two-step algorithm)
Definition: dcft.h:454
void check_n_representability()
Definition: dcft_n_representability.cc:778
SharedMatrix scf_error_b_
The beta SCF error vector.
Definition: dcft.h:460
SharedMatrix X_b_
Generator of the orbital rotations (Beta) with respect to the orbitals from the previous update...
Definition: dcft.h:487
SharedMatrix avir_tau_
The Tau matrix in the MO basis (alpha virtual)
Definition: dcft.h:404
SharedMatrix avir_c_
The alpha virtual eigenvectors, per irrep.
Definition: dcft.h:392
int navir_
The number of virtual alpha orbitals.
Definition: dcft.h:282
void refine_tau()
Definition: dcft_tau_UHF.cc:827
void build_denominators_RHF()
Definition: dcft_integrals_RHF.cc:300
double int_tolerance_
The cutoff below which and integral is assumed to be zero.
Definition: dcft.h:351
SharedVector Hd_
Contribution of the Fock matrix to the diagonal part of the Hessian. Used as preconditioner for conju...
Definition: dcft.h:469
void compute_ewdm_odc_RHF()
Definition: dcft_gradient_RHF.cc:447
void compute_gradient_UHF()
Definition: dcft_gradient_UHF.cc:38
SharedMatrix bQijB_mo_scf_
Definition: dcft.h:576
int cumulant_idp_
The total number of cumulant independent pairs for the current NR step.
Definition: dcft.h:309
int orbital_idp_b_
The number of orbital independent pairs for the current NR step (Beta spin)
Definition: dcft.h:299
void compute_lagrangian_OO()
Definition: dcft_gradient_UHF.cc:3247
int * lookup_cumulant_
The lookup array that determines which compound indices belong to cumulant IDPs and which don&#39;t...
Definition: dcft.h:319
int * aocc_off_
Alpha occupied MO offset.
Definition: dcft.h:341
void build_denominators()
Definition: dcft_integrals_UHF.cc:611
int iter_
The current number of macroiteration for energy or gradient computation.
Definition: dcft.h:292
SharedMatrix Ftilde_b_
The beta density-weighted Fock matrix in the MO basis.
Definition: dcft.h:438
void formJm12_scf(std::shared_ptr< BasisSet > auxiliary, std::shared_ptr< BasisSet > zero)
Definition: dcft_df_tensor.cc:2488
std::shared_ptr< Vector > SharedVector
Definition: adc.h:52
int iterate_nr_conjugate_gradients()
Definition: dcft_qc.cc:1792
double scf_energy_
The SCF component of the energy.
Definition: dcft.h:371
void compute_relaxed_density_OOOO()
Definition: dcft_density_UHF.cc:1154
void file2_transform(dpdfile2 *A, dpdfile2 *B, SharedMatrix C, bool backwards)
Definition: half_transform.cc:151
int nalpha_
The number of active alpha electrons.
Definition: dcft.h:278
double orbitals_threshold_
The convergence criterion for the scf iterations.
Definition: dcft.h:365
int cumulant_idp_ab_
The number of cumulant independent pairs for the current NR step (Alpha-Beta spin) ...
Definition: dcft.h:305
SharedMatrix bQpqA_mo_
b(Q|p, q)
Definition: dcft.h:588
void build_DF_tensors_UHF()
Definition: dcft_df_tensor.cc:1761
void rotate_orbitals()
Definition: dcft_oo_UHF.cc:928