-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from mir-group/develop
v0.5.1
- Loading branch information
Showing
19 changed files
with
5,193 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Run LAMMPS-Python tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.9] | ||
torch-version: [1.10.0] | ||
nequip-branch: ["develop"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
env: | ||
TORCH: "${{ matrix.torch-version }}" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install torch==${TORCH} -f https://download.pytorch.org/whl/cpu/torch_stable.html | ||
pip install pytest | ||
pip install pytest-xdist[psutil] | ||
pip install mkl-include | ||
- name: Install NequIP | ||
env: | ||
NEQUIP: "${{ matrix.nequip-branch }}" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
pip install "https://github.com/mir-group/nequip/archive/${NEQUIP}.zip" | ||
- name: Fetch and build LAMMPS | ||
run: | | ||
mkdir lammps_dir/ | ||
cd lammps_dir/ | ||
wget -nv "https://github.com/lammps/lammps/archive/release.zip" | ||
unzip -q release.zip | ||
mv lammps-release/ lammps/ | ||
rm release.zip | ||
cd .. | ||
./patch_lammps.sh lammps_dir/lammps/ | ||
cd lammps_dir/lammps/ | ||
mkdir build/ | ||
cd build/ | ||
cmake ../cmake -DCMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` -DMKL_INCLUDE_DIR=`python -c "import sysconfig;from pathlib import Path;print(Path(sysconfig.get_paths()[\"include\"]).parent)"` | ||
make -j$(nproc) | ||
echo "LAMMPS in dir" | ||
pwd | ||
ls lmp | ||
cd ../../.. | ||
echo "Now in dir" | ||
pwd | ||
- name: Run tests with pytest | ||
run: | | ||
# See https://github.com/pytest-dev/pytest/issues/1075 | ||
PYTHONHASHSEED=0 LAMMPS=`pwd`/lammps_dir/lammps/build/lmp pytest -n auto tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"editor.formatOnSave": false, | ||
"[python]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"python.formatting.provider": "black" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.017391652023890813 free_energy=-0.017391652023890813 pbc="T T T" | ||
Cu 0.01764052 0.00400157 0.00978738 -0.08717844 0.04962473 -0.12179229 -0.00472427 | ||
Cu 0.02240893 1.82367558 1.79522722 -0.12285307 -0.13375551 0.17188324 -0.00362717 | ||
Cu 1.81450088 -0.00151357 1.80396781 0.08501339 0.09035482 0.10694376 -0.00469092 | ||
Cu 1.80910599 1.80644044 0.01454274 0.12501812 -0.00622404 -0.15703471 -0.00434929 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.015905094412799414 free_energy=-0.015905094412799414 pbc="T T T" | ||
Cu 0.01624345 -0.00611756 -0.00528172 -0.06246748 0.14140106 -0.03262814 -0.00437084 | ||
Cu -0.01072969 1.81365408 1.78198461 0.13723509 -0.12500316 0.07279520 -0.00412798 | ||
Cu 1.82244812 -0.00761207 1.80819039 -0.11120998 0.15286120 -0.12108536 -0.00357991 | ||
Cu 1.80250630 1.81962108 -0.02060141 0.03644236 -0.16925910 0.08091829 -0.00382637 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.01528731937769301 free_energy=-0.01528731937769301 pbc="T T T" | ||
Cu -0.00416758 -0.00056267 -0.02136196 0.01148580 -0.04169084 0.08236991 -0.00512480 | ||
Cu 0.01640271 1.78706564 1.79658253 -0.14132134 0.08420319 0.07401279 -0.00350296 | ||
Cu 1.81002881 -0.01245288 1.79442048 0.01247261 0.04689613 0.08984380 -0.00391347 | ||
Cu 1.79590992 1.81051454 0.02292208 0.11736294 -0.08940848 -0.24622650 -0.00274609 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.01887755101138211 free_energy=-0.01887755101138211 pbc="T T T" | ||
Cu 0.01788628 0.00436510 0.00096497 -0.15444665 -0.09501731 -0.02555193 -0.00454935 | ||
Cu -0.01863493 1.80222612 1.80145241 0.11584357 0.01712771 0.06618692 -0.00503852 | ||
Cu 1.80417259 -0.00627001 1.80456182 0.00463158 -0.01619046 0.04319703 -0.00488369 | ||
Cu 1.80022782 1.79186135 0.00884622 0.03397150 0.09408005 -0.08383203 -0.00440599 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.020128104148323445 free_energy=-0.020128104148323445 pbc="T T T" | ||
Cu 0.00050562 0.00499951 -0.00995909 -0.07686553 -0.03193870 0.02688282 -0.00520543 | ||
Cu 0.00693599 1.80081698 1.78915423 -0.12450754 0.07391750 0.07765346 -0.00475940 | ||
Cu 1.79852293 0.00598575 1.80832250 0.08218191 -0.03926083 -0.06416069 -0.00518652 | ||
Cu 1.79352523 1.81118670 -0.00087987 0.11919115 -0.00271797 -0.04037558 -0.00497675 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.020154675346251594 free_energy=-0.020154675346251594 pbc="T T T" | ||
Cu 0.00441227 -0.00330870 0.02430771 -0.08239901 -0.01596948 -0.11560842 -0.00482879 | ||
Cu -0.00252092 1.80609610 1.82082481 -0.03096779 -0.04175481 -0.03348025 -0.00521007 | ||
Cu 1.79590768 -0.00591637 1.80687603 0.07820172 0.00326506 0.06975380 -0.00487497 | ||
Cu 1.80170130 1.79307235 -0.00204877 0.03516508 0.05445923 0.07933486 -0.00524084 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.01482573303385415 free_energy=-0.01482573303385415 pbc="T T T" | ||
Cu -0.00311784 0.00729004 0.00217821 0.05397007 -0.04615605 0.08312341 -0.00388045 | ||
Cu -0.00899092 1.78013219 1.81413252 0.09728569 0.15265900 -0.04201865 -0.00425637 | ||
Cu 1.81627064 -0.01514093 1.82139291 -0.13314014 0.11989754 -0.09607516 -0.00301817 | ||
Cu 1.80070106 1.83131281 0.00601822 -0.01811562 -0.22640049 0.05497041 -0.00367074 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.021005203893530222 free_energy=-0.021005203893530222 pbc="T T T" | ||
Cu 0.01690526 -0.00465937 0.00032820 -0.10681903 -0.01566386 0.03841762 -0.00519367 | ||
Cu 0.00407516 1.79711077 1.80502066 -0.01195269 -0.02590150 -0.00836358 -0.00557351 | ||
Cu 1.80499110 -0.01754724 1.81517658 0.08162914 0.07959041 -0.08354024 -0.00494696 | ||
Cu 1.81100499 1.79874571 -0.00171548 0.03714257 -0.03802506 0.05348620 -0.00529107 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.004108154437133749 free_energy=-0.004108154437133749 pbc="T T T" | ||
Cu 0.00091205 0.01091283 -0.01946970 0.10455948 -0.22944333 0.27304574 -0.00116755 | ||
Cu -0.01386350 1.78203508 1.82909834 0.21498056 0.31338220 -0.18956466 0.00087501 | ||
Cu 1.82227836 0.02204556 1.81294828 -0.18865295 -0.31150667 -0.06864456 -0.00045239 | ||
Cu 1.81476421 1.79316573 0.01916364 -0.13088708 0.22756779 -0.01483652 -0.00336323 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.019378981209557722 free_energy=-0.019378981209557722 pbc="T T T" | ||
Cu 0.00001109 -0.00289544 -0.01116066 -0.08585694 0.03365348 0.05228967 -0.00526449 | ||
Cu -0.00012883 1.80121639 1.80018865 -0.08489222 -0.00366840 0.06224814 -0.00489394 | ||
Cu 1.78982669 -0.00490872 1.80259319 0.11746446 0.04869625 0.04446378 -0.00464278 | ||
Cu 1.79852053 1.81135891 0.01740117 0.05328471 -0.07868133 -0.15900158 -0.00457777 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.02045229620204303 free_energy=-0.02045229620204303 pbc="T T T" | ||
Cu 0.01331587 0.00715279 -0.01545400 -0.09836036 -0.01328786 0.08680352 -0.00509484 | ||
Cu -0.00008384 1.81121336 1.79779914 0.00068210 -0.01608512 0.04158748 -0.00522638 | ||
Cu 1.80765512 0.00108549 1.80504291 0.03263030 0.03155436 -0.01202871 -0.00515197 | ||
Cu 1.80325400 1.80933026 0.01203037 0.06504795 -0.00218138 -0.11636230 -0.00497910 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.018290814060376803 free_energy=-0.018290814060376803 pbc="T T T" | ||
Cu 0.01749455 -0.00286073 -0.00484565 -0.19061190 -0.01456145 0.04251433 -0.00438217 | ||
Cu -0.02653319 1.80491715 1.80180369 0.13511600 0.00423319 -0.01469846 -0.00510239 | ||
Cu 1.79963371 0.00315403 1.80921051 0.00818829 -0.05888333 -0.06960037 -0.00441341 | ||
Cu 1.79434397 1.79613760 -0.00475733 0.04730761 0.06921159 0.04178450 -0.00439284 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.014445625580108867 free_energy=-0.014445625580108867 pbc="T T T" | ||
Cu 0.00472986 -0.00681426 0.00242439 0.08237017 0.05878299 -0.11269540 -0.00449715 | ||
Cu -0.01700736 1.81253143 1.78965279 0.24383637 -0.08787004 0.14938555 -0.00237017 | ||
Cu 1.80505127 -0.00120228 1.79693018 -0.05672510 0.01724830 0.09417810 -0.00506256 | ||
Cu 1.83371819 1.79902177 0.00472457 -0.26948144 0.01183874 -0.13086824 -0.00251574 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.0176633526467036 free_energy=-0.0176633526467036 pbc="T T T" | ||
Cu -0.00712391 0.00753766 -0.00044503 0.06557173 -0.03798336 0.08665333 -0.00473434 | ||
Cu 0.00451812 1.81845102 1.81032338 -0.02074291 -0.03687740 -0.09653905 -0.00501509 | ||
Cu 1.81850188 0.00861211 1.81978686 -0.11099053 -0.04625615 -0.16681003 -0.00395624 | ||
Cu 1.79454623 1.79711011 -0.01261606 0.06616171 0.12111690 0.17669574 -0.00395768 | ||
4 | ||
Lattice="3.61 0.0 0.0 0.0 3.61 0.0 0.0 0.0 3.61" Properties=species:S:1:pos:R:3:forces:R:3:energies:R:1 energy=-0.018288343723298794 free_energy=-0.018288343723298794 pbc="T T T" | ||
Cu 0.01551339 0.00079186 0.00173977 -0.13521265 -0.09341389 -0.02995679 -0.00426431 | ||
Cu -0.00072337 1.78495671 1.80644678 -0.01536463 0.16563008 -0.00209572 -0.00447119 | ||
Cu 1.78998831 0.00211109 1.79941795 0.17102355 -0.10330832 0.04999955 -0.00401561 | ||
Cu 1.81584529 1.80313711 0.00014661 -0.02044627 0.03109214 -0.01794704 -0.00553723 |
Oops, something went wrong.