COGITOico module
- class COGITOico.COGITO_ICO(directory: str, verbose: int = 0, file_suffix: str = '', orbs_orth: bool = False, spin_polar: bool = False)[source]
Bases:
object- __init__(directory: str, verbose: int = 0, file_suffix: str = '', orbs_orth: bool = False, spin_polar: bool = False) None[source]
Initializes the
- Parameters:
directory (
str) – The path for the input filesverbose (
int) – How much will be printed (0 is least)file_suffix (
str) – The suffix to the TBparams and overlaps filesorbs_orth (
bool) – Whether the orbitals are orthogonal, if from COGITO this is always False
- read_orbitals(file: str = 'orbitals.npy') None[source]
This function reads in the orbitals as coefficents for a gaussian expansion. The information in ‘orbitals.npy’ is combined with the orbital data in ‘tb_input.txt’.
- Parameters:
file (
str) – Orbital file
- static get_neighbors(self) list[source]
This sorts the matrix of TB parameters into terms which are 1NN, 2NN, etc.
- get_bonds_figure(energy_cutoff: float = 0.1, elem_colors: list = [], atom_colors: list = [], atom_labels: list = [], plot_atom: int | None = None, one_atom: bool = False, bond_max: float = 3.0, fovy: float = 10, return_fig: bool = False) None[source]
this will plot the crystal structure atoms with line weighted by iCOHP each line should also be hoverable to reveal the number and amounts that are s-s,s-p, and p-p
- Parameters:
energy_cutoff (
float) – This is the minimum bond magnitude that will be plottedelem_colors (
list) – Colors for the elements based on order in tb_input. Length of list should be the number of unique elements. Can either be integer list to reference the default colors or list of plotly compatable colors.atom_colors (
list) – Colors for the atoms based on order in tb_input. Length of list should be the number of atoms in the primitive cell. Can either be integer list to reference the default colors or list of plotly compatable colors. If not set defaults to elem_colors.atom_labels (
list) – List of atom labels as a string.plot_atom (
int) – Set with one_atom=True, plots only one atom and it’s bonds, this passes the atom number to plotone_atom (
bool) – Whether only the atom defined in plot_atom should be plotted; default is Falsebond_max (
float) – The maximum bond distance that will be plotted outside the primitive cellfovy (
float) – field of view in the vertical direction. Use this tag to adjust depth perception in crystal. Set between 3 (for close to orthographic) and 30 (for good perspective depth).
- Returns:
Nothing
- Return type:
None
- get_bonds_charge_figure(energy_cutoff: float = 0.1, bond_max: float = 3.0, elem_colors: list = [], atom_colors: list = [], atom_labels: list = [], auto_label: str = '', plot_atom: int | None = None, one_atom: bool = False, fovy: float = 10, return_fig: bool = False, only_prim_atoms: bool | None = None, atom_dist_from_prim: float = 3.0) None[source]
this will plot the crystal structure atoms with line weighted by iCOHP each line should also be hoverable to reveal the number and amounts that are s-s,s-p, and p-p
“mulliken” - plots the onsite charge and mag (if spin_polar) on atoms by mulliken population (overrides atom_labels) “full” - plots the charge and magnetics moments (if spin_polar) on atoms and bonds (overrides atom_labels) “color” - colors the atoms and bonds based on their charge (overrides atom_colors or elem_colors) “color mag” - colors the atoms and bonds based on their magnetic moments (overrides atom_colors or elem_colors) NOTE: Only use “mulliken” OR “full”, NOT both