Repository 'mmpbsa_mmgbsa'
hg clone https://toolshed.g2.bx.psu.edu/repos/chemteam/mmpbsa_mmgbsa

Changeset 2:51023da731c0 (2021-01-25)
Previous changeset 1:d09f116dfca5 (2020-04-07) Next changeset 3:cf2be7b90ea5 (2021-02-16)
Commit message:
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 4a3f58846bcad26240ccdc6b76e8f4d2cbe63631"
modified:
macros.xml
mmpbsa_mmgbsa.xml
template_mmpbsa_mmgbsa.j2
b
diff -r d09f116dfca5 -r 51023da731c0 macros.xml
--- a/macros.xml Tue Apr 07 07:59:06 2020 -0400
+++ b/macros.xml Mon Jan 25 11:14:40 2021 +0000
b
@@ -1,8 +1,8 @@
 <macros>
-  <token name="@VERSION@">19.11</token>
+  <token name="@TOOL_VERSION@">20.15</token>
   <xml name="requirements">
     <requirements>
-      <requirement type="package" version="19.11">ambertools</requirement>
+      <requirement type="package" version="@TOOL_VERSION@">ambertools</requirement>
       <yield/>
     </requirements>
   </xml>
b
diff -r d09f116dfca5 -r 51023da731c0 mmpbsa_mmgbsa.xml
--- a/mmpbsa_mmgbsa.xml Tue Apr 07 07:59:06 2020 -0400
+++ b/mmpbsa_mmgbsa.xml Mon Jan 25 11:14:40 2021 +0000
[
b'@@ -1,30 +1,25 @@\n-<tool id="mmpbsa_mmgbsa" name="mmpbsa mmgbsa" version="@VERSION@.1">\n-  <description>- estimate ligand binding affinities\n-  </description>\n-  <macros>\n-    <import>macros.xml</import>\n-  </macros>\n-  <expand macro="requirements">\n-    <requirement type="package" version="2.11.1">jinja2</requirement>\n-  </expand>\n-  <command detect_errors="exit_code">\n-    <![CDATA[\n-    python \'$mmpbsa_script\' \'$inputs\' &&\n-    PATH_TO_MMPBSA=\\$(dirname `which MMPBSA.py`) &&\n-    export AMBERHOME=\\$(dirname \\$PATH_TO_MMPBSA) &&\n-    #if $input.simulation.solvatedcomplex:\n-        MMPBSA.py -O -i \'$parameteroutfile\' -sp \'$input.simulation.solvatedcomplex\' -cp \'$input.simulation.complex\' -rp \'$input.simulation.receptor\' -lp \'$input.simulation.ligand\' -y \'$input.simulation.trajcomplex\' -o \'$resultoutfile\' -do \'$decompoutfile\'\n-    #else:\n-        MMPBSA.py -O -i \'$parameteroutfile\' -cp \'$input.simulation.complex\' -rp \'$input.simulation.receptor\' -lp \'$input.simulation.ligand\' -y \'$input.simulation.trajcomplex\' -o \'$resultoutfile\' -do \'$decompoutfile\'\n-    #end if\n-\n-    ]]>\n-  </command>\n-  <configfiles>\n-    <inputs name="inputs"/>\n-    <configfile name="mmpbsa_script">\n-      <![CDATA[\n-\n+<tool id="mmpbsa_mmgbsa" name="MMPBSA/MMGBSA" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">\n+    <description>tool for estimating ligand binding affinities</description>\n+    <macros>\n+        <import>macros.xml</import>\n+        <token name="@GALAXY_VERSION@">0</token>\n+    </macros>\n+    <expand macro="requirements">\n+        <requirement type="package" version="2.11.2">jinja2</requirement>\n+    </expand>\n+    <command detect_errors="exit_code"><![CDATA[\n+        python \'$mmpbsa_script\' \'$inputs\' &&\n+        PATH_TO_MMPBSA=\\$(dirname `which MMPBSA.py`) &&\n+        export AMBERHOME=\\$(dirname \\$PATH_TO_MMPBSA) &&\n+        #if $input.simulation.solvatedcomplex:\n+            MMPBSA.py -O -i \'$parameteroutfile\' -sp \'$input.simulation.solvatedcomplex\' -cp \'$input.simulation.complex\' -rp \'$input.simulation.receptor\' -lp \'$input.simulation.ligand\' -y \'$input.simulation.trajcomplex\' -o \'$resultoutfile\' -do \'$decompoutfile\'\n+        #else:\n+            MMPBSA.py -O -i \'$parameteroutfile\' -cp \'$input.simulation.complex\' -rp \'$input.simulation.receptor\' -lp \'$input.simulation.ligand\' -y \'$input.simulation.trajcomplex\' -o \'$resultoutfile\' -do \'$decompoutfile\'\n+        #end if\n+    ]]></command>\n+    <configfiles>\n+        <inputs name="inputs"/>\n+        <configfile name="mmpbsa_script"><![CDATA[\n import os\n import sys\n import json\n@@ -43,211 +38,218 @@\n with open("$parameteroutfile",\'w+\') as f:\n     f.write(template.render(params))\n \n-]]>\n-    </configfile>\n-  </configfiles>\n-  <inputs>\n-    <section name="input" title="Input" expanded="true">\n-      <conditional name="simulation">\n-        <param name="simtype" type="select" label="Single or Multiple Trajectories" help="For a single complex in water choose Single. For complex, receptor and ligand trajectories choose multiple">\n-          <option selected="True" value="single">Single Trajectory Protocol (STP)</option>\n-          <option value="multiple">Multiple Trajectory Protocol (MTP)</option>\n-        </param>\n-        <when value="single">\n-          <param format="txt" name="ligand" type="data" label="AMBER prmtop input for Ligand"/>\n-          <param format="txt" name="receptor" type="data" label="AMBER prmtop input for Receptor"/>\n-          <param format="txt" name="complex" type="data" label="AMBER prmtop input for Complex"/>\n-          <param format="txt" optional="true" name="solvatedcomplex" type="data" label="AMBER prmtop input for Solvated Complex" help="This is optional. Not required if trajectory already has solvent removed"/>\n-          <param format="netcdf" name="trajcomplex" type="data" label="NetCDF trajectory input for Complex" help="Trajectory of the (solvated) complex"/>\n-        </when>\n-        <when value="multiple">\n-          <param format="txt" name="ligand" type="'..b'   **Test data**\n+This tool calculates the Molecular Mechanics Poisson-Boltzman Surface Area (MMPBSA), which is an estimate of the binding free energy between a ligand and a receptor. It also can calculate the MMGBSA, which is a common alternative, replacing the Poisson-Boltzmann term with the General Born approximation.\n+\n+.. class:: infomark\n+\n+**How it works**\n \n-    - The test data for this tool comes from an `Amber Tutorial`_ and the original dataset_ is available.\n-    - For convenience, water has been stripped from the .mdcrd trajectory and this has been converted to netcdf format.\n+Prior to using this tool, simulations of the ligand complexed with the receptor must be run. This tool, which wraps AmberTools, requires a prmtop (Amber parameter topology) file for the receptor, ligand and the complex and the trajectory in netCDF format.\n+\n+- Single Trajectory Estimate: A single simulation of the complex in water is run. The trajectory of this complex is used to estimate the MMPBSA or MMGBSA, depending on the options chosen.\n+- Multiple Trajectory Estimate: Separate simulations of the complex in water, the receptor in water and the ligand in water are run. This is useful if the ligand (or receptor) is expected to have a significantly different conformation in solution compared to in the complex, but is otherwise not recommended as it increases the uncertainty of the results. The trajectories are used to estimate the MMPBSA or MMGBSA depending on the options chosen.\n \n-    .. code-block:: python\n+If simulations were performed using the Galaxy GROMACS tools, the topology (in top format) and trajectories (in xtc format) can be converted to Amber prmtop and netcdf formats using the Convert Parameters and MDTraj file converter tools respectively.\n+\n+.. class:: infomark\n+\n+**Outputs created**\n \n-      import mdtraj as md\n-      traj = md.load(\'1err_prod.mdcrd\', top=\'1err.solvated.prmtop\')\n-      topology = traj.topology\n-      atoms_to_keep = topology.select(\'not water\')\n-      traj.restrict_atoms(atoms_to_keep)\n-      traj.save(\'1err_desolvated.nc\')\n-      traj[0:2].save(\'1err_desolvated_mini.nc\')\n+- The statistics file which includes all information about the frames analysed and average energies. The DELTA G binding is estimated. If negative this is a favourable binding. Note that by default the entropy contribution to binding (unfavourable) is not calculated. A normal mode analysis is needed.\n+- The parameter file contains the input parameters passed from Galaxy to MMPBSA.py in the expected MMPBSA input format.\n+- (Optional, if decomposition analysis is performed) The decomposition file contains a breakdown of each residue\'s contribution to the energy. For example, using the default energy decomposition scheme (1) the interaction of each residue with the rest of the system is calculated and listed.\n+- (Optional, if the "Keep additional files?" option is chosen) A collection containing all temporary files generated in the course of the calculation. This may be useful for debugging.\n \n+.. class:: infomark\n+\n+**User guide and documentation**\n \n-    .. _`Amber Tutorial`: http://ambermd.org/tutorials/advanced/tutorial3/py_script/index.htm\n-    .. _`AmberTools Manual`: https://ambermd.org/doc12/Amber18.pdf\n-    .. _dataset: http://ambermd.org/tutorials/advanced/tutorial3/py_script/files/Est_Rec_top_mdcrd.tgz\n-\n+- The `AmberTools Manual`_\n+- The `Amber Tutorial`_ on using MMPBSA.py\n+- There are many more complex flags available. This Galaxy wrapper only supports GB and PB binding free energies and decomposition. Parallel calculations are not supported at present.\n \n-    ]]>\n-  </help>\n-  <expand macro="citations">\n-    <expand macro="mmpbsa_citation"/>\n-  </expand>\n+.. _`Amber Tutorial`: http://ambermd.org/tutorials/advanced/tutorial3/py_script/index.htm\n+.. _`AmberTools Manual`: https://ambermd.org/doc12/Amber18.pdf\n+\n+    ]]></help>\n+    <expand macro="citations">\n+        <expand macro="mmpbsa_citation"/>\n+    </expand>\n </tool>\n'
b
diff -r d09f116dfca5 -r 51023da731c0 template_mmpbsa_mmgbsa.j2
--- a/template_mmpbsa_mmgbsa.j2 Tue Apr 07 07:59:06 2020 -0400
+++ b/template_mmpbsa_mmgbsa.j2 Mon Jan 25 11:14:40 2021 +0000
b
@@ -2,16 +2,15 @@
 #  
 &general
 startframe={{ allparams.startframe }}, endframe={{ allparams.endframe }}, interval={{ allparams.interval }},
-verbose={{ allparams.verbose }}, keep_files={{ allparams.keep_files | int }}, strip_mask={{ allparams.strip_mask }}, use_sander={{ allparams.use_sander | int }}, entropy={{ allparams.entropy | int }}
+verbose=2, keep_files={{ allparams.keep_files | int }}, strip_mask={{ allparams.strip_mask }}, use_sander={{ allparams.use_sander | int }}, entropy={{ allparams.entropy | int }}, netcdf=1
 /
-{% if calcdetails.gbcalc.calctype == 'yes' %}
+{% if calcdetails.gb_pb_calc.calctype == 'gb' %}
 &gb
-igb={{ calcdetails.gbcalc.igb }}, saltcon={{ calcdetails.gbcalc.saltcon }}
+igb={{ calcdetails.gb_pb_calc.igb }}, saltcon={{ calcdetails.gb_pb_calc.saltcon }}, surfoff={{ calcdetails.gb_pb_calc.surfoff }}, molsurf={{ calcdetails.gb_pb_calc.molsurf | int}}, probe={{ calcdetails.gb_pb_calc.probe }}, msoffset={{ calcdetails.gb_pb_calc.msoffset }}
 /
-{% endif %}
-{% if calcdetails.pbcalc.calctype == 'yes' %}
+{% elif calcdetails.gb_pb_calc.calctype == 'pb' %}
 &pb
-istrng={{ calcdetails.pbcalc.istrng }}, fillratio={{ calcdetails.pbcalc.fillratio }}, inp={{ calcdetails.pbcalc.inp }},radiopt={{ calcdetails.pbcalc.radiopt }}
+istrng={{ calcdetails.gb_pb_calc.istrng }}, fillratio={{ calcdetails.gb_pb_calc.fillratio }}, inp={{ calcdetails.gb_pb_calc.inp }}, radiopt={{ calcdetails.gb_pb_calc.radiopt }}, cavity_offset={{ calcdetails.gb_pb_calc.cavity_offset }}, scale={{ calcdetails.gb_pb_calc.scale }}, linit={{ calcdetails.gb_pb_calc.linit }}, prbrad={{ calcdetails.gb_pb_calc.prbrad }}
 /
 {% endif %}
 {% if calcdetails.decomposition.decomposition == 'yes' %}