Skip to content

Commit

Permalink
Merge branch 'main' into splits
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh authored Sep 27, 2024
2 parents 6b0642a + 9600cef commit 19dedbb
Show file tree
Hide file tree
Showing 59 changed files with 388 additions and 225 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"
cache: pip
cache-dependency-path: pyproject.toml

Expand All @@ -39,7 +39,7 @@ jobs:
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
split: [1, 2, 3]

steps:
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
name: coverage${{ matrix.split }}
file: ./coverage.xml

test-notebooks-and-ase:
# prevent this action from running on forks
if: github.repository == 'materialsproject/atomate2'
Expand All @@ -117,7 +117,7 @@ jobs:
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Check out repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.10"

- name: Install pre-commit
run: pip install pre-commit
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:
exclude: ^(.github/|tests/test_data/abinit/)
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.6.1
rev: v0.6.7
hooks:
- id: ruff
args: [--fix]
Expand All @@ -30,7 +30,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
rev: v1.11.2
hooks:
- id: mypy
files: ^src/
Expand Down
38 changes: 34 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Change log

## v0.0.16

This release brings lots of new workflows and support for all ASE calculators.

### New Features 🎉

* Anharmonicity Quantification workflow by @4kevinbeck5 in https://github.com/materialsproject/atomate2/pull/901
* Workflow for Quasi-harmonic approximation (forcefields and VASP) by @JaGeo in https://github.com/materialsproject/atomate2/pull/903
* Atomate2 OpenMM integration & broader classical MD framework by @orionarcher in https://github.com/materialsproject/atomate2/pull/782
* Frequency Flattening Optimizer by @rohithsrinivaas in https://github.com/materialsproject/atomate2/pull/863
* Including VASP surface adsorption flow by @itsduowang in https://github.com/materialsproject/atomate2/pull/691
* Generalize forcefields for generic ASE calculator support by @esoteric-ephemera in https://github.com/materialsproject/atomate2/pull/940

### Documentation 📖

* Input set tutorial by @JonathanSchmidt1 in https://github.com/materialsproject/atomate2/pull/780

### House-Keeping 🧹

* Remove emmet `==` pin in `pyproject.toml` and update version in `strict` by @Andrew-S-Rosen in https://github.com/materialsproject/atomate2/pull/988

### New Contributors

* @4kevinbeck5 made their first contribution in https://github.com/materialsproject/atomate2/pull/901
* @orionarcher made their first contribution in https://github.com/materialsproject/atomate2/pull/782
* @rohithsrinivaas made their first contribution in https://github.com/materialsproject/atomate2/pull/863
* @itsduowang made their first contribution in https://github.com/materialsproject/atomate2/pull/691

**Full Changelog**: https://github.com/materialsproject/atomate2/compare/v0.0.15...v0.0.16

## v0.0.15

**NOTE**: This version updates the VASP workflows to use input sets defined in pymatgen. Please make sure your pymatgen version is updated accordingly.
Expand Down Expand Up @@ -72,7 +102,7 @@
* `ruff` fixes by @janosh in https://github.com/materialsproject/atomate2/pull/894
* `ruff` fixes by @janosh in https://github.com/materialsproject/atomate2/pull/946

## New Contributors
### New Contributors

* @rul048 made their first contribution in https://github.com/materialsproject/atomate2/pull/775
* @davidwaroquiers made their first contribution in https://github.com/materialsproject/atomate2/pull/183
Expand Down Expand Up @@ -127,7 +157,7 @@
* Update lobsterpy version by @naik-aakash in https://github.com/materialsproject/atomate2/pull/683
* Fix all ruff PT011 (not checking error message when testing exceptions) by @janosh in https://github.com/materialsproject/atomate2/pull/698

## New Contributors
### New Contributors

* @JonathanSchmidt1 made their first contribution in https://github.com/materialsproject/atomate2/pull/648
* @rdguha1995 made their first contribution in https://github.com/materialsproject/atomate2/pull/161
Expand Down Expand Up @@ -235,7 +265,7 @@ The API of `Maker.maker` for all workflows (VASP, CP2K, force fields) have been
* Future type annotations by @janosh in https://github.com/materialsproject/atomate2/pull/580
* Use `numpy.testing.assert_allclose` over assert `np.(all|is)close` by @janosh in https://github.com/materialsproject/atomate2/pull/582

## New Contributors
### New Contributors

* @mattmcdermott made their first contribution in https://github.com/materialsproject/atomate2/pull/506
* @tpurcell90 made their first contribution in https://github.com/materialsproject/atomate2/pull/568
Expand Down Expand Up @@ -353,7 +383,7 @@ reciprocal_density_metal` instead of `reciprocal_density` for metallic systems.
* Simplify: `dict.get(key, None)` -> `dict.get(key)` by @janosh in https://github.com/materialsproject/atomate2/pull/429
* `dict.setdefault` instead of `if key not in dict: dict[key] = ...` by @janosh in https://github.com/materialsproject/atomate2/pull/452

## New Contributors
### New Contributors

* @naik-aakash made their first contribution in https://github.com/materialsproject/atomate2/pull/279
* @matthewkuner made their first contribution in https://github.com/materialsproject/atomate2/pull/322
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![pypi version](https://img.shields.io/pypi/v/atomate2?color=blue)](https://pypi.org/project/atomate2)
![supported python versions](https://img.shields.io/pypi/pyversions/atomate2)
[![Zenodo](https://img.shields.io/badge/DOI-10.5281/zenodo.10677081-blue?logo=Zenodo&logoColor=white)](https://zenodo.org/records/10677081)
[![This project supports Python 3.10+](https://img.shields.io/badge/Python-3.10+-blue.svg?logo=python&logoColor=white)](https://python.org/downloads)

[Documentation][docs] | [PyPI][pypi] | [GitHub][github]

Expand Down Expand Up @@ -85,7 +86,7 @@ atomate2 workflows can be run using the [FireWorks] software. See the

## Installation

Atomate2 is a Python 3.8+ library and can be installed using pip. Full installation
Atomate2 is a Python 3.10+ library and can be installed using pip. Full installation
and configuration instructions are provided in the [installation tutorial][installation].

## Tutorials
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/3.8", None),
"python": ("https://docs.python.org/3.10", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
"networkx": ("https://networkx.org/documentation/stable/", None),
"jobflow": ("https://materialsproject.github.io/jobflow", None),
Expand Down
30 changes: 14 additions & 16 deletions docs/user/codes/openmm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>>> conda activate atomate2

# installing atomate2
>>> pip install git+https://github.com/orionarcher/atomate2.git
>>> pip install git+https://github.com/orionarcher/atomate2

# installing classical_md dependencies
>>> conda install -c conda-forge --file .github/classical_md_requirements.txt
Expand All @@ -18,7 +18,7 @@ you can clone the repository and install from source.

``` bash
# installing atomate2
>>> git clone https://github.com/orionarcher/atomate2.git
>>> git clone https://github.com/orionarcher/atomate2
>>> cd atomate2
>>> git branch openff
>>> git checkout openff
Expand All @@ -33,7 +33,7 @@ you intend to run on GPU, make sure that the tests are passing for CUDA.
>>> python -m openmm.testInstallation
```

# Understanding Atomate2 OpenMM
## Understanding Atomate2 OpenMM

Atomate2 is really just a collection of jobflow workflows relevant to
materials science. In all the workflows, we pass our system of interest
Expand All @@ -55,7 +55,6 @@ The first job we need to create generates the `Interchange` object.
To specify the system of interest, we use give it the SMILES strings,
counts, and names (optional) of the molecules we want to include.


```python
from atomate2.openff.core import generate_interchange

Expand All @@ -73,7 +72,6 @@ out the `create_mol_spec` function in the `atomate2.openff.utils`
module. Under the hood, this is being called on each mol_spec dict.
Meaning the code below is functionally identical to the code above.


```python
from atomate2.openff.utils import create_mol_spec

Expand All @@ -90,7 +88,6 @@ object, which we can pass to the next stage of the simulation.
NOTE: It's actually mandatory to include partial charges
for PF6- here, the built in partial charge method fails.


```python
import numpy as np
from pymatgen.core.structure import Molecule
Expand Down Expand Up @@ -205,13 +202,13 @@ Awesome! At this point, we've run a workflow and could start analyzing
our data. Before we get there though, let's go through some of the
other simulation options available.

# Digging Deeper
## Digging Deeper

Atomate2 OpenMM supports running a variety of workflows with different
configurations. Below we dig in to some of the more advanced options.


### Configuring the Simulation

<details>
<summary>Learn more about the configuration of OpenMM simulations</summary>

Expand All @@ -228,14 +225,13 @@ once and have it apply to all stages of the simulation. The value inheritance
is as follows: 1) any explicitly set value, 2) the value from the previous
maker, 3) the default value (as shown below).


```python
from atomate2.openmm.jobs.base import OPENMM_MAKER_DEFAULTS

print(OPENMM_MAKER_DEFAULTS)
```

```
```py
{
"step_size": 0.001,
"temperature": 298,
Expand Down Expand Up @@ -339,7 +335,6 @@ Rather than use `jobflow.yaml`, you could also create the stores in
Python and pass the stores to the `run_locally` function. This is a bit
more code, so usually the prior method is preferred.


```python
from jobflow import run_locally, JobStore
from maggma.stores import MongoStore, S3Store
Expand Down Expand Up @@ -374,19 +369,18 @@ run_locally(
ensure_success=True,
)
```

</details>

### Running on GPUs

<details>
<summary>Learn to accelerate MD simulations with GPUs</summary>


Running on a GPU is nearly as simple as running on a CPU. The only difference
is that you need to specify the `platform_properties` argument in the
`EnergyMinimizationMaker` with the `DeviceIndex` of the GPU you want to use.


```python
production_maker = OpenMMFlowMaker(
name="test_production",
Expand Down Expand Up @@ -414,7 +408,6 @@ First you'll need to install mpi4py.

Then you can modify and run the following script to distribute the work across the GPUs.


```python
# other imports
Expand Down Expand Up @@ -457,15 +450,16 @@ for i in range(4):
# this script will run four times, each with a different rank, thus distributing the work across the four GPUs.
run_locally(flows[rank], ensure_success=True)
```

</details>

# Analysis with Emmet
## Analysis with Emmet

For now, you'll need to make sure you have a particular emmet branch installed.
Later the builders will be integrated into `main`.

```bash
pip install git+https://github.com/orionarcher/emmet.git@md_builders
pip install git+https://github.com/orionarcher/emmet@md_builders
```

### Analyzing Local Data
Expand Down Expand Up @@ -498,6 +492,7 @@ u = create_universe(
solute = create_solute(u, solute_name="Li", networking_solvents=["PF6"])
```

</details>

### Setting up builders
Expand Down Expand Up @@ -556,6 +551,7 @@ builder.connect()
<summary>Here are some more convenient queries.</summary>

Here are some more convenient queries we could use!

```python
# query jobs from a specific day
april_16 = {"completed_at": {"$regex": "^2024-04-16"}}
Expand All @@ -570,6 +566,7 @@ job_uuids = [
]
my_specific_jobs = {"uuid": {"$in": job_uuids}}
```

</details>

</details>
Expand Down Expand Up @@ -611,6 +608,7 @@ solute = create_solute(
fallback_radius=3,
)
```

</details>

### Automated analysis with builders
Expand Down
4 changes: 2 additions & 2 deletions docs/user/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ atomate2
## Create a conda environment

```{note}
Make sure to create a Python 3.8+ environment as recent versions of atomate2 only
support Python 3.8 and higher.
Make sure to create a Python 3.10+ environment as recent versions of atomate2 only
support Python 3.10 and higher.
```

We highly recommend that you organize your installation of the atomate2 and the other
Expand Down
Loading

0 comments on commit 19dedbb

Please sign in to comment.