Skip to content

Commit

Permalink
style: optmize the import of each submodule (#154)
Browse files Browse the repository at this point in the history
* data import

* optimize imports
  • Loading branch information
floatingCatty authored Apr 29, 2024
1 parent b977a23 commit eb59b19
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 124 deletions.
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.

0 comments on commit eb59b19

Please sign in to comment.