Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7ce8673
Unpin rdkit.
andrewtarzia Oct 14, 2025
5de1f6c
Add logo.
andrewtarzia Dec 6, 2025
203642e
Modify github actions.
andrewtarzia Dec 6, 2025
ff9ca11
Update example output.
andrewtarzia Dec 6, 2025
8396293
Update example output.
andrewtarzia Dec 6, 2025
c30dee3
Change charge method.
andrewtarzia Dec 6, 2025
a43fc6a
Update example output.
andrewtarzia Dec 6, 2025
7a2360b
Change charge method.
andrewtarzia Dec 6, 2025
154ef27
Update example output.
andrewtarzia Dec 6, 2025
84af469
Update example output.
andrewtarzia Dec 6, 2025
2509e9e
Update example output.
andrewtarzia Dec 6, 2025
36fc20f
Update install.
andrewtarzia Dec 6, 2025
7fc2ee8
Update dependancies.
andrewtarzia Dec 6, 2025
065a9af
Make output floats.
andrewtarzia Dec 6, 2025
d3bd2f6
Change charge method.
andrewtarzia Dec 6, 2025
acdad3a
Add openbabel warning.
andrewtarzia Dec 6, 2025
51a981f
Handle no espaloma.
andrewtarzia Dec 6, 2025
9f1591f
Make plane accessible.
andrewtarzia Dec 6, 2025
0e95070
Make output floats.
andrewtarzia Dec 6, 2025
6bdf89d
Handle change in rdkit api.
andrewtarzia Dec 6, 2025
1a29e26
Remove hardcoded test outputs.
andrewtarzia Dec 6, 2025
dfe52b0
Remove hardcoded test outputs.
andrewtarzia Dec 6, 2025
4f596af
Update test outputs.
andrewtarzia Dec 6, 2025
d5c4de1
Update test outputs.
andrewtarzia Dec 6, 2025
02b785b
Remove hardcoded test outputs.
andrewtarzia Dec 6, 2025
7e22425
Update installation flags and dependancies.
andrewtarzia Dec 7, 2025
fbb4c83
Bump python version in tests.
andrewtarzia Dec 7, 2025
cf7c9b0
Update installation instructions.
andrewtarzia Dec 7, 2025
2e989df
Add warnings, update doctests, remove openbabel doctests.
andrewtarzia Dec 7, 2025
f277c42
Update readme.
andrewtarzia Dec 7, 2025
136ad91
Update readme.
andrewtarzia Dec 7, 2025
ce4397e
Test workflow installation ordering.
andrewtarzia Dec 7, 2025
be644b5
Remove polymer test due to multiple steps of deviation possible.
andrewtarzia Dec 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.13"
cache: "pip"
- run: "pip install '.[dev]'"
- run: ruff check .
Expand All @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.13"
cache: "pip"
- run: "pip install -e '.[dev]'"
- run: mypy src examples
Expand All @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.13"
cache: "pip"
- run: "pip install -e '.[dev]'"
- run: ruff format --check .
Expand All @@ -52,17 +52,16 @@ jobs:

with:
miniforge-version: latest
python-version: 3.11
python-version: 3.13
activate-environment: pytest

- name: Build environment
run: |
conda activate pytest
conda install -c conda-forge pytorch==2.3.1 torchdata==0.7.1 openff-toolkit openmm openmmtools dgl rdkit==2024.3.4 espaloma_charge
conda install -c conda-forge mdanalysis openbabel
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install -e '.[dev]'
conda install -c conda-forge openff-toolkit
- run: pytest

example-tests:
Expand All @@ -77,17 +76,16 @@ jobs:

with:
miniforge-version: latest
python-version: 3.11
python-version: 3.13
activate-environment: pytest

- name: Build environment
run: |
conda activate pytest
conda install -c conda-forge pytorch==2.3.1 torchdata==0.7.1 openff-toolkit openmm openmmtools dgl rdkit==2024.3.4 espaloma_charge
conda install -c conda-forge mdanalysis openbabel
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install -e '.[dev]'
conda install -c conda-forge openff-toolkit
- name: Run script
run: python examples/testable_example.py

Expand All @@ -103,15 +101,14 @@ jobs:

with:
miniforge-version: latest
python-version: 3.11
python-version: 3.13
activate-environment: pytest

- name: Build environment
run: |
conda activate pytest
conda install -c conda-forge pytorch==2.3.1 torchdata==0.7.1 openff-toolkit openmm openmmtools dgl rdkit==2024.3.4 espaloma_charge
conda install -c conda-forge mdanalysis openbabel
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install -e '.[dev]'
conda install -c conda-forge openff-toolkit
- run: make -C docs doctest
42 changes: 25 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@

.. figure:: docs/source/_static/stko.png

.. image:: https://readthedocs.org/projects/stko-docs/badge/?version=latest
:target: https://stko-docs.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

Overview
========

``stko`` is a Python library which allows for the optimisation and
property calculation of molecules constructed using the library
``stk`` https://github.com/lukasturcani/stk. There is a Discord server
`stko <https://github.com/JelfsMaterialsGroup/stko>`_ is a Python library for
performing optimizations and calculations on complex molecules built using
`stk <https://github.com/lukasturcani/stk>`_. In the case of
optimizations, a clone of ``stk.Molecule`` is returned. For
calculators, a ``Results`` class are used to calculate and extract
properties of an ``stk.Molecule``. There is a Discord server
for ``stk``, which can be joined through https://discord.gg/zbCUzuxe2B.


Expand All @@ -34,10 +33,9 @@ Some optional dependencies are only available through conda:

# for xtb
mamba install xtb
# for openbabel
# for openbabel, assuming you are not using Python >= 3.13!
mamba install openbabel
# for mdanalysis
mamba install mdanalysis


With OpenMM
-----------
Expand All @@ -48,16 +46,26 @@ requirements:

.. code-block:: bash

# for OpenMM and espaloma charge
# note the temporary issue with rdkit versions and conda will overwrite pip
# installed software
mamba install -c conda-forge pytorch==2.3.1 torchdata==0.7.1 openff-toolkit openmm openmmtools dgl rdkit==2024.3.4 espaloma_charge
mamba install -c conda-forge openff-toolkit

Then install ``stko`` with pip:
Then install ``stko`` with pip, but with the cuda variant to take advantage
of GPU speed up (note that this is a heavy installation!).

.. code-block:: bash

pip install stko
pip install stko[cuda]

We also removed the default installation of ``espaloma_charge`` that provides
the ML-based ``espaloma-am1bcc`` partial charges method. If users want this
package, create a new environment and install their dependancies (if this
fails, please check their
`instructions <https://github.com/choderalab/espaloma-charge>`_), then install
``stko``:

.. code-block:: bash

mamba install -c conda-forge espaloma_charge openff-toolkit
pip install stko[cuda]


Developer Setup
Expand Down Expand Up @@ -86,7 +94,7 @@ and maintain examples in the doc strings of ``Calculator`` and
``Optimizer`` classes.

``examples/basic_examples.py`` highlights basic optimisation with
``rdkit``, ``openbabel`` and ``xtb`` (if you have ``xtb`` available).
``rdkit``, and ``xtb`` (if you have ``xtb`` available).


How To Contribute
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
19 changes: 6 additions & 13 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
channels:
- conda-forge
- defaults
- conda-forge
- defaults
dependencies:
- openff-toolkit
- openmm
- openmmtools
- dgl
- python=3.11
- pip
- rdkit==2024.3.4
- espaloma_charge
- mdanalysis
- openbabel

- openff-toolkit
- python=3.13
- pip
- rdkit
Binary file added docs/source/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/new_stko_logo_dec2025.pdf
Binary file not shown.
Loading
Loading