ERKALE
ERKALE - DFT from Hel
 All Classes Functions Variables Friends Pages
xrsscf.h
1 /*
2  * This source code is part of
3  *
4  * E R K A L E
5  * -
6  * HF/DFT from Hel
7  *
8  * Written by Susi Lehtola, 2010-2011
9  * Copyright (c) 2010-2011, Susi Lehtola
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  */
16 
17 
18 #ifndef ERKALE_XRSSCF
19 #define ERKALE_XRSSCF
20 
21 #include "../global.h"
22 #include <armadillo>
23 #include "../scf.h"
24 
25 enum xrs_method {
26  // Transition potential: one half electron in excited initial state, system has net charge +0.5
27  TP,
28  // Full hole: no electron in excited initial state, system has net charge +1
29  FCH,
30  // XCH: Full hole, but excited electron placed on LUMO
31  XCH
32 };
33 
34 class XRSSCF : public SCF {
36  bool spin;
38  int nocca;
40  int noccb;
41 
43  arma::vec coreorb;
44 
45  public:
47  XRSSCF(const BasisSet & basis, const Settings & set, Checkpoint & chkpt, bool spin);
49  ~XRSSCF();
50 
52  void set_core(const arma::vec & c);
54  arma::vec get_core() const;
55 
57  size_t full_hole(uscf_t & sol, convergence_t conv, dft_t dft, bool xch);
59  size_t half_hole(uscf_t & sol, convergence_t conv, dft_t dft);
60 
62  size_t full_hole_ls(size_t xcatom, uscf_t & sol, convergence_t conv, dft_t dft, bool xch);
64  size_t half_hole_ls(size_t xcatom, uscf_t & sol, convergence_t conv, dft_t dft);
65 
67  void Fock_full_hole(uscf_t & sol, dft_t dft, const std::vector<double> & occa, const std::vector<double> & occb, DFTGrid & grid, DFTGrid & nlgrid, bool xch) const;
69  void Fock_half_hole(uscf_t & sol, dft_t dft, const std::vector<double> & occa, const std::vector<double> & occb, DFTGrid & grid, DFTGrid & nlgrid) const;
70 };
71 
73 size_t find_excited_orb(const BasisSet & basis, const arma::vec & xco, const arma::mat & C, int nocc);
74 
76 size_t get_excited_atom_idx(std::vector<atom_t> & at);
77 
79 std::vector<size_t> atom_list(const BasisSet & basis, size_t xcatom, bool verbose);
80 
82 std::vector<double> norm_occ(size_t nocc);
84 std::vector<double> tp_occ(size_t excited, size_t nocc);
86 std::vector<double> xch_occ(size_t excited, size_t nocc);
88 std::vector<double> fch_occ(size_t excited, size_t nocc);
89 
91 size_t localize(const BasisSet & basis, int nocc, size_t xcatom, arma::mat & C, const std::string & state, int iorb);
92 
93 #endif
void set_core(const arma::vec &c)
Set core hole state [Iannuzzi and Hütter, PCCP 9, 1559 (2007)].
Definition: xrsscf-base.cpp:44
int noccb
Number of beta electrons.
Definition: xrsscf.h:40
arma::vec coreorb
Initial core hole orbital, used to identify the state by maximal overlap.
Definition: xrsscf.h:43
size_t half_hole_ls(size_t xcatom, uscf_t &sol, convergence_t conv, dft_t dft)
Compute TP solution using line search (slow!)
size_t full_hole_ls(size_t xcatom, uscf_t &sol, convergence_t conv, dft_t dft, bool xch)
Compute 1st core-excited state using line search (slow!)
DFT settings.
Definition: scf.h:59
Convergence criteria.
Definition: scf.h:49
void Fock_half_hole(uscf_t &sol, dft_t dft, const std::vector< double > &occa, const std::vector< double > &occb, DFTGrid &grid, DFTGrid &nlgrid) const
Get Fock operator for TP state.
size_t full_hole(uscf_t &sol, convergence_t conv, dft_t dft, bool xch)
Compute 1st core-excited state.
Unrestricted solver info.
Definition: scf.h:139
bool spin
Excite beta spin?
Definition: xrsscf.h:36
Settings used for a calculations.
Definition: settings.h:74
void Fock_full_hole(uscf_t &sol, dft_t dft, const std::vector< double > &occa, const std::vector< double > &occb, DFTGrid &grid, DFTGrid &nlgrid, bool xch) const
Get Fock operator for 1st core-excited state.
Definition: xrsscf.h:34
arma::vec get_core() const
Get core hole state.
Definition: xrsscf-base.cpp:48
Self-consistent field solver routines.
Definition: scf.h:205
DFT quadrature grid.
Definition: dftgrid.h:475
Basis set.
Definition: basis.h:187
size_t half_hole(uscf_t &sol, convergence_t conv, dft_t dft)
Compute TP solution.
int nocca
Number of alpha electrons.
Definition: xrsscf.h:38
~XRSSCF()
Destructor.
Definition: xrsscf-base.cpp:41
Checkpointing class.
Definition: checkpoint.h:69
XRSSCF(const BasisSet &basis, const Settings &set, Checkpoint &chkpt, bool spin)
Constructor.
Definition: xrsscf-base.cpp:34