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

add LAMMPS plugin #945

Merged
merged 8 commits into from
Aug 12, 2021
Merged

add LAMMPS plugin #945

merged 8 commits into from
Aug 12, 2021

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Aug 10, 2021

  • Breaking changes: update fix_dplr to support Standardize fix contributions to energy and virial, remove THERMO_ENERGY mask lammps/lammps#2560. Old version may be not supported. No idea how to support both versions. Both versions will be supported, if one provides either LAMMPS_VERSION_NUMBER, LAMMPS_VERSION, or LAMMPS_SOURCE_ROOT. If none is provided, default is 29Oct2020.
  • Feature: support LAMMPS's new plugin package. See document for details.
  • update document and examples for LAMMPS plugin. The old installation method will be still supported, although it's removed from documents.
  • OLD_LMP_PPPM is replaced by LAMMPS_VERSION_NUMBER. (we can add back support for version<29Oct2020 removed in compatible to lammps stable_29Oct2020 #302?)
  • LAMMPS hasn't released a stable version, but I think it will be released in one or two months.

- Breaking changes: update fix_dplr to support lammps/lammps#2560. Old version may be not supported. No idea how to support both versions.
- Feature: support LAMMPS's new plugin package. See document for details.
- update document and examples for LAMMPS plugin. The old installation method will be still supported, although it's removed from documents.
- LAMMPS hasn't released a stable version, but I think it will be released in one or two months.
@njzjz njzjz linked an issue Aug 10, 2021 that may be closed by this pull request
@njzjz
Copy link
Member Author

njzjz commented Aug 10, 2021

I have an idea to let one assign the LAMMPS version when using CMake if using the traditional version. (or automatically detect using new method) Then I can add the compatibility back.

@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2021

Codecov Report

Merging #945 (d50523b) into devel (c4856ef) will decrease coverage by 7.83%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #945      +/-   ##
==========================================
- Coverage   83.34%   75.51%   -7.84%     
==========================================
  Files         118       85      -33     
  Lines        9956     6796    -3160     
==========================================
- Hits         8298     5132    -3166     
- Misses       1658     1664       +6     
Impacted Files Coverage Δ
deepmd/entrypoints/compress.py 80.76% <0.00%> (-10.35%) ⬇️
deepmd/entrypoints/train.py 87.19% <0.00%> (-0.78%) ⬇️
source/lib/tests/test_soft_min_switch_virial.cc
source/lib/tests/test_prod_force_grad_a.cc
source/lib/tests/test_pair_tab.cc
source/lib/tests/test_main.cc
source/api_cc/tests/test_deeppolar.cc
source/api_cc/tests/test_dipolecharge.cc
source/lib/tests/test_fmt_nlist.cc
source/lib/tests/test_prod_force_grad_r.cc
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4856ef...d50523b. Read the comment docs.

@njzjz
Copy link
Member Author

njzjz commented Aug 11, 2021

Note: I've changed actions, so Expected — Waiting for status to be reported will appear util the setting is changed.

@njzjz njzjz requested a review from amcadmus August 11, 2021 03:20
doc/install.md Outdated
@@ -204,6 +204,7 @@ One may add the following arguments to `cmake`:
| -DCUDA_TOOLKIT_ROOT_DIR=&lt;value&gt; | Path | Detected automatically | The path to the CUDA toolkit directory. |
| -DUSE_ROCM_TOOLKIT=&lt;value&gt; | `TRUE` or `FALSE` | `FALSE` | If `TRUE`, Build GPU support with ROCM toolkit. |
| -DROCM_ROOT=&lt;value&gt; | Path | Detected automatically | The path to the ROCM toolkit directory. |
| -LAMMPS_SOURCE_ROOT=&lt;value&gt; | Path | - | The path to the LAMMPS source code (later than 8Apr2021). |
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't it be -DLAMMPS_SOURCE_ROOT

Comment on lines 417 to 422
Firstly, enable DeePMD-kit package in LAMMPS with `plugin` command:

```
plugin load path/to/deepmd/lib/libdeepmd_lmp.so
```

Copy link
Member

Choose a reason for hiding this comment

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

It seems that the built-in mode is not supported by this PR. Then it is a breaking change, because all lammps input scripts have to be changed.

It is ideal to support both built-in and plugin modes. We still need the built-in mode because it is easy to use, one do not need to load the shared lib in every lammps script.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok. Note that I just removed built-in mode in the document, and I'll revert them.

@njzjz njzjz requested a review from amcadmus August 11, 2021 23:49
@amcadmus amcadmus mentioned this pull request Aug 12, 2021
@amcadmus amcadmus merged commit 72aaa9b into deepmodeling:devel Aug 12, 2021
@njzjz njzjz deleted the lammps-plugin branch August 12, 2021 01:22
gzq942560379 pushed a commit to HPC-AI-Team/deepmd-kit that referenced this pull request Sep 2, 2021
* add LAMMPS plugin

- Breaking changes: update fix_dplr to support lammps/lammps#2560. Old version may be not supported. No idea how to support both versions.
- Feature: support LAMMPS's new plugin package. See document for details.
- update document and examples for LAMMPS plugin. The old installation method will be still supported, although it's removed from documents.
- LAMMPS hasn't released a stable version, but I think it will be released in one or two months.

* fix include path

* add compatibility

* add `make install` to lammps document

* update document for built-in mode

* revert troublesome

* update docs

* Update source/install/build_cc.sh
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.

[Feature Request] Write LAMMPS plugin
3 participants