Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
RosettaPy API Reference
========================

.. toctree::
:maxdepth: 2
:caption: Packages

api/rosettapy
28 changes: 28 additions & 0 deletions docs/api/rosettapy.analyser.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
RosettaPy.analyser
===================

.. automodule:: RosettaPy.analyser
:members:
:undoc-members:
:show-inheritance:

Modules
-------

.. autosummary::
:toctree: generated
:recursive:

RosettaPy.analyser.ddg
RosettaPy.analyser.reu

Key Classes
-----------

.. autoclass:: RosettaPy.analyser.RosettaEnergyUnitAnalyser
:members:
:show-inheritance:

.. autoclass:: RosettaPy.analyser.RosettaCartesianddGAnalyser
:members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/api/rosettapy.app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
RosettaPy.app
==============

.. automodule:: RosettaPy.app
:members:
:undoc-members:
:show-inheritance:

Modules
-------

.. autosummary::
:toctree: generated
:recursive:

RosettaPy.app.cart_ddg
RosettaPy.app.fastrelax
RosettaPy.app.mutate_relax
RosettaPy.app.pross
RosettaPy.app.rosettaligand
RosettaPy.app.utils.CA_constraints
RosettaPy.app.utils.smiles2param
35 changes: 35 additions & 0 deletions docs/api/rosettapy.common.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
RosettaPy.common
=================

.. automodule:: RosettaPy.common
:members:
:undoc-members:
:show-inheritance:

Modules
-------

.. autosummary::
:toctree: generated
:recursive:

RosettaPy.common.mutation

Key Classes
-----------

.. autoclass:: RosettaPy.common.mutation.Mutation
:members:
:show-inheritance:

.. autoclass:: RosettaPy.common.mutation.Chain
:members:
:show-inheritance:

.. autoclass:: RosettaPy.common.mutation.RosettaPyProteinSequence
:members:
:show-inheritance:

.. autoclass:: RosettaPy.common.mutation.Mutant
:members:
:show-inheritance:
35 changes: 35 additions & 0 deletions docs/api/rosettapy.node.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
RosettaPy.node
===============

.. automodule:: RosettaPy.node
:members:
:undoc-members:
:show-inheritance:

Modules
-------

.. autosummary::
:toctree: generated
:recursive:

RosettaPy.node.dockerized
RosettaPy.node.mpi
RosettaPy.node.native
RosettaPy.node.utils
RosettaPy.node.wsl

Key Classes
-----------

.. autoclass:: RosettaPy.node.MpiNode
:members:

.. autoclass:: RosettaPy.node.Native
:members:

.. autoclass:: RosettaPy.node.WslWrapper
:members:

.. autoclass:: RosettaPy.node.dockerized.RosettaContainer
:members:
16 changes: 16 additions & 0 deletions docs/api/rosettapy.rosetta.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
RosettaPy.rosetta
==================

.. automodule:: RosettaPy.rosetta
:members:
:undoc-members:
:show-inheritance:

Key Classes
-----------

.. autoclass:: RosettaPy.rosetta.Rosetta
:members:

.. autoclass:: RosettaPy.rosetta.RosettaScriptsVariableGroup
:members:
16 changes: 16 additions & 0 deletions docs/api/rosettapy.rosetta_finder.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
RosettaPy.rosetta_finder
=========================

.. automodule:: RosettaPy.rosetta_finder
:members:
:undoc-members:
:show-inheritance:

Key Classes
-----------

.. autoclass:: RosettaPy.rosetta_finder.RosettaBinary
:members:

.. autoclass:: RosettaPy.rosetta_finder.RosettaFinder
:members:
21 changes: 21 additions & 0 deletions docs/api/rosettapy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
RosettaPy Package
=================

.. automodule:: RosettaPy
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
:maxdepth: 1

rosettapy.analyser
rosettapy.app
rosettapy.common
rosettapy.node
rosettapy.utils
rosettapy.rosetta
rosettapy.rosetta_finder
34 changes: 34 additions & 0 deletions docs/api/rosettapy.utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
RosettaPy.utils
================

.. automodule:: RosettaPy.utils
:members:
:undoc-members:
:show-inheritance:

Modules
-------

.. autosummary::
:toctree: generated
:recursive:

RosettaPy.utils.escape
RosettaPy.utils.repository
RosettaPy.utils.task
RosettaPy.utils.tools

Key Items
---------

.. autofunction:: RosettaPy.utils.render

.. autofunction:: RosettaPy.utils.print_diff

.. autofunction:: RosettaPy.utils.zip_render

.. autoclass:: RosettaPy.utils.RosettaCmdTask
:members:

.. autoclass:: RosettaPy.utils.RosettaScriptsVariableGroup
:members:
30 changes: 30 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,42 @@
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode", # Add links to highlighted source code
"sphinx.ext.napoleon", # to render Google format docstrings
"sphinx.ext.githubpages",
"sphinx_copybutton",
]

# Autosummary settings
autosummary_generate = True

Check failure on line 47 in docs/conf.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] docs/conf.py#L47

C0103: Constant name "autosummary_generate" doesn't conform to UPPER_CASE naming style ('([^\\W\\da-z][^\\Wa-z]*|__.*__)$' pattern) (invalid-name)
Raw output
docs/conf.py:47:0: C0103: Constant name "autosummary_generate" doesn't conform to UPPER_CASE naming style ('([^\\W\\da-z][^\\Wa-z]*|__.*__)$' pattern) (invalid-name)

# Autodoc defaults
autodoc_default_options = {
"members": True,
"undoc-members": True,
"show-inheritance": True,
"inherited-members": True,
}

# Display type hints in the description
autodoc_typehints = "description"

Check failure on line 58 in docs/conf.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] docs/conf.py#L58

C0103: Constant name "autodoc_typehints" doesn't conform to UPPER_CASE naming style ('([^\\W\\da-z][^\\Wa-z]*|__.*__)$' pattern) (invalid-name)
Raw output
docs/conf.py:58:0: C0103: Constant name "autodoc_typehints" doesn't conform to UPPER_CASE naming style ('([^\\W\\da-z][^\\Wa-z]*|__.*__)$' pattern) (invalid-name)

# Mock heavy/optional third-party deps during doc build
autodoc_mock_imports = [
"Bio",
"pandas",
"numpy",
"matplotlib",
"docker",
"git",
"rdkit",
"joblib",
"joblib_progress",
"tree",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
52 changes: 52 additions & 0 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Getting Started
===============

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

.. code-block:: bash

pip install RosettaPy -U

Prerequisites
-------------

- Rosetta must be compiled and installed with a valid license.
- Ensure the `rosetta_scripts` binary is available locally or in a supported container.

Minimal Example
---------------

.. code-block:: python

import os
from RosettaPy import Rosetta, RosettaScriptsVariableGroup
from RosettaPy.node import node_picker

rosetta = Rosetta(
bin="rosetta_scripts",
flags=["/path/to/flags.txt"],
opts=["-in:file:s", "/path/to/input.pdb", "-parser:protocol", "/path/to/protocol.xml"],
output_dir="./outputs",
job_id="demo",
run_node=node_picker("native"),
verbose=False,
)

# Optional: supply RosettaScripts variables
rsv = RosettaScriptsVariableGroup.from_dict({
"TASKOPERATIONS": ["OperateOnCertainResidues"],
})

rosetta.opts.append(rsv)
tasks = rosetta.run(nstruct=2)

# Each task contains the composed command; running returns execution results
for t in tasks:
print(t.cmd)

Where to go next
----------------

- See the guides for specific workflows like PROSS, FastRelax, RosettaLigand, Supercharge, MutateRelax, and Cartesian ddG.
- Explore the full API reference for classes and functions.
14 changes: 14 additions & 0 deletions docs/guides.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Guides
======

This section provides end-to-end examples for common tasks.

.. toctree::
:maxdepth: 1

guides/pross
guides/fastrelax
guides/rosettaligand
guides/supercharge
guides/mutate_relax
guides/cart_ddg
23 changes: 23 additions & 0 deletions docs/guides/cart_ddg.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Cartesian ddG Workflow
======================

Example
-------

.. code-block:: python

from RosettaPy.app.cart_ddg import CartesianddG
from RosettaPy.common.mutation import Mutant, Mutation, RosettaPyProteinSequence, Chain
from RosettaPy.node import node_picker

wt = RosettaPyProteinSequence(chains=[Chain(chain_id="A", sequence="IRGWEEGVAQM")])
mutant = Mutant(mutations=[Mutation(chain_id="A", position=10, wt_res="Q", mut_res="V")], wt_protein_sequence=wt)

app = CartesianddG(
pdb="/path/to/wt.pdb",
mutant=mutant,
output_dir="./outputs",
node=node_picker("native"),
)
ddg = app.run(nstruct=25)
print(ddg)
18 changes: 18 additions & 0 deletions docs/guides/fastrelax.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FastRelax Workflow
==================

Example
-------

.. code-block:: python

from RosettaPy.app.fastrelax import FastRelax
from RosettaPy.node import node_picker

fr = FastRelax(
pdb="/path/to/input.pdb",
output_dir="./outputs",
node=node_picker("native"),
)
scores = fr.run(nstruct=10)
print(scores.describe())
Loading
Loading