Konjkov / molden2qmc

molden to Casino input converter
7 stars 7 forks source link

Getting number of alpha electrons and Beta electrons in the case of unrestricted calculations #9

Closed anbenali closed 4 years ago

anbenali commented 4 years ago

Hello,

I am working on modifying your converter to generate an HDF5 file that can be read by QMCPACK but I need the electron count for electrons alpha and Beta individually. So far the total number of electrons is a sum of the orbital occupation. To implement it, I could create a parser that separates the orbotals Alpha and Beta but that would be heavy. Do you know how to implement this in a cleaner way?

Thanks

Anouar Benali

Konjkov commented 4 years ago

Hello Anouar

I added two methods nalpha() and nbeta() down the link

Unfortunately, not all programs correctly set an OCCUP attribute value in MOLDEN file. For example DALTON 2017 version set it to zero in unrestricted case, maybe they''ll fix it in new versions. Anyway it’s hard for me to guarantee the correctness this methods for all excited unrestricted states, but you can add print(self.nalpha(), self.nbeta()) and run the tests for any molden inputs.

Best Vladimir.

anbenali commented 4 years ago

Hi Vladimir

Thank you very much for the addition. We are cleaning up the code and should submit a PR for a fully functional option to generate a qmcpack input file.