aiida.common.orbital package

Classes for describing atomic orbitals.

Contains general Orbital class. For subclasses of Orbital, see submodules.

class aiida.common.orbital.Orbital[source]

Bases: object

Base class for Orbitals. Can handle certain basic fields, their setting and validation. More complex Orbital objects should then inherit from this class

Parameters:
  • position – the absolute position (three floats) units in angstrom
  • x_orientation – x,y,z unit vector defining polar angle theta in spherical coordinates unitless
  • z_orientation – x,y,z unit vector defining azimuthal angle phi in spherical coordinates unitless
  • orientation_spin – x,y,z unit vector defining the spin orientation unitless
  • diffusivity – Float controls the radial term in orbital equation units are reciprocal Angstrom.
  • module_name – internal parameter, stores orbital type
__dict__ = dict_proxy({'_base_fields': ('position', 'x_orientation', 'z_orientation', 'spin_orientation', 'diffusivity', 'module_name'), '__module__': 'aiida.common.orbital', 'set_orbital_dict': <function set_orbital_dict>, 'get_orbital_dict': <function get_orbital_dict>, '__str__': <function __str__>, '_get_module_name': <function _get_module_name>, '_validate_keys': <function _validate_keys>, '__repr__': <function __repr__>, '__dict__': <attribute '__dict__' of 'Orbital' objects>, '__weakref__': <attribute '__weakref__' of 'Orbital' objects>, '__doc__': '\n Base class for Orbitals. Can handle certain basic fields, their setting\n and validation. More complex Orbital objects should then inherit from\n this class\n\n :param position: the absolute position (three floats) units in angstrom\n :param x_orientation: x,y,z unit vector defining polar angle theta\n in spherical coordinates unitless\n :param z_orientation: x,y,z unit vector defining azimuthal angle phi\n in spherical coordinates unitless\n :param orientation_spin: x,y,z unit vector defining the spin orientation\n unitless\n :param diffusivity: Float controls the radial term in orbital equation\n units are reciprocal Angstrom.\n :param module_name: internal parameter, stores orbital type\n\n ', '__init__': <function __init__>})
__init__()[source]

x.__init__(…) initializes x; see help(type(x)) for signature

__module__ = 'aiida.common.orbital'
__repr__() <==> repr(x)[source]
__str__() <==> str(x)[source]
__weakref__

list of weak references to the object (if defined)

_base_fields = ('position', 'x_orientation', 'z_orientation', 'spin_orientation', 'diffusivity', 'module_name')
_get_module_name()[source]

Sets the module name, or label, to the orbital

_validate_keys(input_dict)[source]

Checks all the input_dict and tries to validate them , to ensure that they have been properly set raises Exceptions indicating any problems that should arise during the validation

Parameters:input_dict – a dictionary of inputs
Returns:input_dict: the original dictionary with all validated kyes now removed
Returns:validated_dict: a dictionary containing all the input keys which have now been validated.
get_orbital_dict()[source]

returns the internal keys as a dictionary

set_orbital_dict(init_dict)[source]

Sets the orbital_dict, which can vary depending on the particular implementation of this base class.

Parameters:init_dict – the initialization dictionary
aiida.common.orbital.OrbitalFactory(module)[source]

Factory method that returns a suitable Orbital subclass.

Parameters:module – a valid string recognized as a Orbital subclass

Submodules

class aiida.common.orbital.realhydrogen.RealhydrogenOrbital[source]

Bases: aiida.common.orbital.Orbital

Orbitals for hydrogen, largely follows the conventions used by wannier90 Object to handle the generation of real hydrogen orbitals and their hybrids, has methods for producing s, p, d, f, and sp, sp2, sp3, sp3d, sp3d2 hybrids. This method does not deal with the cannonical hydrogen orbitals which contain imaginary components.

The orbitals described here are chiefly concerned with the symmetric aspects of the oribitals without the context of space. Therefore diffusitivity, position and atomic labels should be handled in the OrbitalData class.

Following the notation of table 3.1, 3.2 of Wannier90 user guide http://www.wannier.org/doc/user_guide.pdf A brief description of what is meant by each of these labels:

Parameters:
  • radial_nodes – the number of radial nodes (or inflections) if no radial nodes are supplied, defaults to 0
  • angular_momentum – Angular quantum number, using real orbitals
  • magnetic_number – Magnetic quantum number, using real orbitals
  • spin – spin, up (1) down (-1) or unspecified (0)

The conventions regarding L and M correpsond to those used in wannier90 for all L greater than 0 the orbital is not hyrbridized see table 3.1 and for L less than 0 the orbital is hybridized see table 3.2. M then indexes all the possible orbitals from 0 to 2L for L > 0 and from 0 to (-L) for L < 0.

__module__ = 'aiida.common.orbital.realhydrogen'
__str__() <==> str(x)[source]
_default_fields = ('position', 'x_orientation', 'z_orientation', 'spin_orientation', 'diffusivity', 'module_name', 'angular_momentum', 'magnetic_number', 'spin', 'radial_nodes', 'kind_name')
_default_quantum_number_fields = ('angular_momentum', 'magnetic_number', 'spin', 'radial_nodes')
_optional_fields = ['kind_name']
_quantum_number_validator(value, value_string, value_range)[source]

Helper function, checks that value is indeed a integer, or None (in which case it returns None) and that the value falls within the input range. Returns the value if it passes and will raise an Exception otherwise.

Parameters:
  • value – the value to be validated
  • value_string – the label of the value
  • value_range – range of values the value may fall
Return value:

the validated number

_validate_keys(input_dict)[source]

Validates the keys otherwise raise ValidationError. Does basic validation from the parent followed by validations for the quantum numbers. Raises exceptions should the input_dict fail the valiation or if it contains any unsupported keywords.

Parameters:input_dict – the dictionary of keys to be validated
Return validated_dict:
 a validated dictionary
classmethod get_name_from_quantum_numbers(angular_momentum, magnetic_number=None)[source]

Returns the orbital_name correponding to the angular_momentum alone, or to both angular_number with magnetic_number. For example using angular_momentum=1 and magnetic_number=1 will return “Px”

classmethod get_quantum_numbers_from_name(name)[source]

Returns all the angular and magnetic numbers corresponding to name. For example, using “P” as name will return all quantum numbers associated with a “P” orbital, while “Px” will return only one set of quantum numbers, the ones associated with “Px”