Open sunqm opened 8 months ago
Currently, the most common practice of AD is something like
mol = gto.Mole()
def fn(mol):
return RHF(mol).kernel()
g = jax.grad(fn)(mol)
Only the perturbations are defined outside the function being differentiated, and fn
in principle should be pure.
I guess simply creating a conversion method within Mole
may be good enough. And inside the function, we can do something like mol.RHF().kernel()
, although I'm not 100% sure if this would work.
I'm also adding a Pytorch backend. Maybe we can wait until that is done.
The conversion interface to gpu4pyscf repo is mostly completed. I'm considering to create a similar conversion function for pyscfad. What is your opinion?