Skip to content

Commit

Permalink
Merge pull request #109 from wolberlab/Code_Class_movement_Setup_Simu…
Browse files Browse the repository at this point in the history
…lation

Merging of Code refactoring of Setup & Simulation with Analysis
  • Loading branch information
talagayev authored Oct 2, 2024
2 parents 191eefe + 2e44afb commit b99f1bd
Show file tree
Hide file tree
Showing 52 changed files with 4,142 additions and 7,465 deletions.
Binary file modified docs/_static/images/tutorials/Amber_Path/AmberOption.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/Amber_Path/addMembrane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified docs/_static/images/tutorials/Amber_Path/addWater.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/Amber_Path/amberPath.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/Amber_Path/normalLigand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/Amber_Path/receptor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/Amber_Path/receptor_otherFF.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/Amber_Path/selectAmberFiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/Amber_Path/specialLigand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/Amber_Path/water_ion_setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Addheavyatoms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Addresidues1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Addresidues2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Addwater1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Addwater2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Modifychains2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Selectfiles1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Selectfiles2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Selectfiletype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/images/tutorials/PDB_Path/Simulationoptions1.png
Binary file modified docs/_static/images/tutorials/PDB_Path/Simulationoptions2.png
38 changes: 29 additions & 9 deletions docs/tutorial_amber_path.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OpenMM enables users to perform molecular dynamics (MD) simulations using AMBER

In this tutorial, we will use the mu opioid receptor (PDB ID: 8EFO) as an illustrative example to provide a comprehensive, step-by-step guide on configuring and initiating an MD simulation using Amber files prepared by OpenMMDL-Setup.

Starting OpenMMDL-Setup
Starting OpenMMDL Setup
------------------------------
We start the tutorial by creating an folder to store input files and facilitate the MD simulation.

Expand Down Expand Up @@ -55,6 +55,7 @@ The second step involves choosing input files. Two options are available:
:figwidth: 700px
:align: center


1. **Yes**, my files are already to simulate.
When selected, users can choose the Prmtop and Inpcrd files via the file browser. Clicking "Continue" transitions to the 'Simulation Setup' page.

Expand All @@ -80,14 +81,15 @@ This page allows users to configure Amber settings and generate the Bash script
:figwidth: 700px
:align: center


The page consists of three tabs: Receptor, Ligand, and Add Water/Membrane.

1. **Receptor**

Depending on the macromolecule type (Protein, DNA, RNA, or Carbohydrate), users can select the receptor PDB file using the file browser and choose the appropriate force fields.

.. figure:: /_static/images/tutorials/Amber_Path/receptor.png
:figwidth: 700px
:figwidth: 350px
:align: center

If needed, users can specify an 'Other Force Field' in the provided textbox. To do this, select 'other' from the drop-down menu of "Force Field," and the 'Other Force Field' textbox will appear. Users can input the force field name in the textbox.
Expand All @@ -97,12 +99,21 @@ If needed, users can specify an 'Other Force Field' in the provided textbox. To
:figwidth: 700px
:align: center


Note: Only force fields provided by AmberTools are supported. To check available force fields, navigate to `/home/user/miniconda3/envs/openmmdl/dat/leap/cmd`. Replace the path with the location of your OpenMMDL installation.

Users can select one type of macromolecule from the options listed above at a time.

In this tutorial, we will select the protein option, navigate to the folder 'openmmdl_amber_tutorial', and select'8EFO_protein.pdb',and select 'ff19SB' as the receptor force field.

When you have uploaded the files, the receptor page should look the following way:


.. figure:: /_static/images/tutorials/Amber_Path/AmberOptionSelected.png
:figwidth: 700px
:align: center


2. **Ligand**

Depends on the type of ligand the user intends to simulate, two options are available:
Expand All @@ -115,6 +126,7 @@ It refers to the small molecule that is made up of C, N, O, S, P, H, F, Cl, Br a
:figwidth: 700px
:align: center


Upon selecting the 'Normal Ligand' option, the parameter settings for the ligand will be revealed.

- Begin by clicking the "Browse..." button to select the ligand PDB or SDF file.
Expand All @@ -136,6 +148,14 @@ Warning: When the file format is pdb, the prefix of the filename should be the s

In this tutorial, we will select the ligand '8QY.pdb', set the charge value to 1, select the 'GAFF2' force field, and choose the 'bcc' charge method.

When you have uploaded the mentioned files and selected the options, your page should look like this:


.. figure:: /_static/images/tutorials/Amber_Path/AmberOptionReceptor.png
:figwidth: 700px
:align: center


2.2 **Special Ligand**.

For ligands that `Antechamber` cannot process, such as cofactors like heme in CYP450 enzymes, users can check the 'Special Ligand' option. The AMBER parameter database serves as a valuable source for finding Amber files for these special ligands. Follow the guidance provided in the application to set up the generation of Amber files for the special ligand.
Expand Down Expand Up @@ -167,14 +187,14 @@ When this option is selected, users can further select the 'Box Type' from the d
When this option is selected, users can further select the 'Lipid Type' and 'Lipid Force Field' from the drop-down list.

.. figure:: /_static/images/tutorials/Amber_Path/addMembrane.png
:figwidth: 700px
:figwidth: 350px
:align: center


If the listed lipid type does not match the desired one, click on the 'Other Type or Mixture' option. Then, input the lipid type in the pop-up textbox of 'Other Types or Mixture' and set the 'Lipid Ratio'. For instance, 'POPC:TOPC' in 'Other Types or Mixture' and '1:1' in the 'Lipid Ratio' means the membrane consists of 1 POPC and 1 TOPC.

.. figure:: /_static/images/tutorials/Amber_Path/addMembrane_other.png
:figwidth: 700px
.. figure:: /_static/images/tutorials/Amber_Path/addMembraneMixtures.png
:figwidth: 350px
:align: center

When selecting only one type of lipid, set the 'Lipid Ratio' to 1.
Expand All @@ -188,7 +208,7 @@ In this tutorial, we will select the 'add Membrane and Water' option, and keep t
It is a must for both 'Add water Box' and 'Add Membrane and Water' options. The Ions will be added to neutralize the model. The user can select the 'Water Force Field', 'Positive Ion' and 'Negative Ion' in the drop-down list, and then type the 'Ion Concentration (molar)' value in the textbox.

.. figure:: /_static/images/tutorials/Amber_Path/water_ion_setting.png
:figwidth: 700px
:figwidth: 500px
:align: center


Expand All @@ -198,7 +218,7 @@ Click 'Save Script' on the top of the right code block to download the generated

Simulation Setup
------------------------------
Configure simulation options across five tabs: System, Integrator, Simulation, Output, and MDAnalysis. Click 'Save Script' to download the generated Python script based on the configuration, saving it in the tutorial folder.
Configure simulation options across six tabs: System, Output, Postprocessing, Analysis, Simulation and Integrator. Click 'Save Conf File' to download the generated configuration file script based on the selected settings, saving it in the tutorial folder.

Run Bash Script
------------------------------
Expand All @@ -216,7 +236,7 @@ Once the `Prmtop` and `Inpcrd` files are generated, the user can run the MD simu

.. code-block:: text
python3 OpenMMDL_Simulation.py
openmmdl_simulation -f amber_tutorial_simulation -t system.opc.prmtop -c system.opc.inpcrd -s OpenMMDL_Simulation.conf
Or run the several MD recplicas via slurm.The `run_slurm.sh` is in tutorial folder `/openmmdl/openmmdl-simulation/tuturial_systems/amber_path/8efo_membrane`. Firstly copy it to the tutorial folder

Expand All @@ -228,4 +248,4 @@ Remember to replace the slurm configuration and environment `openmmdl` path with

.. code-block:: text
sbatch run_slurm.sh
sbatch run_slurm.sh
32 changes: 21 additions & 11 deletions docs/tutorial_pdb_path.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ To create a new folder we enter the following command lines:
mkdir openmmdl_pdb_tutorial
activating our openmmdl environment to start the OpenMMDL-Setup.
To start the OpenMMDL-Setup we need to activate the openmmdl environment. to do this we have to enter the following command lines:
activating our openmmdl environment to start the OpenMMDL Setup.
To start the OpenMMDL-Setup we need to activate the openmmdl environment. To do this we have to enter the following command lines:

.. code-block:: text
conda activate openmmdl
Now that we have activated the openmmdl environment we can start OpenMMDL-Setup. To do this you need to type the following:
Now that we have activated the openmmdl environment we can start OpenMMDL Setup. To do this you need to type the following:

.. code-block:: text
Expand All @@ -34,7 +34,7 @@ Now that we have activated the openmmdl environment we can start OpenMMDL-Setup.
Selecting Input Files
------------------------------

This will open the OpenMMDL-Setup, which you can use for the creation of the input files for OpenMMDL-Simulation.
This will open the OpenMMDL Setup, which you can use for the creation of the input files for OpenMMDL-Simulation.



Expand Down Expand Up @@ -65,6 +65,7 @@ The page should look like the page below.
:figwidth: 725px
:align: center


Now that we selected the PDB and SDF File we select continue and go to the next page.

Selecting Chains
Expand All @@ -73,7 +74,7 @@ Selecting Chains
The next page shows us the protein with all of the chains that are in the pdb file.


.. figure:: /_static/images/tutorials/PDB_Path/Modifychains1.png
.. figure:: /_static/images/tutorials/PDB_Path/Modifychains.png
:figwidth: 725px
:align: center

Expand Down Expand Up @@ -134,6 +135,7 @@ In the Water Box we also change the Ionic strenght to 0.15.
:figwidth: 725px
:align: center


Now that we selected the following options we continue to the next page.

Adjusting MD Simulation Options
Expand All @@ -145,24 +147,32 @@ The final page displays the MD simulation options.
:figwidth: 725px
:align: center


We will simulate the protein for 10 ns.

For this we go to the Simulation Tab and Change Simulation lenght (steps) to 250000.
For this we change Simulation lenght to 10 ns.

If you want to have a longer or shorter simulation you can increase or reduce the amount of steps.

.. figure:: /_static/images/tutorials/PDB_Path/Simulationoptions2.png
:figwidth: 725px
:align: center

Now that we changed the amount of steps we select the Save Script button to save the script for the simulation.

Select the Save Processed PDF File to save the PDB File that will be the input for the MD simulation.
Now that we changed the amount of steps we select the Save All Files button to save the zip. file with all of the necessery files for the simulation.

After you download the zip. file, you can unpack the zip. file. Your downloaded folder should contain the following files:


.. figure:: /_static/images/tutorials/PDB_Path/PDBFixerPathFolder.png
:figwidth: 725px
:align: center


Running Tutorial OpenMMDL-Simulation
------------------------------

Create a separate folder and copy the Simulation script, Processed PDB File and the Ligand SDF File into the folder.
Create a separate folder and copy the Configuration file, Processed PDB File and the Ligand SDF File into the folder.

The SDF File should be the same that was used as an input for the Openmm-Setup.

Expand All @@ -184,11 +194,11 @@ For this enter the following command

.. code-block:: text
openmmdl-simulation -f tutorial_simulation -s OpenMMDL_Simulation.py -t 5wyz-processed_openMMDL.pdb -l 5VF.sdf
openmmdl_simulation -f tutorial_simulation -s OpenMMDL_Simulation.conf -t 5wyz-processed_openMMDL.pdb -l 5VF.sdf
By entering the command we create a folder called tutorial_simulation, where the Output of the MD simulation will appear.

As the Input for the MD simulation we used the -t to select 5wyz-processed_openMMDL.pdb as the topology file for the simulation, -l to select the ligand 5VF.sdf and -s to specify the OpenMMDL_Simulation.py script that will run the MD simulation.
As the Input for the MD simulation we used the -t to select 5wyz-processed_openMMDL.pdb as the topology file for the simulation, -l to select the ligand 5VF.sdf and -s to specify the OpenMMDL_Simulation.conf file that will run the MD simulation.

.. figure:: /_static/images/tutorials/PDB_Path/Outputfiles1.png
:figwidth: 725px
Expand Down
Loading

0 comments on commit b99f1bd

Please sign in to comment.