30 #ifndef _lib_chemistry_qc_scf_h
31 #define _lib_chemistry_qc_scf_h
35 #include <chemistry/qc/scf/scf.h>
37 #include <util/misc/xml.h>
43 class SCFIterationData;
48 typedef std::function<void(boost::property_tree::ptree&,
const XMLWriter&)> element_write_function;
56 std::vector<element_write_function> other_details_;
57 std::vector<std::vector<element_write_function>> other_iter_details_;
59 std::vector<SCFIterationData> iterations_;
65 boost::property_tree::ptree& write_xml(boost::property_tree::ptree& parent,
const XMLWriter& writer);
71 void log_density(
RefSymmSCMatrix density, SpinCase1 spin_case=AnySpinCase1);
73 void log_evals(
RefDiagSCMatrix evals, SpinCase1 spin_case=AnySpinCase1);
75 void log_coeffs(
RefSCMatrix evals, SpinCase1 spin_case=AnySpinCase1);
77 bool log_coeffs_enabled(){
return log_coeffs_; }
79 template <
typename Func,
typename... Args>
80 void log_global_misc(Func&& func, Args&&... args) {
81 other_details_.emplace_back(std::bind(
82 func, std::placeholders::_1, std::placeholders::_2, std::forward<Args>(args)...
86 template <
typename Func,
typename... Args>
87 void log_iter_misc(Func&& func, Args&&... args) {
88 other_iter_details_.back().emplace_back(std::bind(
89 func, std::placeholders::_1, std::placeholders::_2, std::forward<Args>(args)...
114 boost::property_tree::ptree& write_xml(boost::property_tree::ptree& parent,
const XMLWriter& writer);