Skip to content
Merged
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
10 changes: 5 additions & 5 deletions .github/workflows/PR_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ name: Test on PR activity
on:
pull_request:
branches:
- "**"
- "**"

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
python-version: [3.11]
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ 3.11 ]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
Expand All @@ -26,7 +26,7 @@ jobs:
python -m pip install --upgrade pip
pip install rdkit
pip install .

- name: Test with pytest
run: |
cd tests
Expand Down
136 changes: 77 additions & 59 deletions README.md

Large diffs are not rendered by default.

Binary file added docs/source/_static/ligandens.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions docs/source/chilife.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
chiLife Functions
=================

Some intro text
General Functions
-----------------

Expand All @@ -22,5 +22,15 @@ IO Functions
.. automodule:: chilife.io
:members: read_distance_distribution,
read_library,
read_pdb,
read_cif,
read_sdf,
save,
write_atoms
write_atoms,
write_cif,
write_sdf,
create_ccd_dicts,
join_ccd_info,



26 changes: 23 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#
import os
import sys
from numpy.typing import ArrayLike
sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('../../../chilife'))

Expand All @@ -33,6 +32,7 @@
'sphinx_mdinclude',
'sphinx.ext.coverage',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'nbsphinx',
'nbsphinx_link',
'IPython.sphinxext.ipython_console_highlighting',
Expand All @@ -47,7 +47,8 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
autodoc_member_order = 'bysource'
autodoc_type_aliases = {'ArrayLike': 'ArrayLike'}
# autodoc_type_aliases = {'ArrayLike': 'ArrayLike'}
autodoc_typehints_format = 'short'
source_suffix = [".rst", ".md"]
add_module_names = False
python_use_unqualified_type_names = True
Expand All @@ -73,9 +74,28 @@
'gallery/04-Adding_custom_spin_labels':'_static/customlabels.png',
'gallery/06-Membrane_Docking': '_static/memdock.png',
'gallery/10-Nucleic_acid_labels' : '_static/TUMLabeled.png',
'gallery/11-Arbitrary_molecular_labels': '_static/CMP501NCA.png'
'gallery/11-Arbitrary_molecular_labels': '_static/CMP501NCA.png',
'gallery/14-LigandEnsemble': '_static/ligandens.png',
}
# Add any paths that contain custom static files (such as style sheets) here,
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".

rst_prolog = """
:github_url: https://github.com/mtessmer/chilife
"""

html_context = {
"display_github": True,
"github_user": "mtessmer",
"github_repo": "chilife",
"github_version": "main",
"conf_py_path": "/docs/source/",
"github_url": "https://github.com/mtessmer/chilife",
}
#
# html_theme_options = {
# 'repository_url': 'https://github.com/mtessmer/chiLife',
# 'repository_name': 'chiLife',
# }
1 change: 1 addition & 0 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Examples
gallery/11-Arbitrary_molecular_labels.nblink
gallery/12-Analyzing_MD_Simulations.nblink
gallery/13-OpenMM_Score_Function.nblink
gallery/14-LigandEnsemble.nblink
2 changes: 1 addition & 1 deletion docs/source/gallery/11-Arbitrary_molecular_labels.nblink
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"path": "../../../examples/11 - Arbitrary molecular labels/12 - Arbitrary molecular labels.ipynb"
"path": "../../../examples/11 - Arbitrary molecular labels/11 - Arbitrary molecular labels.ipynb"
}
4 changes: 4 additions & 0 deletions docs/source/gallery/14-LigandEnsemble.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"path": "../../../examples/14 - LigandEnsemble/14-LigandEnsemble.ipynb"
}

Binary file added docs/source/gallery/ligandens.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/source/ligand_utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Ligand Utils
=============

.. automodule:: chilife.ligand_utils
:members:
36 changes: 30 additions & 6 deletions docs/source/rotamer_ensemble.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _rotamer_ensemble:

Side Chain Ensembles
Molecular Ensembles
=====================


Expand All @@ -17,10 +17,9 @@ acids.
SpinLabel
---------

The :class:`chilife.SpinLabel` object is the primary feature of χLife. :class:`chilife.SpinLabel` inherits from the
:class:`chilife.RotamerEnsemble` object and therefore has all the same properties and methods . Additionally
:class:`chilife.SpinLabel` have several other features unique to spin labels and useful for protein and spin label
modeling.
The :class:`chilife.SpinLabel` inherits from the :class:`chilife.RotamerEnsemble` object and therefore has all the same
properties and methods. Additionally :class:`chilife.SpinLabel` have several other features unique to spin labels and
useful for protein and spin label modeling.

.. autoclass:: chilife.SpinLabel
:members:
Expand All @@ -35,17 +34,42 @@ amino acids whether they are spin labels or other bifunctional non-canonical ami
.. autoclass:: chilife.dRotamerEnsemble
:members:


dSpinLabel
----------
The :class:`dSpinLabel` class is the radicalized extension of the :class:`dRotamerEnsemble`. It is used to model
bifunctional spinl labels like RX and di-histidine copper capped with NTA.

.. autoclass:: chilife.dSpinLabel
:members:
:exclude-members: copy


LigandEnsemble
--------------
The :class:`LigandEnsemble` is the base class for ligands. Ligands, being free-floating structures rather than branches
off a protein or nucleic acid chain, must be treated very differently than other ensemble objects. Nonetheless, the
:class:`LigandEnsemble` API is designed to be used in a very similar manner to the :class:`RotamerEnsemble` and
:class:`dRotamerEnsemble` class families.

.. autoclass:: chilife.LigandEnsemble
:members:


SpinLigand
----------
The :class:`SpinEnsemble` class extends :class:`LigandEnsemble` allowing for free radicals and can be used like a
:class:`SpinLabel` to get distance distributions with other :class:`SpinLabel` like objects and visualize spin density.

.. autoclass:: chilife.SpinLigand
:members:


IntrinsicLabel
--------------
The :class:`IntrinsicLabel` class is designed to allow users to specify free radicals that are already present in a
molecular system or protein structure such as metals in hemes and porphyrins, organic radicals like the tryptophan
cation radical.

.. autoclass:: chilife.IntrinsicLabel
:members:

1 change: 1 addition & 0 deletions docs/source/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Utils

numba_utils
protein_utils
ligand_utils
alignments
scoring
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"\n",
"# Create spin labels using the off-rotamer sampling method\n",
"SL1 = xl.dSpinLabel('DCN', (6, 8), protein)\n",
"SL2 = xl.dSpinLabel('DCN', (28,32), protein)\n",
"SL2 = xl.dSpinLabel('DCN', (28, 32), protein)\n",
"\n",
"# Predict distance distributions over an experimental axis\n",
"r, Pexp = np.loadtxt('Exp_Data.txt').T\n",
"Pexp /= np.trapz(Pexp, r)\n",
"Pexp /= np.trapezoid(Pexp, r)\n",
"P = xl.distance_distribution(SL1, SL2, r=r)"
],
"outputs": [],
Expand All @@ -60,6 +60,7 @@
},
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"plt.style.use('chiLife')\n",
"plt.rcParams.update({'font.size': 15})\n",
"\n",
Expand All @@ -69,7 +70,6 @@
"\n",
"ax.plot(r, P, label='Model Prediction', color='C0')\n",
"\n",
"\n",
"ax.set_yticks([])\n",
"ax.set_xlabel(r'distance ($\\rm\\AA$)')\n",
"ax.legend(frameon=False)\n",
Expand Down
Binary file modified examples/12 - Analyzing MD simulations/.AR1A.xtc_offsets.npz
Binary file not shown.

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions examples/12 - Analyzing MD simulations/1ubq_A28CYR.pdb
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ ATOM 4 S1L CYR A 28 41.113 22.404 12.342 0.60 1.00 S
ATOM 5 C1L CYR A 28 40.902 22.700 10.587 0.60 1.00 C
ATOM 6 C1R CYR A 28 41.649 21.701 9.707 0.60 1.00 C
ATOM 7 C2R CYR A 28 42.660 22.053 8.929 0.60 1.00 C
ATOM 8 C1 CYR A 28 41.403 20.210 9.539 0.60 1.00 C
ATOM 8 C1 CYR A 28 41.404 20.210 9.539 0.60 1.00 C
ATOM 9 C2 CYR A 28 43.181 21.048 8.029 0.60 1.00 C
ATOM 10 NN CYR A 28 42.231 19.939 8.398 0.60 1.00 N
ATOM 11 ON CYR A 28 42.425 18.730 8.022 0.60 1.00 O
Expand All @@ -756,7 +756,7 @@ ATOM 6 C1R CYR A 28 43.117 22.296 13.973 0.54 1.00 C
ATOM 7 C2R CYR A 28 43.607 23.561 14.205 0.54 1.00 C
ATOM 8 C1 CYR A 28 43.874 21.124 14.655 0.54 1.00 C
ATOM 9 C2 CYR A 28 44.785 23.470 15.131 0.54 1.00 C
ATOM 10 NN CYR A 28 44.902 21.916 15.324 0.54 1.00 N
ATOM 10 NN CYR A 28 44.902 21.916 15.323 0.54 1.00 N
ATOM 11 ON CYR A 28 45.835 21.399 15.997 0.54 1.00 O
ATOM 12 C2D CYR A 28 44.314 24.064 16.420 0.54 1.00 C
ATOM 13 C1D CYR A 28 43.032 20.354 15.730 0.54 1.00 C
Expand Down Expand Up @@ -839,7 +839,7 @@ ATOM 5 C1L CYR A 28 42.185 23.263 11.196 0.29 1.00 C
ATOM 6 C1R CYR A 28 43.347 22.415 10.704 0.29 1.00 C
ATOM 7 C2R CYR A 28 44.629 22.415 11.112 0.29 1.00 C
ATOM 8 C1 CYR A 28 43.198 21.468 9.523 0.29 1.00 C
ATOM 9 C2 CYR A 28 45.545 21.456 10.561 0.29 1.00 C
ATOM 9 C2 CYR A 28 45.546 21.456 10.561 0.29 1.00 C
ATOM 10 NN CYR A 28 44.638 20.978 9.486 0.29 1.00 N
ATOM 11 ON CYR A 28 45.044 19.901 8.929 0.29 1.00 O
ATOM 12 C2D CYR A 28 45.801 20.312 11.589 0.29 1.00 C
Expand Down Expand Up @@ -966,7 +966,7 @@ ATOM 6 C1R CYR A 28 42.437 21.761 13.973 0.16 1.00 C
ATOM 7 C2R CYR A 28 42.869 22.771 14.678 0.16 1.00 C
ATOM 8 C1 CYR A 28 42.749 20.487 14.529 0.16 1.00 C
ATOM 9 C2 CYR A 28 43.643 22.438 15.852 0.16 1.00 C
ATOM 10 NN CYR A 28 43.594 20.955 15.719 0.16 1.00 N
ATOM 10 NN CYR A 28 43.594 20.955 15.718 0.16 1.00 N
ATOM 11 ON CYR A 28 43.838 20.189 16.757 0.16 1.00 O
ATOM 12 C2D CYR A 28 43.012 22.940 17.152 0.16 1.00 C
ATOM 13 C1D CYR A 28 41.476 19.770 15.027 0.16 1.00 C
Expand Down
Loading
Loading