DQC: differentiable quantum chemistry

DQC is a PyTorch-based quantum chemistry simulation software that can automatically provide gradients of (almost) any variables with respect to (almost) any variables. DQC provides analytic first and higher order derivatives automatically using PyTorch’s autograd engine.

DQC’s example API:

import torch
import dqc
atomzs, atomposs = dqc.parse_moldesc("H -1 0 0; H 1 0 0")
atomposs = atomposs.requires_grad_()  # mark atomposs as differentiable
mol = dqc.Mol((atomzs, atomposs), basis="3-21G")
qc = dqc.HF(mol).run()
ene = qc.energy()  # calculate the energy
force = -torch.autograd.grad(ene, atomposs)[0]  # calculate the force
print(force)
tensor([[ 0.1033, -0.0000, -0.0000],
        [-0.1033, -0.0000, -0.0000]], dtype=torch.float64)

Indices and tables