Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the gradient of positions #6

Closed
smiles724 opened this issue Jan 26, 2022 · 1 comment
Closed

Question about the gradient of positions #6

smiles724 opened this issue Jan 26, 2022 · 1 comment

Comments

@smiles724
Copy link

Hi, great work, and thanks for sharing the code. I have a small question regarding the gradient of inputs["R"].
As far as I know, inputs["R"] represents the positions of atoms. Why do you make its requires_grad True?

        if not self.direct_forces:
            inputs["R"].requires_grad = True
@gasteigerjo
Copy link
Contributor

If we don't predict forces directly (self.direct_forces=False), we calculate them via F = -dE/dx. This thus requires exactly the positions' gradients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants