Psi4
oeprop.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-2018 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_oeprop_h
30 #define _psi_src_lib_oeprop_h
31 
32 #include <set>
33 #include <vector>
34 #include <map>
35 #include <string>
36 
37 #include "typedefs.h"
38 #include "psi4/libmints/vector3.h"
39 
40 namespace psi {
41 
42 class Wavefunction;
43 class IntegralFactory;
44 class MatrixFactory;
45 class BasisSet;
46 
64 class Prop {
65  protected:
67  std::shared_ptr<Wavefunction> wfn_;
69  std::shared_ptr<BasisSet> basisset_;
71  bool same_orbs_; // This allows pointers to be duplicated/computation skipped
72  bool same_dens_; // This allows pointers to be duplicated/computation skipped
74  std::shared_ptr<IntegralFactory> integral_;
76  std::shared_ptr<MatrixFactory> factory_;
77 
80 
97 
99  void common_init();
100 
101  public:
103  Prop(std::shared_ptr<Wavefunction> wfn);
105  virtual ~Prop();
106 
107  // => Wavefunction Modifiers (rarely called, C is usually fixed at HF) <= //
108 
109  // Change restricted flag. Resets C/D/epsilon matrices from wfn
110  void set_wavefunction(std::shared_ptr<Wavefunction> wfn);
111  // Change restricted flag. Resets C/D/epsilon matrices from wfn
112  void set_restricted(bool restricted);
113  // Set alpha eigenvalues, MO pitzer order basis
115  // Set beta eigenvalues, MO pitzer order basis. Throws if restricted
117  // Set alpha C matrix, SO/MO pitzer order basis.
118  void set_Ca(SharedMatrix Ca);
119  // Set beta C matrix, SO/MO pitzer order basis. Throws if restricted
120  void set_Cb(SharedMatrix Cb);
121 
122  // => Set OPDM/TDM/DDM (often called). These need not be totally symmetric. Note, you are setting Da and/or Db, I do
123  // the adding to Dt <= //
124 
125  // TODO Add symmetry is irrep number
126  void set_Da_ao(SharedMatrix Da, int symmetry = 0);
127  void set_Db_ao(SharedMatrix Db, int symmetry = 0);
128  void set_Da_so(SharedMatrix Da);
129  void set_Db_so(SharedMatrix Db);
130  void set_Da_mo(SharedMatrix Da);
131  void set_Db_mo(SharedMatrix Db);
132 
133  // => Get routines (useful to quickly change bases) <= //
134 
139 
148 
161 
163  SharedMatrix Dt_so(bool total = true);
165  SharedMatrix Dt_mo(bool total = true);
166 
168  std::pair<SharedMatrix, SharedVector> Na_mo();
170  std::pair<SharedMatrix, SharedVector> Nb_mo();
172  std::pair<SharedMatrix, SharedVector> Nt_mo();
174  std::pair<SharedMatrix, SharedVector> Na_so();
176  std::pair<SharedMatrix, SharedVector> Nb_so();
178  std::pair<SharedMatrix, SharedVector> Nt_so();
180  std::pair<SharedMatrix, SharedVector> Na_ao();
182  std::pair<SharedMatrix, SharedVector> Nb_ao();
184  std::pair<SharedMatrix, SharedVector> Nt_ao();
185 
187  std::string Da_name() const;
188 
189  // => Some integral helpers <= //
191 };
192 
211  protected:
213  int print_;
215  int debug_;
216 
218  std::string title_;
219 
221  std::set<std::string> tasks_;
222 
223  public:
225  virtual void print_header() = 0;
226  // => Queue/Compute Routines <= //
227 
229  void add(const std::string& task);
231  void add(std::vector<std::string> tasks);
233  void clear();
234 
236  void set_title(const std::string& title) { title_ = title; }
237 
239  virtual void compute() = 0;
240 
241  // => Utility Routines <= //
242  void set_print(int print) { print_ = print; }
243  void set_debug(int debug) { debug_ = debug; }
244 
245  // Constructor, sets defaults for print and debug
247  // Destructor
248  virtual ~TaskListComputer() {}
249 };
250 
267 class MultipolePropCalc : public Prop {
268  private:
270 
271  protected:
276 
277  public:
279  MultipolePropCalc(std::shared_ptr<Wavefunction> wfn, Vector3 const& origin);
280  // Output Type of multipole function, name, elec, nuc, tot
281  typedef std::vector<std::tuple<std::string, double, double, double>> MultipoleOutputTypeBase;
282  typedef std::shared_ptr<MultipoleOutputTypeBase> MultipoleOutputType;
284  MultipoleOutputType compute_multipoles(int order, bool transition = false, bool print_output = false,
285  bool verbose = false);
287  SharedVector compute_dipole(bool transition = false, bool print_output = false, bool verbose = false);
289  SharedMatrix compute_quadrupole(bool transition = false, bool print_output = false, bool verbose = false);
291  std::vector<SharedVector> compute_mo_extents(bool print_output = false);
292 };
293 
309 class PopulationAnalysisCalc : public Prop {
310  private:
312 
313  public:
314  typedef std::shared_ptr<std::vector<double>> SharedStdVector;
315  PopulationAnalysisCalc(std::shared_ptr<Wavefunction> wfn);
316  virtual ~PopulationAnalysisCalc();
318  std::tuple<SharedStdVector, SharedStdVector, SharedStdVector> compute_mulliken_charges(bool print_output = false);
320  std::tuple<SharedStdVector, SharedStdVector, SharedStdVector> compute_lowdin_charges(bool print_output = false);
322  std::tuple<SharedMatrix, SharedMatrix, SharedMatrix, SharedVector> compute_mayer_indices(bool print_output = false);
324  std::tuple<SharedMatrix, SharedMatrix, SharedMatrix, SharedVector> compute_wiberg_lowdin_indices(
325  bool print_output = false);
327  std::shared_ptr<std::vector<std::vector<std::tuple<double, int, int>>>> compute_no_occupations(
328  int max_noon = 3, bool print_output = false);
329 };
330 
347 class ESPPropCalc : public Prop {
348  private:
349  // Constructing without wavefunction is forbidden:
350  ESPPropCalc();
351 
352  protected:
354  std::vector<double> Vvals_;
356  std::vector<double> Exvals_;
357  std::vector<double> Eyvals_;
358  std::vector<double> Ezvals_;
359 
360  public:
362  ESPPropCalc(std::shared_ptr<Wavefunction> wfn);
364  virtual ~ESPPropCalc();
365 
366  std::vector<double> const& Vvals() const { return Vvals_; }
367  std::vector<double> const& Exvals() const { return Exvals_; }
368  std::vector<double> const& Eyvals() const { return Eyvals_; }
369  std::vector<double> const& Ezvals() const { return Ezvals_; }
370 
374  std::shared_ptr<std::vector<double>> compute_esp_at_nuclei(bool print_output = false, bool verbose = false);
376  void compute_esp_over_grid(bool print_output = false);
378  void compute_field_over_grid(bool print_output = false);
381 };
382 
387 class OEProp : public TaskListComputer {
388  private:
390  OEProp();
391 
392  protected:
394  std::shared_ptr<Wavefunction> wfn_;
396  void common_init();
398  void print_header();
399 
400  // Compute routines
402  void compute_dipole(bool transition = false);
404  void compute_quadrupole(bool transition = false);
406  void compute_multipoles(int order, bool transition = false);
408  void compute_mo_extents();
412  void compute_lowdin_charges();
414  void compute_mayer_indices();
418  void compute_no_occupations();
423  void compute_esp_at_nuclei();
425  void compute_esp_over_grid();
428 
432 
433  int max_noon_ = 3;
434 
435  // retrieves the Origin vector from the environment.
438  Vector3 compute_center(const double* property) const;
439 
440  public:
442  OEProp(std::shared_ptr<Wavefunction> wfn);
444  virtual ~OEProp();
445 
447  void oepy_add(const std::string& task) { add(task); }
448  void oepy_compute() { compute(); }
449  void oepy_set_title(const std::string& title) { set_title(title); }
450 
452  void compute();
453 
454  std::vector<double> const& Vvals() const { return epc_.Vvals(); }
455  std::vector<double> const& Exvals() const { return epc_.Exvals(); }
456  std::vector<double> const& Eyvals() const { return epc_.Eyvals(); }
457  std::vector<double> const& Ezvals() const { return epc_.Ezvals(); }
458 
459  // These functions need to be overridden to pass on to the feature classes:
460 
461  // Change restricted flag. Resets C/D/epsilon matrices from wfn
462  void set_wavefunction(std::shared_ptr<Wavefunction> wfn);
463  // Change restricted flag. Resets C/D/epsilon matrices from wfn
464  void set_restricted(bool restricted);
465  // Set alpha eigenvalues, MO pitzer order basis
466  void set_epsilon_a(SharedVector epsilon_a);
467  // Set beta eigenvalues, MO pitzer order basis. Throws if restricted
468  void set_epsilon_b(SharedVector epsilon_a);
469  // Set alpha C matrix, SO/MO pitzer order basis.
470  void set_Ca(SharedMatrix Ca);
471  // Set beta C matrix, SO/MO pitzer order basis. Throws if restricted
472  void set_Cb(SharedMatrix Cb);
473 
474  // => Set OPDM/TDM/DDM (often called). These need not be totally symmetric. Note, you are setting Da and/or Db, I do
475  // the adding to Dt <= //
476 
477  // TODO Add symmetry is irrep number
478  void set_Da_ao(SharedMatrix Da, int symmetry = 0);
479  void set_Db_ao(SharedMatrix Db, int symmetry = 0);
480  void set_Da_so(SharedMatrix Da);
481  void set_Db_so(SharedMatrix Db);
482  void set_Da_mo(SharedMatrix Da);
483  void set_Db_mo(SharedMatrix Db);
484 };
485 
496 // class GridProp : public Prop {
497 //
498 // protected:
499 // /// The absolute file path where results from this analysis will be stored
500 // std::string filename_;
501 // /// The format for the output (defaults to df3)
502 // std::string format_;
503 //
504 // /// Is the grid initialized
505 // bool initialized_;
506 //
507 // /// The grid (grid_["x"] = <double***> x, for instance)
508 // std::map<std::string, double***> grid_;
509 // /// The BasisPoints object to evaluate basis functions on the grid
510 // //std::shared_ptr<BasisPoints> points_;
511 //
512 //
513 // /// The number of subintervals
514 // int n_[3];
515 // /// The dimensions of the grid (bohr)
516 // double l_[3];
517 // /// The origin of the final grid (bohr)
518 // double o_[3];
519 // /// The number of points to compute at once (5000 seems reasonable)
520 // int block_size_;
521 // /// The max/min for d3f writes
522 // double caxis_[2];
523 //
524 // /// An nbf x nbf scratch array
525 // double** temp_tens_;
526 //
527 // /// AO basis matrices (everything on grids is AO)
528 // SharedMatrix Da_ao_;
529 // SharedMatrix Db_ao_;
530 // SharedMatrix Ca_ao_;
531 // SharedMatrix Cb_ao_;
532 // /// irrep offsets (for orbitals)
533 // int irrep_offsets_[8];
534 //
535 // /// The array of alpha MOs to store
536 // std::vector<std::pair<int, int> > alpha_mos_;
537 // /// The array of beta MOs to store
538 // std::vector<std::pair<int, int> > beta_mos_;
539 // /// The array of basis functions to plot (use C1 if you want AO, otherwise SO will be done)
540 // std::vector<std::pair<int, int> > basis_funs_;
541 //
542 // /// Common initialization
543 // void common_init();
544 //
545 // /// Print header
546 // void print_header();
547 //
548 // // Deprecated
549 // // // Compute routines (these all work on a block of points)
550 // // /// Compute mo values
551 // // void compute_mos(std::shared_ptr<GridBlock> g, size_t offset);
552 // // /// Compute basis function values
553 // // void compute_basis_funs(std::shared_ptr<GridBlock> g, size_t offset);
554 // // /// Compute total density
555 // // void compute_rho(std::shared_ptr<GridBlock> g, double* results);
556 // // /// Compute spin density (rho_a - rho_b)
557 // // void compute_rho_s(std::shared_ptr<GridBlock> g, double* results);
558 // // /// Compute rho_a (alpha density)
559 // // void compute_rho_a(std::shared_ptr<GridBlock> g, double* results);
560 // // /// Compute rho_b (beta density)
561 // // void compute_rho_b(std::shared_ptr<GridBlock> g, double* results);
562 // // /// Compute gamma_aa (\nabla rho_a ^2)
563 // // void compute_gamma_aa(std::shared_ptr<GridBlock> g, double* results);
564 // // /// Compute gamma_ab (\nabla rho_a \nabla rho_b)
565 // // void compute_gamma_ab(std::shared_ptr<GridBlock> g, double* results);
566 // // /// Compute gamma_bb (\nabla rho_b ^2)
567 // // void compute_gamma_bb(std::shared_ptr<GridBlock> g, double* results);
568 // // /// Compute tau_a (KE density)
569 // // void compute_tau_a(std::shared_ptr<GridBlock> g, double* results);
570 // // /// Compute tau_b (KE density)
571 // // void compute_tau_b(std::shared_ptr<GridBlock> g, double* results);
572 //
573 // /// Compute ESP (perhaps more involved, might need a fast Poisson solver)
574 // void compute_ESP();
575 //
576 // /// Allocate a grid3 (and zero it out)
577 // double*** block_grid(int nx, int ny, int nz);
578 // /// Free a grid3
579 // void free_grid(double*** grid);
580 // /// Actually build the grid
581 // void build_grid();
582 // /// allocate all the registers
583 // void allocate_arrays();
584 // /// Write the grid out in data format
585 // void write_data_grid();
586 // /// Write the grid out in df3 files
587 // void write_df3_grid();
588 //
589 //
590 // public:
591 // /// Constructor, uses globals
592 // GridProp(std::shared_ptr<Wavefunction> wfn);
593 // /// Constructor, uses globals and Process::environment::reference wavefunction
594 // GridProp();
595 // /// Destructor
596 // virtual ~GridProp();
597 //
598 // /// Python issue
599 // void gridpy_add(const std::string& task) { add(task); }
600 // void gridpy_compute() { compute(); }
601 //
602 // /// Set the output filename
603 // void set_filename(const std::string& file) { filename_ = file; }
604 // /// Set the format
605 // void set_format(const std::string& form) { format_ = form; }
606 // /// Set a desired MO (use for restricted)
607 // void add_alpha_mo(int irrep, int index);
608 // /// Set a desired MO
609 // void add_beta_mo(int irrep, int index);
610 // /// Set a desired basis function
611 // void add_basis_fun(int irrep, int index);
612 // /// Compute and print/save the properties
613 // void compute();
614 //
615 // /**
616 // * Grid specification
617 // */
618 //
619 // // High-Level
620 //
621 // /// Set the number of subintervals on the grid
622 // /// Setting 0 for one index will graph a plane (origin centered)
623 // /// Setting 0 for two indices will graph a line (origin centered)
624 // /// Defaults to nx,ny,nz = 40
625 // void set_n(int nx, int ny, int nz) { n_[0] = nx; n_[1] = ny; n_[2] = nz; }
626 //
627 // /// build the best grid for a given set of overages (bohr) at the edges
628 // void build_grid_overages(double overages);
629 //
630 // /// The maximum/minimum data values to plot for the current properties (clamp)
631 // void set_caxis(double min, double max) { caxis_[0] = min; caxis_[1] = max; }
632 //
633 // // Low-Level
634 //
635 // /// Set the dimensions of the grid (in bohr)
636 // void set_l(double lx, double ly, double lz) { l_[0] = lx; l_[1] = ly; l_[2] = lz; }
637 //
638 // /// Set the origin of the grid (in bohr)
639 // void set_o(double ox, double oy, double oz) { o_[0] = ox; o_[1] = oy; o_[2] = oz; }
640 //
641 // /// Get the k-th element of n_
642 // int get_n(int k) const { return n_[k]; }
643 //
644 // /// Get the k-th element of l_
645 // double get_l(int k) const { return l_[k]; }
646 //
647 // /// Get the k-th element of o_
648 // double get_o(int k) const { return o_[k]; }
649 //
650 // /// Free the grid (useful if doing properties sequentially)
651 // void reset();
652 //
653 //};
654 
655 } // namespace psi
656 
657 #endif
std::shared_ptr< MultipoleOutputTypeBase > MultipoleOutputType
Definition: oeprop.h:282
bool origin_preserves_symmetry_
Whether the origin is on a symmetry axis or not.
Definition: oeprop.h:275
void set_print(int print)
Definition: oeprop.h:242
bool same_dens_
Definition: oeprop.h:72
void set_epsilon_a(SharedVector epsilon_a)
Definition: oeprop.cc:2154
std::vector< double > Eyvals_
Definition: oeprop.h:357
ESPPropCalc epc_
Definition: oeprop.h:431
void title()
Definition: ccdensity.cc:599
SharedVector epsilon_a_
The alpha eigenvalues in the MO basis (used to form Pitzer ordering)
Definition: oeprop.h:86
void compute_lowdin_charges()
Compute Lowdin Charges.
Definition: oeprop.cc:1668
Definition: oeprop.h:347
void set_Db_ao(SharedMatrix Db, int symmetry=0)
Definition: oeprop.cc:175
std::shared_ptr< Wavefunction > wfn_
The wavefunction object this Prop is built around.
Definition: oeprop.h:394
std::vector< double > const & Ezvals() const
Definition: oeprop.h:369
void set_Ca(SharedMatrix Ca)
Definition: oeprop.cc:141
void set_Db_so(SharedMatrix Db)
Definition: oeprop.cc:203
std::vector< double > Ezvals_
Definition: oeprop.h:358
void set_debug(int debug)
Definition: oeprop.h:243
void compute_dipole(bool transition=false)
Compute dipole.
Definition: oeprop.cc:1178
SharedMatrix Cb_so()
The beta C matrix in the SO basis.
Definition: oeprop.cc:314
std::tuple< SharedStdVector, SharedStdVector, SharedStdVector > compute_mulliken_charges(bool print_output=false)
Compute Mulliken Charges.
Definition: oeprop.cc:1586
std::pair< SharedMatrix, SharedVector > Nt_so()
The total natural orbital occupations and orbitals in the SO basis.
Definition: oeprop.cc:586
void compute_esp_over_grid()
Compute electrostatic potential at specified grid points.
Definition: oeprop.cc:977
SharedVector compute_dipole(bool transition=false, bool print_output=false, bool verbose=false)
Compute dipole.
Definition: oeprop.cc:1192
void set_Db_mo(SharedMatrix Db)
Definition: oeprop.cc:2208
int print_
Print flag.
Definition: oeprop.h:213
void set_Ca(SharedMatrix Ca)
Definition: oeprop.cc:2166
void compute_mulliken_charges()
Compute Mulliken Charges.
Definition: oeprop.cc:1573
std::string Da_name() const
Density Matrix title, used for fallback naming of OEProp compute jobs.
Definition: oeprop.cc:661
SharedVector epsilon_b()
The alpha eigenvalues in the MO basis (used to form Pitzer ordering)
Definition: oeprop.cc:272
void compute_no_occupations()
Compute/display natural orbital occupations around the bandgap. Displays max_num above and below the ...
Definition: oeprop.cc:2011
std::shared_ptr< std::vector< double > > compute_esp_at_nuclei(bool print_output=false, bool verbose=false)
Compute electrostatic potentials at the nuclei.
Definition: oeprop.cc:1130
virtual ~PopulationAnalysisCalc()
Definition: oeprop.cc:1571
std::vector< double > Vvals_
The ESP in a.u., computed at each grid point.
Definition: oeprop.h:354
std::pair< SharedMatrix, SharedVector > Na_so()
The alpha natural orbital occupations and orbitals in the SO basis.
Definition: oeprop.cc:437
std::vector< double > const & Eyvals() const
Definition: oeprop.h:456
Definition: vector3.h:38
void compute_field_over_grid()
Compute field at specified grid points.
Definition: oeprop.cc:1068
SharedMatrix Dt_mo(bool total=true)
The total/spin density matrix in the ao basis, depending on if true or false.
Definition: oeprop.cc:402
SharedMatrix Da_so_
The alpha density matrix in the SO basis.
Definition: oeprop.h:90
TaskListComputer()
Definition: oeprop.cc:258
Definition: oeprop.h:267
void set_title(const std::string &title)
Set title for use in saving information.
Definition: oeprop.h:236
PopulationAnalysisCalc pac_
Definition: oeprop.h:430
std::shared_ptr< std::vector< double > > SharedStdVector
Definition: oeprop.h:314
std::vector< double > const & Vvals() const
Definition: oeprop.h:366
std::shared_ptr< IntegralFactory > integral_
The integral factory for this wavefunction&#39;s basisset.
Definition: oeprop.h:74
SharedVector compute_esp_over_grid_in_memory(SharedMatrix input_grid) const
Compute electrostatic potential at grid points based on input grid, OpenMP version. input_grid is Nx3.
Definition: oeprop.cc:1021
void common_init()
Common initialization.
Definition: oeprop.cc:691
void oepy_add(const std::string &task)
Python issue.
Definition: oeprop.h:447
void compute_field_over_grid(bool print_output=false)
Compute field at specified grid points.
Definition: oeprop.cc:1070
void compute_quadrupole(bool transition=false)
Compute quadrupole.
Definition: oeprop.cc:1284
bool same_orbs_
Is this wavefunction object spin-restricted? (Actually closed-shell, but this is wavefunction&#39;s conve...
Definition: oeprop.h:71
std::pair< SharedMatrix, SharedVector > Nt_mo()
The total natural orbital occupations and orbitals in the MO basis.
Definition: oeprop.cc:577
void set_Cb(SharedMatrix Cb)
Definition: oeprop.cc:147
SharedMatrix Ca_so_
The alpha C matrix in the SO basis.
Definition: oeprop.h:94
void add(const std::string &task)
Add a single task to the queue.
Definition: oeprop.cc:264
void set_Da_mo(SharedMatrix Da)
Definition: oeprop.cc:208
std::pair< SharedMatrix, SharedVector > Nb_so()
The beta natural orbital occupations and orbitals in the SO basis. Throws if restricted.
Definition: oeprop.cc:458
virtual ~Prop()
Virtual destructor.
Definition: oeprop.cc:75
std::vector< double > const & Eyvals() const
Definition: oeprop.h:368
void set_Da_so(SharedMatrix Da)
Definition: oeprop.cc:197
Definition: oeprop.h:210
Definition: oeprop.h:309
int max_noon_
Definition: oeprop.h:433
virtual void print_header()=0
Print header.
void oepy_set_title(const std::string &title)
Definition: oeprop.h:449
std::vector< double > const & Exvals() const
Definition: oeprop.h:367
Definition: oeprop.h:64
SharedMatrix Dt_so(bool total=true)
The total/spin density matrix in the ao basis, depending on if true or false.
Definition: oeprop.cc:386
SharedMatrix Db_mo()
The beta density matrix in the MO basis.
Definition: oeprop.cc:351
void clear()
Clear task queue.
Definition: oeprop.cc:270
Vector3 origin_
The center about which properties are computed.
Definition: oeprop.h:273
SharedMatrix Ca_so()
The alpha C matrix in the SO basis.
Definition: oeprop.cc:313
void compute_esp_over_grid(bool print_output=false)
Compute electrostatic potential at specified grid points.
Definition: oeprop.cc:979
std::pair< SharedMatrix, SharedVector > Nt_ao()
The total natural orbital occupations and orbitals in the AO basis.
Definition: oeprop.cc:607
SharedMatrix Da_ao()
The alpha density matrix in the AO (Spherical Harmonics, C1) basis.
Definition: oeprop.cc:273
void set_Da_so(SharedMatrix Da)
Definition: oeprop.cc:2190
void compute_esp_at_nuclei()
Compute electrostatic potentials at the nuclei.
Definition: oeprop.cc:1119
void set_Da_ao(SharedMatrix Da, int symmetry=0)
Definition: oeprop.cc:152
void oepy_compute()
Definition: oeprop.h:448
MultipoleOutputType compute_multipoles(int order, bool transition=false, bool print_output=false, bool verbose=false)
Compute arbitrary-order multipoles up to (and including) l=order. returns name, elec, nuc and tot as vector_ptr.
Definition: oeprop.cc:846
void set_Db_so(SharedMatrix Db)
Definition: oeprop.cc:2196
std::pair< SharedMatrix, SharedVector > Nb_mo()
The beta natural orbital occupations and orbitals in the MO basis. Throws if restricted.
Definition: oeprop.cc:426
std::tuple< SharedStdVector, SharedStdVector, SharedStdVector > compute_lowdin_charges(bool print_output=false)
Compute Lowdin Charges.
Definition: oeprop.cc:1681
void set_epsilon_b(SharedVector epsilon_a)
Definition: oeprop.cc:2160
SharedMatrix overlap_so()
Definition: oeprop.cc:654
MultipolePropCalc mpc_
Definition: oeprop.h:429
std::tuple< SharedMatrix, SharedMatrix, SharedMatrix, SharedVector > compute_mayer_indices(bool print_output=false)
Compute Mayer Bond Indices (non-orthogoal basis)
Definition: oeprop.cc:1774
void set_Db_ao(SharedMatrix Db, int symmetry=0)
Definition: oeprop.cc:2184
void compute_multipoles(int order, bool transition=false)
Compute arbitrary-order multipoles up to (and including) l=order.
Definition: oeprop.cc:831
void set_Da_mo(SharedMatrix Da)
Definition: oeprop.cc:2202
void compute_electric_field_and_gradients()
std::vector< std::tuple< std::string, double, double, double > > MultipoleOutputTypeBase
Definition: oeprop.h:281
void set_wavefunction(std::shared_ptr< Wavefunction > wfn)
Definition: oeprop.cc:2142
std::shared_ptr< Wavefunction > wfn_
The wavefunction object this Prop is built around.
Definition: oeprop.h:67
Vector3 compute_center(const double *property) const
Computes the center for a given property, for the current molecule. Weighted center of geometry funct...
Definition: oeprop.cc:663
std::vector< double > Exvals_
The field components in a.u. computed at each grid point.
Definition: oeprop.h:356
void set_restricted(bool restricted)
Definition: oeprop.cc:2148
SharedMatrix compute_quadrupole(bool transition=false, bool print_output=false, bool verbose=false)
Compute quadrupole.
Definition: oeprop.cc:1306
void compute_mayer_indices()
Compute Mayer Bond Indices (non-orthogoal basis)
Definition: oeprop.cc:1766
void print_header()
Print header and information.
Definition: oeprop.cc:782
virtual ~TaskListComputer()
Definition: oeprop.h:248
Vector3 get_origin_from_environment() const
Definition: oeprop.cc:737
std::set< std::string > tasks_
The set of tasks to complete.
Definition: oeprop.h:221
SharedMatrix AO2USO_
The AO to USO matrix.
Definition: oeprop.h:79
std::pair< SharedMatrix, SharedVector > Nb_ao()
The beta natural orbital occupations and orbitals in the AO basis. Throws if restricted.
Definition: oeprop.cc:528
void set_epsilon_b(SharedVector epsilon_a)
Definition: oeprop.cc:137
std::shared_ptr< std::vector< std::vector< std::tuple< double, int, int > > > > compute_no_occupations(int max_noon=3, bool print_output=false)
Compute/display natural orbital occupations around the bandgap. Displays max_num above and below the ...
Definition: oeprop.cc:2015
Definition: oeprop.h:387
void compute_mo_extents()
Compute mo extents.
Definition: oeprop.cc:1411
std::pair< SharedMatrix, SharedVector > Na_ao()
The alpha natural orbital occupations and orbitals in the AO basis.
Definition: oeprop.cc:481
SharedMatrix Db_ao()
The beta density matrix in the AO (Spherical Harmonics, C1) basis.
Definition: oeprop.cc:292
OEProp()
Constructor, uses globals and Process::environment::reference wavefunction, Implementation does not e...
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
std::shared_ptr< Wavefunction > wfn
Definition: dx_write.cc:60
std::string title_
The title of this Prop object, for use in saving info.
Definition: oeprop.h:218
void set_Cb(SharedMatrix Cb)
Definition: oeprop.cc:2172
SharedMatrix Db_so_
The beta density matrix in the SO basis.
Definition: oeprop.h:92
std::shared_ptr< BasisSet > basisset_
The basisset for this wavefunction.
Definition: oeprop.h:69
SharedMatrix Cb_so_
The beta C matrix in the SO basis.
Definition: oeprop.h:96
void set_restricted(bool restricted)
Definition: oeprop.cc:108
Prop(std::shared_ptr< Wavefunction > wfn)
Build a Prop object with C, epsilon, and restricted buit from wfn.
Definition: oeprop.cc:71
std::tuple< SharedMatrix, SharedMatrix, SharedMatrix, SharedVector > compute_wiberg_lowdin_indices(bool print_output=false)
Compute Wiberg Bond Indices using Lowdin Orbitals (symmetrically orthogonal basis) ...
Definition: oeprop.cc:1896
void set_Da_ao(SharedMatrix Da, int symmetry=0)
Definition: oeprop.cc:2178
SharedMatrix Cb_ao()
The beta C matrix in the AO (Spherical Harmonics, C1) basis. Ordered by eigenvalue.
Definition: oeprop.cc:316
void set_wavefunction(std::shared_ptr< Wavefunction > wfn)
Definition: oeprop.cc:77
SharedMatrix Ca_ao()
The alpha C matrix in the AO (Spherical Harmonics, C1) basis. Ordered by eigenvalue.
Definition: oeprop.cc:315
SharedMatrix Db_so()
The beta density matrix in the SO basis.
Definition: oeprop.cc:318
void set_epsilon_a(SharedVector epsilon_a)
Definition: oeprop.cc:131
std::vector< double > const & Vvals() const
Definition: oeprop.h:454
SharedMatrix Da_so()
The alpha density matrix in the SO basis.
Definition: oeprop.cc:317
std::vector< double > const & Ezvals() const
Definition: oeprop.h:457
void compute()
Compute and print/save the properties.
Definition: oeprop.cc:794
virtual ~ESPPropCalc()
Destructor.
Definition: oeprop.cc:975
virtual ~OEProp()
Destructor.
Definition: oeprop.cc:689
std::shared_ptr< MatrixFactory > factory_
The matrix factory for this wavefunction&#39;s basisset (SO)
Definition: oeprop.h:76
std::vector< double > const & Exvals() const
Definition: oeprop.h:455
void compute_electric_field_and_gradients()
This function is missing, it should be removed until it is implemented.
int debug_
Debug flag.
Definition: oeprop.h:215
SharedVector epsilon_a()
The alpha eigenvalues in the MO basis (used to form Pitzer ordering)
Definition: oeprop.cc:271
std::vector< SharedVector > compute_mo_extents(bool print_output=false)
Compute mo extents.
Definition: oeprop.cc:1416
void common_init()
Common initialization.
Definition: oeprop.cc:76
SharedMatrix Da_mo()
The alpha density matrix in the MO basis.
Definition: oeprop.cc:319
void set_Db_mo(SharedMatrix Db)
Definition: oeprop.cc:234
void compute_wiberg_lowdin_indices()
Compute Wiberg Bond Indices using Lowdin Orbitals (symmetrically orthogonal basis) ...
Definition: oeprop.cc:1888
SharedVector epsilon_b_
The alpha eigenvalues in the MO basis (used to form Pitzer ordering)
Definition: oeprop.h:88
std::shared_ptr< Vector > SharedVector
Definition: adc.h:51
std::pair< SharedMatrix, SharedVector > Na_mo()
The alpha natural orbital occupations and orbitals in the MO basis.
Definition: oeprop.cc:417
virtual void compute()=0
Compute properties.