Closed j-euler closed 1 year ago
First I apologize for the long delay in response.
I have fixed the above issue in pyphotonics: now pyphotonics will calculate delta_R properly without having to use this weird shift vector
thing, which was meant to be temporary fix by the way.
I have run your diamond.py which uses your inputs, and got the following:
Delta_R= 0.14863490208142474 Delta_Q= 0.5218646561846176 HuangRhyes= 2.187839398660597 DebyeWaller= 0.11215881750730829
I guess that's all good now? Let me know please if anything is not working.
While testing the code, I got unreasonable large Delta_R, Delta_Q, and HuangRhyes factor for the NV center in diamond. This is because I used a different defect supercell. In this cell, the defect is placed at the corner instead of the center of the supercell, as in the example in the repo. To verify that this change was responsible for the difference, I shifted the defect in the example to the corner and could recreate the unreasonable large values.
With the attached infiles shifted_NV.tar.gz I got the following values: Delta_R= 7.145141461466035 Delta_Q= 24.76297908689863 HuangRhyes= 8760.021847986585 These are so large that I get an overflow error, and the calculation stops.
These values should be the same as in the example since a translation should not affect the result. The reason is that atoms move across the cell boundary between the ground and excited state and end up at different corners of the supercell. Therefore, when Delta_R is calculated, periodic boundary conditions are not handled.
I verified this with a minimal example using one atom in a large box 10 Å. minimal_example.tar.gz I moved the atom over the cell boundary between the ground and excited state, corresponding to a movement of 2 Å. However, without periodic boundary conditions, the distance is 8 Å which is the result PyPhotonics gives: Delta_R= 8.0 Delta_Q= 29.940741473784513 HuangRhyes= 0.0