MPQC  3.0.0-alpha
pop_local.h
1 
2 /*
3  * Copyright 2009 Sandia Corporation. Under the terms of Contract
4  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
5  * retains certain rights in this software.
6  *
7  * This file is a part of the MPQC LMP2 library.
8  *
9  * The MPQC LMP2 library is free software: you can redistribute it
10  * and/or modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation, either
12  * version 3 of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this program. If not, see
21  * <http://www.gnu.org/licenses/>.
22  *
23  */
24 
25 #ifndef _chemistry_qc_lmp2_pop_local_h
26 #define _chemistry_qc_lmp2_pop_local_h
27 
28 #include <chemistry/qc/wfn/obwfn.h>
29 
30 namespace sc {
31 
33 convert_complete_to_occupied_vector(
35  const sc::RefSCMatrix &vec);
36 
38 convert_complete_to_occupied_vector_nosymm(
40  int nfzc, const sc::RefSCMatrix &vec);
41 
42 
43 sc::RefSCMatrix pop_local_mo(const sc::Ref<sc::OneBodyWavefunction> &wfn, int nfzc, const sc::RefSymmSCMatrix &ao_overlap,
44  const sc::Ref<sc::MessageGrp> &msg);
45 
49  int nfzc_;
50  sc::RefSymmSCMatrix ao_overlap_;
51 
52  // filled in by compute_orbitals
53  sc::RefSCMatrix scf_vector_;
54 
55  class OrbData {
56  public:
57  double delta,gamma;
58  int i,j;
59  mutable bool obsolete;
60  OrbData(): obsolete(true) {};
61  };
62 
63  // temporary data and routines used by compute_orbitals
64  typedef std::multimap<double, OrbData, std::greater<double> > orbmap_t;
65  orbmap_t orbmap_;
66  std::set<std::pair<int,int> > obsolete_orbs_;
67  std::vector<std::vector<orbmap_t::iterator> > orbmap_iters_;
68  std::vector<double> scf_vector_dat_, S_half_trans_dat_;
69  int nocc_;
70  int nocc_act_;
71  int natom_;
72  int noso_;
73  int nbasis_;
75  void compute_rotation(OrbData &orbdata);
76  void rotate(const OrbData &orbdata, double *vec);
77  void rotate(const OrbData &orbdata);
78  void init_orbmap();
79  orbmap_t::iterator largest_orbmap_entry();
80  void update_orbmap_entries(int orb);
81  void obsolete_orbmap_entries(int orb);
82  void update_orbmap_entry(int I, int J);
83  void zero_orbmap_entry(int I, int J);
84  void remove_from_obsolete(int i, int j);
85  void add_to_obsolete(int i, int j);
86  long update_obsolete_entries();
87 
88  public:
90  int nfzc,
91  const sc::RefSymmSCMatrix &ao_overlap);
92  sc::RefSCMatrix compute_orbitals();
93  void write_orbitals();
94 };
95 
96 }
97 
98 #endif
sc::RefSymmSCMatrix
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:265
sc::RefSCMatrix
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition: matrix.h:135
sc::Ref< sc::OneBodyWavefunction >
sc::PipekMezeyLocalization
Performs a Pipek-Mezey orbital localization.
Definition: pop_local.h:47
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

Generated at Sun Jan 26 2020 23:23:58 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.