MADNESS 0.10.1
madness::PCMParameters Class Reference

input parameters for the polarizable continuum model – the pcm data group More...

#include <pcm.h>

Inheritance diagram for madness::PCMParameters:
Collaboration diagram for madness::PCMParameters:

Public Member Functions

 PCMParameters ()
 PCMParameters (World &world, const commandlineparser &parser)
double area () const
std::string cavity_type () const
double correction () const
double epsilon () const
std::string get_tag () const override
double min_radius () const
double probe_radius () const
std::string radii_set () const
bool reader_own () const
 whether PCMSolver should read its own input file instead of our parameters
std::string restart_name () const
bool scaling () const
void set_derived_values (const CalculationParameters &cparam)
 adopt the solvent named by the dft group's pcm_data, derive from it, validate
std::string solvent () const
std::string solver_type () const
Public Member Functions inherited from madness::QCCalculationParametersBase
virtual std::set< std::string > case_sensitive_keys () const
 keys whose string values must NOT be case-folded
virtual std::set< std::string > case_sensitive_keys () const
 keys whose string values must NOT be case-folded
bool file_exists (World &world, std::string filename) const
bool file_exists (World &world, std::string filename) const
void from_json (const json &j)
void from_json (const json &j)
template<typename T>
T get (const std::string key) const
template<typename T>
T get (const std::string key) const
ParameterContainerT get_all_parameters () const
ParameterContainerT get_all_parameters () const
QCParameter & get_parameter (const std::string key)
QCParameter & get_parameter (const std::string key)
hashT hash () const
hashT hash () const
bool is_user_defined (std::string key) const
bool is_user_defined (std::string key) const
bool keeps_case (const std::string &key) const
bool keeps_case (const std::string &key) const
bool parameter_exists (const std::string &key) const
bool parameter_exists (const std::string &key) const
void print (const std::string header="", const std::string footer="") const
 print all parameters
void print (const std::string header="", const std::string footer="") const
 print all parameters
std::string print_to_string (const std::list< std::string > precedences={"all"}) const
std::string print_to_string (const std::list< std::string > precedences={"all"}) const
template<typename... Types>
void qcparameter_to_json (json &j, const std::pair< std::string, QCParameter > &p, const std::tuple< Types... > &) const
template<typename... Types>
void qcparameter_to_json (json &j, const std::pair< std::string, QCParameter > &p, const std::tuple< Types... > &) const
template<typename Tuple>
void qcparameter_to_json_from_tuple (json &j, const std::pair< std::string, QCParameter > &p, const Tuple &) const
template<typename Tuple>
void qcparameter_to_json_from_tuple (json &j, const std::pair< std::string, QCParameter > &p, const Tuple &) const
void read_commandline_options (World &world, const commandlineparser &parser, const std::string tag)
 read the parameters from the command line and broadcast
void read_commandline_options (World &world, const commandlineparser &parser, const std::string tag)
virtual void read_internal (World &world, std::string &filecontents, std::string tag)
 read the stream, starting from tag
virtual void read_internal (World &world, std::string &filecontents, std::string tag)
 read the stream, starting from tag
template<typename Archive>
void serialize (Archive &ar)
template<typename Archive>
void serialize (Archive &ar)
template<typename T>
void set_derived_value (const std::string &key, const T &value)
template<typename T>
void set_derived_value (const std::string &key, const T &value)
template<typename T>
void set_user_defined_value (const std::string &key, const T &value)
template<typename T>
void set_user_defined_value (const std::string &key, const T &value)
json to_json () const
 convert all parameters to a json object
json to_json () const
 convert all parameters to a json object
void to_json (json &j) const
 convert all parameters to a json object
void to_json (json &j) const
 convert all parameters to a json object
json to_json_if_precedence (const std::string &precedence) const
 convert all parameters to a json object, but only those with a given precedence
json to_json_if_precedence (const std::string &precedence) const
 convert all parameters to a json object, but only those with a given precedence
template<typename T>
std::string to_stored_string (const std::string &key, const T &value) const
 stringify value for storage, honoring case_sensitive_keys()
template<typename T>
std::string to_stored_string (const std::string &key, const T &value) const
 stringify value for storage, honoring case_sensitive_keys()
template<typename... Types>
bool try_set_from_json (QCParameter &parameter, const nlohmann::json &value)
template<typename... Types>
bool try_set_from_json (QCParameter &parameter, const nlohmann::json &value)

Static Public Member Functions

static const std::map< std::string, std::pair< double, double > > & solvent_data ()
 the solvents PCMSolver tabulates
Static Public Member Functions inherited from madness::QCCalculationParametersBase
static std::string add_quotes (const std::string arg)
static std::string add_quotes (const std::string arg)
template<typename T>
static bool check_type (const std::string key, const QCParameter &parameter)
template<typename T>
static bool check_type (const std::string key, const QCParameter &parameter)
template<typename T>
static bool check_type_silent (const QCParameter &parameter)
template<typename T>
static bool check_type_silent (const QCParameter &parameter)
template<typename T>
static std::enable_if< std::is_same< T, bool >::value, T >::type fromstring (const std::string &arg)
template<typename T>
static std::enable_if<!std::is_same< T, bool >::value, T >::type fromstring (const std::string &arg)
template<typename T>
static std::enable_if< std::is_same< T, bool >::value, T >::type fromstring (const std::string &arg)
template<typename T>
static std::enable_if<!std::is_same< T, bool >::value, T >::type fromstring (const std::string &arg)
template<typename T>
static std::enable_if<!std::is_floating_point< T >::value, void >::type overwrite_if_inf (std::string &str, const T &arg)
template<typename T>
static std::enable_if< std::is_floating_point< T >::value, void >::type overwrite_if_inf (std::string &str, const T &arg)
template<typename T>
static std::enable_if<!std::is_floating_point< T >::value, void >::type overwrite_if_inf (std::string &str, const T &arg)
template<typename T>
static std::enable_if< std::is_floating_point< T >::value, void >::type overwrite_if_inf (std::string &str, const T &arg)
template<typename T>
static std::enable_if<!std::is_same< T, std::string >::value, T >::type read_quotes (std::stringstream &ssvalue)
template<typename T>
static std::enable_if< std::is_same< T, std::string >::value, T >::type read_quotes (std::stringstream &ssvalue)
template<typename T>
static std::enable_if<!std::is_same< T, std::string >::value, T >::type read_quotes (std::stringstream &ssvalue)
template<typename T>
static std::enable_if< std::is_same< T, std::string >::value, T >::type read_quotes (std::stringstream &ssvalue)
static std::string tostring (const bool &arg)
static std::string tostring (const bool &arg)
template<typename T>
static std::string tostring (const T &arg)
template<typename T>
static std::string tostring (const T &arg)
static std::string trim_blanks (const std::string arg)
static std::string trim_blanks (const std::string arg)
static std::string trim_quotes (const std::string arg)
static std::string trim_quotes (const std::string arg)

Static Public Attributes

static constexpr std::size_t max_solvent_name_length = 15
 longest solvent name PCMInput::solvent (char[16]) can hold with its NUL
static constexpr char const * tag = "pcm"

Private Attributes

bool reader_own_ = false

Additional Inherited Members

Public Types inherited from madness::QCCalculationParametersBase
using all_parameter_types
using all_parameter_types
Protected Types inherited from madness::QCCalculationParametersBase
typedef std::map< std::string, QCParameter > ParameterContainerT
typedef std::map< std::string, QCParameter > ParameterContainerT
Protected Member Functions inherited from madness::QCCalculationParametersBase
 QCCalculationParametersBase ()
 ctor for testing
 QCCalculationParametersBase ()
 ctor for testing
 QCCalculationParametersBase (const QCCalculationParametersBase &other)
 copy ctor
 QCCalculationParametersBase (const QCCalculationParametersBase &other)
 copy ctor
virtual ~QCCalculationParametersBase ()
 destructor
virtual ~QCCalculationParametersBase ()
 destructor
const QCParameter & get_parameter (const std::string &key) const
const QCParameter & get_parameter (const std::string &key) const
template<typename T>
void initialize (const std::string &key, const T &value, const std::string comment="", const std::vector< T > allowed_values={})
template<typename T>
void initialize (const std::string &key, const T &value, const std::string comment="", const std::vector< T > allowed_values={})
void read_input_and_commandline_options (World &world, const commandlineparser &parser, const std::string tag)
void read_input_and_commandline_options (World &world, const commandlineparser &parser, const std::string tag)
template<typename Tuple>
bool try_setting_any (const std::string &key, const std::string &value)
 helper function for try_setting_user_defined_value
template<typename Tuple>
bool try_setting_any (const std::string &key, const std::string &value)
 helper function for try_setting_user_defined_value
template<typename Tuple, std::size_t... I>
bool try_setting_any_impl (const std::string &key, const std::string &value, Tuple, std::index_sequence< I... >)
 helper function for try_setting_user_defined_value
template<typename Tuple, std::size_t... I>
bool try_setting_any_impl (const std::string &key, const std::string &value, Tuple, std::index_sequence< I... >)
 helper function for try_setting_user_defined_value
template<typename T>
bool try_setting_user_defined_value (const std::string &key, const std::string &val)
 helper function for try_setting_user_defined_value
template<typename T>
bool try_setting_user_defined_value (const std::string &key, const std::string &val)
 helper function for try_setting_user_defined_value
Protected Attributes inherited from madness::QCCalculationParametersBase
bool ignore_unknown_keys = true
bool ignore_unknown_keys_silently = false
ParameterContainerT parameters
bool print_debug = false
bool throw_if_datagroup_not_found = false

Detailed Description

input parameters for the polarizable continuum model – the pcm data group

Declared outside MADNESS_HAS_PCM on purpose: ParameterManager and madqc hold and print this group whether or not PCMSolver was compiled in, and only the conversion to PCMSolver's PCMInput needs the library.

The group refines pcm_data of the dft group, which stays the on/off switch: pcm_data <solvent> on its own is a complete specification, and the solvent it names arrives here as a derived value that an explicit solvent in this group overrides.

Only the thirteen PCMInput fields that PCMSolver's host-struct reader actually consults are exposed. patch_level, coarsity, min_distance, der_order and equation_type are accepted by the struct but never read by Input::reader(const PCMInput&), and upstream documents no keyword for them.

Constructor & Destructor Documentation

◆ PCMParameters() [1/2]

madness::PCMParameters::PCMParameters ( )

◆ PCMParameters() [2/2]

madness::PCMParameters::PCMParameters ( World & world,
const commandlineparser & parser )
inline

Member Function Documentation

◆ area()

double madness::PCMParameters::area ( ) const
inline

◆ cavity_type()

std::string madness::PCMParameters::cavity_type ( ) const
inline

◆ correction()

double madness::PCMParameters::correction ( ) const
inline

◆ epsilon()

double madness::PCMParameters::epsilon ( ) const
inline

◆ get_tag()

std::string madness::PCMParameters::get_tag ( ) const
inlineoverridevirtual

Implements madness::QCCalculationParametersBase.

References tag.

◆ min_radius()

double madness::PCMParameters::min_radius ( ) const
inline

◆ probe_radius()

double madness::PCMParameters::probe_radius ( ) const
inline

◆ radii_set()

std::string madness::PCMParameters::radii_set ( ) const
inline

◆ reader_own()

bool madness::PCMParameters::reader_own ( ) const
inline

whether PCMSolver should read its own input file instead of our parameters

Set from pcm_data pcmsolver_reader_own in the dft group; not a key of this group, because in that mode none of the keys below are consulted.

References reader_own_.

◆ restart_name()

std::string madness::PCMParameters::restart_name ( ) const
inline

◆ scaling()

bool madness::PCMParameters::scaling ( ) const
inline

◆ set_derived_values()

void madness::PCMParameters::set_derived_values ( const CalculationParameters & cparam)

adopt the solvent named by the dft group's pcm_data, derive from it, validate

The solvent is set as a derived value, so an explicit solvent in the pcm group wins; epsilon and probe_radius are then derived from the solvent in turn, and only stand as given for solvent explicit. Validation that allowed_values cannot express – buffer capacities and cross-key consistency – happens here, as OEP_Parameters does for its density thresholds.

References correction(), MADNESS_CHECK, MADNESS_EXCEPTION, max_solvent_name_length, madness::CalculationParameters::pcm_data(), madness::print(), reader_own_, restart_name(), madness::QCCalculationParametersBase::set_derived_value(), solvent(), solvent_data(), and solver_type().

◆ solvent()

std::string madness::PCMParameters::solvent ( ) const
inline

◆ solvent_data()

const std::map< std::string, std::pair< double, double > > & madness::PCMParameters::solvent_data ( )
static

the solvents PCMSolver tabulates

Maps the canonical name to {static permittivity, probe radius / Angstrom}; values from PCMSolver's src/utils/Solvent.cpp. Two uses: deriving epsilon and probe_radius from solvent, and spelling out the solvent explicit equivalent for the names that do not fit PCMInput::solvent.

Referenced by set_derived_values().

◆ solver_type()

std::string madness::PCMParameters::solver_type ( ) const
inline

Member Data Documentation

◆ max_solvent_name_length

std::size_t madness::PCMParameters::max_solvent_name_length = 15
staticconstexpr

longest solvent name PCMInput::solvent (char[16]) can hold with its NUL

Referenced by set_derived_values().

◆ reader_own_

bool madness::PCMParameters::reader_own_ = false
private

Referenced by reader_own(), and set_derived_values().

◆ tag

char const* madness::PCMParameters::tag = "pcm"
staticconstexpr

Referenced by PCMParameters(), and get_tag().


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