Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ff89fd1
feat: md notebook
ChristineSchulz Apr 1, 2026
42569f2
fix:AmberTools linkage
ChristineSchulz Apr 10, 2026
9bd0d64
fix: resname length
ChristineSchulz Apr 13, 2026
47c39a1
fix: Boltz smiles input
ChristineSchulz Apr 13, 2026
fe6c2b7
fix: paths in prep for CI
ChristineSchulz Apr 13, 2026
466f113
fix: env path typo
ChristineSchulz Apr 13, 2026
9ee5c43
tests: molecular dynamics
ChristineSchulz Apr 14, 2026
3fbee6f
fix: test preparation
ChristineSchulz Apr 14, 2026
13cafe0
fix: remove unneccessary files
ChristineSchulz Apr 14, 2026
78629cf
feat: MD Tutorial
ChristineSchulz Apr 15, 2026
53683a0
fix: MD notebook paths
ChristineSchulz Apr 15, 2026
4b43153
fix: MD tutorial style
ChristineSchulz Apr 15, 2026
7457dea
fix: typo
ChristineSchulz Apr 17, 2026
e4f4052
Added descriptions to molecular dynamics notebook.
jbanjo Apr 24, 2026
ac80452
first draft: visualization notebook
ChristineSchulz May 13, 2026
fb56187
feat: MD visualization w nglview
ChristineSchulz May 28, 2026
c1a63d0
fix: CCD to smiles for ions / smol
ChristineSchulz May 29, 2026
cf5edd3
draft:RNAprep tool to fix RNA in pdb
ChristineSchulz Jun 8, 2026
5fa365a
Fixed MD_visualization.ipynb notebook
jbanjo Jun 10, 2026
1a8a96d
fix: tools
ChristineSchulz Jun 11, 2026
4b79f7d
Merge branch 'molecular_dynamics' of github.com:ssciwr/BioStructureHu…
ChristineSchulz Jun 11, 2026
1b1166d
add:RNA tests
ChristineSchulz Jun 11, 2026
1f088cf
add: RNA to MD notebook
ChristineSchulz Jun 11, 2026
1dcb53d
fix: missing package
ChristineSchulz Jun 12, 2026
4334d8d
fix: paths in testing
ChristineSchulz Jun 12, 2026
6541b15
add: ion testing
ChristineSchulz Jun 12, 2026
eeb25d8
feat: more stable OP3 / HOP3 treatment for AlphaFold inputs
ChristineSchulz Jun 18, 2026
263efd8
update Tutorial
ChristineSchulz Jun 19, 2026
2eb7fc2
add: post MD notebooks
ChristineSchulz Jun 19, 2026
77a8ae7
add: distance analysis, traj limits
ChristineSchulz Aug 3, 2026
d1143e1
fix: rmsd without start frame
ChristineSchulz Aug 3, 2026
e048296
test: MD Analysis notebook
ChristineSchulz Aug 3, 2026
8b7bff8
fix test: MDAnalysis
ChristineSchulz Aug 4, 2026
a7591e9
fix: SonarCloud suggestions
ChristineSchulz Aug 4, 2026
f9a7dc9
fix test: matrix for analysis
ChristineSchulz Aug 4, 2026
6799e37
fix test: import order
ChristineSchulz Aug 4, 2026
425cb1f
Merge branch 'main' into molecular_dynamics
iulusoy Aug 5, 2026
135129a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 5, 2026
92aec8c
Merge branch 'main' into molecular_dynamics
ChristineSchulz Aug 6, 2026
ed4f2a9
fix test: move PLM tests in test and doc
ChristineSchulz Aug 6, 2026
78b40bd
fix: pre-commit suggestions
ChristineSchulz Aug 6, 2026
d60819b
fix: SonarQube suggestions
ChristineSchulz Aug 6, 2026
040afd9
fix: notebook tags
ChristineSchulz Aug 6, 2026
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
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,64 @@ jobs:
run: |
python -m pytest --nbval tests/PLM_prepare.py notebooks/PLM-interact.ipynb tests/PLM_output.py

test_md:
runs-on: ubuntu-latest

strategy:
matrix:
include:
# Protein with small molecule with smiles
- input_file: md_inputs/G3_smol_model_0.cif
boltz_input_file: md_inputs/G3_smol_smi.yaml
# Protein ion as CCD
- input_file: md_inputs/G3_ion_model_0.cif
boltz_input_file: md_inputs/G3_ion.yaml
# Protein with RNA
- input_file: md_inputs/G3_RNA_model_0.cif
boltz_input_file: md_inputs/G3_RNA.yaml

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3
with:
environment-file: environments/molecular_dynamics.yml
activate-environment: openmm
auto-activate-base: false

- name: Install local tool RNAprep
shell: bash -el {0}
run: |
pip install -e tools/RNAprep
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

- name: Install local tool ccd2smiles
shell: bash -el {0}
run: |
pip install -e tools/ccd2smiles
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

- name: Run ccd2smiles tests
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate openmm
pytest tools/ccd2smiles/tests

- name: Patch notebook inputs
run: |
sed \
-e 's|__INPUT_FILE__|${{ matrix.input_file }}|g' \
-e 's|__BOLTZ_INPUT_FILE__|${{ matrix.boltz_input_file }}|g' \
notebooks/Molecular_Dynamics.ipynb > notebooks/Molecular_Dynamics_ci.ipynb

- name: Run MD Notebook
shell: bash -el {0}
run: |
python -m pytest --nbval tests/prepare_md.py notebooks/Molecular_Dynamics_ci.ipynb

- name: Run MD Analysis Notebook
if: matrix.input_file == 'md_inputs/G3_smol_model_0.cif'
shell: bash -el {0}
run: |
python -m pytest --nbval tests/prepare_md_output.py notebooks/MD_Analysis.ipynb



Binary file added docs/images/tutorial/bwVisu_MD_files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions docs/tutorials/tutorial_MD_bwVisu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Molecular Dynamics on bwVisu

Welcome to the Molecular Dynamics Tutorial for bwVisu!

This tutorial will guide you through running short Molecular Dynamics Simulation on bwVisu. Please follow these steps carefully. Any feedback on the tutorial is welcome! Feel free to [contact us](../contact.md)!

This tutorial is intended as a follow up to a structure prediction using either [AlphaFold](/docs/tutorials/tutorial_AF_bwVisu.md) or [Boltz](/docs/tutorials/tutorial_Boltz_bwVisu.md).

Note that only proteins, DNA and small molecules can be treated with this workflow. If you have more complex systems, [contact us](../contact.md) to discuss a solution.

### Step 1: Access bwVisu and Start Jupyter

Go to <a href="https://bwvisu.bwservices.uni-heidelberg.de/" target="_blank" rel="noopener">https://bwvisu.bwservices.uni-heidelberg.de/</a> and log in with your credentials and one-time password.

Choose Jupyter and start a new session. Now you can select the resources you need.

For the Molecular Dynamics Simulation we will need a GPU of type A40.

You also need access to the python environment, so set the `Kernel Path` to the OpenMM kernel at `/mnt/sds-hd/sd25g005/openmm/share/jupyter/`.

![Screenshot](../images/tutorial/bwVisu_GPU_Kernel.png){:.invertable}
<!--{: style="height:500px;width:750px"}-->

Click on "Launch". This will bring you to a new screen showing your interactive sessions. Wait for your session to be ready, then click on "Connect to Jupyter". This brings you into a JupyterLab environment.

### Step 2: Go to your Working Directory and Upload Files

Next all required files need to be present in the same directory as your predicted structure. Take the Molecular Dynamics notebook from our <a href="https://github.com/ssciwr/BioStructureHub/tree/main/notebooks" target="_blank" rel="noopener">github</a> and upload them by clicking on the upload button:

![Screenshot](../images/tutorial/bwVisu_upload.png){: .invertable style="height:111px;width:444px"}

Make sure that the output of your structure prediction is in the same directory as the `Molecular_Dynamics.ipynb` notebook.

- if you ran an **AlphaFold** prediction, you just need the `.cif` file
- if you ran a **Boltz** prediction with small molecules present, you need the `.cif` file and the input `.yaml` file

It should look like this:

![Screenshot](../images/tutorial/bwVisu_MD_files.png){: .invertable style="height:142px"}


### Step 3: Start the Simulation

Open `Molecular_Dynamics.ipynb`, add your `.cif` file (and in case of Boltz your input `.yaml`) in the notebook and then execute all the cells in the notebook to start your Molecular Dynamics run!
23 changes: 23 additions & 0 deletions environments/molecular_dynamics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: openmm
channels:
- conda-forge

dependencies:
- python=3.12
- pip
- rdkit=2024.09.6
- openmm=8.4
- biopython
- nbval
- numpy=2.4.3
- pandas=2.3.3
- pdbfixer
- pytest
- scipy=1.17.1
- matplotlib=3.10.8
- mdanalysis
- openff-toolkit==0.18.0
- openmmforcefields



1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ nav:
- tutorials/tutorial_Boltz_bwVisu.md
- tutorials/tutorial_Boltzgen_bwVisu.md
- tutorials/tutorial_RFDiffusion_bwVisu.md
- tutorials/tutorial_MD_bwVisu.md
- tutorials/tutorial_use_templates.md
- tutorials/tutorial_PLM_bwVisu.md
- tutorials/tutorial_visu2helix.md
Expand Down
371 changes: 371 additions & 0 deletions notebooks/MD_Analysis.ipynb

Large diffs are not rendered by default.

140 changes: 140 additions & 0 deletions notebooks/MD_Visualization.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "5ab21147-78ae-414d-850e-06e6f5e05799",
"metadata": {},
"outputs": [],
"source": [
"# https://github.com/nglviewer/nglview\n",
"\n",
"# Uncomment below if you need to install nglview on the fly\n",
"# ! pip install jupyterlab_widgets ipywidgets nglview\n",
"# ! sed -i \"s/__frontend_version__ = '4.0'/__frontend_version__ = '3.1.5'/\" ~/.local/lib/python3.9/site-packages/nglview/_frontend.py"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "80cfd11b-a6a0-4b53-8e9b-c1a72b47e0f2",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "31d2bc2848324eff9dd3858a929b7477",
"version_major": 2,
"version_minor": 0
},
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import MDAnalysis as mda\n",
"import nglview as nv"
]
},
{
"cell_type": "markdown",
"id": "7258bab2-5165-4430-817c-b4a61b89edad",
"metadata": {},
"source": [
"Insert your trajectory file:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "4a243c7a-f3a6-42c0-8332-0d076e69650e",
"metadata": {},
"outputs": [],
"source": [
"input_trajectory = \"__TRAJECTORY_FILE__\""
]
},
{
"cell_type": "markdown",
"id": "8e5432a4-3fb0-448d-b43f-24b0454b2081",
"metadata": {},
"source": [
"Visualize the trajectory:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "991a3b94-7361-4463-a553-432289622839",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d7b2a533a88542689a91906aff8c026d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"NGLWidget(max_frame=99)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"u = mda.Universe(input_trajectory)\n",
"\n",
"view = nv.show_mdanalysis(u)\n",
"view.clear()\n",
"\n",
"# see more options here: https://nglviewer.org/ngl/api/manual/selection-language.html\n",
"view.add_representation(\"cartoon\", selection=\"protein\")\n",
"view.add_representation(\"licorice\", selection=\"water\", opacity=0.1)\n",
"view.center()\n",
"\n",
"view"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fc92f7eb-0e38-40ae-ae71-af87887fde47",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "1b328850-f8e2-44cd-9819-fa5532697646",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading
Loading