v2DM-DOCI  1.0
PotentialReducation.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Copyright (C) 2014-2015 Ward Poelmans
5  *
6  * This file is part of v2DM-DOCI.
7  *
8  * v2DM-DOCI is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * Foobar is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
20  *
21  * @END LICENSE
22  */
23 
24 #ifndef POTENTIAL_REDUCTION_H
25 #define POTENTIAL_REDUCTION_H
26 
27 #include "include.h"
28 
29 namespace CheMPS2 { class Hamiltonian; }
30 
31 namespace doci2DM
32 {
33 
35 {
36  public:
37 
39 
40  PotentialReduction(const TPM &);
41 
43 
45 
46  virtual ~PotentialReduction() = default;
47 
48  PotentialReduction* Clone() const;
49 
51 
53 
55 
56  void BuildHam(const CheMPS2::Hamiltonian &);
57 
58  void BuildHam(const TPM &);
59 
60  unsigned int Run();
61 
62  double getFullEnergy() const;
63 
64  void set_target(double);
65 
66  void set_tolerance(double);
67 
68  void set_reduction(double);
69 
70  TPM& getRDM() const;
71 
72  TPM& getHam() const;
73 
74  Lineq& getLineq() const;
75 
76  double evalEnergy() const;
77 
78  bool FullyConverged() const;
79 
80  private:
81 
82  std::unique_ptr<TPM> ham;
83 
84  std::unique_ptr<TPM> rdm;
85 
86  std::unique_ptr<Lineq> lineq;
87 
88  double nuclrep;
89 
90  double norm_ham;
91 
92  double target;
93 
94  double tolerance;
95 
96  double reductionfac;
97 
98  double t;
99 };
100 
101 }
102 
103 #endif /* POTENTIAL_REDUCTION_H */
104 
105 /* vim: set ts=3 sw=3 expandtab :*/
void BuildHam(const CheMPS2::Hamiltonian &)
PotentialReduction * Clone() const
virtual ~PotentialReduction()=default
std::unique_ptr< TPM > ham
std::unique_ptr< Lineq > lineq
PotentialReduction(const CheMPS2::Hamiltonian &)
PotentialReduction & operator=(PotentialReduction &&)=default
std::unique_ptr< TPM > rdm