MADNESS 0.10.1
madness::SCF Class Reference

#include <SCF.h>

Collaboration diagram for madness::SCF:

Public Member Functions

 SCF (World &world, const CalculationParameters &param, const Molecule &molecule, const PCMParameters &pcm_param=PCMParameters())
 collective constructor for SCF uses contents of file filename and broadcasts to all nodes
 SCF (World &world, const commandlineparser &parser)
 forwarding constructor
vecfuncT apply_bsh (World &world, vecfuncT &Vpsi, const tensorT &eps, const CalculationParameters &param)
vecfuncT apply_bsh_macrotask (World &world, vecfuncT &Vpsi, const tensorT &eps, const CalculationParameters &param, long batch, bool redistribute)
vecfuncT apply_bsh_plain (World &world, vecfuncT &Vpsi, const tensorT &eps, const CalculationParameters &param)
 Single un-tiled apply (small systems / debugging). Consumes Vpsi.
vecfuncT apply_bsh_tiled (World &world, vecfuncT &Vpsi, const tensorT &eps, const CalculationParameters &param)
void apply_explicit_occupations (World &world)
 overwrite the leading occupation numbers with the explicit aocc/bocc input, if given
vecfuncT apply_potential (World &world, const tensorT &occ, const vecfuncT &amo, const functionT &vlocal, double &exc, double &enl, int ispin)
bool canonicalize_virtuals (World &world, tensorT &fock, vecfuncT &psi, vecfuncT &Vpsi, const int nocc, const bool force=false) const
vecfuncT compute_residual (World &world, tensorT &occ, tensorT &fock, const vecfuncT &psi, vecfuncT &Vpsi, double &err)
void copy_data (World &world, const SCF &other)
tensorT derivatives (World &world, const functionT &rho) const
tensorT diag_fock_matrix (World &world, tensorT &fock, vecfuncT &psi, vecfuncT &Vpsi, tensorT &evals, const tensorT &occ, const double thresh) const
 diagonalize the fock matrix, taking care of degenerate states
tensorT dipole (World &world, const functionT &rho) const
 compute the total dipole moment of the molecule
void do_plots (World &world)
double do_step_restriction (World &world, const vecfuncT &mo, vecfuncT &mo_new, std::string spin) const
 perform step restriction following the KAIN solver
const vecfuncT & get_amo () const
 getter for the molecular orbitals, alpha spin
const tensorT & get_aocc () const
 getter for the occupation numbers, alpha spin
const vecfuncT & get_bmo () const
 getter for the molecular orbitals, beta spin
const tensorT & get_bocc () const
 getter for the occupation numbers, alpha spin
tensorT get_fock_transformation (World &world, const tensorT &overlap, tensorT &fock, tensorT &evals, const tensorT &occ, const double thresh_degenerate) const
 compute the unitary transformation that diagonalizes the fock matrix
void get_initial_orbitals (World &world, RestartPlan &plan)
 carry out a restart plan: read the orbitals it names, or make a guess
std::vector< int > group_orbital_sets (World &world, const tensorT &eps, const tensorT &occ, const int nmo) const
 group orbitals into sets of similar orbital energies for localization
void initial_guess (World &world)
void initial_guess_ao_eigenvectors (World &world, tensorT &c, tensorT &e)
void initial_guess_from_nwchem (World &world)
void initial_load_bal (World &world)
bool is_spin_restricted () const
vecfuncT kain_combine (World &world, const subspaceT &subspace, const tensorT &c, const size_t lo, const size_t n) const
 KAIN: the updated orbitals lo..lo+n of the subspace's vectors for coefficients c.
tensorT kain_solve (World &world, const vecfuncT &vm, const vecfuncT &rm, subspaceT &subspace, tensorT &Q) const
void kain_trim (subspaceT &subspace, tensorT &Q) const
 KAIN: drop the oldest history entry once the subspace holds maxsub of them.
distmatT kinetic_energy_matrix (World &world, const vecfuncT &v) const
void load_mos (World &world, const bool allow_fewer=true)
void loadbal (World &world, functionT &arho, functionT &brho, functionT &arho_old, functionT &brho_old, subspaceT &subspace)
functionT make_coulomb_potential (const functionT &rho) const
 make the Coulomb potential given the total density
functionT make_density (World &world, const tensorT &occ, const cvecfuncT &v)
functionT make_density (World &world, const tensorT &occ, const vecfuncT &v) const
double make_dft_energy (World &world, const vecfuncT &vf, int ispin)
tensorT make_fock_matrix (World &world, const vecfuncT &psi, const vecfuncT &Vpsi, const tensorT &occ, double &ekinetic) const
void make_nuclear_potential (World &world)
void orthonormalize (World &world, vecfuncT &amo_new) const
 orthonormalize the vectors
void orthonormalize (World &world, vecfuncT &amo_new, int nocc) const
 orthonormalize the vectors (symmetric in occupied spaced, gramm-schmidt for virt to occ)
void output_calc_info_schema () const
void output_scf_info_schema (const std::map< std::string, double > &vals, const tensorT &dipole_T) const
bool pad_virtuals_from_guess (World &world)
nlohmann::json population_analysis (World &world) const
 atomic charges, and spin populations for open shells, of the occupied orbitals
void project (World &world)
vecfuncT project_ao_basis (World &world, const AtomicBasisSet &aobasis)
void reset_aobasis (const std::string &aobasisname)
bool restart_aos (World &world)
void rotate_subspace (World &world, const distmatT &U, subspaceT &subspace, int lo, int nfunc, double trantol) const
void rotate_subspace (World &world, const tensorT &U, subspaceT &subspace, int lo, int nfunc, double trantol) const
void save_mos (World &world)
void set_print_timings (const bool value)
template<std::size_t NDIM>
void set_protocol (World &world, double thresh)
void solve (World &world)
void solve_virtuals (World &world)
Tensor< double > twoint (World &world, const vecfuncT &psi) const
 Compute the two-electron integrals over the provided set of orbitals.
void update_subspace (World &world, vecfuncT &Vpsia, vecfuncT &Vpsib, tensorT &focka, tensorT &fockb, subspaceT &subspace, tensorT &Q, double &bsh_residual, double &update_residual)
void vector_stats (const std::vector< double > &v, double &rms, double &maxabsval) const

Static Public Member Functions

static void analyze_vectors (World &world, const vecfuncT &mo, const vecfuncT &ao, double vtol, const Molecule &molecule, const int print_level, const AtomicBasisSet &aobasis, const tensorT &occ=tensorT(), const tensorT &energy=tensorT(), const std::vector< int > &set=std::vector< int >())
static void help ()
static std::vector< poperatorT > make_bsh_operators (World &world, const tensorT &evals, const CalculationParameters &param)
static functionT make_lda_potential (World &world, const functionT &arho)
static void print_parameters ()
static vecfuncT project_ao_basis_only (World &world, const AtomicBasisSet &aobasis, const Molecule &molecule)

Public Attributes

tensorT aeps
 orbital energies for alpha and beta orbitals
vecfuncT amo
 alpha and beta molecular orbitals
vecfuncT ao
 MRA projection of the minimal basis set.
AtomicBasisSet aobasis
tensorT aocc
 occupation numbers for alpha and beta orbitals
std::vector< int > aset
std::vector< int > at_nbf
std::vector< int > at_to_bf
tensorT beps
vecfuncT bmo
tensorT bocc
std::vector< int > bset
double converged_for_dconv =1.e10
 mos are converged for this density
double converged_for_tconv =1.e10
 derivatives of mos are converged for this threshold
double converged_for_thresh =1.e10
 mos are converged for this threshold
poperatorT coulop
double current_energy
DispersionCorrection dispersion
scf_data e_data
std::vector< std::shared_ptr< real_derivative_3d > > gradop
std::shared_ptr< GTHPseudopotential< double > > gthpseudopotential
std::vector< long > localize_pivot_state_a
 cholesky localization's pivot order from the previous iteration (per spin)
std::vector< long > localize_pivot_state_b
functionT mask
Molecule molecule
CalculationParameters param
PCM pcm
PCMParameters pcm_param
 the pcm data group; inert unless param.pcm_data() is set
std::shared_ptr< PotentialManager > potentialmanager
std::string restart_ncf
 nuclear correlation factor behind restart_representation, e.g. "slater:2.0"
Representation restart_representation =Representation::mo
bool suppress_raw_gradient_print =false
double vtol
std::filesystem::path work_dir
XCfunctional xc

Constructor & Destructor Documentation

◆ SCF() [1/2]

◆ SCF() [2/2]

madness::SCF::SCF ( World & world,
const CalculationParameters & param,
const Molecule & molecule,
const PCMParameters & pcm_param = PCMParameters() )

collective constructor for SCF uses contents of file filename and broadcasts to all nodes

pcm_param defaults to the bare pcm group; the solvent is still picked up from param.pcm_data() by PCMParameters::set_derived_values, so a caller that does not parse a deck keeps working.

References SCF(), aobasis, madness::WorldGopInterface::broadcast_serializable(), dispersion, madness::error(), madness::World::gop, molecule, param, pcm_param, madness::print_timings, PROFILE_MEMBER_FUNC, madness::World::rank(), reset_aobasis(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_debug(), madness::FunctionDefaults< NDIM >::set_truncate_mode(), and xc.

Member Function Documentation

◆ analyze_vectors()

◆ apply_bsh()

vecfuncT madness::SCF::apply_bsh ( World & world,
vecfuncT & Vpsi,
const tensorT & eps,
const CalculationParameters & param )

Applies the Green's function with the executor the bsh_apply parameter selects (auto: macrotask when multinode or at tight thresh, else tile). Consumes Vpsi; eps(i) is the orbital energy entering operator i. Shared with nemo's solver.

References apply_bsh_macrotask(), apply_bsh_plain(), apply_bsh_tiled(), madness::BSH_TIGHT_THRESH, madness::FunctionDefaults< NDIM >::get_thresh(), param, madness::print(), madness::World::rank(), and madness::ranks_per_host().

Referenced by compute_residual().

◆ apply_bsh_macrotask()

◆ apply_bsh_plain()

◆ apply_bsh_tiled()

vecfuncT madness::SCF::apply_bsh_tiled ( World & world,
vecfuncT & Vpsi,
const tensorT & eps,
const CalculationParameters & param )

◆ apply_explicit_occupations()

void madness::SCF::apply_explicit_occupations ( World & world)

overwrite the leading occupation numbers with the explicit aocc/bocc input, if given

References aocc, madness::apply(), bocc, MADNESS_CHECK_THROW, param, madness::World::rank(), and madness::BaseTensor::size().

Referenced by solve(), and solve_virtuals().

◆ apply_potential()

◆ canonicalize_virtuals()

bool madness::SCF::canonicalize_virtuals ( World & world,
tensorT & fock,
vecfuncT & psi,
vecfuncT & Vpsi,
const int nocc,
const bool force = false ) const

canonicalize the virtual orbitals: diagonalize the virtual-virtual Fock block and rotate psi, Vpsi and the occupied-virtual coupling in phase. Occupied orbitals are untouched. No-op when there are no virtuals or, unless forced, when the rotation is near-identity.

Parameters
[in]noccnumber of occupied orbitals; the block [nocc, nmo) is canonicalized
[in]forcerotate even when the rotation is near-identity (final publication)
Returns
true if a rotation was applied

References SCF(), std::abs(), madness::WorldGopInterface::broadcast(), madness::copy(), madness::FunctionDefaults< NDIM >::k, madness::FunctionDefaults< NDIM >::get_thresh(), madness::World::gop, madness::inner(), madness::matrix_inner(), madness::normalize(), param, PROFILE_MEMBER_FUNC, psi(), madness::Tensor< T >::ptr(), madness::World::rank(), madness::scale(), madness::BaseTensor::size(), madness::sygvp(), madness::transform(), madness::transpose(), madness::truncate(), v, and vtol.

Referenced by solve(), solve_virtuals(), and update_subspace().

◆ compute_residual()

◆ copy_data()

void madness::SCF::copy_data ( World & world,
const SCF & other )

◆ derivatives()

◆ diag_fock_matrix()

tensorT madness::SCF::diag_fock_matrix ( World & world,
tensorT & fock,
vecfuncT & psi,
vecfuncT & Vpsi,
tensorT & evals,
const tensorT & occ,
const double thresh ) const

diagonalize the fock matrix, taking care of degenerate states

Vpsi is passed in to make sure orbitals and Vpsi are in phase

Parameters
[in]worldthe world
[in,out]fockthe fock matrix (diagonal upon exit)
[in,out]psithe orbitals
[in,out]Vpsithe orbital times the potential
[out]evalsthe orbital energies
[in]occoccupation numbers
[in]threshthreshold for rotation and truncation
Returns
the unitary matrix U: U^T F U = evals

Vpsi is passed in to make sure orbitals and Vpsi are in phase

Parameters
[in]worldthe world
[in,out]fockthe fock matrix (diagonal upon exit)
[in,out]psithe orbitals
[in,out]Vpsithe orbital times the potential
[out]evalsthe orbital energies
[in]occoccupation numbers
[in]threshthreshold for rotation and truncation
Returns
the unitary matrix U: U^T F U = evals

References SCF(), madness::BaseTensor::dim(), END_TIMER, madness::FunctionDefaults< NDIM >::thresh, get_fock_transformation(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::matrix_inner(), madness::normalize(), param, PROFILE_MEMBER_FUNC, psi(), START_TIMER, madness::transform(), madness::truncate(), and vtol.

Referenced by solve().

◆ dipole()

tensorT madness::SCF::dipole ( World & world,
const functionT & rho ) const

compute the total dipole moment of the molecule

Parameters
[in]rhothe total (alpha + beta) density
Returns
the x,y,z components of the el. + nucl. dipole moment

References SCF(), axis, END_TIMER, madness::FunctionFactory< T, NDIM >::functor(), molecule, mu, param, madness::print(), PROFILE_MEMBER_FUNC, madness::World::rank(), and START_TIMER.

Referenced by solve().

◆ do_plots()

◆ do_step_restriction()

double madness::SCF::do_step_restriction ( World & world,
const vecfuncT & mo,
vecfuncT & mo_new,
std::string spin ) const

perform step restriction following the KAIN solver

undo the rotation from the KAIN solver if the rotation exceeds the maxrotn parameter

Parameters
[in]worldthe world
[in]movector of orbitals from previous iteration
[in,out]mo_newvector of orbitals from the KAIN solver
[in]spin"alpha" or "beta" for user information
Returns
max residual

Limit maximum step size to make convergence more robust

Parameters
[in]worldthe world
[in]movector of orbitals from previous iteration
[in,out]new_movector of orbitals from the KAIN solver
[in]spin"alpha" or "beta" for user information
Returns
max residual

References SCF(), madness::WorldGopInterface::fence(), madness::World::gop, madness::mo, madness::norm2s(), param, madness::print(), PROFILE_MEMBER_FUNC, madness::World::rank(), madness::sub(), and vector_stats().

Referenced by solve_virtuals(), and update_subspace().

◆ get_amo()

const vecfuncT & madness::SCF::get_amo ( ) const
inline

getter for the molecular orbitals, alpha spin

References amo.

Referenced by madness::Coulomb< T, NDIM >::compute_density().

◆ get_aocc()

const tensorT & madness::SCF::get_aocc ( ) const
inline

getter for the occupation numbers, alpha spin

References aocc.

Referenced by madness::Coulomb< T, NDIM >::compute_density().

◆ get_bmo()

const vecfuncT & madness::SCF::get_bmo ( ) const
inline

getter for the molecular orbitals, beta spin

References bmo.

Referenced by madness::Coulomb< T, NDIM >::compute_density().

◆ get_bocc()

const tensorT & madness::SCF::get_bocc ( ) const
inline

getter for the occupation numbers, alpha spin

References bocc.

Referenced by madness::Coulomb< T, NDIM >::compute_density().

◆ get_fock_transformation()

tensorT madness::SCF::get_fock_transformation ( World & world,
const tensorT & overlap,
tensorT & fock,
tensorT & evals,
const tensorT & occ,
const double thresh_degenerate ) const

compute the unitary transformation that diagonalizes the fock matrix

Parameters
[in]worldthe world
[in]overlapthe overlap matrix of the orbitals
[in,out]fockthe fock matrix; diagonal upon exit
[out]evalsthe orbital energies
[in]occthe occupation numbers
[in]thresh_degeneratethreshold for orbitals being degenerate
Returns
the unitary matrix U: U^T F U = evals
Parameters
[in]worldthe world
[in]overlapthe overlap matrix of the orbitals
[in,out]fockthe fock matrix; diagonal upon exit
[out]evalsthe orbital energies
[in]occthe occupation numbers
[in]thresh_degeneratethreshold for orbitals being degenerate
Returns
the unitary matrix U: U^T F U = evals

References SCF(), madness::WorldGopInterface::broadcast(), madness::World::gop, PROFILE_MEMBER_FUNC, madness::Tensor< T >::ptr(), madness::BaseTensor::size(), madness::sygvp(), madness::Localizer::undo_degenerate_rotations(), and madness::Localizer::undo_reordering().

Referenced by diag_fock_matrix().

◆ get_initial_orbitals()

void madness::SCF::get_initial_orbitals ( World & world,
RestartPlan & plan )

carry out a restart plan: read the orbitals it names, or make a guess

get the initial orbitals for a calculation, from the source the plan names

Parameters
[in,out]plandowngraded to the initial guess if the named source turns out not to load

The precedence ladder that used to live here is gone: which source to use is decided once, up front, by plan_restart() (RestartPlan.h), from the archive's header rather than from file existence plus a handful of booleans. All this does is carry the decision out.

The one thing that cannot be decided from a header is whether the orbitals themselves load. If they do not, an automatic plan falls back to the initial guess – loudly, since a header that parsed and a body that did not is a damaged archive – while an explicitly requested source throws, because a silent fresh start is exactly what someone asking to resume a long run does not want.

References amo, ao, aobasis, madness::automatic, converged_for_dconv, converged_for_thresh, current_energy, e(), errmsg(), madness::World::gop, madness::initial_guess, initial_guess(), initial_guess_from_nwchem(), madness::RestartPlan::iterate, load_mos(), madness::loaded, MADNESS_CHECK_THROW, MADNESS_EXCEPTION, make_nuclear_potential(), madness::WorldGopInterface::min(), madness::RestartPlan::mode, madness::RestartPlan::needs_load(), madness::nwchem, param, madness::print(), project_ao_basis(), madness::RestartPlan::protocol_start, madness::World::rank(), reset_aobasis(), restart_aos(), madness::restartao, madness::restartdata, set_protocol(), madness::RestartPlan::source, source(), and madness::to_string().

◆ group_orbital_sets()

std::vector< int > madness::SCF::group_orbital_sets ( World & world,
const tensorT & eps,
const tensorT & occ,
const int nmo ) const

group orbitals into sets of similar orbital energies for localization

Parameters
[in]epsorbital energies
[in]occoccupation numbers
[in]nmonumber of MOs for the given spin
Returns
vector of length nmo with the set index for each MO

References SCF(), lo, param, madness::print(), PROFILE_MEMBER_FUNC, and madness::World::rank().

Referenced by initial_guess(), initial_guess_from_nwchem(), and pad_virtuals_from_guess().

◆ help()

void madness::SCF::help ( )
inlinestatic

References madness::print(), and madness::print_header2().

Referenced by main().

◆ initial_guess()

◆ initial_guess_ao_eigenvectors()

◆ initial_guess_from_nwchem()

◆ initial_load_bal()

◆ is_spin_restricted()

bool madness::SCF::is_spin_restricted ( ) const
inline

◆ kain_combine()

vecfuncT madness::SCF::kain_combine ( World & world,
const subspaceT & subspace,
const tensorT & c,
const size_t lo,
const size_t n ) const

KAIN: the updated orbitals lo..lo+n of the subspace's vectors for coefficients c.

References SCF(), c, madness::WorldGopInterface::fence(), madness::gaxpy(), madness::World::gop, lo, m, PROFILE_MEMBER_FUNC, subspace, and madness::zero_functions_compressed().

Referenced by solve_virtuals(), and update_subspace().

◆ kain_solve()

tensorT madness::SCF::kain_solve ( World & world,
const vecfuncT & vm,
const vecfuncT & rm,
subspaceT & subspace,
tensorT & Q ) const

KAIN: append (vm, rm) to the subspace and return the mixing coefficients

Rebuilds the subspace matrix Q incrementally; on a singular subspace the history is dropped and the step is a plain update.

References SCF(), madness::_(), madness::WorldGopInterface::broadcast_serializable(), c, e(), END_TIMER, madness::World::gop, madness::KAIN(), m, param, madness::print(), PROFILE_MEMBER_FUNC, madness::Tensor< T >::ptr(), Q(), madness::World::rank(), START_TIMER, subspace, and madness::WorldGopInterface::sum().

Referenced by solve_virtuals(), and update_subspace().

◆ kain_trim()

void madness::SCF::kain_trim ( subspaceT & subspace,
tensorT & Q ) const

KAIN: drop the oldest history entry once the subspace holds maxsub of them.

References param, Q(), and subspace.

Referenced by solve_virtuals(), and update_subspace().

◆ kinetic_energy_matrix()

◆ load_mos()

◆ loadbal()

◆ make_bsh_operators()

◆ make_coulomb_potential()

functionT madness::SCF::make_coulomb_potential ( const functionT & rho) const
inline

make the Coulomb potential given the total density

References madness::apply(), and coulop.

◆ make_density() [1/2]

◆ make_density() [2/2]

◆ make_dft_energy()

double madness::SCF::make_dft_energy ( World & world,
const vecfuncT & vf,
int ispin )
inline

◆ make_fock_matrix()

◆ make_lda_potential()

◆ make_nuclear_potential()

◆ orthonormalize() [1/2]

void madness::SCF::orthonormalize ( World & world,
vecfuncT & amo_new ) const

orthonormalize the vectors

orthonormalize the vectors ignoring occupied/virtual distinctions

Parameters
[in]worldthe world
[in,out]amo_newthe vectors to be orthonormalized
[in]worldthe world
[in,out]amo_newthe vectors to be orthonormalized

References SCF(), std::abs(), amo, END_TIMER, madness::matrix_inner(), madness::normalize(), param, madness::print(), PROFILE_MEMBER_FUNC, Q(), madness::Q2(), madness::World::rank(), START_TIMER, madness::transform(), madness::truncate(), and vtol.

Referenced by pad_virtuals_from_guess(), restart_aos(), solve_virtuals(), and update_subspace().

◆ orthonormalize() [2/2]

void madness::SCF::orthonormalize ( World & world,
vecfuncT & amo_new,
int nocc ) const

orthonormalize the vectors (symmetric in occupied spaced, gramm-schmidt for virt to occ)

Parameters
[in]worldthe world
[in,out]amo_newthe vectors to be orthonormalized

References SCF(), std::abs(), END_TIMER, madness::matrix_inner(), madness::normalize(), param, madness::print(), PROFILE_MEMBER_FUNC, Q(), madness::Q2(), madness::World::rank(), START_TIMER, madness::transform(), madness::truncate(), and vtol.

◆ output_calc_info_schema()

void madness::SCF::output_calc_info_schema ( ) const

◆ output_scf_info_schema()

void madness::SCF::output_scf_info_schema ( const std::map< std::string, double > & vals,
const tensorT & dipole_T ) const

◆ pad_virtuals_from_guess()

bool madness::SCF::pad_virtuals_from_guess ( World & world)

fill in the virtuals a restart archive lacks, up to nmo_alpha/nmo_beta, with atomic-guess orbitals orthogonalized against the loaded ones

Returns
true if anything was added

References SCF(), madness::_(), aeps, amo, ao, aobasis, aocc, aset, beps, bmo, bocc, bset, c, e(), group_orbital_sets(), guess(), initial_guess_ao_eigenvectors(), L, MADNESS_CHECK_THROW, make_nuclear_potential(), madness::mo, molecule, orthonormalize(), param, PROFILE_MEMBER_FUNC, project_ao_basis(), madness::World::rank(), reset_aobasis(), madness::transform(), and vtol.

Referenced by load_mos().

◆ population_analysis()

nlohmann::json madness::SCF::population_analysis ( World & world) const

atomic charges, and spin populations for open shells, of the occupied orbitals

Runs the schemes of the population key (population.h) on the current orbitals: projects the population basis sets at the current FunctionDefaults, forms the overlaps, and prints a table per scheme on rank 0. Call it after the final rung. The orbitals of each spin are those with a nonzero occupation in aocc/bocc, so explicit holes count, and the total charge is the nuclear charge minus their sum. A failing scheme only warns: its entry in the result holds the error.

Returns
the results on every rank; empty when population is none

References SCF(), amo, madness::population::PopulationAnalysis::analyze(), aocc, bmo, bocc, molecule, param, and PROFILE_MEMBER_FUNC.

Referenced by main().

◆ print_parameters()

void madness::SCF::print_parameters ( )
inlinestatic

◆ project()

◆ project_ao_basis()

vecfuncT madness::SCF::project_ao_basis ( World & world,
const AtomicBasisSet & aobasis )

◆ project_ao_basis_only()

◆ reset_aobasis()

void madness::SCF::reset_aobasis ( const std::string & aobasisname)
inline

◆ restart_aos()

◆ rotate_subspace() [1/2]

void madness::SCF::rotate_subspace ( World & world,
const distmatT & U,
subspaceT & subspace,
int lo,
int nfunc,
double trantol ) const

◆ rotate_subspace() [2/2]

void madness::SCF::rotate_subspace ( World & world,
const tensorT & U,
subspaceT & subspace,
int lo,
int nfunc,
double trantol ) const

◆ save_mos()

◆ set_print_timings()

void madness::SCF::set_print_timings ( const bool value)

◆ set_protocol()

◆ solve()

◆ solve_virtuals()

void madness::SCF::solve_virtuals ( World & world)

◆ twoint()

Tensor< double > madness::SCF::twoint ( World & world,
const vecfuncT & psi ) const

Compute the two-electron integrals over the provided set of orbitals.

Returned is a replicated tensor of $(ij|kl)$ with $i>=j$ and $k>=l$. The symmetry $(ij|kl)=(kl|ij)$ is enforced.

Important this is consistent with Coulomb

References SCF(), madness::apply(), coulop, madness::WorldGopInterface::fence(), madness::FunctionDefaults< NDIM >::get_thresh(), madness::World::gop, madness::matrix_inner(), madness::mul_sparse(), madness::norm_tree(), PROFILE_MEMBER_FUNC, psi(), madness::reconstruct(), and madness::truncate().

◆ update_subspace()

◆ vector_stats()

void madness::SCF::vector_stats ( const std::vector< double > & v,
double & rms,
double & maxabsval ) const

Member Data Documentation

◆ aeps

◆ amo

◆ ao

◆ aobasis

◆ aocc

◆ aset

std::vector<int> madness::SCF::aset

sets of orbitals grouped by their orbital energies (for localization?) only orbitals within the same set will be mixed to localize

Referenced by compare_calc_and_mos(), copy_data(), initial_guess(), initial_guess_from_nwchem(), load_mos(), pad_virtuals_from_guess(), restart_aos(), save_mos(), and solve().

◆ at_nbf

std::vector<int> madness::SCF::at_nbf

Referenced by copy_data(), and project_ao_basis().

◆ at_to_bf

std::vector<int> madness::SCF::at_to_bf

Referenced by copy_data(), and project_ao_basis().

◆ beps

◆ bmo

◆ bocc

◆ bset

◆ converged_for_dconv

double madness::SCF::converged_for_dconv =1.e10

mos are converged for this density

Referenced by get_initial_orbitals(), load_mos(), save_mos(), solve(), and solve_virtuals().

◆ converged_for_tconv

double madness::SCF::converged_for_tconv =1.e10

derivatives of mos are converged for this threshold

◆ converged_for_thresh

double madness::SCF::converged_for_thresh =1.e10

mos are converged for this threshold

Referenced by get_initial_orbitals(), load_mos(), save_mos(), solve(), and solve_virtuals().

◆ coulop

◆ current_energy

double madness::SCF::current_energy

◆ dispersion

DispersionCorrection madness::SCF::dispersion

empirical DFT-D3 dispersion correction; inactive unless dispersion is set

Owned by SCF so that nemo and oep, which hold a shared_ptr<SCF>, reach the same object through calc->dispersion. (Znemo carries a bare CalculationParameters instead and uses the static DispersionCorrection::reject to refuse a correction it cannot apply.)

Referenced by SCF(), derivatives(), main(), and solve().

◆ e_data

scf_data madness::SCF::e_data

Referenced by output_calc_info_schema(), and solve().

◆ gradop

std::vector<std::shared_ptr<real_derivative_3d> > madness::SCF::gradop

◆ gthpseudopotential

◆ localize_pivot_state_a

std::vector<long> madness::SCF::localize_pivot_state_a

cholesky localization's pivot order from the previous iteration (per spin)

Referenced by solve().

◆ localize_pivot_state_b

std::vector<long> madness::SCF::localize_pivot_state_b

Referenced by solve().

◆ mask

functionT madness::SCF::mask

Referenced by set_protocol().

◆ molecule

◆ param

◆ pcm

PCM madness::SCF::pcm

Referenced by solve(), and solve_virtuals().

◆ pcm_param

PCMParameters madness::SCF::pcm_param

the pcm data group; inert unless param.pcm_data() is set

Referenced by SCF().

◆ potentialmanager

◆ restart_ncf

std::string madness::SCF::restart_ncf

nuclear correlation factor behind restart_representation, e.g. "slater:2.0"

Referenced by save_mos().

◆ restart_representation

Representation madness::SCF::restart_representation =Representation::mo

what amo/bmo actually hold, recorded in the restartdata header

Representation::mo for moldft's orbitals. Nemo drives an SCF rather than deriving from one and stores the regularized F = psi/R in amo, so it sets this to Representation::nemo (and restart_ncf) on the SCF it owns. Without it both engines write the same filename, with the same version tag, holding different functions – and loading one as the other is silently wrong.

Referenced by load_mos(), and save_mos().

◆ suppress_raw_gradient_print

bool madness::SCF::suppress_raw_gradient_print =false
mutable

set while an optimizer drives this SCF, to keep the raw derivative table out of the log next to MolOpt's projected one – see SCF::derivatives

Referenced by derivatives().

◆ vtol

◆ work_dir

std::filesystem::path madness::SCF::work_dir

Referenced by SCF().

◆ xc

XCfunctional madness::SCF::xc

The documentation for this class was generated from the following files: