Skip to content

Commit

Permalink
Merge pull request #15 from andrewtarzia/dec_develop
Browse files Browse the repository at this point in the history
Some development and improvements to docs.
  • Loading branch information
andrewtarzia authored Dec 14, 2024
2 parents 50a8ae3 + b18ce03 commit d8edb5d
Show file tree
Hide file tree
Showing 45 changed files with 985 additions and 209 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,14 @@ jobs:
python-version: "3.11"
cache: "pip"
- run: "pip install -e '.[dev]'"
- run: pytest
- run: pytest
doctest:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- run: pip install -e '.[dev]'
- run: make -C docs doctest
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ src/bbprep.egg-info

# Some folders get created by tests.
docs/build

.ruff_cache
44 changes: 0 additions & 44 deletions README.md

This file was deleted.

59 changes: 59 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
:maintainers:
`andrewtarzia <https://github.com/andrewtarzia/>`_
:documentation: https://bbprepared.readthedocs.io/en/latest/


============
Introduction
============

:mod:`bbprepared` or ``bbprep`` is a toolkit aimed at simplifying the
preparation of your building blocks for
`stk <https://stk.readthedocs.io/en/stable/>`_ construction and analysis.


Installation
============

To get :mod:`.bbprepared`, you can install it with pip:

.. code-block:: bash
pip install bbprepared
Developer Setup
---------------

To develop with :mod:`bbprepared`, you can clone the repo and use
`just <https://github.com/casey/just>`_ to setup the dev environment:

.. code-block:: bash
just dev
Examples
========

* See `Recipes` for usage and the code tests include additional examples.
* See `gists <https://gist.github.com/andrewtarzia>`_ for usage.

How To Cite
===========

If you use ``bbprepared`` please cite

https://github.com/andrewtarzia/bbprepared


Acknowledgements
================

Funded by the European Union - Next Generation EU, Mission 4 Component 1
CUP E13C22002930006 and the ERC under projects DYNAPOL.

This work is a mixture of codes developed throughout my postdoc in the
`Jelfs Group <http://www.jelfs-group.org/>`_, and the
`Pavan Group <https://www.gmpavanlab.com/>`_, and during my time as a developer
of `stk <https://stk.readthedocs.io/en/stable/>`_ and
`stko <https://github.com/JelfsMaterialsGroup/stko>`_ with Lukas Turcani.
4 changes: 2 additions & 2 deletions docs/source/_autosummary/bbprep.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
:template: module.rst
:recursive:

bbprep.generators
bbprep.selectors
generators
selectors

Empty file.
96 changes: 0 additions & 96 deletions docs/source/bbprep.rst

This file was deleted.

10 changes: 10 additions & 0 deletions docs/source/building_blocks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
New building blocks
===================

New BuildingBlock classes to replace :class:`stk.BuildingBlock`. They may
inherit or contain the ``stk`` class, depending on design considerations.

.. toctree::
:maxdepth: 1

PanelBuildingBlock <_autosummary/bbprep.PanelBuildingBlock>
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx_copybutton",
"moldoc",
]

autosummary_imported_members = True
Expand Down
24 changes: 24 additions & 0 deletions docs/source/containers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Containers
==========

:class:`Ensemble` contain :class:`Conformer`, which contain
:class:`stk.BuildingBlock`.

.. toctree::
:maxdepth: 1

Conformer <_autosummary/bbprep.Conformer>
Ensemble <_autosummary/bbprep.Ensemble>

Example:
--------

.. testcode:: containers-test

import stk
import bbprep

bb = stk.BuildingBlock(smiles="C1=CC=C(C=C1)C2=CC=CC=C2")
generator = bbprep.generators.ETKDG(num_confs=30)
ensemble = generator.generate_conformers(bb)
conformers = list(ensemble.yield_conformers())
Loading

0 comments on commit d8edb5d

Please sign in to comment.