-
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
DFT initial pr - Adding utilities #3190
Conversation
deepchem/models/dft/dftutils.py
Outdated
retain_graph=True) | ||
return f | ||
|
||
def hashstr(s: str) -> str: |
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 have a docstring
deepchem/models/dft/dftutils.py
Outdated
from dqc.qccalc.base_qccalc import BaseQCCalc | ||
import hashlibs | ||
|
||
class KSCalc(object): |
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.
We should add some basic unit tests for this object
8a0fc1d
to
6dc611f
Compare
deepchem/utils/dftutils.py
Outdated
import torch | ||
from dqc.utils.datastruct import SpinParam | ||
from dqc.qccalc.base_qccalc import BaseQCCalc | ||
except ImportError: |
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.
It should be ModuleNotFoundError
deepchem/utils/dftutils.py
Outdated
def energy(self) -> torch.Tensor: | ||
""" | ||
Returns | ||
_______ |
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.
hyphens (-
) over underscores (_
)
from deepchem.utils.dftutils import KSCalc, hashstr | ||
import torch | ||
|
||
|
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.
@pytest.mark.torch because dqc requires pytorch to be installed
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.
Since we are running dqc tests in a separate workflow, we should have it marked as @pytest.mark.dqc and then invoke the test in dqc workflow.
We should add in |
9e744eb
to
01a052a
Compare
added not dqc in unit test ci to skip dqc test
Description
Adding utilities for XCNN model.