Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b6d1889
some docs update
PythonFZ Mar 27, 2025
17bae54
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 27, 2025
f03a593
Merge branch 'main' into docs-uv
PythonFZ Mar 27, 2025
93f46ea
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 27, 2025
90cfaf5
use cp2k-output tools from source due to build issues with regex
PythonFZ Apr 14, 2025
05c1e3c
Merge remote-tracking branch 'origin/cp2k-output-from-src' into docs-uv
PythonFZ Apr 16, 2025
ef53186
update ASEGeomOpt docs
PythonFZ Apr 16, 2025
0228301
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 16, 2025
0d1cca8
add example
PythonFZ Apr 16, 2025
5db4499
Merge branch 'docs-uv' of https://github.com/zincware/IPSuite into do…
PythonFZ Apr 16, 2025
6df3b4b
update cp2k docs
PythonFZ Apr 16, 2025
a5d379b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 16, 2025
198ce8d
fix docutils complaints
PythonFZ Apr 16, 2025
3e5444e
Merge branch 'docs-uv' of https://github.com/zincware/IPSuite into do…
PythonFZ Apr 16, 2025
bcacdda
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 16, 2025
a63ebe2
Merge branch 'main' into docs-uv
PythonFZ May 9, 2025
63e3784
update docs a bit
PythonFZ May 9, 2025
7307c78
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 9, 2025
72872e6
Merge branch 'main' into docs-uv
PythonFZ Jun 6, 2025
3f45e22
rename `.atoms` to `.frames`
PythonFZ Jun 6, 2025
1865f60
doc updates
PythonFZ Jun 6, 2025
94eeab3
skip GAP testing
PythonFZ Jun 7, 2025
8418515
shorten line length
PythonFZ Jun 7, 2025
ba5abb0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 7, 2025
c0ee33a
pre-commit fix
PythonFZ Jun 7, 2025
36a9e7f
Merge branch 'docs-uv' of https://github.com/zincware/IPSuite into do…
PythonFZ Jun 7, 2025
5b77cbd
disable and move GAP tests
PythonFZ Jun 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
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ submodules:

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-lts-latest
tools:
python: "3.11"
jobs:
post_install:
# see https://github.com/astral-sh/uv/issues/10074
- pip install uv
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --all-extras --link-mode=copy --group=docs
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --link-mode=copy --group=docs

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
59 changes: 59 additions & 0 deletions docs/source/_examples/01_relaxation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Geometry Relaxation
===================

In this example we will setup a simulation box and relax the structure using an :term:`MLIP`.

.. tip::

Setup a new project in an empty directory by calling

.. code::

git init
dvc init
touch main.py


Add the following to your main.py file:

.. code::

import ipsuite as ips

project = ips.Project()
# create the main project to handle the workflow

with project:
# add new nodes to the project within the project context manager
ips.Smiles2Conformers(smiles="O", numConfs=1) # add our first node

project.build()

To build the project, run the file using :code:`python main.py`.

.. note::

This will construct the workflow, but not execute.

To execute the workflow now constructed, run :code:`dvc repro`.


.. code::

import ipsuite as ips

project = ips.Project()
# create the main project to handle the workflow

with project:
# add new nodes to the project within the project context manager
water = ips.Smiles2Conformers(smiles="O", numConfs=1) # add our first node
ammonia = ips.Smiles2Conformers(smiles="N", numConfs=1) # add another node
box = ips.MultiPackmol(
data=[water.frames, ammonia.frames],
count=[10, 3],
density=997,
n_configurations=3
)

project.build()
39 changes: 39 additions & 0 deletions docs/source/_get_started/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Installation
============

From PyPI
---------

To use :code:`ipsuite`, first install it using pip:

.. code-block:: console

(.venv) $ pip install ipsuite

.. note::

The :code:`ipsuite` package installation does not contain any :term:`MLIP` packages.
Due to different dependencies, it is highly recommended to install your preferred :term:`MLIP` package individually into the same environment.

.. note::

If you encounter en error like :code:`Permission denied '/var/cache/dvc'` you might want to reinstall :code:`pip install platformdirs==3.11.0` or :code:`pip install platformdirs==3.10.0` as discussed at https://github.com/iterative/dvc/issues/9184

From Source
-----------

To install and develop :code:`ipsuite` from source we recommend using :code:`https://docs.astral.sh/uv`.
More information and installation instructions can be found at https://docs.astral.sh/uv/getting-started/installation/ .

.. code:: console

(.venv) $ git clone https://github.com/zincware/ipsuite
(.venv) $ cd ipsuite
(.venv) $ uv sync
(.venv) $ source .venv/bin/activate

In a file :code:`main.py` try importing IPS to check if everything is working correctly

.. code-block:: python

import ipsuite as ips
60 changes: 9 additions & 51 deletions docs/source/_get_started/quickstart.rst
Original file line number Diff line number Diff line change
@@ -1,55 +1,13 @@
.. _getting_started:

Getting started
===============

Installation
------------

The IPS package can be downloaded via the package-management system pip.
We recommend the usage of an python environment with the python version 3.10. Other versions might not currently work.

.. code-block:: bash

pip install ipsuite

Alternatively the latest version of IPSuite can be downloaded from `GitHub <https://github.com/zincware/IPSuite>`_,
using `Poetry <https://python-poetry.org/>`_ to install the python dependencies.

.. code-block:: bash

git clone https://github.com/zincware/IPSuite.git
cd IPSuite
poetry install

For IPSuite to work, it is necessary for an IPS Project to be in a git as well as DVC initialized directory.
Create a folder for your project and initialize git and DVC to start working with IPS.

.. code-block:: bash

mkdir project
cd project
git init
dvc init

In a file :code:`main.py` try importing IPS to check if everything is working correctly

.. code-block:: python

import ipsuite as ips

Quickstart
==========


To get to know the IPS procedures we will do an example problem.


The First Project
=================

Initial Data Generation
-----------------------
This project will show the basic creation of an IPS Project using an additional piece of software
called `Packmol <https://m3g.github.io/packmol/>`_.
The goal is to place water molecules inside a box at a specified density.

.. code-block:: python
Expand All @@ -58,20 +16,20 @@ The goal is to place water molecules inside a box at a specified density.

with ips.Project() as project:
# Generate a single water molecule
mol = ips.Smiles2Atoms(smiles="O")
mol = ips.Smiles2Conformers(smiles="O")
# Duplicate water molecules
packmol = ips.Packmol(
data=[mol.frames], count=[10], density=876
)

project.build()

The *Smiles2Atoms* node takes the `SMILES <https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system>`_ string for water ("O"),
The :class:`ipsuite.Smiles2Conformers` node takes the `SMILES <https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system>`_ string for water ("O"),
and generates an an `ASE atoms object <https://wiki.fysik.dtu.dk/ase/ase/atoms.html>`_ from it.
This atom from the Smiles2Atoms instance can be accessd by calling `mol.atoms`.
This atom from the :class:`ipsuite.Smiles2Conformers` instance can be accessd by calling `mol.frames`.
This instance attribute is then handed over to the Packmol node in the `data` attribute.
It is possible to hand over multiple different types of ASE atoms,
so `mol.atoms` as to be given as a list. The next attribute we need to set is the amount of molecules we want to place in the box.
so `mol.frames` as to be given as a list. The next attribute we need to set is the amount of molecules we want to place in the box.
This also has to be a list with each entry being the amount for other ASE atoms object in the `data` list. Lastly the density has
to be provided. Calling `project.build()` will save the workflow into DVC graph configuration and parameter files.
After executing the code, the entire workflow is constructed and can be visualised
Expand All @@ -80,7 +38,7 @@ used with `Mermaid <https://mermaid.js.org/>`_ to better visualise the workflows

The parameters files, namely `params.yaml` can be viewed and parameters can be changed without rerunning the python script.

By calling `dvc repro` the workflow consisting of the nodes is executed, which results in the generation of firstly a single water molecule by the Smiles2Atoms node and then the placement
By calling `dvc repro` the workflow consisting of the nodes is executed, which results in the generation of firstly a single water molecule by the :class:`ipsuite.Smiles2Conformers` node and then the placement
of multiple water molecules in a box by the Packmol node.
After running `dvc repro` a new folder `nodes` is created which each node having their own subfolder. These folders
contain the results from the Nodes.
Expand All @@ -90,9 +48,9 @@ we can visualise the H5MD files generated by the nodes.

.. code-block:: bash

zndraw nodes/Smiles2Atoms/structures.h5
zndraw nodes/Smiles2Conformers/structures.h5

will visualise the single water molecule generated by Smiles2Atoms. There will also be a H5MD file in the Packmol folder
will visualise the single water molecule generated by :class:`ipsuite.Smiles2Conformers`. There will also be a H5MD file in the Packmol folder

.. figure:: ../images/water_packmol.png
:alt: ZnDraw Screenshot
Expand Down
53 changes: 0 additions & 53 deletions docs/source/_nodes/ipsuite.analysis.model.rst

This file was deleted.

61 changes: 0 additions & 61 deletions docs/source/_nodes/ipsuite.analysis.rst

This file was deleted.

29 changes: 0 additions & 29 deletions docs/source/_nodes/ipsuite.base.rst

This file was deleted.

29 changes: 0 additions & 29 deletions docs/source/_nodes/ipsuite.bootstrap.rst

This file was deleted.

Loading
Loading