google-deepmind / ferminet

An implementation of the Fermionic Neural Network for ab-initio electronic structure calculations
Apache License 2.0
721 stars 120 forks source link

Initialization policy for charged molecules #55

Closed shaipranesh2 closed 1 year ago

shaipranesh2 commented 2 years ago

This PR aims to initialize charge in molecules according to electronegativity. (most eleectronegative atom gets anionic charge and vice versa)

google-cla[bot] commented 2 years ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

shaipranesh2 commented 2 years ago

@dpfau @jsspencer Btw I wanted to confirm the logic before writing the code entirely here:

1)For the initialization policy, single atoms will get the charge intended unless the charge>number of electrons. 2)For diatomic molecules, the most electronegative atom will get the anionic charge, and the least electronegativity gets a cationic charge. 3)For any other multi-atomic molecule, the most electronegative atom is assigned the anionic charge. In case if there are 2 or more instances of the same atom (most or least electronegative one), then its neighbor's electronegativity is taken into account, i.e. electronegativity of the atom - sum(electronegativity of neighbor/distance from the atom)

This might have some problems though, like adding each charge can affect the atom's electronegativity and can change the initialization if multiple charges are being added to the same atom. One thing which can be done is to make it restricted for an atom to have only one charge , - either +1 or -1, the remaining charges go to the next electronegative atom. I would like to get some opinion on this initialization policy.

jsspencer commented 2 years ago

What problem are you trying to solve? Have you identified a case where the (admittedly simple) initialisation fails? Have you studied existing approaches taken by other QMC packages that might address your needs? Personally, I think such heuristics for initialisation are a bit fragile (e.g. what about HO^{-} and HO^{2-}? What about something like the benzene cation?) and the user can handle initialisation for a custom system manually.

Please note that unfortunately we do not have the capacity to design algorithms which are outside of our own lines of research.

shaipranesh2 commented 1 year ago

@jsspencer @dpfau Sorry for the late reply, but would like to take a pick at this PR again. For starters, can we use mulliken partial charges which comes along with solution computed using PySCF in the training, so would the most negative mulliken charge would accomodate the electron i guess?