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: monty.json.MSONable

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

abstract property Z

The atomic number of the atom.

abstract property Z_val

Valence charge.


A JSON serializable dict representation of an object.

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

File basename.


Compute and erturn MD5 hash value.

property djrepo_path

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

property element

Pymatgen Element.

property filepath
classmethod from_dict(d)[source]
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

True if the pseudo has an associated DOJO_REPORT section.

property has_hints

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

True if norm-conserving pseudopotential.

property ispaw

True if PAW pseudopotential.

abstract property l_local

Angular momentum used for the local part.

abstract property l_max

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

String summarizing the most important properties.

abstract property supports_soc

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

Element symbol.


String representation.

property type
class PseudoTable(pseudos)[source]

Bases:, monty.json.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 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

True if all pseudos are norm-conserving.

property allpaw

True if all pseudos are PAW.


A JSON serializable dict representation of an object.

classmethod as_table(items)[source]

Return an instance of PseudoTable from the iterable items.

classmethod from_dict(d)[source]
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 occurences are present in the table.


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 occurences 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 occurences are present.


Select only those pseudopotentials for which condition is True. Return new class:PseudoTable object.


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


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

Ordered list with the atomic numbers available in the table.