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:
ModelHamiltonian/moha/rauk/rauk.py
Lines 141 to 145 in bd293f4
@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:
ModelHamiltonian/moha/rauk/rauk.py
Line 66 in bd293f4
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:
where charges
Then, we run calculations for different
Pariser Parr Atomic dictionary
The previous approach requires to build the
However, in the papers people use Mataga-Nishimoto formula:
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
At this stage it’s good to make sure that our default value of
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 :)