This module provides objects describing the basic parameters of the pseudopotentials used in Abinit, and a parser to instantiate pseudopotential objects..

class Pseudo[source]

Bases: MSONable

Abstract base class defining the methods that must be implemented by the concrete pseudo-potential sub-classes.

abstract property Z[source]

The atomic number of the atom.

abstract property Z_val[source]

Valence charge.


Return dictionary for MSONable protocol.

classmethod as_pseudo(obj)[source]

Convert obj into a pseudo. Accepts:

  • Pseudo object.

  • string defining a valid path.


Copy the pseudopotential to a temporary a file and returns a new pseudopotential object. Useful for unit tests in which we have to change the content of the file.


tmpdir – If None, a new temporary directory is created and files are copied here else tmpdir is used.

property basename[source]

File basename.


Compute and erturn MD5 hash value.

property djrepo_path[source]

The path of the djrepo file. None if file does not exist.

property element[source]

Pymatgen Element.

property filepath[source]

Absolute path to pseudopotential file.

classmethod from_dict(d)[source]

Build instance from dictionary (MSONable protocol).

static from_file(filename)[source]

Build an instance of a concrete Pseudo subclass from filename. Note: the parser knows the concrete class that should be instantiated Client code should rely on the abstract interface provided by Pseudo.

property has_dojo_report[source]

True if the pseudo has an associated DOJO_REPORT section.

property has_hints[source]

True if self provides hints on the cutoff energy.


Returns a Hint object with the suggested value of ecut [Ha] and pawecutdg [Ha] for the given accuracy. ecut and pawecutdg are set to zero if no hint is available.


accuracy – [“low”, “normal”, “high”]

property isnc[source]

True if norm-conserving pseudopotential.

property ispaw[source]

True if PAW pseudopotential.

abstract property l_local[source]

Angular momentum used for the local part.

abstract property l_max[source]

Maximum angular momentum.


MD5 hash value.

open_pspsfile(ecut=20, pawecutdg=None)[source]

Calls Abinit to compute the internal tables for the application of the pseudopotential part. Returns PspsFile object providing methods to plot and analyze the data or None if file is not found or it’s not readable.

  • ecut – Cutoff energy in Hartree.

  • pawecutdg – Cutoff energy for the PAW double grid.

abstract property summary[source]

String summarizing the most important properties.

abstract property supports_soc[source]

True if the pseudo can be used in a calculation with spin-orbit coupling. Base classes should provide a concrete implementation that computes this value.

property symbol[source]

Element symbol.


String representation.

property type[source]

Type of pseudo.

class PseudoTable(pseudos)[source]

Bases: Sequence, MSONable

Define the pseudopotentials from the element table. Individidual elements are accessed by name, symbol or atomic number.

For example, the following all retrieve iron:

print elements[26] Fe print elements.Fe Fe print elements.symbol(‘Fe’) Fe print‘iron’) Fe print elements.isotope(‘Fe’) Fe


pseudos – List of pseudopotentials or filepaths


Return a list with all the possible combination of pseudos for the given list of element_symbols. Each item is a list of pseudopotential objects.


table.all_combinations_for_elements(["Li", "F"])
property allnc[source]

True if all pseudos are norm-conserving.

property allpaw[source]

True if all pseudos are PAW.


Return dictionary for MSONable protocol.

classmethod as_table(items)[source]

Return an instance of PseudoTable from the iterable items.

classmethod from_dict(d)[source]

Build instance from dictionary (MSONable protocol).

classmethod from_dir(top, exts=None, exclude_dirs='_*')[source]

Find all pseudos in the directory tree starting from top.

  • top – Top of the directory tree

  • exts – List of files extensions. if exts == “all_files” we try to open all files in top

  • exclude_dirs – Wildcard used to exclude directories.

return: PseudoTable sorted by atomic number Z.


Return the list of Pseudo objects to be used for this Structure.


structure – pymatgen Structure.

  • ValueError

  • multiple occurrences are present in the table.

is_complete(zmax=118) bool[source]

True if table is complete i.e. all elements with Z < zmax have at least on pseudopotential

print_table(stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, filter_function=None)[source]

A pretty ASCII printer for the periodic table, based on some filter_function.

  • stream – file-like object

  • filter_function – A filtering function that take a Pseudo as input and returns a boolean. For example, setting filter_function = lambda p: p.Z_val > 2 will print a periodic table containing only pseudos with Z_val > 2.

pseudo_with_symbol(symbol, allow_multi=False)[source]

Return the pseudo with the given chemical symbol.

  • symbols – String with the chemical symbol of the element

  • allow_multi – By default, the method raises ValueError if multiple occurrences are found. Use allow_multi to prevent this.


ValueError if symbol is not found or multiple occurrences are present and not allow_multi


Return the pseudos with the given chemical symbols.


ValueError if one of the symbols is not found or multiple occurrences are present.

select(condition) PseudoTable[source]

Select only those pseudopotentials for which condition is True.


condition – Function that accepts a Pseudo object and returns True or False.


New PseudoTable instance with pseudos for which condition is True.

Return type:



Return PseudoTable with element belonging to the specified family, e.g. family=”alkaline”


Return new class:PseudoTable object with pseudos in the given rows of the periodic table. rows can be either a int or a list of integers.

select_symbols(symbols, ret_list=False)[source]

Return a PseudoTable with the pseudopotentials with the given list of chemical symbols.

  • symbols – str or list of symbols Prepend the symbol string with “-”, to exclude pseudos.

  • ret_list – if True a list of pseudos is returned instead of a PseudoTable


Return a new PseudoTable with pseudos sorted by Z

sorted(attrname, reverse=False)[source]

Sort the table according to the value of attribute attrname.


PseudoTable object

Return type:

New class


Return string with data in tabular form.


Select pseudos containing the DOJO_REPORT section. Return new class:PseudoTable object.

property zlist[source]

Ordered list with the atomic numbers available in the table.