Skip to content

Commit

Permalink
Merge pull request #62 from mtzgroup/feature-crest-terachemopt-new-te…
Browse files Browse the repository at this point in the history
…rachem-binary
  • Loading branch information
coltonbh authored Sep 13, 2024
2 parents 2b70334 + c336e74 commit 3c36df1
Show file tree
Hide file tree
Showing 21 changed files with 805 additions and 781 deletions.
34 changes: 3 additions & 31 deletions .github/workflows/basic-code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"
- name: Install ruff
run: pip install ruff
- name: ruff
Expand All @@ -26,50 +26,22 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"
- name: Install poetry
run: pip install poetry
- name: Install repo
run: poetry install --no-interaction --no-ansi
- name: mypy
run: mypy .

black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install black
run: pip install black
- name: Check code formatting with black
run: black --check .

isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install poetry
run: pip install poetry
- name: Install repo
run: poetry install --no-interaction --no-ansi
- name: Check import formatting with isort
run: isort --check-only --diff .

detect-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"
- name: Install detect secrets
run: pip install detect-secrets
- name: Look for secrets
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Install poetry
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/setup-python@v4
name: Set up Python
with:
python-version: "3.8"
python-version: "3.9"
- name: Install poetry
run: pip install poetry
- name: Install repo
Expand Down
12 changes: 2 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,10 @@ repos:
exclude: poetry.lock
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: "v0.0.278"
rev: "v0.5.7"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
hooks:
Expand All @@ -40,7 +32,7 @@ repos:
types-paramiko,
]
- repo: https://github.com/crate-ci/typos
rev: v1.16.10
rev: v1.24.5
hooks:
- id: typos
- repo: local
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [unreleased]

### Changed

- 🚨 Bumped minimum python version from 3.8 -> 3.9.
- Updated all conda dependencies in `env.lock`.
- Removed Intel's `openmp` from `env.yaml` since they seem to have removed their channel. Replaced it with `llvm-openmp`.
- Updated to `qcelemental 0.28.0` as this is required for `psi4 1.9`.
- Upgraded all python package dependencies.
- Dropped `black` and `isort` in favor of `ruff`.
- Updated typing syntax to python 3.9.
- Updated base image from `mambaorg/micromamba:1.4-jammy` -> `mambaorg/micromamba:1.5-jammy`.

### Added

- Support for CREST conformer searches (interface support via new `qcop`. Binary via conda).

## [0.9.0] - 2024-07-19

### Changed
Expand Down
6 changes: 3 additions & 3 deletions bigchem/algos.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Top level functions for parallelized BigChem algorithms"""

from typing import List, Union
from typing import Union

from qcio import (
CalcType,
Expand Down Expand Up @@ -83,8 +83,8 @@ def parallel_frequency_analysis(
def multistep_opt(
structure: Structure,
calctype: CalcType,
programs: List[str],
program_args: List[Union[ProgramArgs, ProgramArgsSub]],
programs: list[str],
program_args: list[Union[ProgramArgs, ProgramArgsSub]],
**kwargs,
) -> Signature:
"""Use multiple steps to sequentially optimize a structure
Expand Down
2 changes: 2 additions & 0 deletions bigchem/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Settings and Configuration for workers. Read more: https://pydantic-docs.helpmanual.io/usage/settings/"""

from __future__ import annotations

from pathlib import Path
from typing import Optional

Expand Down
7 changes: 4 additions & 3 deletions bigchem/tasks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from itertools import zip_longest
from typing import List, Union
from typing import Union

import numpy as np
from qcio import (
Expand All @@ -15,6 +15,7 @@
SinglePointResults,
StructuredInputs,
)

from qcop import compute as qcop_compute

from .app import bigchem
Expand Down Expand Up @@ -85,7 +86,7 @@ def output_to_input(

@bigchem.task
def assemble_hessian(
gradients: List[ProgramOutput[ProgramInput, SinglePointResults]], dh: float
gradients: list[ProgramOutput[ProgramInput, SinglePointResults]], dh: float
) -> ProgramOutput[ProgramInput, SinglePointResults]:
"""Assemble hessian from an array of gradient computations
Expand Down Expand Up @@ -178,7 +179,7 @@ def add(x, y):


@bigchem.task
def task_sum(values: List[Union[float, int]], extra: int = 0) -> Union[float, int]:
def task_sum(values: list[Union[float, int]], extra: int = 0) -> Union[float, int]:
"""Sum all the values in a list
NOTE: Used for design testing as a summation at the end of add (a chord)
Expand Down
3 changes: 1 addition & 2 deletions bigchem/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Helper functions not for end users"""

from typing import List

import numpy as np
from qcio import CalcType, ProgramInput
Expand All @@ -10,7 +9,7 @@

def _gradient_inputs(
prog_input: ProgramInput, dh: float = settings.bigchem_default_hessian_dh
) -> List[ProgramInput]:
) -> list[ProgramInput]:
"""Create ProgramInput gradient calculations for a numerical hessian
Params:
Expand Down
Loading

0 comments on commit 3c36df1

Please sign in to comment.