-
Notifications
You must be signed in to change notification settings - Fork 0
Molecular dynamics #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ChristineSchulz
wants to merge
43
commits into
main
Choose a base branch
from
molecular_dynamics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
ff89fd1
feat: md notebook
ChristineSchulz 42569f2
fix:AmberTools linkage
ChristineSchulz 9bd0d64
fix: resname length
ChristineSchulz 47c39a1
fix: Boltz smiles input
ChristineSchulz fe6c2b7
fix: paths in prep for CI
ChristineSchulz 466f113
fix: env path typo
ChristineSchulz 9ee5c43
tests: molecular dynamics
ChristineSchulz 3fbee6f
fix: test preparation
ChristineSchulz 13cafe0
fix: remove unneccessary files
ChristineSchulz 78629cf
feat: MD Tutorial
ChristineSchulz 53683a0
fix: MD notebook paths
ChristineSchulz 4b43153
fix: MD tutorial style
ChristineSchulz 7457dea
fix: typo
ChristineSchulz e4f4052
Added descriptions to molecular dynamics notebook.
jbanjo ac80452
first draft: visualization notebook
ChristineSchulz fb56187
feat: MD visualization w nglview
ChristineSchulz c1a63d0
fix: CCD to smiles for ions / smol
ChristineSchulz cf5edd3
draft:RNAprep tool to fix RNA in pdb
ChristineSchulz 5fa365a
Fixed MD_visualization.ipynb notebook
jbanjo 1a8a96d
fix: tools
ChristineSchulz 4b79f7d
Merge branch 'molecular_dynamics' of github.com:ssciwr/BioStructureHu…
ChristineSchulz 1b1166d
add:RNA tests
ChristineSchulz 1f088cf
add: RNA to MD notebook
ChristineSchulz 1dcb53d
fix: missing package
ChristineSchulz 4334d8d
fix: paths in testing
ChristineSchulz 6541b15
add: ion testing
ChristineSchulz eeb25d8
feat: more stable OP3 / HOP3 treatment for AlphaFold inputs
ChristineSchulz 263efd8
update Tutorial
ChristineSchulz 2eb7fc2
add: post MD notebooks
ChristineSchulz 77a8ae7
add: distance analysis, traj limits
ChristineSchulz d1143e1
fix: rmsd without start frame
ChristineSchulz e048296
test: MD Analysis notebook
ChristineSchulz 8b7bff8
fix test: MDAnalysis
ChristineSchulz a7591e9
fix: SonarCloud suggestions
ChristineSchulz f9a7dc9
fix test: matrix for analysis
ChristineSchulz 6799e37
fix test: import order
ChristineSchulz 425cb1f
Merge branch 'main' into molecular_dynamics
iulusoy 135129a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 92aec8c
Merge branch 'main' into molecular_dynamics
ChristineSchulz ed4f2a9
fix test: move PLM tests in test and doc
ChristineSchulz 78b40bd
fix: pre-commit suggestions
ChristineSchulz d60819b
fix: SonarQube suggestions
ChristineSchulz 040afd9
fix: notebook tags
ChristineSchulz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/`. | ||
|
|
||
| {:.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: | ||
|
|
||
| {: .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: | ||
|
|
||
| {: .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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.