Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor(data preprocess): remove the cut off options from info.json #200

Merged
merged 14 commits into from
Aug 13, 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ dptb/tests/**/*.pth
dptb/tests/**/*.npy
dptb/tests/**/*.traj
dptb/tests/**/out*/*
dptb/tests/**/out*/*
dptb/tests/**/*lmdb
dptb/tests/**/*h5
examples/_*
*.dat
*log*
Expand Down
38 changes: 36 additions & 2 deletions dptb/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
from dptb.entrypoints.main import main
from dptb.entrypoints.main import main as entry_main
import logging
import pyfiglet
from dptb import __version__

logging.basicConfig(level=logging.INFO, format='%(message)s')
log = logging.getLogger(__name__)

def print_logo():
f = pyfiglet.Figlet(font='dos_rebel') # 您可以选择您喜欢的字体
logo = f.renderText("DeePTB")
log.info(" ")
log.info(" ")
log.info("#"*81)
log.info("#" + " "*79 + "#")
log.info("#" + " "*79 + "#")
for line in logo.split('\n'):
if line.strip(): # 避免记录空行
log.info('# '+line+ ' #')
log.info("#" + " "*79 + "#")
version_info = f"Version: {__version__}"
padding = (79 - len(version_info)) // 2
nspace = 79-padding
format_str = "#" + "{}"+"{:<"+f"{nspace}" + "}"+ "#"
log.info(format_str.format(" "*padding, version_info))
log.info("#" + " "*79 + "#")
log.info("#"*81)
log.info(" ")
log.info(" ")
def main() -> None:
"""
The main entry point for the dptb package.
"""
print_logo()
entry_main()

if __name__ == '__main__':
main()
#print_logo()
main()
2 changes: 1 addition & 1 deletion dptb/data/AtomicData.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def from_points(
def from_ase(
cls,
atoms,
r_max,
r_max: Union[float, int, dict],
er_max: Optional[float] = None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边er_max和oer_max不要同步改下嘛?

oer_max: Optional[float] = None,
key_mapping: Optional[Dict[str, str]] = {},
Expand Down
Loading