orbitals#
Module contents:
- class Orbitals(path, path_SCF0=None, path_fragments=None, path_output=None)[source]#
Bases:
objectContainer class that stores information about both
MOsandFMOs.Orbitalscan also be given the paths toadf.rkffiles from related calculations to obtain more information. For example, the path to a calculation with the number of SCF cycles set to 0 populates theeffective_energy_SCF0properties of the FMOs.- Parameters:
path (
str) – the path to anadf.rkffile containing information about the system of interest.path_SCF0 (
str) – the path to anadf.rkffile containing information about a calculation with 0 SCF cycles. This argument is required to populate theFMO.effective_energy_scf0propertypath_fragments (
Dict[str,str]) – dictionary containing fragment name as the key and path to itsadf.rkfas the value.path_output (
str) – the path to an.outfile generated by ADF. This is required to read the kinetic energies for the MOs.
- fmos#
the
FMOsobject storing theFMOobjects associated with this system. Use this to select specificFMOfor further analysis.- Type:
- charges#
a dictionary storing formal charges of the complex and each fragment.
- Type:
Dict[str,int]
- property molecule: Molecule#
The molecule corresponding to the overall system.
- property fragments: List[str]#
The names of the fragments defined in the calculation.
- write_excel(out_file=None)[source]#
Write the data corresponding to the system into an Excel file.
- Parameters:
out_file (
str) – The filename of the Excel file to write.
- property fmo_energy_types: List[str]#
Get the orbital energy types that are available for the provided system.
See also
This property is a redirection of
FMOs.energy_types.
- rename_fragment(old, new)[source]#
Rename the
oldfragment tonew.- Parameters:
old (
str) – the name of the fragment to rename.new (
str) – the name to rename the fragment to.
- Raises:
ValueError – if the new name is already in use.
See also
See
Orbitals.fragmentsto obtain a list of fragment names that are currently used.
- class MO(data, parent)[source]#
Bases:
OrbitalClass holding data specifically for molecular orbitals.
Each
MOholds the following data that can be accessed like attributes.Variable
Type
Description
indexintnamestrThe regular name of this
MOas it would show up in ADFLevels.symmetrystrThe irreducible representation this
MObelongs to.symmetry_indexintThe index of this
MOin the overalMOsthat belong to the same irreducible representation.spinstrThe spin of this
MO, either'A','B'or'AB'energyfloatThe energy of the
MOin \(\text{kcal mol}^{-1}\).kinetic_energyfloatThe kinetic energy of the
MOin \(\text{kcal mol}^{-1}\) if it could be read from the calculation.occupationintThe occupation number of this
MO. Either0,1or2.occupiedboolWhether the
MOhas electrons in it.- fragment_character(fragment)[source]#
Calculate the total contribution of
FMOobjects from a specific fragment to thisMO. The sum of all fragment characters is always1for eachMO.- Parameters:
fragment (
str) – the fragment to calculate the character for.- Return type:
float
Example
>>> MO.fragment_character('NH3') 0.469475215528633 >>> MO.fragment_character('BH3') 0.530524784471364
- class FMO(data, parent)[source]#
Bases:
OrbitalClass holding data specifically for symmetry-adapted fragment orbitals.
Each
FMOholds the following data that can be accessed like attributes.Variable
Type
Description
indexintnamestrThe regular name of this
FMOas it would show up in ADFLevels.symmetrystrThe irreducible representation this
FMObelongs to.symmetry_indexintThe index of this
FMOin the overalFMOsthat belong to the same irreducible representation.fragmentstrThe name of the fragment the
FMObelongs to.fragment_uniquestrIf fragments do not have unique names (i.e. with atomic fragments) this name will be unique for the atom.
fragment_indexintspinstrThe spin of this
FMO, either'A','B'or'AB'energyfloatThe regular energy of the
FMOin \(\text{kcal mol}^{-1}\).approx_effective_energyfloatApproximated diagonal element of the Fock matrix belonging to the
FMOin \(\text{kcal mol}^{-1}\). This is available even if the Fock matrix cannot be read from the calculation.effective_energyfloatThe diagonal element of the Fock matrix belonging to the
FMOin \(\text{kcal mol}^{-1}\) if it could be read from the calculation.effective_energy_SCF0floatThe diagonal element of the Fock matrix after 0 SCF cycles belonging to the
FMOin \(\text{kcal mol}^{-1}\) if it could be read from the calculation.occupationintThe occupation number of this
FMO. Either0,1,2, or a fractional value if the electronic configuration is non-aufbau.occupiedboolWhether the
FMOhas electrons in it.gross_populationfloatThe gross Mulliken population of this
FMO.gross_spinfloatThe gross Mulliken spin population of this
FMO.moleculeplams.MoleculeThe molecule object containing the atoms belonging to the fragment of this
FMO.- overlap(other)[source]#
Get the overlap between this
FMOand anotherFMO.- Parameters:
other (
FMO) – the orbital to get the overlap with.- Return type:
float
Note
The matmul operation
@redirects to this method.
- fock(other)[source]#
Get the Fock matrix element between this
FMOand anotherFMO.- Parameters:
other (
FMO) – the orbital to get the Fock matrix element with.- Return type:
float
- mulliken_contribution(other, normalized=False)[source]#
Get the mulliken contribution of this
FMOinto anMO.- Parameters:
other (
MO) – the orbital to get the Mulliken contribution with.- Return type:
float
- coefficient(other)[source]#
Get the coefficient of this
FMOinto anMO.- Parameters:
other (
MO) – the orbital to get the coefficient with.- Return type:
float
- make_name(spin=True, frag_name=True, relative_name=False)[source]#
Generate a name for this
FMOwith several options to modify it.- Parameters:
spin (
bool) – whether to include spin in the name. It will be appended to the end as_{spin}.frag_name (
bool) – whether to include the fragment’s unique name in the name as{fragment_unique}(...).relative_name (
bool) – whether to use the relative name instead of the regular name.
- Return type:
str
Examples
Generate the regular name of this
FMO. This is the default name when printing the object.>>> fmo.make_name() 'NH3(4A1)'
One can also use relative naming.
>>> fmo.make_name(relative_name=True) 'NH3(LUMO)'
One can also only get the name of the orbital by disabling the fragment name.
>>> fmo.make_name(frag_name=False) '4A1'
- property subspecies_relative_name: str#
The relative name of the orbital in its irreducible representation. E.g. the overall HOMO-2 could be the HOMO of its irreducible representation.
- class MOs(orbitals, parent)[source]#
Bases:
OrbitalSelector
- class FMOs(orbitals, parent)[source]#
Bases:
OrbitalSelectorObject storing all
FMOobjects for the given calculation.- property fragments: List[str]#
Return a list of fragment names found in the orbitals.
- property energy_types: List[str]#
Object storing all
FMOobjects for theOrbitalsobjects.- Returns:
A list potentially containing
energy,effective_energyandeffective_energy_SCF0.
- property subspecies: List[str]#
The spin species that are present in the given orbitals.
Submodules:
- adf
- fragments
- objects
pyorbb.orbitals.objects.FMOpyorbb.orbitals.objects.FMO.coefficient()pyorbb.orbitals.objects.FMO.cube_file()pyorbb.orbitals.objects.FMO.degeneracypyorbb.orbitals.objects.FMO.degeneracy_indexpyorbb.orbitals.objects.FMO.degeneratepyorbb.orbitals.objects.FMO.degenerate_orbitalspyorbb.orbitals.objects.FMO.doubly_occupiedpyorbb.orbitals.objects.FMO.draw()pyorbb.orbitals.objects.FMO.fock()pyorbb.orbitals.objects.FMO.fully_occupiedpyorbb.orbitals.objects.FMO.make_name()pyorbb.orbitals.objects.FMO.mulliken_contribution()pyorbb.orbitals.objects.FMO.overlap()pyorbb.orbitals.objects.FMO.partially_occupiedpyorbb.orbitals.objects.FMO.relative_namepyorbb.orbitals.objects.FMO.screenshot()pyorbb.orbitals.objects.FMO.singly_occupiedpyorbb.orbitals.objects.FMO.spin_match_orbspyorbb.orbitals.objects.FMO.spin_total_occupationpyorbb.orbitals.objects.FMO.subspecies_relative_namepyorbb.orbitals.objects.FMO.symmetry_relative_namepyorbb.orbitals.objects.FMO.unoccupiedpyorbb.orbitals.objects.FMO.vtk_file()
pyorbb.orbitals.objects.FMOspyorbb.orbitals.objects.FMOs.decode_key()pyorbb.orbitals.objects.FMOs.energy_typespyorbb.orbitals.objects.FMOs.filter()pyorbb.orbitals.objects.FMOs.fragmentspyorbb.orbitals.objects.FMOs.get()pyorbb.orbitals.objects.FMOs.spinspyorbb.orbitals.objects.FMOs.subspeciespyorbb.orbitals.objects.FMOs.symmetrypyorbb.orbitals.objects.FMOs.unrestricted
pyorbb.orbitals.objects.MOpyorbb.orbitals.objects.MO.coefficient()pyorbb.orbitals.objects.MO.cube_file()pyorbb.orbitals.objects.MO.degeneracypyorbb.orbitals.objects.MO.degeneracy_indexpyorbb.orbitals.objects.MO.degeneratepyorbb.orbitals.objects.MO.degenerate_orbitalspyorbb.orbitals.objects.MO.doubly_occupiedpyorbb.orbitals.objects.MO.draw()pyorbb.orbitals.objects.MO.fragment_character()pyorbb.orbitals.objects.MO.fully_occupiedpyorbb.orbitals.objects.MO.mulliken_contribution()pyorbb.orbitals.objects.MO.partially_occupiedpyorbb.orbitals.objects.MO.relative_namepyorbb.orbitals.objects.MO.screenshot()pyorbb.orbitals.objects.MO.singly_occupiedpyorbb.orbitals.objects.MO.spin_match_orbspyorbb.orbitals.objects.MO.spin_total_occupationpyorbb.orbitals.objects.MO.symmetry_relative_namepyorbb.orbitals.objects.MO.unoccupiedpyorbb.orbitals.objects.MO.vtk_file()
pyorbb.orbitals.objects.MOspyorbb.orbitals.objects.Orbitalpyorbb.orbitals.objects.Orbital.cube_file()pyorbb.orbitals.objects.Orbital.degeneracypyorbb.orbitals.objects.Orbital.degeneracy_indexpyorbb.orbitals.objects.Orbital.degeneratepyorbb.orbitals.objects.Orbital.degenerate_orbitalspyorbb.orbitals.objects.Orbital.doubly_occupiedpyorbb.orbitals.objects.Orbital.draw()pyorbb.orbitals.objects.Orbital.fully_occupiedpyorbb.orbitals.objects.Orbital.partially_occupiedpyorbb.orbitals.objects.Orbital.relative_namepyorbb.orbitals.objects.Orbital.screenshot()pyorbb.orbitals.objects.Orbital.singly_occupiedpyorbb.orbitals.objects.Orbital.spin_match_orbspyorbb.orbitals.objects.Orbital.spin_total_occupationpyorbb.orbitals.objects.Orbital.symmetry_relative_namepyorbb.orbitals.objects.Orbital.unoccupiedpyorbb.orbitals.objects.Orbital.vtk_file()
pyorbb.orbitals.objects.OrbitalSelectorpyorbb.orbitals.objects.Orbitalspyorbb.orbitals.objects.Orbitals.fmospyorbb.orbitals.objects.Orbitals.mospyorbb.orbitals.objects.Orbitals.chargespyorbb.orbitals.objects.Orbitals.fmo_energy_typespyorbb.orbitals.objects.Orbitals.fragmentspyorbb.orbitals.objects.Orbitals.get_mixer()pyorbb.orbitals.objects.Orbitals.moleculepyorbb.orbitals.objects.Orbitals.rename_fragment()pyorbb.orbitals.objects.Orbitals.write_excel()