lcmd-epfl / Q-stack

Stack of codes for dedicated pre- and post-processing tasks for Quantum Machine Learning (QML)
MIT License
13 stars 5 forks source link

Loading molecules for spahm #33

Closed briling closed 2 months ago

briling commented 2 months ago

What is this supposed to do?

        mols.append(compound.xyz_to_mol(xyzfile, basis, charge=0 if ch is None else ch,
                                        spin=0 if ch is None else sp, unit=units)) #TODO

I don't understand why spin=0 if ch is None else sp

YAY-C commented 2 months ago

So if I remember correctly, this is done to avoid Pyscf overwriting the spin arguments, whenever the charge does not fit the number of electrons. (which suppresses the error and would give a different representation)

YAY-C commented 2 months ago

Though I don't know if they change this behaviour in the more recent version of PySCF ...

briling commented 2 months ago

apparently spin=0 if ch is None else sp was a bug

briling commented 2 months ago

fixed by #36