aiida.tools.data.orbital package#

Module for classes and methods that represents molecular orbitals.

Submodules#

Classes for describing atomic orbitals.

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

class aiida.tools.data.orbital.orbital.Orbital(**kwargs)[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.

__dict__ = mappingproxy({'__module__': 'aiida.tools.data.orbital.orbital', '__doc__': '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    ', '_base_fields_required': (('position', <function validate_len3_list>),), '_base_fields_optional': (), '__init__': <function Orbital.__init__>, '__repr__': <function Orbital.__repr__>, '__str__': <function Orbital.__str__>, '_validate_keys': <function Orbital._validate_keys>, 'set_orbital_dict': <function Orbital.set_orbital_dict>, 'get_orbital_dict': <function Orbital.get_orbital_dict>, '__dict__': <attribute '__dict__' of 'Orbital' objects>, '__weakref__': <attribute '__weakref__' of 'Orbital' objects>, '__annotations__': {}})#
__init__(**kwargs)[source]#
__module__ = 'aiida.tools.data.orbital.orbital'#
__repr__()[source]#

Return repr(self).

__str__() str[source]#

Return str(self).

__weakref__#

list of weak references to the object (if defined)

_base_fields_optional = ()#
_base_fields_required = (('position', <function validate_len3_list>),)#
_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.tools.data.orbital.orbital.validate_float(value)[source]#

Validate that the value is a float

aiida.tools.data.orbital.orbital.validate_float_or_none(value)[source]#

Validate that the value is a float or is None

aiida.tools.data.orbital.orbital.validate_int(value)[source]#

Validate that the value is an int

aiida.tools.data.orbital.orbital.validate_int_or_none(value)[source]#

Validate that the value is a int or is None

aiida.tools.data.orbital.orbital.validate_len3_list(value)[source]#

Validate that the value is a list of three floats

aiida.tools.data.orbital.orbital.validate_len3_list_or_none(value)[source]#

Validate that the value is a list of three floats or is None

A module defining hydrogen-like orbitals that are real valued (rather than complex-valued).

class aiida.tools.data.orbital.realhydrogen.RealhydrogenOrbital(**kwargs)[source]#

Bases: 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 (which can be downloaded from http://www.wannier.org/support/) 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.

__annotations__ = {}#
__module__ = 'aiida.tools.data.orbital.realhydrogen'#
__str__()[source]#

Return str(self).

_base_fields_optional = (('kind_name', <function validate_kind_name>, None), ('spin', <function validate_spin>, 0), ('x_orientation', <function validate_len3_list_or_none>, None), ('z_orientation', <function validate_len3_list_or_none>, None), ('spin_orientation', <function validate_len3_list_or_none>, None), ('diffusivity', <function validate_float_or_none>, None))#
_base_fields_required = (('position', <function validate_len3_list>), ('angular_momentum', <function validate_l>), ('magnetic_number', <function validate_m>), ('radial_nodes', <function validate_n>))#
_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”

aiida.tools.data.orbital.realhydrogen.validate_kind_name(value)[source]#

Validate the value of the kind_name

aiida.tools.data.orbital.realhydrogen.validate_l(value)[source]#

Validate the value of the angular momentum

aiida.tools.data.orbital.realhydrogen.validate_m(value)[source]#

Validate the value of the magnetic number

aiida.tools.data.orbital.realhydrogen.validate_n(value)[source]#

Validate the value of the number of radial nodes

aiida.tools.data.orbital.realhydrogen.validate_spin(value)[source]#

Validate the value of the spin