aiida_cusp.utils package
- class aiida_cusp.utils.PotcarParser(path_to_potcar_file, name=None, functional=None)
Bases:
object
Minimalistic parsing library for VASP POTCAR files.
Only tries to parse the basic potential identifiers from the file, i.e. the potential version and the associated element. Does not perform any checks on the validity of the parsed results but only raises if no match was retrieved at all.
- Parameters:
path_to_potcar_file (pathlib.Path) – path to a VASP POTCAR file
name (str) – name of the potential (i.e. Li, Li_sv, …)
functional (str) – functional of the potential, i.e. one of lda_us, lda, lda_52, lda_54, pbe, pbe_52, pbe_54, pw91 or pw91_us
- apply_quirks()
Update invalid and erroneous parameters running the stored quirks
- hash_contents()
Hash potential contents using secure hashing.
Calculates the hash based on the reduced instead of the full potential contents to avoid potentials being assumed as different if whitespaces differ.
- Returns:
return sha256 hash for potential contents
- Return type:
- load_potential_contents()
Load POTCAR file contents.
- Returns:
the contents of the potcar file
- Return type:
- load_reduced_contents()
Load POTCAR file contents and return a reduced version without consecutive whitespaces and occasionally occuring ‘^’ chars
- Returns:
returns the reduced contents of the potcar file
- Return type:
- potential_element()
Extract the element stored with the potential
- Returns:
string containing the element name
- Return type:
- Raises:
PotcarParserError – if regex returns with no match
- potential_header()
Extract header section from potential contents
- Returns:
string containing the potential header
- Return type:
- Raises:
PotcarParserError – if regex returns with no match
- potential_title()
Extract the potential title (i.e. the first line of the file)
- potential_version()
Extract creation date from the potential header
- Returns:
integer representation of the potential creation date
- Return type:
- verify_parsed()
Check if the parsed contents do make sense.
Submodules
- aiida_cusp.utils.custodian module
- aiida_cusp.utils.decorators module
- aiida_cusp.utils.defaults module
CustodianDefaults
CustodianDefaults.CUSTODIAN_SETTINGS
CustodianDefaults.ERROR_HANDLER_SETTINGS
CustodianDefaults.HANDLER_IMPORT_PATH
CustodianDefaults.MODIFIABLE_SETTINGS
CustodianDefaults.RUN_LOG_FNAME
CustodianDefaults.VASP_JOB_IMPORT_PATH
CustodianDefaults.VASP_JOB_SETTINGS
CustodianDefaults.VASP_NEB_JOB_IMPORT_PATH
CustodianDefaults.VASP_NEB_JOB_SETTINGS
PluginDefaults
VaspDefaults
VasprunParsingDefaults
- aiida_cusp.utils.exceptions module
- aiida_cusp.utils.potcar module
- aiida_cusp.utils.single_archive_data module