nanotools.species module

This module defines the Species class.

class nanotools.species.Species(label: str, path: str | None = None, alphaZ: float | None = None, charge=None, mass=None, total_magnetic_moment=0.0, magrad=1.2, psp=None, aob=None, rna=None, vna=None)[source]

Bases: Base

Species class.

The Species class stores various parameters and data pertaining to atomic species. It contains notably:

  • Labels.

  • Paths to pseudopotential files.

  • Atomic orbital basis functions.

  • Pseudopotentials.

The species fields is initialized from a list of dictionaries as follows:

system.atoms.species = [{"label": "Ga", "path": "Ga_AtomicData.mat"},
                          {"label": "As", "path": "As_AtomicData.mat"}]

A label tags each species and a path defines an atomic orbital basis and a pseudopotential.

label

Species label (e.g. “Si1”, “Au_surf”).

Type:

string

pseudo_preferences

Preferences for the pseudopotential atomic orbital basis when there are multiple basis sets available in the database folder. Default: [{“default” : {“xc”: “PBE”, “type”: “OV”, “precision”: “DZP”}}] If one wants to use the default values, there is no need to add anything to the Atoms object. Alternatively, one can use “atoms = Atoms(fractional_positions=fxyz, formula=”GaAs”, pseudo_preferences=[“default”])”. If one wants to modify the pseudo preferences, use instead e.g. “preferences = [{“Ga”: {“xc”: “LDA”, “precision”: “TZP”}}, {“As”: {“precision”: “SZP”}}]”. Then initialize Atoms with “atoms = Atoms(fractional_positions=fxyz, formula=”GaAs”, pseudo_preferences=preferences)”.

Explanation of terms:
  • “xc”: Exchange-correlation functional used in the pseudopotentials.

  • “type”: Type of pseudopotential, e.g., “OV” for “Optimized Norm-Conserving Vanderbilt”, “TM” for “Troullier-Martin”.

  • “precision”: Level of precision for the basis set, e.g., “DZP” for “Double Zeta Polarization”, “TZP” for “ Triple Zeta Polarization”.

Type:

list

charge

Electron charge.

Type:

float

mass

Atomic mass.

Type:

float

total_magnetic_moment

Magnetic moment (Cartesian).

Type:

float

magrad

Magnetic “radius” (for mag. moment integration).

Type:

float

alphaZ

Long-range energy correction (depends on unit cell volume).

Type:

float

psp

Pseudopotential.

Type:

float

aob

Atomic orbital basis.

Type:

float

rna

Neutral atom valence density (short-range).

Type:

float

vna

Neutral atom potential (short-range).

Type:

float

get_number_of_orbitals()[source]

Returns the number of orbitals.

to_vacuum()[source]

Convert a species to its equivalent vacuum species.

A vacuum species has zero pseudopotential but retains an atomic orbital basis.

nanotools.species.label_to_symbol(label, ignore_errors=False)[source]

Convert a label to an atomic species

Parameters:

label (string) – Should be an atomic species plus a tag. (e.g. H1, H_surf).

Returns:

The best matching species from the periodic table.

Return type:

symbol (string)

Raises:

KeyError – Couldn’t find an appropriate species.