43 #include <moldft/xcfunctional.h> 
   44 #include <moldft/molecule.h> 
   45 #include <moldft/molecularbasis.h> 
   50 tensorT Q3(
const madness::Tensor<double>& s);
 
   71     std::vector< std::shared_ptr<real_derivative_3d> > 
gradop;
 
   75     SCF(World & world, 
const char *filename);
 
   91     double PM_q(
const tensorT & S, 
const tensorT & 
C, 
int i, 
int j, 
int lo, 
int nbf);
 
   94             const bool & doprint, 
const std::vector<int> & set,
 
   95             const double thetamax, tensorT & U, 
const double thresh);
 
   97     tensorT 
localize_PM(World & world, 
const vecfuncT & mo, 
const std::vector<int> & set, 
const double thresh = 1e-9, 
const double thetamax = 0.5, 
const bool randomize = 
true, 
const bool doprint = 
true);
 
   99     void analyze_vectors(World & world, 
const vecfuncT & mo, 
const tensorT & occ = 
tensorT(), 
const tensorT & 
energy = 
tensorT(), 
const std::vector<int> & set = std::vector<int>());
 
  101     inline double DIP(
const tensorT & dip, 
int i, 
int j, 
int k, 
int l);
 
  103     tensorT 
localize_boys(World & world, 
const vecfuncT & mo, 
const std::vector<int> & set, 
const double thresh = 1e-9, 
const double thetamax = 0.5, 
const bool randomize = 
true);
 
  107     vecfuncT 
core_projection(World & world, 
const vecfuncT & 
psi, 
const bool include_Bc = 
true);
 
  115     functionT 
make_density(World & world, 
const tensorT & occ, 
const vecfuncT & v);
 
  119     vecfuncT 
apply_hf_exchange(World & world, 
const tensorT & occ, 
const vecfuncT & 
psi, 
const vecfuncT & 
f);
 
  129     vecfuncT 
apply_potential(World & world, 
const tensorT & occ, 
const vecfuncT & amo,
 
  130             const vecfuncT& vf, 
const vecfuncT& delrho, 
const functionT & vlocal, 
double & exc, 
int ispin);
 
  134     tensorT 
dipole(World & world);
 
  136     void vector_stats(
const std::vector<double> & v, 
double & rms, 
double & maxabsval);
 
  138     vecfuncT 
compute_residual(World & world, tensorT & occ, tensorT & fock, 
const vecfuncT & 
psi, vecfuncT & Vpsi, 
double & err);
 
  140     tensorT 
make_fock_matrix(World & world, 
const vecfuncT & 
psi, 
const vecfuncT & Vpsi, 
const tensorT & occ, 
double & ekinetic);
 
  146     Tensor<double> 
twoint(World& world, 
const vecfuncT& 
psi);
 
  150     tensorT 
diag_fock_matrix(World & world, tensorT& fock, vecfuncT & 
psi, vecfuncT & Vpsi, tensorT & evals, 
const tensorT & occ, 
double thresh);
 
  152     void loadbal(World & world, functionT & arho, functionT & brho, functionT & arho_old, functionT & brho_old, subspaceT & subspace);
 
  154     void rotate_subspace(World& world, 
const tensorT& U, subspaceT& subspace, 
int lo, 
int nfunc, 
double trantol);
 
  157             vecfuncT & Vpsia, vecfuncT & Vpsib,
 
  158             tensorT & focka, tensorT & fockb,
 
  159             subspaceT & subspace, tensorT & Q,
 
  160             double & bsh_residual, 
double & update_residual);
 
  163     void solve(World & world);
 
SCFParameters param
Definition: tkato/SCF.h:63
std::vector< int > at_to_bf
Definition: tkato/SCF.h:69
tensorT dipole(World &world)
vecfuncT apply_hf_exchange(World &world, const tensorT &occ, const vecfuncT &psi, const vecfuncT &f)
Definition: tkato/SCF.cc:1126
std::shared_ptr< operatorT > poperatorT
Definition: tkato/SCF.h:59
Tensor< double > tensorT
Definition: DFcode/distpm.cc:13
Main include file for MADNESS and defines Function interface. 
void localize_PM_task_kernel(tensorT &Q, std::vector< tensorT > &Svec, tensorT &C, const bool &doprint, const std::vector< int > &set, const double thetamax, tensorT &U, const double thresh)
Definition: tkato/SCF.cc:568
void set_protocol(World &world, double thresh)
double make_dft_energy(World &world, const vecfuncT &vf)
Definition: tkato/SCF.cc:1213
MolecularSystem molsys
Definition: tkato/SCF.h:61
std::vector< poperatorT > make_bsh_operators(World &world, const tensorT &evals)
madness::Function< double, 3 > functionT
Definition: tkato/SCF.h:53
std::vector< pairvecfuncT > subspaceT
Definition: tkato/SCF.h:56
madness::SeparatedConvolution< double, 3 > operatorT
Definition: tkato/SCF.h:58
madness::Tensor< double > tensorT
Definition: tkato/SCF.h:57
void make_nuclear_potential(World &world)
void initial_guess(World &world)
Simplified interface to XC functionals. 
Definition: DFcode/xcfunctional.h:52
NDIM & f
Definition: mra.h:2179
Definition: DFcode/molecule.h:82
std::pair< vecfuncT, vecfuncT > pairvecfuncT
Definition: tkato/SCF.h:55
double vtol
Definition: tkato/SCF.h:72
vecfuncT compute_residual(World &world, tensorT &occ, tensorT &fock, const vecfuncT &psi, vecfuncT &Vpsi, double &err)
void loadbal(World &world, functionT &arho, functionT &brho, functionT &arho_old, functionT &brho_old, subspaceT &subspace)
AtomicBasisSet aobasis
Definition: tkato/SCF.h:65
SCF(World &world, const char *filename)
double PM_q(const tensorT &S, const tensorT &C, int i, int j, int lo, int nbf)
Definition: tkato/SCF.cc:549
JLOOP2 NK jnz KLOOP2 mov C
Definition: mtxm_gen.h:10
void update_subspace(World &world, vecfuncT &Vpsia, vecfuncT &Vpsib, tensorT &focka, tensorT &fockb, subspaceT &subspace, tensorT &Q, double &bsh_residual, double &update_residual)
Tensor< double > twoint(World &world, const vecfuncT &psi)
Compute the two-electron integrals over the provided set of orbitals. 
Definition: tkato/SCF.cc:1462
tensorT Q3(const madness::Tensor< double > &s)
Given overlap matrix, return rotation with 3rd order error to orthonormalize the vectors. 
Definition: chem/SCF.cc:161
tensorT localize_boys(World &world, const vecfuncT &mo, const std::vector< int > &set, const double thresh=1e-9, const double thetamax=0.5, const bool randomize=true)
Definition: tkato/SCF.cc:734
double psi(const Vector< double, 3 > &r)
Definition: apps/ii/hatom_energy.cc:42
tensorT kinetic_energy_matrix(World &world, const vecfuncT &v)
Definition: tkato/SCF.cc:860
poperatorT coulop
Definition: tkato/SCF.h:70
functionT make_dft_potential(World &world, const vecfuncT &vf, int what)
Definition: tkato/SCF.cc:1208
std::vector< std::shared_ptr< real_derivative_3d > > gradop
Definition: tkato/SCF.h:71
Definition: scfparam.h:49
void save_mos(World &world)
functionT make_density(World &world, const tensorT &occ, const vecfuncT &v)
tensorT matrix_exponential(const tensorT &A)
Definition: tkato/SCF.cc:1483
XCfunctional xc
Definition: tkato/SCF.h:64
double core_projector_derivative(World &world, const vecfuncT &mo, const tensorT &occ, int atom, int axis)
Molecule molecule
Definition: tkato/SCF.h:62
void vector_stats(const std::vector< double > &v, double &rms, double &maxabsval)
Definition: tkato/SCF.cc:1377
double current_energy
Definition: tkato/SCF.h:73
vecfuncT apply_potential(World &world, const tensorT &occ, const vecfuncT &amo, const vecfuncT &vf, const vecfuncT &delrho, const functionT &vlocal, double &exc, int ispin)
Definition: tkato/SCF.cc:1219
functionT make_lda_potential(World &world, const functionT &arho)
void project_ao_basis(World &world)
Parameters of the SCF calculation. 
void initial_load_bal(World &world)
std::vector< int > at_nbf
Definition: tkato/SCF.h:69
void project(World &world)
Definition: tkato/SCF.h:52
void do_plots(World &world)
tensorT make_fock_matrix(World &world, const vecfuncT &psi, const vecfuncT &Vpsi, const tensorT &occ, double &ekinetic)
Definition: tkato/SCF.cc:1439
tensorT localize_PM(World &world, const vecfuncT &mo, const std::vector< int > &set, const double thresh=1e-9, const double thetamax=0.5, const bool randomize=true, const bool doprint=true)
represents molecular system 
void rotate_subspace(World &world, const tensorT &U, subspaceT &subspace, int lo, int nfunc, double trantol)
Definition: tkato/SCF.cc:1643
void load_mos(World &world)
vecfuncT ao
Definition: tkato/SCF.h:68
functionT mask
Definition: tkato/SCF.h:67
tensorT diag_fock_matrix(World &world, tensorT &fock, vecfuncT &psi, vecfuncT &Vpsi, tensorT &evals, const tensorT &occ, double thresh)
Definition: tkato/SCF.cc:1519
void analyze_vectors(World &world, const vecfuncT &mo, const tensorT &occ=tensorT(), const tensorT &energy=tensorT(), const std::vector< int > &set=std::vector< int >())
vecfuncT core_projection(World &world, const vecfuncT &psi, const bool include_Bc=true)
std::vector< functionT > vecfuncT
Definition: tkato/SCF.h:54
functionT vnuc
Definition: tkato/SCF.h:66
Contracted Gaussian basis. 
Definition: DFcode/molecularbasis.h:390
double DIP(const tensorT &dip, int i, int j, int k, int l)
tensorT derivatives(World &world)