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

style: optmize the import of each submodule #154

Merged
merged 2 commits into from
Apr 29, 2024
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
10 changes: 4 additions & 6 deletions dptb/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
AtomicInMemoryDataset,
NpzDataset,
ASEDataset,
HDF5Dataset,
ABACUSDataset,
ABACUSInMemoryDataset,
DefaultDataset
)
from .dataloader import DataLoader, Collater, PartialSampler
from .build import dataset_from_config
from .test_data import EMTTestDataset
from .build import build_dataset
from .transforms import OrbitalMapper

__all__ = [
AtomicData,
Expand All @@ -33,17 +32,16 @@
AtomicInMemoryDataset,
NpzDataset,
ASEDataset,
HDF5Dataset,
ABACUSDataset,
ABACUSInMemoryDataset,
DefaultDataset,
DataLoader,
Collater,
PartialSampler,
dataset_from_config,
OrbitalMapper,
build_dataset,
_NODE_FIELDS,
_EDGE_FIELDS,
_GRAPH_FIELDS,
_LONG_FIELDS,
EMTTestDataset,
]
12 changes: 11 additions & 1 deletion dptb/nn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
from .build import build_model
from .deeptb import NNENV
from .deeptb import NNENV, MIX
from .nnsk import NNSK
from .dftbsk import DFTBSK
from .hamiltonian import E3Hamiltonian, SKHamiltonian
from .hr2hk import HR2HK
from .energy import Eigenvalues

__all__ = [
build_model,
E3Hamiltonian,
SKHamiltonian,
HR2HK,
Eigenvalues,
NNENV,
NNSK,
MIX,
DFTBSK,
]
"""

Expand Down
11 changes: 11 additions & 0 deletions dptb/postprocess/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from .bandstructure import Band
from .totbplas import TBPLaS
from .write_ham import write_ham


__all__ = [
Band,
TBPLaS,
write_ham,

]
1 change: 1 addition & 0 deletions dptb/postprocess/bandstructure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .band import Band
75 changes: 0 additions & 75 deletions dptb/postprocess/write_skparam.py

This file was deleted.

42 changes: 0 additions & 42 deletions dptb/postprocess/write_tbplus.py

This file was deleted.