Skip to content

Commit

Permalink
PSP8 format support.
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierandrade committed Jun 28, 2018
1 parent 94db5a5 commit b56296e
Show file tree
Hide file tree
Showing 5 changed files with 405 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/pseudo/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ namespace pseudopotential {
PSF = 779,
CPI = 780,
FHI = 781,
HGH = 782
HGH = 782,
PSP8 = 783
};

// these values match libxc convention
Expand All @@ -74,7 +75,9 @@ namespace pseudopotential {
UNKNOWN = -2,
ANY = -1,
NONE = 0,
LDA_PZ = 9,
LDA_PW = 12,
LDA_XC_TETER93 = 20,
PBE = 130,
PBE_SOL = 133,
LYP = 131
Expand Down
10 changes: 6 additions & 4 deletions src/pseudo/detect_format.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ namespace pseudopotential {
std::string extension = filename.substr(filename.find_last_of(".") + 1);
std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower);

if(extension == "psf") return pseudopotential::format::PSF;
if(extension == "cpi") return pseudopotential::format::CPI;
if(extension == "fhi") return pseudopotential::format::FHI;
if(extension == "hgh") return pseudopotential::format::HGH;
if(extension == "psp8") return pseudopotential::format::PSP8;
if(extension == "drh") return pseudopotential::format::PSP8;
if(extension == "psf") return pseudopotential::format::PSF;
if(extension == "cpi") return pseudopotential::format::CPI;
if(extension == "fhi") return pseudopotential::format::FHI;
if(extension == "hgh") return pseudopotential::format::HGH;

return pseudopotential::format::UNKNOWN;
}
Expand Down
Loading

0 comments on commit b56296e

Please sign in to comment.