-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Adding NNPBE #3418
Adding NNPBE #3418
Conversation
deepchem/models/dft/nnxc.py
Outdated
xi = (nu - nd) / n_offset | ||
s = safenorm(densinfo.u.grad + densinfo.d.grad, dim=-1).unsqueeze(-1) | ||
|
||
print("s_1", s.shape) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove print after testing.
deepchem/models/dft/nnxc.py
Outdated
""" | ||
|
||
def __init__(self, nnmodel: torch.nn.Module): | ||
# nnmodel should receives input with shape (..., 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this into the docstring instead of leaving as comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
deepchem/models/dft/nnxc.py
Outdated
# (2) normalized gradients (s): |del(n)| / [2(3*pi^2)^(1/3) * n^(4/3)] | ||
# the output of the model must have shape of (..., 1) | ||
# it represents the energy density per density per volume | ||
super().__init__() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should come after the docstring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Fix #(issue)
Type of change
Please check the option that is related to your PR.
Checklist
yapf -i <modified file>
and check no errors (yapf version must be 0.32.0)mypy -p deepchem
and check no errorsflake8 <modified file> --count
and check no errorspython -m doctest <modified file>
and check no errors