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

Change folder to DFT #3732

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions deepchem/models/deep_dft/__init__.py

This file was deleted.

15 changes: 15 additions & 0 deletions deepchem/models/dft/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Density Functional Theory.
"""
# flake8: noqa
import logging

logger_ = logging.getLogger(__name__)

try:
from deepchem.models.dft.hamilton.orbparams import BaseOrbParams
from deepchem.models.dft.hamilton.orbparams import QROrbParams
from deepchem.models.dft.hamilton.orbparams import MatExpOrbParams
except ModuleNotFoundError as e:
logger_.warning(
f'Skipped loading some Pytorch utilities, missing a dependency. {e}')
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class BaseOrbParams(object):
Examples
--------
>>> import torch
>>> from deepchem.models.deep_dft import BaseOrbParams
>>> from deepchem.models.dft import BaseOrbParams
>>> class MyOrbParams(BaseOrbParams):
... @staticmethod
... def params2orb(params, coeffs, with_penalty):
Expand Down Expand Up @@ -96,7 +96,7 @@ class QROrbParams(BaseOrbParams):
Examples
--------
>>> import torch
>>> from deepchem.models.deep_dft import QROrbParams
>>> from deepchem.models.dft import QROrbParams
>>> params = torch.randn(3, 3)
>>> coeffs = torch.randn(4, 3)
>>> with_penalty = 0.1
Expand Down Expand Up @@ -181,7 +181,7 @@ class MatExpOrbParams(BaseOrbParams):

Examples
--------
>>> from deepchem.models.deep_dft import MatExpOrbParams
>>> from deepchem.models.dft import MatExpOrbParams
>>> params = torch.randn(3, 3)
>>> coeffs = torch.randn(4, 3)
>>> with_penalty = 0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@pytest.mark.torch
def test_base_orb_params():
from deepchem.models.deep_dft.hamilton.orbparams import BaseOrbParams
from deepchem.models.dft.hamilton.orbparams import BaseOrbParams

class MyOrbParams(BaseOrbParams):

Expand All @@ -29,7 +29,7 @@ def orb2params(orb):

@pytest.mark.torch
def test_qr_orb_params():
from deepchem.models.deep_dft.hamilton.orbparams import QROrbParams
from deepchem.models.dft.hamilton.orbparams import QROrbParams
params = torch.randn(3, 3)
coeffs = torch.randn(4, 3)
with_penalty = 0.1
Expand All @@ -40,7 +40,7 @@ def test_qr_orb_params():

@pytest.mark.torch
def test_mat_exp_orb_params():
from deepchem.models.deep_dft.hamilton.orbparams import MatExpOrbParams
from deepchem.models.dft.hamilton.orbparams import MatExpOrbParams
params = torch.randn(3, 3)
coeffs = torch.randn(4, 3)
orb = MatExpOrbParams.params2orb(params, coeffs)[0]
Expand Down
Loading