36 std::size_t found_xml = name.find(
".xml");
38 if (found_xml != std::string::npos) {
45 basis_property.
get(
"pseudopotential").
getAttribute<std::string>(
"name");
46 std::vector<tools::Property*> elementProps =
47 basis_property.
Select(
"pseudopotential.element");
50 std::string elementName = elementProp->getAttribute<std::string>(
"name");
51 Index lmax = elementProp->getAttribute<
Index>(
"lmax");
53 throw std::runtime_error(
"In ecps lmax larger " +
54 std::to_string(
Index(
L::I)) +
" is not allowed");
56 Index ncore = elementProp->getAttribute<
Index>(
"ncore");
60 std::vector<tools::Property*> shellProps = elementProp->Select(
"shell");
62 std::string shellType = shellProp->getAttribute<std::string>(
"type");
63 if (shellType.size() > 1) {
64 throw std::runtime_error(
65 "In ecps no combined shells e.g. SP are allowed. Here:" +
69 std::vector<tools::Property*> constProps = shellProp->Select(
"constant");
71 Index power = constProp->getAttribute<
Index>(
"power");
72 double decay = constProp->getAttribute<
double>(
"decay");
73 double contraction = constProp->getAttribute<
double>(
"contraction");
84 std::shared_ptr<ECPElement> element(
new ECPElement(elementType, lmax, ncore));
90 std::map<std::string, std::shared_ptr<ECPElement> >::const_iterator itm =
93 throw std::runtime_error(
"Basis set " +
name_ +
94 " does not have element of type " + element_type);
104 for (
const auto& gaussian : shell.
gaussians_) {
105 out <<
" Gaussian Decay: " << gaussian.decay_;
106 out <<
" Power: " << gaussian.power_;
107 out <<
" Contraction:" << gaussian.contraction_ <<
"\n";
113 out <<
"Element:" << element.getType() <<
" Lmax:" << element.getLmax()
114 <<
" Ncore:" << element.getNcore() <<
"\n";
115 for (
const auto& shell : element) {
122 out <<
"BasisSet:" << basis.
name_ <<
"\n";
123 for (
const auto& element : basis) {
124 out << (*element.second);
132 double contraction) {
ECPElement & addElement(std::string elementType, L lmax, Index ncore)
void Load(const std::string &name)
std::map< std::string, std::shared_ptr< ECPElement > > elements_
const ECPElement & getElement(std::string element_type) const
ECPElement(std::string type, L lmax, Index ncore)
ECPGaussianPrimitive & addGaussian(Index power, double decay, double contraction)
std::vector< ECPGaussianPrimitive > gaussians_
Index getnumofFunc() const
Charge transport classes.
std::string EnumToString(L l)
L StringToEnum(const std::string &type)
base class for all analysis tools