Pariser-Parr dictionary
Closed this issue · 5 comments
-
When we build Pariser-Parr dictionary, we assume user provides connectivity matrix as ('atomx, 'atomy', 'Rxy'). Where
$R_{xy}$ is a distance between atoms x and y. -
To compute hopping term
$\beta_{xy}$ we need to compute overlap between orbitals$S_{xy}$ :
$$\beta_{X Y}=1.75 S_{X Y} \frac{\alpha_X+\alpha_Y}{2}$$
Problem: computation of
and
@PaulWAyers what do you think is the best way from API perspective to choose the type of overlap-computations?
Perhaps have an option for the overlap calculation, where the user can specify s
or p
; then we can indicate in the documentation what these keywords mean, specifically.
A more advanced option would be to support passing a string (here s
or p
) or a function, whereby the user passes their own overlap function. That would add a lot of flexibility, since basically the any overlap function could be used. (Under the hood, the keyword arguments would just call the code with the function as specified here.)
What do you think?
What if instead of the passing a function, we let user pass the overlap matrix for directly? Such approach will provide the same flexibility, but eliminates a problem of restricting formatting for the function that user provides
That's a good idea. We can provide some utilities for constructing the overlap matrix and then pass it.
Just a summary of the workflow for me and @giovanni-br
We need to differentiate computations of overlap between orbitals depending on whether it's 1s-1s or 2p-2p orbitals.
Input format:
User provides connectivity in the form of [("C1", "C2", 0.5, "pi"), ("C2", "O3(2)", 0.7, "sigma")] where:
- First two elements are
atoms
that are connected
Atom
itself composed of:- Atom symbol:
string
- Atom number:
float
- Atom type:
(float)
-- number in parenthesis
It may look cumbersome to specify number of an atom, but it's necessary if user wants to specify connectivity that is more complex then linear chains.
- Atom symbol:
- Third element is a distance between atoms.
float
data type - Forth element is a type of overlap.
string
data type; allowed values are"sigma"
,"pi"
Aside of connectivity, user can provide:
- atomic dictionary that corresponds to
$\alpha$ values - bond dictionary that corresponds to
$\beta_{XY}$ values - overlap matrix
$S_{XY}$ that corresponds to the orbital overlap between atoms X, Y;
Hierarchy
- if atomic dictionary isn't provided, we need to use values from the paper as
$\alpha = -I_X$ , where$I_X$ is ionization potential. - if bond dictionary isn't provided, user can provide overlap matrix
$S_{XY}$ .
In this case we need to compute$\beta_{XY}$ as
- if
$S_{XY}$ isn't provide, we need to compute overlap$S_{XY}$ by parsing types of orbitals binding (sigma or pi). Here, we need to check whether user provides forth parameter. Otherwise yield an error. Once$S_{XY}$ is computed, use formula above to compute$\beta_{XY}$
Output format:
Array that represents one-body term. On the diagonal:
Code structure
We need to make a function that resembles rauk.py
file that builds one-body term. Functions in the file:
build_one_body
; returns one-body term and resembles function in therauk.py
filecompute_U
; returns array of potential, computed from Pariser-Parr approximation as
compute_gamma
; returns gamma from Pariser-Parr approximation as
- Change check of building the one body term based on either Rauk or Pariser Parr approximation inside the
hamiltonians.py
so it doesn't depend on number of parameters inside theconnectivity
list
# check if elements in connectivity matrix are integer
connectivity = [("C1", "C2", 0.5, "pi"), ("C2", "C3", 0.5, "sigma")]
elif np.all([isinstance(elem[3], int) for elem in self.connectivity]):
one_body_term = assign_rauk_parameters(
self.connectivity,
self.atom_types,
self.atoms_num,
self.n_sites,
self.atom_dictionary,
self.bond_dictionary
)
# check if elements in connectivity matrix are float
elif np.all([isinstance(elem[3], float) for elem in self.connectivity]):
one_body_term = compute_param_dist_overlap(
self.connectivity,
self.atom_types,
self.atoms_num,
self.n_sites,
self.atoms_dist,
self.atom_dictionary,
self.bond_dictionary
)
Stylistics changes
- Change function name from
compute_param_dist_overlap
tocompute_overlap
. This will make code more succinct
Long Run:
- Implement utilities for computing overlap between different types of orbitals
Two body term
Computing u_onsite
Function name: compute_U
in the rauk module, PariserParr.py
- For the computation of potential on each site, if user didn't provide
u_onsite
(u_onsite
isNone
) oraffinity_dct is None
, then function pull information about binding affinity from the Json file. It should also know (or read)atom_dct
- Computation of u_onsite is done by
$U_X = \alpha_X - A_X$
Computing gamma
Function name: compute_gamma
in the rauk module, PariserParr.py
- For the computation of
$\gamma_{XY}$ ifgamma is None
we need to callcompute_U
to evaluate$U_x$ . Then, we can use the following formula: