Skip to content

Commit

Permalink
Merge branch 'libAtoms:main' into neb_attach
Browse files Browse the repository at this point in the history
  • Loading branch information
jungsdao authored Oct 8, 2024
2 parents d5598cf + 2d600ae commit 8c2c523
Show file tree
Hide file tree
Showing 31 changed files with 1,478 additions and 1,429 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,9 @@ jobs:
cd docs
make html
# event type from https://stackoverflow.com/questions/61886993/in-github-actions-how-to-get-the-type-of-a-trigger-event-as-a-variable
# conditional control ("if:") from https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution
# dependency from https://docs.github.com/en/actions/using-jobs/using-jobs-in-a-workflow

deploy-docs:
if: github.event.action == 'push'
name: Publish documentation
if: startsWith(github.ref, "refs/tags/")
needs: build-docs
runs-on: ubuntu-latest

Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
- name: Install dependencies from pip
run: |
echo "numpy<2" >> $PIP_CONSTRAINT
python3 -m pip install wheel setuptools numpy scipy click matplotlib pyyaml spglib rdkit flake8 pytest pytest-cov requests
python3 -m pip install wheel setuptools numpy scipy click matplotlib pyyaml spglib rdkit==2024.3.3 flake8 pytest pytest-cov requests
- name: Install latest ASE from pypi
run: |
echo PIP_CONSTRAINT $PIP_CONSTRAINT
python3 -m pip install ase
python3 -m pip install ase
echo -n "ASE VERSION "
python3 -c "import ase; print(ase.__file__, ase.__version__)"
Expand Down Expand Up @@ -105,15 +105,27 @@ jobs:
run: |
echo "search for torch version"
set +o pipefail
# echo "torch versions"
# python3 -m pip install torch==
# echo "torch versions to search"
# python3 -m pip install torch== 2>&1 | fgrep 'from versions' |
# sed -e 's/.*from versions: //' -e 's/)//' -e 's/,[ ]*/\n/g' | tac
# search for available torch version with +cpu support
for torch_version_test in $( python3 -m pip install torch== 2>&1 | fgrep 'from versions' |
sed -e 's/.*from versions: //' -e 's/)//' -e 's/,[ ]*/\n/g' | tac ); do
# for torch_version_test in $( python3 -m pip install torch== 2>&1 | fgrep 'from versions' |
# sed -e 's/.*from versions: //' -e 's/)//' -e 's/,[ ]*/\n/g' | tac ); do
wget https://pypi.org/pypi/torch/json -O torch_versions
for torch_version_test in $( python3 -c "import json; print(' '.join(json.load(open('torch_versions'))['releases'].keys()))" | sed 's/ /\n/g' | tac ); do
echo "check torch_version_test $torch_version_test"
set +e
python3 -m pip install --dry-run torch==${torch_version_test}+cpu \
-f https://download.pytorch.org/whl/torch_stable.html > /dev/null 2>&1
-f https://download.pytorch.org/whl/torch_stable.html 2>&1
search_stat=$?
echo "got search_stat $search_stat"
set -e
if [ $search_stat == 0 ]; then
echo "got valid +cpu version, exiting"
torch_version=${torch_version_test}
break
fi
Expand Down Expand Up @@ -269,7 +281,7 @@ jobs:
mpirun -n 2 pytest --cov=wfl --cov-report term --cov-config=tests/.coveragerc --cov-report term-missing --cov-report term:skip-covered --with-mpi -k mpi --cov-append
- name: 'Upload Coverage Data'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: env.coverage-on-version == matrix.python-version
with:
name: coverage-html-${{ matrix.python-version }}
Expand Down
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,23 @@ For examples and more information see [documentation](https://libatoms.github.io

`wfl` and its dependencies may be installed via `pip install wfl`.

NOTE: (as of 14 June 2024) `wfl` is only tested against the latest ASE pip release, currently v3.23.0.
For the time being, v3.22.1 is the minimum version listed as a (pip) prerequisite of `wfl`, because
it at least mostly works, but it may not be fully compatible and is not actively tested.

# Recent changes

v0.2.3:
v0.3.1:

- Add wfl.generate.neb, with required improved support for passing ConfigSet.groups() to
autoaparallelized functions
- additional updates to file-based calculators for ASE v3.23.
- fixes to parity plots

- Improved handling of old and new style ase.calculators.espresso.Espresso initialization
v0.3.0:

v0.2.2:
- Update the file-based calculators (Orca, FHI-Aims, Vasp, Quantum Espresso, Castep) to work
with with ASE v3.23. This update breaks backwards-compatibility. For compatibility with with
the ASE v3.22 see use wfl v0.2.8 or earlier.

- Improve checking of DFT calculator convergence
v0.2.8:

v0.2.1:
- Latest version compatible with ASE v3.22.x. To install, use `pip install wfl==0.2.8`.

- Fix group iterator
For older changes see [documentation](https://libatoms.github.io/workflow).

v0.2.0:

- Change all wfl operations to use explicit random number generator [pull 285](https://github.com/libAtoms/workflow/pull/285), to improve reproducibility of scripts and reduce the chances that on script rerun, cached jobs will not be recognized due to uncontrolled change in random seed (as in [issue 283](https://github.com/libAtoms/workflow/issues/283) and [issue 284](https://github.com/libAtoms/workflow/issues/284)). Note that this change breaks backward compatibility because many functions now _require_ an `rng` argument, for example
```python
rng = np.random.default_rng(1)
md_configs = md.md(..., rng=rng, ...)
```

v0.1.0:

- make it possible to fire off several remote autoparallelized ops without waiting for their jobs to finish
- multi-pass calculation in `Vasp`, to allow for things like GGA followed by HSE
- MACE fitting, including remote jobs
- various bug fixes
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#
import os
import sys
from wfl import __version__

sys.path.insert(0, os.path.abspath('../../wfl'))


Expand All @@ -21,6 +23,8 @@
#copyright = '2021, N. Bernstein, T. K. Stenczel, E. Gelzinyte'
author = 'N. Bernstein, T. K. Stenczel, E. Gelzinyte'

release = __version__


# -- General configuration ---------------------------------------------------

Expand Down
69 changes: 61 additions & 8 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ Quick start that installs all of the mandatory dependencies:
python3 -m pip install wfl
.. note::

(as of 14 June 2024) `wfl` is only tested against the latest
ASE pip release, currently v3.23.0. For the time being, v3.22.1 is
the mininum version listed as a (pip) prerequisite of `wfl`, because
it at least mostly works, but it may not be fully compatible and is
not actively tested.

***************************************
Repository
Expand All @@ -39,6 +31,67 @@ Repository
Please find the code, raise issues and cotribute at https://github.com/libAtoms/workflow.


***************************************
Development
***************************************

To install all dependencies needed for running unit tests:

.. code-block:: sh
python3 -m pip install /path/to/workflow[test]
Some of the `wfl` functions rely on the `quippy-ase` package, which currently (2 September 2024) supports no higher Python versions than v3.9.

The file-based calculator tests need ASE calculator configiguration file to be present; `see the ASE documentation <https://wiki.fysik.dtu.dk/ase/ase/calculators/calculators.html#calculator-configuration>`.


***************************************
Recent Changes
***************************************

v0.3.0:

- Update the file-based calculators (Orca, FHI-Aims, Vasp, Quantum Espresso, Castep) to work
with with ASE v3.23. This update breaks backwards-compatibility. For compatibility with with
the ASE v3.22 see use wfl v0.2.7 or earlier.

v0.2.7:

- Latest version compatible with ASE v3.22.x. To install, use `pip install wfl==0.2.7`.

v0.2.3:

- Add wfl.generate.neb, with required improved support for passing ConfigSet.groups() to
autoaparallelized functions

- Improved handling of old and new style ase.calculators.espresso.Espresso initialization

v0.2.2:

- Improve checking of DFT calculator convergence

v0.2.1:

- Fix group iterator

v0.2.0:

- Change all wfl operations to use explicit random number generator [pull 285](https://github.com/libAtoms/workflow/pull/285), to improve reproducibility of scripts and reduce the chances that on script rerun, cached jobs will not be recognized due to uncontrolled change in random seed (as in [issue 283](https://github.com/libAtoms/workflow/issues/283) and [issue 284](https://github.com/libAtoms/workflow/issues/284)). Note that this change breaks backward compatibility because many functions now _require_ an `rng` argument, for example
```python
rng = np.random.default_rng(1)
md_configs = md.md(..., rng=rng, ...)
```

v0.1.0:

- make it possible to fire off several remote autoparallelized ops without waiting for their jobs to finish
- multi-pass calculation in `Vasp`, to allow for things like GGA followed by HSE
- MACE fitting, including remote jobs
- various bug fixes


***************************************
Contents
***************************************
Expand Down
25 changes: 23 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[project]

name = "wfl"
version = "0.3.0"
requires-python = ">=3.9"
dependencies = [ "click>=7.0", "numpy<2", "ase>=3.22.1", "pyyaml", "spglib",
"docstring_parser", "expyre-wfl", "universalSOAP" ]
"docstring_parser", "expyre-wfl", "universalSOAP", "pandas" ]
readme = "README.md"
license = { file = "LICENSE" }
dynamic = ["version"]

[project.scripts]
wfl = "wfl.cli.cli:cli"
Expand All @@ -16,3 +16,24 @@ license = { file = "LICENSE" }

[tool.setuptools.packages.find]
exclude = [ "test*" ]

[tool.setuptools.dynamic]
version = {attr = "wfl.__version__"}

[project.optional-dependencies]
test = [
"pytest",
"mace-torch",
"quippy-ase",
"requests",
"rdkit==2024.3.3",
]
doc = [
"sphinx",
"sphinx_click",
"nbsphinx",
"myst_parser",
"sphinx_book_theme",
]
all = ["wfl[test,doc]"]

6 changes: 0 additions & 6 deletions tests/assets/orca.ase

This file was deleted.

22 changes: 0 additions & 22 deletions tests/assets/orca.engrad

This file was deleted.

21 changes: 0 additions & 21 deletions tests/assets/orca.inp

This file was deleted.

Loading

0 comments on commit 8c2c523

Please sign in to comment.