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 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 _PSI4_SRC_BIN_DCFT_DCFT_H_
30 #define _PSI4_SRC_BIN_DCFT_DCFT_H_
31 
32 #include "psi4/libmints/matrix.h"
33 #include "psi4/libmints/vector.h"
35 #include "psi4/libdpd/dpd.h"
36 #include "psi4/libciomr/libciomr.h"
38 
39 #define DCFT_TIMER
40 
41 // Handy mints timer macros, requires libqt to be included
42 #ifdef DCFT_TIMER
43 # include "psi4/libqt/qt.h"
44 
45 # define dcft_timer_on(a) timer_on((a));
46 # define dcft_timer_off(a) timer_off((a));
47 #else
48 # define dcft_timer_on(a)
49 # define dcft_timer_off(a)
50 #endif
51 
52 namespace psi{
53 
54 class Options;
55 class IntegralTransform;
56 
57 namespace dcft{
58 
60 {
61 public:
63  ~DCFTSolver();
64 
65  double compute_energy();
66 
67 protected:
69 
70  void mp2_guess();
71  void scf_guess();
72  void finalize();
73  void transform_integrals();
75  void sort_OOOO_integrals();
76  void sort_OOVV_integrals();
77  void sort_VVVV_integrals();
78  void sort_OVOV_integrals();
79  void sort_OVVV_integrals();
80  void sort_OOOV_integrals();
81  void init();
82  void compute_dcft_energy();
83  void compute_cepa0_energy();
85  void compute_scf_energy();
87  void build_tau();
88  void transform_tau();
89  void build_gtau();
90  void print_opdm();
94  void process_so_ints();
95  void build_G();
96  void build_AO_tensors();
97  void build_denominators();
98  void update_fock();
99  void dump_density();
100  void dpd_buf4_add(dpdbuf4 *A, dpdbuf4 *B, double alpha);
102  int *mospi_left, int *mospi_right, int **so_row, int **mo_row,
103  bool backwards, double alpha, double beta);
104  void file2_transform(dpdfile2 *A, dpdfile2 *B, SharedMatrix C, bool backwards);
105  void AO_contribute(dpdbuf4 *tau1_AO, dpdbuf4 *tau2_AO, int p, int q,
106  int r, int s, double value, dpdfile2* = NULL, dpdfile2* = NULL, dpdfile2* = NULL);
107  //void AO_contribute(dpdfile2 *tau1_AO, dpdfile2 *tau2_AO, int p, int q,
108  // int r, int s, double value);
109  bool correct_mo_phases(bool dieOnError = true);
110  double compute_cumulant_residual();
111  double compute_scf_error_vector();
112  double update_scf_density(bool damp = false);
113  void run_twostep_dcft();
116  void run_simult_dcft();
117  void run_simult_dcft_oo();
118  // DCFT analytic gradient subroutines
119  virtual SharedMatrix compute_gradient();
120  void compute_gradient_dc();
121  void compute_gradient_odc();
122  void response_guess();
123  void gradient_init();
124  void compute_lagrangian_OV();
125  void compute_lagrangian_VO();
127  void orbital_response_guess();
129  double update_orbital_response();
130  double compute_response_coupling();
133  void build_perturbed_tau();
137  void compute_lagrangian_OO();
138  void compute_lagrangian_VV();
139  void compute_ewdm_dc();
140  void compute_ewdm_odc();
145  void compute_TPDM_trace();
146  // Quadratically-convergent DCFT
147  void run_qc_dcft();
149  void form_idps();
150  void compute_sigma_vector();
156  int iterate_nr_jacobi();
157  void check_qc_convergence();
159  void update_cumulant_nr();
160  void run_davidson();
161  void davidson_guess();
162  // Exact Tau
163  void refine_tau();
165  // Cumulant residual intermediates
166  void compute_G_intermediate();
167  void compute_F_intermediate();
168  void compute_V_intermediate();
169  void compute_W_intermediate();
170  void compute_H_intermediate();
171  void compute_I_intermediate();
172  void compute_J_intermediate();
173  void compute_K_intermediate();
174  void compute_L_intermediate();
175  void compute_O_intermediate();
176  void compute_M_intermediate();
177  void compute_N_intermediate();
178 
179  // Orbital-optimized DCFT
180  void run_simult_dc_guess();
181  double compute_orbital_residual();
189  void rotate_orbitals();
190  void compute_oe_properties();
191  void write_molden_file();
192  // Three-particle cumulant contributions
194  void dcft_semicanonicalize();
196  void dump_semicanonical();
199  void semicanonicalize_dc();
200  double compute_triples_aaa();
201  double compute_triples_aab();
202  double compute_triples_abb();
203  double compute_triples_bbb();
204 
205  // RHF-reference DCFT
206  double compute_energy_RHF();
207  void scf_guess_RHF();
208  double update_scf_density_RHF(bool damp = false);
210  void build_denominators_RHF();
211  void mp2_guess_RHF();
220  void run_simult_dcft_oo_RHF();
221  void run_simult_dcft_RHF();
222  void build_tau_RHF();
223  void refine_tau_RHF();
224  void transform_tau_RHF();
225  void process_so_ints_RHF();
231  void compute_scf_energy_RHF();
235  void rotate_orbitals_RHF();
242  void compute_gradient_RHF();
243  void gradient_init_RHF();
247  void compute_ewdm_odc_RHF();
248  void print_opdm_RHF();
249  void compute_R_AA_and_BB();
250  void presort_mo_tpdm_AB();
251  void presort_mo_tpdm_AA();
252 
253  // UHF-reference DCFT
254  void compute_gradient_UHF();
255  double compute_energy_UHF();
256 
257  bool augment_b(double *vec, double tol);
271  int print_;
273  int ntriso_;
275  int nalpha_;
277  int nbeta_;
279  int navir_;
281  int nbvir_;
283  int maxdiis_;
287  int maxiter_;
289  int iter_;
290  // Quadratically-convergent DCFT
292  int nidp_;
308  int dim_;
318  int nguess_;
320  int b_dim_;
324  int n_add_;
326  int nevals_;
338  int *aocc_off_;
340  int *avir_off_;
342  int *bocc_off_;
344  int *bvir_off_;
346  double enuc_;
368  double scf_energy_;
376  double regularizer_;
380  double vec_add_tol_;
383 
458  // Quadratically-convergent DCFT
489 
490 
492  std::string indent;
493 
494 
495  // Density-Fitting DCFT
497  void df_build_b_ao();
499  void df_memory();
501  void build_DF_tensors_RHF();
502  void build_DF_tensors_UHF();
504  void formJm12(std::shared_ptr<BasisSet> auxiliary, std::shared_ptr<BasisSet> zero);
505  void formJm12_scf(std::shared_ptr<BasisSet> auxiliary, std::shared_ptr<BasisSet> zero);
507  void formb_ao(std::shared_ptr<BasisSet> primary, std::shared_ptr<BasisSet> auxiliary, std::shared_ptr<BasisSet> zero);
508  void formb_ao_scf(std::shared_ptr<BasisSet> primary, std::shared_ptr<BasisSet> auxiliary, std::shared_ptr<BasisSet> zero);
510  void transform_b();
512  void transform_b_ao2so();
513  void transform_b_ao2so_scf();
515  void formb_oo();
516  void formb_oo_scf();
518  void formb_ov();
520  void formb_vv();
522  void formb_pq();
523  void formb_pq_scf();
524 
526  void form_df_g_ovov();
528  void form_df_g_oooo();
530  void form_df_g_vvoo();
532  void form_df_g_vooo();
534  void form_df_g_ovvv();
536  void form_df_g_vvvv();
538  void build_gbarGamma_RHF();
539  void build_gbarGamma_UHF();
541  void build_gbarKappa_RHF();
542  void build_gbarKappa_UHF();
546 
547  // Density-Fitting DCFT
549  std::shared_ptr<BasisSet> auxiliary_;
551  std::shared_ptr<BasisSet> auxiliary_scf_;
553  std::shared_ptr<BasisSet> primary_;
555  int nn_;
557  int nQ_;
558  int nQ_scf_;
560  int naocc_;
562  double **Jm12_;
563  double **Jm12_scf_;
574 
589 
601 };
602 
603 }} // Namespaces
604 
605 #endif // Header guard
bool orbitalsDone_
Controls convergence of the orbital updates.
Definition: dcft.h:259
void transform_tau_RHF()
Definition: dcft_tau_RHF.cc:260
double compute_energy()
Definition: dcft_compute.cc:45
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:59
void build_gbarlambda_UHF_v3mem()
Definition: dcft_df_tensor.cc:1818
void sort_OVVV_integrals()
Definition: dcft_integrals_UHF.cc:461
void run_qc_dcft()
Definition: dcft_qc.cc:40
double old_total_energy_
The previous total energy.
Definition: dcft.h:372
void compute_sigma_vector()
Definition: dcft_qc.cc:549
double regularizer_
The Tikhonow regularizer used to remove singularities (c.f. Taube and Bartlett, JCP, 2009)
Definition: dcft.h:376
void process_so_ints()
Definition: dcft_scf_UHF.cc:476
void form_density_weighted_fock()
Definition: dcft_intermediates_UHF.cc:541
SharedMatrix Fa_
The alpha Fock matrix in the SO basis.
Definition: dcft.h:425
double compute_cumulant_residual()
Definition: dcft_lambda_UHF.cc:46
void response_guess()
Definition: dcft_gradient_UHF.cc:338
bool cumulantDone_
Controls convergence of the decnsity cumulant updates.
Definition: dcft.h:261
Options & options() const
Definition: wavefunction.cc:396
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:323
void transform_core_integrals_RHF()
Definition: dcft_integrals_RHF.cc:249
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:399
void dcft_semicanonicalize()
Definition: dcft_triples.cc:65
int nn_
Number of total primary basis functions.
Definition: dcft.h:555
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:320
void process_so_ints_RHF()
Definition: dcft_scf_RHF.cc:126
void sort_OVOV_integrals()
Definition: dcft_integrals_UHF.cc:140
double compute_triples_aaa()
Definition: dcft_triples.cc:767
void sort_VVVV_integrals()
Definition: dcft_integrals_UHF.cc:345
SharedVector Q_
The new element of Krylov subspace vector in the IDP basis for conjugate gradient procedure...
Definition: dcft.h:478
SharedMatrix scf_error_a_
The alpha SCF error vector.
Definition: dcft.h:455
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:443
void presort_mo_tpdm_AA()
Definition: dcft_sort_mo_tpdm.cc:202
void compute_F_intermediate_RHF()
Definition: dcft_intermediates_RHF.cc:219
SharedMatrix bQpqB_mo_
Definition: dcft.h:586
SharedMatrix kappa_mo_a_
The Kappa in the MO basis (alpha occupied)
Definition: dcft.h:413
SharedMatrix aocc_tau_
The Tau matrix in the MO basis (alpha occupied)
Definition: dcft.h:397
~DCFTSolver()
Definition: dcft.cc:113
SharedVector D_
The conjugate direction vector in the IDP basis for conjugate gradient procedure. ...
Definition: dcft.h:472
double compute_orbital_residual_RHF()
Definition: dcft_oo_RHF.cc:215
void run_twostep_dcft_orbital_updates()
Definition: dcft_compute_UHF.cc:347
int n_add_
The number of vectors that can be added during the iteration in the Davidson diagonalization.
Definition: dcft.h:324
SharedMatrix mo_gammaB_
Definition: dcft.h:600
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:265
double diis_start_thresh_
The convergence that must be achieved before DIIS extrapolation starts.
Definition: dcft.h:366
double new_total_energy_
The updated total energy.
Definition: dcft.h:374
void sort_OVOV_integrals_RHF()
Definition: dcft_integrals_RHF.cc:157
double compute_cumulant_response_residual()
Definition: dcft_gradient_UHF.cc:3083
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:41
SharedMatrix orbital_gradient_b_
The orbital gradient in the MO basis (Beta spin)
Definition: dcft.h:462
void mp2_guess_RHF()
Definition: dcft_mp2_RHF.cc:48
void compute_I_intermediate()
Definition: dcft_intermediates_UHF.cc:1911
SharedMatrix bQmn_ao_scf_
Definition: dcft.h:567
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:2450
void gradient_init_RHF()
Definition: dcft_gradient_RHF.cc:53
SharedMatrix bQabB_mo_
Definition: dcft.h:583
void presort_mo_tpdm_AB()
Definition: dcft_sort_mo_tpdm.cc:51
double response_coupling_rms_
The RMS value of the change in the coupling of orbital and cumulant response.
Definition: dcft.h:358
void dump_semicanonical()
Definition: dcft_triples.cc:132
void print_opdm_RHF()
Definition: dcft_tau_RHF.cc:322
void compute_dcft_energy_RHF()
Definition: dcft_energy_RHF.cc:41
int * avir_off_
Alpha virtual MO offset.
Definition: dcft.h:340
double ** Jm12_
J^-1/2 Matrix.
Definition: dcft.h:562
void compute_H_intermediate()
Definition: dcft_intermediates_UHF.cc:1812
SharedMatrix bQmn_so_
Definition: dcft.h:566
SharedMatrix mo_gbarGamma_A_
MO-based (Gbar Tau + Gbar Kappa)
Definition: dcft.h:594
int nevals_
The number of eigenvalues requested in the stability check.
Definition: dcft.h:326
SharedMatrix bvir_ptau_
The perturbed Tau matrix in the MO basis (beta virtual)
Definition: dcft.h:411
void formb_oo_scf()
Definition: dcft_df_tensor.cc:2731
void print_orbital_energies()
Definition: dcft_scf_UHF.cc:229
void update_cumulant_response()
Definition: dcft_gradient_UHF.cc:3193
void compute_sigma_vector_orb_cum()
Definition: dcft_qc.cc:883
virtual SharedMatrix compute_gradient()
Compute gradient. Subclasses override this function to compute the gradient.
Definition: dcft_gradient.cc:39
void sort_OOOO_integrals_RHF()
Definition: dcft_integrals_RHF.cc:167
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:447
void compute_orbital_rotation_nr()
Definition: dcft_qc.cc:1961
void compute_relaxed_density_OOVV()
Definition: dcft_density_UHF.cc:1335
SharedMatrix X_a_
Generator of the orbital rotations (Alpha) with respect to the orbitals from the previous update...
Definition: dcft.h:482
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:269
SharedMatrix bQiaA_mo_
b(Q|i, a)
Definition: dcft.h:576
int dim_orbitals_
The maximum number of IDPs possible for orbital updates.
Definition: dcft.h:310
void init()
Definition: dcft_memory.cc:51
void compute_cumulant_response_intermediates()
Definition: dcft_gradient_UHF.cc:2331
double compute_scf_error_vector()
Definition: dcft_scf_UHF.cc:379
SharedMatrix bvir_tau_
The Tau matrix in the MO basis (beta virtual)
Definition: dcft.h:403
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:176
void transform_core_integrals()
Definition: dcft_integrals_UHF.cc:524
SharedMatrix g_tau_b_
The beta external potential in the SO basis.
Definition: dcft.h:449
SharedMatrix bQaiB_mo_
Definition: dcft.h:580
bool orbital_optimized_
Whether the user requested the DCFT functional that is variationally orbitally-optimized.
Definition: dcft.h:267
Definition: dcft.h:59
void transform_integrals_triples()
Definition: dcft_triples.cc:97
void scf_guess_RHF()
Definition: dcft_scf_RHF.cc:51
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:439
int orbital_idp_
The total number of orbital independent pairs for the current NR step.
Definition: dcft.h:298
void compute_R_AA_and_BB()
Definition: dcft_lambda_RHF.cc:131
void sort_OOOO_integrals()
Definition: dcft_integrals_UHF.cc:222
void compute_L_intermediate()
Definition: dcft_intermediates_UHF.cc:2211
SharedMatrix mo_gammaA_
MO-based Gamma &lt;r|s&gt;
Definition: dcft.h:599
int nQ_
Number of total auxilliary basis functions.
Definition: dcft.h:557
double compute_three_particle_energy()
Definition: dcft_triples.cc:39
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:3796
void build_gtau()
Definition: dcft_integrals_UHF.cc:843
void update_cumulant_jacobi_RHF()
Definition: dcft_lambda_RHF.cc:88
void mp2_guess()
Definition: dcft_mp2_UHF.cc:49
SharedMatrix moFb_
The beta Fock matrix in the MO basis.
Definition: dcft.h:431
void build_cumulant_intermediates()
Definition: dcft_intermediates_UHF.cc:41
int nidp_
The total number of independent pairs for the current NR step.
Definition: dcft.h:292
void semicanonicalize_gbar_ooov()
Definition: dcft_triples.cc:404
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:380
double compute_triples_bbb()
Definition: dcft_triples.cc:2533
void davidson_guess()
Definition: dcft_qc.cc:2260
void compute_cepa0_energy()
Definition: dcft_energy_UHF.cc:164
double enuc_
The nuclear repulsion energy in Hartree.
Definition: dcft.h:346
int maxdiis_
The maximum size of the DIIS subspace.
Definition: dcft.h:283
SharedMatrix aocc_c_
The alpha occupied eigenvectors, per irrep.
Definition: dcft.h:385
int cumulant_idp_bb_
The number of cumulant independent pairs for the current NR step (Beta-Beta spin) ...
Definition: dcft.h:304
int max_space_
The maximum size of the subspace in stability check.
Definition: dcft.h:328
void compute_dcft_energy()
Definition: dcft_energy_UHF.cc:41
int * bocc_off_
Beta occupied MO offset.
Definition: dcft.h:342
void iterate_cumulant_response()
Definition: dcft_gradient_UHF.cc:1967
SharedMatrix mo_gbarKappa_B_
Definition: dcft.h:597
void update_cumulant_nr()
Definition: dcft_qc.cc:2002
int print_
The amount of information to print.
Definition: dcft.h:271
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:2034
double compute_cumulant_residual_RHF()
Definition: dcft_lambda_RHF.cc:46
SharedMatrix moFa_
The alpha Fock matrix in the MO basis.
Definition: dcft.h:429
SharedMatrix avir_ptau_
The perturbed Tau matrix in the MO basis (alpha virtual)
Definition: dcft.h:409
void compute_unrelaxed_density_VVVV_RHF()
Definition: dcft_density_RHF.cc:291
double compute_energy_UHF()
Definition: dcft_compute_UHF.cc:46
int nbvir_
The number of virtual beta orbitals.
Definition: dcft.h:281
double energy_level_shift_
Level shift applied to the diagonal of the density-weighted Fock operator.
Definition: dcft.h:382
double cumulant_convergence_
The RMS value of the change in lambda after the lambda iterations.
Definition: dcft.h:352
std::shared_ptr< BasisSet > auxiliary_
Auxiliary basis.
Definition: dcft.h:549
void transform_integrals_RHF()
Definition: dcft_integrals_RHF.cc:44
void compute_N_intermediate()
Definition: dcft_intermediates_UHF.cc:3761
void compute_gradient_dc()
Definition: dcft_gradient_UHF.cc:53
void compute_sigma_vector_orb_orb()
Definition: dcft_qc.cc:791
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:372
double update_scf_density_RHF(bool damp=false)
Definition: dcft_scf_RHF.cc:88
SharedMatrix bQmn_so_scf_
Definition: dcft.h:568
void compute_gradient_odc_RHF()
Definition: dcft_gradient_RHF.cc:90
void gradient_init()
Definition: dcft_gradient_UHF.cc:259
SharedMatrix s_half_inv_
The inverse square root overlap matrix in the SO basis.
Definition: dcft.h:437
void refine_tau_RHF()
Definition: dcft_tau_RHF.cc:130
void compute_relaxed_density_VVVV()
Definition: dcft_density_UHF.cc:1698
void sort_OVVV_integrals_RHF()
Definition: dcft_integrals_RHF.cc:238
bool correct_mo_phases(bool dieOnError=true)
Definition: dcft_scf_UHF.cc:54
void semicanonicalize_dc()
Definition: dcft_triples.cc:615
SharedMatrix bQijA_mo_scf_
Definition: dcft.h:572
Dimension naoccpi_
The number of occupied alpha orbitals per irrep.
Definition: dcft.h:330
void run_simult_dcft_oo_RHF()
Definition: dcft_oo_RHF.cc:46
void compute_ewdm_odc()
Definition: dcft_gradient_UHF.cc:4741
SharedMatrix so_h_
The one-electron integrals in the SO basis.
Definition: dcft.h:419
void compute_oe_properties()
Definition: dcft_density_UHF.cc:2042
void iterate_orbital_response()
Definition: dcft_gradient_UHF.cc:1146
SharedMatrix Xtotal_a_
Generator of the orbital rotations (Alpha) with respect to the reference orbitals.
Definition: dcft.h:486
void compute_unrelaxed_density_OOOO_RHF()
Definition: dcft_density_RHF.cc:40
void build_gbarKappa_RHF()
Form MO-based Gbar*Kappa.
Definition: dcft_df_tensor.cc:1653
void compute_F_intermediate()
Definition: dcft_intermediates_UHF.cc:411
double update_scf_density(bool damp=false)
Definition: dcft_scf_UHF.cc:427
SharedVector S_
The search direction vector in the IDP basis for conjugate gradient procedure.
Definition: dcft.h:476
SharedMatrix bQijB_mo_
Definition: dcft.h:571
double r_convergence_
Convergence of the residual in the Davidson diagonalization.
Definition: dcft.h:322
Dimension navirpi_
The number of virtual alpha orbitals per irrep.
Definition: dcft.h:334
SharedMatrix bocc_ptau_
The perturbed Tau matrix in the MO basis (beta occupied)
Definition: dcft.h:407
void update_cumulant_jacobi()
Definition: dcft_lambda_UHF.cc:205
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:235
void build_tau_fourth_order()
Definition: dcft_tau_UHF.cc:171
SharedVector gradient_
Orbital and cumulant gradient in the basis of IDP.
Definition: dcft.h:464
void compute_orbital_response_intermediates()
Definition: dcft_gradient_UHF.cc:1271
void semicanonicalize_gbar_ovvv()
Definition: dcft_triples.cc:220
void run_simult_dc_guess()
Definition: dcft_oo_UHF.cc:202
int ntriso_
The number of unique pairs of symmetrized atomic orbitals.
Definition: dcft.h:273
SharedMatrix tau_so_b_
The Tau matrix in the AO basis, stored by irrep, to perturb the beta Fock matrix. ...
Definition: dcft.h:395
void build_perturbed_tau()
Definition: dcft_gradient_UHF.cc:2115
void compute_orbital_rotation_jacobi_RHF()
Definition: dcft_oo_RHF.cc:592
void compute_unrelaxed_density_OOVV()
Definition: dcft_density_UHF.cc:223
void run_simult_dcft_oo()
Definition: dcft_oo_UHF.cc:40
SharedMatrix b_
The subspace vector in the Davidson diagonalization procedure.
Definition: dcft.h:480
SharedMatrix bQmn_ao_
b(Q|mu,nu)
Definition: dcft.h:565
void form_density_weighted_fock_RHF()
Definition: dcft_intermediates_RHF.cc:256
int orbital_idp_a_
The number of orbital independent pairs for the current NR step (Alpha spin)
Definition: dcft.h:294
SharedMatrix tau_so_a_
The Tau matrix in the AO basis, stored by irrep, to perturb the alpha Fock matrix.
Definition: dcft.h:393
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:470
void update_fock()
Definition: dcft_scf_UHF.cc:1051
int nQ_scf_
Definition: dcft.h:558
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:460
bool augment_b(double *vec, double tol)
Definition: dcft_qc.cc:2277
void compute_scf_energy_RHF()
Definition: dcft_scf_RHF.cc:492
void compute_J_intermediate()
Definition: dcft_intermediates_UHF.cc:1973
void orbital_response_guess()
Definition: dcft_gradient_UHF.cc:1217
void run_twostep_dcft()
Definition: dcft_compute_UHF.cc:175
SharedMatrix ao_s_
The overlap matrix in the AO basis.
Definition: dcft.h:417
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:350
SharedMatrix mo_tauA_
The Tau in the MO basis (All)
Definition: dcft.h:591
int dim_cumulant_
The maximum number of IDPs possible for cumulant updates.
Definition: dcft.h:312
void finalize()
Definition: dcft_memory.cc:204
SharedMatrix Fb_
The beta Fock matrix in the SO basis.
Definition: dcft.h:427
void compute_unrelaxed_density_VVVV()
Definition: dcft_density_UHF.cc:1008
void transform_tau()
Definition: dcft_tau_UHF.cc:638
int naocc_
Number of alpha occupied orbitals.
Definition: dcft.h:560
void compute_lagrangian_VV()
Definition: dcft_gradient_UHF.cc:3554
double cumulant_response_rms_
The RMS value of the change in the cumulant response.
Definition: dcft.h:356
int run_twostep_dcft_cumulant_updates()
Definition: dcft_compute_UHF.cc:228
Definition: dimension.h:38
int nguess_
The number of the guess subspace vectors for the Davidson diagonalization.
Definition: dcft.h:318
void compute_orbital_rotation_jacobi()
Definition: dcft_oo_UHF.cc:894
double compute_energy_RHF()
Definition: dcft_compute_RHF.cc:46
void write_molden_file()
Definition: dcft_density_UHF.cc:2104
Dimension nbvirpi_
The number of virtual beta orbitals per irrep.
Definition: dcft.h:336
SharedMatrix moF0b_
The beta Fock matrix (without Tau contribution) in the MO basis.
Definition: dcft.h:423
SharedMatrix bQpqA_mo_scf_
Definition: dcft.h:587
SharedMatrix mo_gbarKappa_A_
Definition: dcft.h:596
Definition: liboptions.h:360
void run_davidson()
Definition: dcft_qc.cc:2076
int dim_
The maximum number of IDPs ever possible.
Definition: dcft.h:308
void compute_orbital_gradient_VO_RHF()
Definition: dcft_oo_RHF.cc:446
double compute_scf_error_vector_RHF()
Definition: dcft_scf_RHF.cc:515
Header file for the Quantum Trio LibraryDavid Sherrill 1994.
void build_AO_tensors()
Definition: dcft_scf_UHF.cc:1137
SharedMatrix bQijA_mo_
b(Q|i, j)
Definition: dcft.h:570
void dpd_buf4_add(dpdbuf4 *A, dpdbuf4 *B, double alpha)
Definition: dcft.cc:93
Definition: libdpd/dpd.h:140
SharedMatrix bQpqB_mo_scf_
Definition: dcft.h:588
double lambda_energy_
The Lambda component of the energy.
Definition: dcft.h:370
double compute_triples_abb()
Definition: dcft_triples.cc:1936
double orbital_response_rms_
The RMS value of the change in the orbital response.
Definition: dcft.h:354
double energy_threshold_
The convergence criterion for energy.
Definition: dcft.h:364
void build_G()
Definition: dcft_scf_UHF.cc:1460
void compute_V_intermediate()
Definition: dcft_intermediates_UHF.cc:739
void compute_orbital_gradient()
Definition: dcft_qc.cc:207
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:68
int cumulant_idp_aa_
The number of cumulant independent pairs for the current NR step (Alpha-Alpha spin) ...
Definition: dcft.h:300
void print_opdm()
Definition: dcft_tau_UHF.cc:721
void sort_OOVV_integrals()
Definition: dcft_integrals_UHF.cc:249
int maxiter_
The maximum number of iterations.
Definition: dcft.h:287
SharedMatrix Ftilde_a_
The alpha density-weighted Fock matrix in the MO basis.
Definition: dcft.h:433
double compute_triples_aab()
Definition: dcft_triples.cc:1324
SharedMatrix mo_gbarGamma_B_
Definition: dcft.h:595
std::shared_ptr< BasisSet > auxiliary_scf_
Auxiliary basis for SCF terms in DCT.
Definition: dcft.h:551
SharedMatrix Xtotal_b_
Generator of the orbital rotations (Beta) with respect to the reference orbitals. ...
Definition: dcft.h:488
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
int * bvir_off_
Beta virtual MO offset.
Definition: dcft.h:344
void dump_density()
Definition: dcft_n_representability.cc:41
void sort_OOOV_integrals_RHF()
Definition: dcft_integrals_RHF.cc:227
SharedMatrix bocc_c_
The beta occupied eigenvectors, per irrep.
Definition: dcft.h:387
DCFTSolver(SharedWavefunction ref_wfn, Options &options)
Definition: dcft.cc:45
SharedVector R_
The residual vector in the IDP basis for conjugate gradient procedure.
Definition: dcft.h:474
Dimension nboccpi_
The number of occupied beta orbitals per irrep.
Definition: dcft.h:332
double update_orbital_response()
Definition: dcft_gradient_UHF.cc:1408
double cumulant_threshold_
The convergence criterion for the lambda iterations.
Definition: dcft.h:360
void scf_guess()
Definition: dcft_scf_UHF.cc:310
Simple wavefunction base class.
Definition: wavefunction.h:84
int * lookup_orbitals_
The lookup array that determines which compound indices belong to orbital IDPs and which don&#39;t...
Definition: dcft.h:314
int mindiisvecs_
The number of DIIS vectors needed for extrapolation.
Definition: dcft.h:285
void compute_sigma_vector_cum_orb()
Definition: dcft_qc.cc:1438
void compute_O_intermediate()
Definition: dcft_intermediates_UHF.cc:2403
double orbital_level_shift_
Level shift for denominators in orbital updates.
Definition: dcft.h:378
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:468
Definition: libdpd/dpd.h:105
SharedMatrix bQabA_mo_
b(Q|a, b)
Definition: dcft.h:582
int iterate_nr_jacobi()
Definition: dcft_qc.cc:1886
void compute_lagrangian_OV()
Definition: dcft_gradient_UHF.cc:385
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:305
void transform_integrals()
Definition: dcft_integrals_UHF.cc:44
SharedMatrix old_cb_
The old full beta MO coefficients.
Definition: dcft.h:441
void compute_M_intermediate()
Definition: dcft_intermediates_UHF.cc:3706
void compute_gradient_RHF()
Definition: dcft_gradient_RHF.cc:39
void compute_G_intermediate()
Definition: dcft_intermediates_UHF.cc:65
SharedMatrix moF0a_
The alpha Fock matrix (without Tau contribution) in the MO basis.
Definition: dcft.h:421
void build_tau()
Definition: dcft_tau_UHF.cc:48
void formb_pq_scf()
Definition: dcft_df_tensor.cc:2830
void compute_gradient_odc()
Definition: dcft_gradient_UHF.cc:244
double compute_response_coupling()
Definition: dcft_gradient_UHF.cc:1522
void run_simult_dcft_RHF()
Definition: dcft_compute_RHF.cc:136
void compute_unrelaxed_density_OOOO()
Definition: dcft_density_UHF.cc:44
Definition: pointgrp.h:113
void compute_orbital_gradient_VO()
Definition: dcft_oo_UHF.cc:641
void compute_unrelaxed_density_OVOV_RHF()
Definition: dcft_density_RHF.cc:149
void compute_sigma_vector_cum_cum()
Definition: dcft_qc.cc:1121
bool densityConverged_
Controls convergence of the idempotent one-particle density.
Definition: dcft.h:263
void compute_relaxed_density_OVOV()
Definition: dcft_density_UHF.cc:1402
SharedMatrix aocc_ptau_
The perturbed Tau matrix in the MO basis (alpha occupied)
Definition: dcft.h:405
SharedMatrix kappa_mo_b_
The Kappa in the MO basis (beta occupied)
Definition: dcft.h:415
void compute_unrelaxed_density_OVOV()
Definition: dcft_density_UHF.cc:787
void compute_lagrangian_VV_RHF()
Definition: dcft_gradient_RHF.cc:299
int nbeta_
The number of active beta electrons.
Definition: dcft.h:277
void run_simult_dcft()
Definition: dcft_compute_UHF.cc:432
void rotate_orbitals_RHF()
Definition: dcft_oo_RHF.cc:618
SharedMatrix mo_tauB_
Definition: dcft.h:592
std::string indent
Used to align things in the output.
Definition: dcft.h:492
SharedMatrix kappa_so_b_
The beta kappa matrix in the SO basis.
Definition: dcft.h:445
void build_cumulant_intermediates_RHF()
Definition: dcft_intermediates_RHF.cc:41
void check_qc_convergence()
Definition: dcft_qc.cc:1940
Definition: PsiFileImpl.h:39
void sort_VVVV_integrals_RHF()
Definition: dcft_integrals_RHF.cc:218
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:52
SharedWavefunction dcft(SharedWavefunction, Options &)
Definition: dcft/main.cc:42
Definition: integraltransform.h:58
std::shared_ptr< BasisSet > primary_
Primary basis.
Definition: dcft.h:553
SharedMatrix bQaiA_mo_
b(Q|a, i)
Definition: dcft.h:579
SharedMatrix bQiaB_mo_
Definition: dcft.h:577
void compute_scf_energy()
Definition: dcft_scf_UHF.cc:345
void compute_orbital_gradient_OV_RHF()
Definition: dcft_oo_RHF.cc:261
SharedMatrix moG_tau_b_
The beta external potential in the MO basis (only needed in two-step algorithm)
Definition: dcft.h:453
void compute_lagrangian_VO()
Definition: dcft_gradient_UHF.cc:891
void formb_vv()
Form MO-basis b(Q, ab)
Definition: dcft_df_tensor.cc:630
double ** Jm12_scf_
Definition: dcft.h:563
void compute_lagrangian_OO_RHF()
Definition: dcft_gradient_RHF.cc:103
void build_tau_RHF()
Definition: dcft_tau_RHF.cc:47
void cumulant_response_guess()
Definition: dcft_gradient_UHF.cc:2060
void compute_unrelaxed_density_OOVV_RHF()
Definition: dcft_density_RHF.cc:111
SharedMatrix bvir_c_
The beta virtual eigenvectors, per irrep.
Definition: dcft.h:391
void compute_TPDM_trace()
Definition: dcft_density_UHF.cc:1861
SharedMatrix moG_tau_a_
The alpha external potential in the MO basis (only needed in two-step algorithm)
Definition: dcft.h:451
void check_n_representability()
Definition: dcft_n_representability.cc:779
SharedMatrix scf_error_b_
The beta SCF error vector.
Definition: dcft.h:457
SharedMatrix X_b_
Generator of the orbital rotations (Beta) with respect to the orbitals from the previous update...
Definition: dcft.h:484
SharedMatrix avir_tau_
The Tau matrix in the MO basis (alpha virtual)
Definition: dcft.h:401
SharedMatrix avir_c_
The alpha virtual eigenvectors, per irrep.
Definition: dcft.h:389
int navir_
The number of virtual alpha orbitals.
Definition: dcft.h:279
void refine_tau()
Definition: dcft_tau_UHF.cc:828
void build_denominators_RHF()
Definition: dcft_integrals_RHF.cc:301
double int_tolerance_
The cutoff below which and integral is assumed to be zero.
Definition: dcft.h:348
SharedVector Hd_
Contribution of the Fock matrix to the diagonal part of the Hessian. Used as preconditioner for conju...
Definition: dcft.h:466
void compute_ewdm_odc_RHF()
Definition: dcft_gradient_RHF.cc:448
void compute_gradient_UHF()
Definition: dcft_gradient_UHF.cc:39
SharedMatrix bQijB_mo_scf_
Definition: dcft.h:573
int cumulant_idp_
The total number of cumulant independent pairs for the current NR step.
Definition: dcft.h:306
int orbital_idp_b_
The number of orbital independent pairs for the current NR step (Beta spin)
Definition: dcft.h:296
void compute_lagrangian_OO()
Definition: dcft_gradient_UHF.cc:3248
int * lookup_cumulant_
The lookup array that determines which compound indices belong to cumulant IDPs and which don&#39;t...
Definition: dcft.h:316
int * aocc_off_
Alpha occupied MO offset.
Definition: dcft.h:338
void build_denominators()
Definition: dcft_integrals_UHF.cc:612
int iter_
The current number of macroiteration for energy or gradient computation.
Definition: dcft.h:289
SharedMatrix Ftilde_b_
The beta density-weighted Fock matrix in the MO basis.
Definition: dcft.h:435
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:51
int iterate_nr_conjugate_gradients()
Definition: dcft_qc.cc:1793
double scf_energy_
The SCF component of the energy.
Definition: dcft.h:368
void compute_relaxed_density_OOOO()
Definition: dcft_density_UHF.cc:1155
void file2_transform(dpdfile2 *A, dpdfile2 *B, SharedMatrix C, bool backwards)
Definition: half_transform.cc:152
int nalpha_
The number of active alpha electrons.
Definition: dcft.h:275
double orbitals_threshold_
The convergence criterion for the scf iterations.
Definition: dcft.h:362
int cumulant_idp_ab_
The number of cumulant independent pairs for the current NR step (Alpha-Beta spin) ...
Definition: dcft.h:302
SharedMatrix bQpqA_mo_
b(Q|p, q)
Definition: dcft.h:585
void build_DF_tensors_UHF()
Definition: dcft_df_tensor.cc:1761
void rotate_orbitals()
Definition: dcft_oo_UHF.cc:929