theochem/ModelHamiltonian

Testing Rauk part

Closed this issue · 7 comments

We need to make sure that building hamiltonians using Rauk and PPP dictionaries is correct

@RichRick1 I've identified a problem in the symmetry of the hamiltonian when the user provides the bond dictionary. The way the logic is built, we need to make sure that the bond dictionary is symmetric with respect to the atoms. So, we should add:

    else:
        # Ensure symmetry in the bond dictionary
        for key in list(bond_dictionary.keys()):
            atom1_name, atom2_name = key.split(',')
            reverse_key = ','.join([atom2_name, atom1_name])
            bond_dictionary[reverse_key] = bond_dictionary[key]

in the rauk.ipynb

I think it's better to populate one body term so that output is symmetric whether or not user provided symmetric keys. I'm surprised it's even an issue, considering that we build the symmetric keys:

bond_key = ','.join([atom1_name, atom2_name])
bond_value = kxy_matrix[index1, index2] * abs(beta_c)
bond_dictionary[bond_key] = bond_value
# Ensure symmetry
bond_dictionary[','.join([atom2_name, atom1_name])] = bond_value

@giovanni-br can you take a look on what's going wrong there?

@RichRick1 I think this part is not the problem, once to enter in this case the user should not provide the dictionary.

But here:

param_nodiag_mtrx[idx1, idx2] = bond_dictionary.get(bond_key1, 0)

When we try to search for the key it's not present in the dictionary

Once this is done, we can show case how we can use Model Hamiltonian to build some real-ish systems.
Here is an example for benzene and biphenyl https://www.sciencedirect.com/science/article/pii/S0301010499000178

@RichRick1 I think the problems in #130 and #133 are solved right now. Since I had some problems with pyscf I would ask you to make sure that the demo is working normally :)

Description

Now when we have PPP model working and tested, @giovanni-br can make a demo for the Rauk (including PP approximation) for building PPP model for Benzene and Biphenol.

Standard PPP model

To match results from this paper, we define the PPP model as:

image

where charges $Q_p = 1, \forall p$ and $U_p = \frac{1}{2} \cdot 10.84$;

$$ \begin{aligned} \gamma_{p, p-1} &= \gamma_{p, p+1} = 5.27760 \\ \gamma_{p ,p-2} &= \gamma_{p,p+2} = 3.86206 \\ \gamma_{p,p-3} &= \gamma_{p,p+3} = 3.48786 \end{aligned} $$

Then, we run calculations for different $\beta$ and show that we match results from the paper.

Pariser Parr Atomic dictionary

The previous approach requires to build the $\gamma$ matrix directly. In MoHa package we can take an advantage of Ohno approximation of Pariser-Parr integrals:

image

However, in the papers people use Mataga-Nishimoto formula:

$$ \gamma_{\mu \nu}=1 /\left(\gamma_0^{-1}+d_{\mu \nu}\right) $$

In the example all we need to do is to provide the distance between each pairs of atoms. So the input will look like system = [('C1', 'C2', R12), ('C1', 'C3', R13), ('C1', 'C4', R14) ... ], where $R_{ij}$ -- is a distance between atoms $R_i$ and $R_j$ in the molecule.

At this stage it’s good to make sure that our default value of $\bar{U}_{XY}$ is equal to 10.84, because it looks like everybody is using it.

Rauk’s Atomic dictionary

Once this is done, it’s good to show that we can substitute on of the atoms with B (?) and perform the same calculations.

Biphenyl molecule

Once the above is done, we can reuse the same code for showcasing the biphenyl system. The only thing that will change is connectivity and distance matrix, but overall the idea is the same

This is done and tested :)