sparc.sparc_parsers.pseudopotential module
Provide a simple parser for pseudo potentials
The psp8 format is defined in abinit manual https://docs.abinit.org/developers/psp8_info/
The first
- exception sparc.sparc_parsers.pseudopotential.MultiplePseudoPotentialFiles(message)[source]
Bases:
Exception
- exception sparc.sparc_parsers.pseudopotential.NoMatchingPseudopotential(message)[source]
Bases:
FileNotFoundError
- sparc.sparc_parsers.pseudopotential.copy_psp_file(source_pot, target_dir, use_symbol=False)[source]
Copy the pseudo potential file source_pot under target_dir
if use_symbol is True, rename the potential to ‘{symbol}.psp8’
the function returns the name of the pseudo potential file
- sparc.sparc_parsers.pseudopotential.find_pseudo_path(symbol, search_path=None, pseudopotential_mapping={})[source]
Get the pseudo potential file at best effort
Searching priorities 1) if pseudopotential_mapping has symbol as key, use the file name
There are two possibilities i) filename does not contain directory information: i.e. Na-pbe.pot
use search_path / filename for the mapping
filename contains directory information, directly use the file name
No pseudopotential_mapping is given, get the psp from search_path