Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into get_geometry_edits
Browse files Browse the repository at this point in the history
  • Loading branch information
ralf-meyer committed Feb 17, 2024
2 parents ec69c0e + e5a4d04 commit 84d56c0
Show file tree
Hide file tree
Showing 517 changed files with 74,363 additions and 6,582 deletions.
3 changes: 0 additions & 3 deletions setup.cfg → .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[aliases]
test=pytest

[flake8]
max-complexity = 15
max-line-length = 127
73 changes: 73 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
# This follows https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

on:
push:
tags:
- v*

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/molSimplify
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/molSimplify
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
41 changes: 28 additions & 13 deletions .github/workflows/CI.yaml → .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI
name: Pytest

on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# Existing codes likely still have "master" as the primary branch
# Both are tracked here to keep legacy and new codes working
push:
branches:
- "master"
Expand All @@ -12,15 +9,10 @@ on:
branches:
- "master"
- "main"
# schedule:
# # Nightly tests run on master by default:
# # Scheduled workflows run on the latest commit on the default or base branch.
# # (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
# - cron: "0 0 * * *"

jobs:
CI:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
pytest_conda:
name: Pytest (conda) on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -82,7 +74,7 @@ jobs:
- name: Run doctest
# For now still excluding several subfolders and files
run: |
pytest --doctest-modules --ignore=molSimplify/job_manager --ignore=molSimplify/Informatics/MOF --ignore=molSimplify/Informatics/protein --ignore=molSimplify/Scripts/in_b3lyp_usetc.py --ignore=molSimplify/Informatics/jupyter_vis.py --ignore=molSimplify/Informatics/macrocycle_synthesis.py --ignore=molSimplify/Informatics/organic_fingerprints.py molSimplify
pytest --doctest-modules --ignore=molSimplify/Informatics/MOF --ignore=molSimplify/Informatics/protein --ignore=molSimplify/Scripts/in_b3lyp_usetc.py --ignore=molSimplify/Informatics/jupyter_vis.py --ignore=molSimplify/Informatics/macrocycle_synthesis.py --ignore=molSimplify/Informatics/organic_fingerprints.py molSimplify
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v3
Expand All @@ -101,9 +93,32 @@ jobs:
#uses: ravsamhq/notify-slack-action@v1
uses: 8398a7/action-slack@v3
with:
job_name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
job_name: Pytest (conda) on ${{ matrix.os }}, Python ${{ matrix.python-version }}
fields: message,commit,author,workflow,job,took
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK}}
#MATRIX_CONTEXT: ${{ toJson(matrix) }} # required

pytest_pip:
name: Pytest (pip) on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install package
run: |
pip install -e .[dev]
- name: Run pytest
run: |
pytest -v
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: '6.1.0'
rev: '7.0.0'
hooks:
- id: flake8
args: ['--select=E9,F63,F7,F82', '--exclude=fragment_classes.py,frag_functionalizer.py,bridge_functionalizer.py']
9 changes: 5 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
version: 2

conda:
environment: docs/environment.yaml
build:
os: ubuntu-22.04
tools:
python: "3.7"

python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- rtd
- docs

sphinx:
builder: html
Expand Down
15 changes: 0 additions & 15 deletions MANIFEST.in

This file was deleted.

32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
![](./molSimplify/icons/logo.png)
[![CI](https://github.com/hjkgrp/molSimplify/actions/workflows/CI.yaml/badge.svg)](https://github.com/hjkgrp/molSimplify/actions/workflows/CI.yaml)
[![Pytest](https://github.com/hjkgrp/molSimplify/actions/workflows/pytest.yaml/badge.svg)](https://github.com/hjkgrp/molSimplify/actions/workflows/pytest.yaml)
[![Documentation Status](https://readthedocs.org/projects/molsimplify/badge/?version=latest)](http://molsimplify.readthedocs.io/?badge=latest)
[![Linter](https://github.com/hjkgrp/molSimplify/actions/workflows/python-linter.yaml/badge.svg)](https://github.com/hjkgrp/molSimplify/actions/workflows/python-linter.yaml)

molSimplify is an open source toolkit for the automated, first-principles screening and discovery of new inorganic molecules and intermolecular complexes. molSimplify is developed by the [Kulik Group](http://hjkgrp.mit.edu) in the [Department of Chemical Engineering](http://web.mit.edu/cheme/) at [MIT](http://web.mit.edu). The software can generate a variety of coordination complexes of metals coordinated by ligands in a mono- or multi-dentate fashion. The code can build a coordination complex directly from a central atom or functionalize a more complex structure (e.g. a porphyrin or other metal-ligand complex) by including additional ligands or replacing existing ones. molSimplify also generates inter-molecular complexes for evaluating binding interactions and generating candidate reactants and intermediates for catalyst reaction mechanism screening. molSimplify also ships neural network models that can predict the [metal-ligand bond lengths](https://pubs.rsc.org/en/content/articlehtml/2017/sc/c7sc01247k), [spin-splitting energy](https://pubs.acs.org/doi/abs/10.1021/acs.jpca.7b08750), [frontier orbital energies](https://pubs.acs.org/doi/abs/10.1021/acs.iecr.8b04015), [spin-state dependent reaction energies](https://pubs.acs.org/doi/abs/10.1021/acscatal.9b02165), and [simulation outcomes](https://pubs.acs.org/doi/abs/10.1021/acs.jctc.9b00057) for octahedral transition metal complexes. See the Tutorials at the [Kulik group webpage](http://hjkgrp.mit.edu/molSimplify-tutorials) for a more complete list of jobs molSimplify can do.

## Installation

### via pip, from PyPI

Starting with version `1.7.4` molSimplify is available on [PyPI](https://pypi.org) enabled by the [openbabel-wheel](https://pypi.org/project/openbabel-wheel/) project.

```bash
pip install molSimplify
```

### via pip, from GitHub

To obtain the latest development version or if you plan to modify the code we recommend installation from GitHub.

1. Clone molSimplify source from github and change into the directory.

```bash
git clone https://github.com/hjkgrp/molSimplify.git
cd molSimplify
```
2. Locally install the molSimplify package using pip.
```bash
pip install -e .[dev]
```
3. To test your installation, you can run the command below at the root directory of molSimplify. You are good to go if all the tests are passed! Note, some test will be skipped because none of the optional dependencies are installed this way.
```bash
pytest
```

### via conda, from GitHub
We currently recommend installation via the [Conda](https://conda.io/docs/) package management system.

The easiest way of installing molSimplify including optional dependencies such as [xtb](https://github.com/grimme-lab/xtb) is via the [Conda](https://conda.io/docs/) package management system.
1. Prerequisite: have [Anaconda or miniconda](https://www.anaconda.com/distribution/) installed on your system. **For M1 Macs, please use [Miniforge](https://github.com/conda-forge/miniforge) for Mac OSX arm64.** (We do not recommend simultaneously installing Anaconda and Miniforge - only install Miniforge.)

2. Clone molSimplify source from github and change into the directory.
Expand Down
27 changes: 0 additions & 27 deletions devtools/conda-envs/README.md

This file was deleted.

1 change: 0 additions & 1 deletion devtools/conda-envs/install_tensorflow_m1.sh

This file was deleted.

2 changes: 2 additions & 0 deletions devtools/conda-envs/mols.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ dependencies:
- pandas
- scipy
- libffi
- importlib_resources
- pip
- pip:
- pytest
- pytest-resource-path

# Optional
# GUI / plotting
Expand Down
Loading

0 comments on commit 84d56c0

Please sign in to comment.