.. toctree:: :hidden: :caption: stko :maxdepth: 1 Video Tutorials Molecular Calculators Optimizers Cage optimisation workflow Host-guest optimisation Cage analysis Helpers .. toctree:: :hidden: :caption: Modules :maxdepth: 1 Modules Welcome to stko's documentation! ================================ | GitHub: https://github.com/JelfsMaterialsGroup/stko | Discord: https://discord.gg/zbCUzuxe2B .. tip:: ⭐ Star us on `GitHub `_! ⭐ .. figure:: _static/logo.png Overview ======== `stko `_ is a Python library for performing optimizations and calculations on complex molecules built using `stk `_. In the case of optimizations, a clone of :class:`stk.Molecule` is returned. For calculators, a ``Results`` class are used to calculate and extract properties of an :class:`stk.Molecule`. Installation ============ :mod:`.stko` can be installed directly with pip: .. code-block:: bash pip install stko Some optional dependencies are only available through conda: .. code-block:: bash # for xtb mamba install xtb # for openbabel, assuming you are not using Python >= 3.13! mamba install openbabel With OpenMM ----------- To get :mod:`.stko` and use ``OpenMM``, we had some installation issues. The current solution is to first, in a new environment, install the ``OpenMM`` requirements: .. code-block:: bash mamba install -c conda-forge openff-toolkit Then install :mod:`.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[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 `_), then install ``stko``: .. code-block:: bash mamba install -c conda-forge espaloma_charge openff-toolkit pip install stko[cuda] Developer Setup --------------- #. Install `just`_. #. In a new virtual environment run:: $ just dev #. Run code checks:: $ just check .. _`just`: https://github.com/casey/just Dependencies ------------ The software packages we offer optimizers for are also depencies depending on the desired functions used. These are: * `MacroModel `_ * `GULP `_ * `XTB `_ * `OpenBabel `_ * `OpenMM `_ * `OpenFF `_ Examples -------- For every class (including ``Calculator``, ``Optimizer``), there are small examples of usage on the associated docs page. We have a page dedicated to analysing `cage structures `_. There are also some examples for ``stko`` usage available `here `_. These cover: * `Basic examples `_ * `Molecule alignment `_ * `Using calculators `_ * `Cage analysis `_ * `Using Gulp `_ * `Splitting molecules `_ * `Interfacing with MDAnalysis `_ * `Interfacing with OpenBabel `_ * `Interfacing with Orca `_ * `Calculating molecular shape with RDKit `_ * `Extracting stk topology graphs from molecules `_ * `Analysing torsions `_ * `Converting molecules to their Zmatrix `_ How To Contribute ----------------- If you have any questions or find problems with the code, please submit an issue. If you wish to add your own code to this repository, please send us a Pull Request. Please maintain the testing and style that is used throughout ```stko``. How To Cite ----------- If you use ``stko`` please cite https://github.com/JelfsMaterialsGroup/stko