Skip to content

Merge devel into master#426

Merged
amcadmus merged 21 commits intodeepmodeling:masterfrom
amcadmus:master
Feb 28, 2023
Merged

Merge devel into master#426
amcadmus merged 21 commits intodeepmodeling:masterfrom
amcadmus:master

Conversation

@amcadmus
Copy link
Member

No description provided.

amcadmus and others added 21 commits December 15, 2022 15:28
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
…TRU files in abacus/scf (deepmodeling#405)

return a null dict but not raiseError when INPUT/running_scf.log/STRU
files are not exist in abacus/scf.
Fix deepmodeling#344.

To lint codes, this PR uses a popular tool,
[pre-commit](https://pre-commit.com/). `.pre-commit-config.yaml` shows
all hooks used, including [black](https://github.com/psf/black) and some
common fixes. It can add a git hook to `git commit`. Thus, everything
committed can be already formatted. In addition, there is also a
[CI](https://pre-commit.ci/) to fix PRs. This way, we can ensure that
everything new will also be formatted.

This PR introduces a huge change history to almost all files, but it's a
necessary step to start linting our codes.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This PR adds a pre-commit hook to use Black to format Python codes in
the documentation.
The new version of parmed drops Python 3.7. However, it did not set
`requires-python`, making pip on Python 3.7 still installs the latest
version.
…deepmodeling#417)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This is an automatic tool to format and sort imports. See
https://github.com/PyCQA/isort for details.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Add a pre-commit hook to run automatic tools to follow the Numpydoc
style guide.
…odeling#422)

Add support for 'deepmd/mixed' format with dpdata.MultiSystems
1. Support dump from dpdata.MultiSystems to [mixed type
format](https://github.com/deepmodeling/deepmd-kit/blob/master/doc/model/train-se-atten.md#data-format):
    dpdata.MultiSystems.to_deepmd_mixed('dir_name_mixed')
2. Support load from mixed type format to dpdata.MultiSystems:
dpdata.MultiSystems.load_systems_from_file('dir_name_mixed',
fmt='deepmd/mixed')

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This PR has concated two commits together:

1. Update the dpdata.MultiSystems() when from_deepmd_npy_mixed method is
called;

dpdata.MultiSystems().from_deepmd_npy_mixed only returned the results
before but did not change itself, which is fixed in this commit, to be
consistent with other from methods.
(another bug is also fixed: not using .copy() in data["atom_names"] may
cause error when manually changing type_map for this system. UTs are
added in the next commit.)


2. Allow multiple sets in mixed-type format;

Now for maximum 50000 frames in one sys and 2000 frames in one set.
The reason I did not use 5000 frames per set, is that I think maximum
set frames will be much more often used in mixed-type format than other
format, and 2000 will be enough for large batch and more friendly for
memory.

Add UTs for type_map changing and mixed_type dir check.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@amcadmus amcadmus requested a review from njzjz February 28, 2023 03:25
@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2023

Codecov Report

Base: 82.36% // Head: 82.51% // Increases project coverage by +0.14% 🎉

Coverage data is based on head (06c21b6) compared to base (2e148f2).
Patch coverage: 84.48% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
+ Coverage   82.36%   82.51%   +0.14%     
==========================================
  Files          67       68       +1     
  Lines        5903     6198     +295     
==========================================
+ Hits         4862     5114     +252     
- Misses       1041     1084      +43     
Impacted Files Coverage Δ
dpdata/__about__.py 0.00% <0.00%> (ø)
dpdata/cli.py 0.00% <0.00%> (ø)
dpdata/md/rdf.py 0.00% <0.00%> (ø)
dpdata/plugin.py 100.00% <ø> (ø)
dpdata/plugins/3dmol.py 46.66% <25.00%> (ø)
dpdata/rdkit/sanitize.py 43.77% <36.73%> (ø)
dpdata/format.py 88.33% <40.00%> (-1.33%) ⬇️
dpdata/plugins/rdkit.py 80.64% <50.00%> (ø)
dpdata/rdkit/utils.py 61.79% <50.00%> (ø)
dpdata/plugins/siesta.py 75.00% <60.00%> (ø)
... and 60 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@amcadmus amcadmus merged commit 9507165 into deepmodeling:master Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants