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

Changeset 0:0b8a0ce446f5 (2018-10-08)
Next changeset 1:ddb1ae2cf028 (2019-08-30)
Commit message:
planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem commit 11519cd4ef5f8ac5864cdc8b3e93ff30115f2e27
added:
macros_packmol.xml
packmol.xml
template.j2
test-data/packmol_outfile1.pdb
test-data/packmol_outfile2.pdb
test-data/packmol_parameteroutfile_1.txt
test-data/packmol_parameteroutfile_2.txt
test-data/urea.pdb
test-data/water.pdb
b
diff -r 000000000000 -r 0b8a0ce446f5 macros_packmol.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros_packmol.xml Mon Oct 08 05:31:29 2018 -0400
b
@@ -0,0 +1,106 @@
+<macros>
+  <xml name="multiple_input" token_name="input_files" token_max_num="10" token_format="txt" token_label="Sparse matrix file (.mtx, .txt)" token_help_text="Specify a sparse matrix file in .txt format.">
+    <repeat name="@NAME@" min="1" max="@MAX_NUM@" title="Select input file(s):">
+        <param name="input" type="data" format="@FORMAT@" label="@LABEL@" help="@HELP_TEXT@"/>
+        <section name="structureparams" title="Structure Parameters (Make Changes!)" expanded="false">
+        <param name="number" type="integer"  multiple="True" value="100" />
+        <param name="radius" type="float"  multiple="True" value="1.0" />
+        <param name="resnumbers" type="integer"  multiple="True" value="0" help="Default is to number 1 to n for type 1 and 1 to n for type 2"/>
+        <repeat name="constraints_repeat" min="1" max="3" title="Select constraint(s) to apply:">
+        <conditional name="constraints">
+        <param name="constraint" type="select" label="Shape Constraint selection" help="Choose the constraint for the molecules">
+         <option value="fixed">fixed - hold 1 molecule in fixed position (hardcoded number=1) Exclusive other constraints not possible</option>
+         <option selected="True" value="cube">cube</option>
+         <option value="box">box</option>
+         <option value="sphere">sphere</option>
+         <option value="ellipsoid">ellipsoid </option>
+         <option value="plane">plane</option>
+         <option value="cylinder">cylinder</option>
+        </param>
+        <when value="fixed">
+        <param name="center" type="select" label="Center" help="center">
+         <option value="Yes">yes</option>
+         <option value="No">no</option>
+        </param>
+        <param name="x" type="float" value="0.0" label="x" />
+        <param name="y" type="float" value="0.0" label="y" />
+        <param name="z" type="float" value="0.0" label="z" />
+        <param name="a" type="float" value="0.0" label="a" />
+        <param name="b" type="float" value="0.0" label="b" />
+        <param name="g" type="float" value="0.0" label="g" />
+        </when>
+        <when value="cube">
+        <param name="placement" type="select" label="Choose placement of molecules" help="Choose the placement of the molecules">
+         <option value="inside">inside</option>
+         <option value="outside">outside</option>
+        </param>
+        <param name="xmin" type="float" value="0.0" label="xmin" />
+        <param name="ymin" type="float" value="0.0" label="ymin" />
+        <param name="zmin" type="float" value="0.0" label="zmin" />
+        <param name="d" type="float" value="40.0" label="d" />
+        </when>
+        <when value="box">
+        <param name="placement" type="select" label="Choose placement of molecules" help="Choose the placement of the molecules">
+         <option value="inside">inside</option>
+         <option value="outside">outside</option>
+        </param>
+        <param name="xmin" type="float" value="0.0" label="xmin" />
+        <param name="ymin" type="float" value="0.0" label="ymin" />
+        <param name="zmin" type="float" value="0.0" label="zmin" />
+        <param name="xmax" type="float" value="40.0" label="xmax" />
+        <param name="ymax" type="float" value="40.0" label="ymax" />
+        <param name="zmax" type="float" value="40.0" label="zmax" />
+        </when>
+        <when value="sphere">
+        <param name="placement" type="select" label="Choose placement of molecules" help="Choose the placement of the molecules">
+         <option value="inside">inside</option>
+         <option value="outside">outside</option>
+        </param>
+        <param name="a" type="float" value="0.0" label="a" />
+        <param name="b" type="float" value="0.0" label="b" />
+        <param name="c" type="float" value="0.0" label="c" />
+        <param name="d" type="float" value="40.0" label="d" />
+        </when>
+        <when value="ellipsoid">
+        <param name="placement" type="select" label="Choose placement of molecules" help="Choose the placement of the molecules">
+         <option value="inside">inside</option>
+         <option value="outside">outside</option>
+        </param>
+        <param name="a1" type="float" value="0.0" label="a1" />
+        <param name="b1" type="float" value="0.0" label="b1" />
+        <param name="c1" type="float" value="0.0" label="c1" />
+        <param name="a2" type="float" value="20.0" label="a2" />
+        <param name="b2" type="float" value="20.0" label="b2" />
+        <param name="c2" type="float" value="20.0" label="c2" />
+        <param name="d" type="float" value="40.0" label="d" />
+        </when>
+        <when value="plane">
+        <param name="placement" type="select" label="Choose placement of molecules" help="Choose the placement of the molecules">
+         <option value="over">over</option>
+         <option value="below">below</option>
+        </param>
+        <param name="a" type="float" value="0.0" label="a" />
+        <param name="b" type="float" value="0.0" label="b" />
+        <param name="c" type="float" value="0.0" label="c" />
+        <param name="d" type="float" value="10.0" label="d" />
+        </when>
+        <when value="cylinder">
+        <param name="placement" type="select" label="Choose placement of molecules" help="Choose the placement of the molecules">
+         <option value="inside">inside</option>
+         <option value="outside">outside</option>
+        </param>
+        <param name="a1" type="float" value="0.0" label="a1" />
+        <param name="b1" type="float" value="0.0" label="b1" />
+        <param name="c1" type="float" value="0.0" label="c1" />
+        <param name="a2" type="float" value="40.0" label="a2" />
+        <param name="b2" type="float" value="40.0" label="b2" />
+        <param name="c2" type="float" value="40.0" label="c2" />
+        <param name="d" type="float" value="10.0" label="d" />
+        <param name="l" type="float" value="10.0" label="l" />
+        </when>
+        </conditional>
+        </repeat>
+        </section>
+    </repeat>
+  </xml>
+</macros>
b
diff -r 000000000000 -r 0b8a0ce446f5 packmol.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packmol.xml Mon Oct 08 05:31:29 2018 -0400
[
b'@@ -0,0 +1,176 @@\n+<tool id="packmol" name="PACKMOL" version="18.169">\n+    <description>Initial configurations for Molecular Dynamics Simulations by packing optimization</description>\n+    <macros>\n+        <import>macros_packmol.xml</import>\n+    </macros>\n+    <requirements>\n+        <requirement type="package" version="18.169">packmol</requirement>\n+    </requirements>\n+    <command detect_errors="exit_code">\n+        <![CDATA[\n+        python \'$packmol_script\' \'$inputs\' &&\n+        packmol < \'$parameteroutfile\'\n+        ]]>\n+    </command>\n+    <configfiles>\n+        <inputs name="inputs" />\n+        <configfile name="packmol_script"><![CDATA[\n+\n+import os\n+import sys\n+import json\n+\n+from jinja2 import Environment, FileSystemLoader\n+\n+input_json_path = sys.argv[1]\n+params = json.load(open(input_json_path, "r"))\n+\n+# get the inputs\n+input_iter = []\n+#for $i, $s in enumerate( $packmol_format.packmol_inputs )\n+pmfile_index = $i\n+pmfile_path = "${s.input.file_name}"\n+input_iter.append(pmfile_path)\n+params["packmol_format"]["packmol_inputs"][pmfile_index]["file"] = pmfile_path\n+params["packmol_format"]["packmol_inputs"][pmfile_index]["datasetname"] = "${s.input.name}"\n+#end for\n+\n+params["outfile"] = "$outfile"\n+\n+currentpath = "$__tool_directory__"  # should work generally\n+template_environment = Environment(loader=FileSystemLoader(currentpath),lstrip_blocks=True, trim_blocks=True)\n+template = template_environment.get_template(\'template.j2\')\n+print(params)\n+\n+with open("$parameteroutfile",\'w+\') as f:\n+    f.write(template.render(params))\n+\n+]]>\n+        </configfile>\n+    </configfiles>\n+    <inputs>\n+        <conditional name="packmol_format">\n+            <param name="selected_format" type="select" label="Select a file format:">\n+                <option value="pdb" selected="true">pdb</option>\n+                <!--option value="xyz">xyz</option>\n+                <option value="tinker">tinker</option>\n+                <option value="moldy">moldy</option-->\n+            </param>\n+            <when value="pdb">\n+                <expand macro="multiple_input" name="packmol_inputs" format="pdb" label="pdb input with molecule type" help_text="Select a pdb file in .pdb format"/>\n+            </when>\n+            <!--when value="xyz">\n+                <expand macro="multiple_input" name="packmol_inputs" format="xyz" label="xyz input with molecule type" help_text="Select a xyz file in .xyz format"/>\n+            </when>\n+            <when value="tinker">\n+                <expand macro="multiple_input" name="packmol_inputs" format="tinker" label="tinker input with molecule type" help_text="Select a tinker file in .tinker format"/>\n+            </when>\n+            <when value="moldy">\n+                <expand macro="multiple_input" name="packmol_inputs" format="moldy" label="moldy input with molecule type" help_text="Select a moldy file in .moldy format"/>\n+            </when-->\n+        </conditional>\n+        <section name="allparams" title="General Parameters" expanded="false">\n+            <param name="tolerance" type="float" value="2.0" label="distance tolerance" min="0.0" max="100.0"/>\n+            <param name="nloop" type="integer" value="20" label="maximum number of optimisation loops" min="1" max="10000"/>\n+            <param name="maxit" type="integer" value="20" label="maximum number of gencan iterations per loop" min="1" max="10000"/>\n+            <param name="seed" type="integer" value="-1" label="random number generator seed, default of -1 used the computer time to set the seed" />\n+        </section>\n+    </inputs>\n+    <outputs>\n+        <data format="pdb" name="outfile" label="${tool.name}: structure output">\n+        <change_format>\n+            <when input="selected_format" value="pdb" format="pdb"/>\n+            <!-- <when input="selected_format" value="xyz" format="xyz"/>\n+            <when input="selected_format" value="tinker" format="tinker"/>\n+            <when input="selected_format" value="moldy" format="m'..b'<param name="selected_format" value="pdb"/>\n+            <param name="packmol_inputs_0|input" value="water.pdb" ftype="pdb"/>\n+            <param name="allparams.seed" value="101"/>\n+            <output name="outfile" file="packmol_outfile1.pdb" compare="sim_size" delta="100000">\n+                <assert_contents>\n+                    <has_text text="HETATM  300  O   HOH"/>\n+                </assert_contents>\n+            </output>\n+            <output name="parameteroutfile" file="packmol_parameteroutfile_1.txt" compare="diff" lines_diff="6"/>\n+        </test>\n+        <test>\n+            <param name="selected_format" value="pdb"/>\n+            <param name="packmol_inputs_0|input" value="water.pdb" ftype="pdb"/>\n+            <param name="packmol_inputs_1|input" value="urea.pdb" ftype="pdb"/>\n+            <param name="packmol_inputs_0|structureparams|number" value="1000"/>\n+            <param name="packmol_inputs_1|structureparams|number" value="400"/>\n+            <param name="packmol_inputs_0|structureparams|constraints_repeat_0|constraints|constraint" value="box"/>\n+            <param name="packmol_inputs_0|structureparams|constraints_repeat_0|constraints|xmax" value="40.0"/>\n+            <param name="packmol_inputs_0|structureparams|constraints_repeat_0|constraints|ymax" value="40.0"/>\n+            <param name="packmol_inputs_0|structureparams|constraints_repeat_0|constraints|zmax" value="40.0"/>\n+            <param name="packmol_inputs_1|structureparams|constraints_repeat_0|constraints|constraint" value="box"/>\n+            <param name="packmol_inputs_1|structureparams|constraints_repeat_0|constraints|xmax" value="40.0"/>\n+            <param name="packmol_inputs_1|structureparams|constraints_repeat_0|constraints|ymax" value="40.0"/>\n+            <param name="packmol_inputs_1|structureparams|constraints_repeat_0|constraints|zmax" value="40.0"/>\n+            <param name="allparams.seed" value="-1"/>\n+            <output name="outfile" file="packmol_outfile2.pdb" compare="sim_size" delta="100000">\n+                <assert_contents>\n+                    <has_text text="HETATM 3000  O   HOH"/>\n+                    <has_text text="HETATM 6200  H     2 B"/>\n+                </assert_contents>\n+            </output>\n+            <output name="parameteroutfile" file="packmol_parameteroutfile_2.txt" compare="diff" lines_diff="6"/>\n+        </test>\n+    </tests>\n+    <help><![CDATA[\n+.. class:: infomark\n+\n+**What it does**\n+\n+Packmol creates initial MD configurations from input molecules. For example, create a water and urea mixture.\n+\n+.. class:: infomark\n+\n+**How it works**\n+\n+- Select a molecule file type e.g. pdb,xyz\n+- Select single molecule from your history (can select multiple)\n+- For each molecule:\n+   - choose how many molecules to create (number variable)\n+   - optionally choose:\n+       - molecular radius\n+       - how to number the molecules (resnumber variable)\n+   - choose one or more placement constraint(s). Each constraint has different parameters:\n+       - for example, specify placement inside a cube of size 40 Angstroms placed at the origin\n+       - all units are in Angstroms for distances and degrees for angles\n+\n+.. class:: infomark\n+\n+**Outputs created**\n+\n+- A pdb file, view this in Galaxy by clicking on visualise and choosing a viewer. The NGLViewer works well for small molecules.\n+- A packmol input script (for debugging and repeatability)\n+\n+.. class:: infomark\n+\n+**User guide and documentation**\n+\n+- Packmol `userguide`_\n+- Calculating the number of molecules using the `volume guesser`_\n+\n+.. class:: infomark\n+\n+**Known issues**\n+\n+- fixed constraint only allows 1 atom but this is not set for the user. user has to set this. Job may fail.\n+\n+.. _`userguide`: http://m3g.iqm.unicamp.br/packmol/userguide.shtml#more\n+.. _`volume guesser`: http://m3g.iqm.unicamp.br/packmol/utilities.shtml\n+\n+]]>\n+    </help>\n+    <citations>\n+        <citation type="doi">10.1002/jcc.21224</citation>\n+    </citations>\n+</tool>\n'
b
diff -r 000000000000 -r 0b8a0ce446f5 template.j2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/template.j2 Mon Oct 08 05:31:29 2018 -0400
b
@@ -0,0 +1,42 @@
+# Template for packmol in Galaxy
+#  
+
+tolerance {{ allparams.tolerance }}
+nloop  {{ allparams.nloop }} 
+maxit  {{ allparams.maxit }} 
+seed  {{ allparams.seed }} 
+filetype {{packmol_format.selected_format}} 
+output {{outfile}}
+
+{% for struct in packmol_format.packmol_inputs %}
+structure {{struct.file}}
+# Galaxy datasetname - {{struct.datasetname}}
+  number {{struct.structureparams.number}}
+  radius {{struct.structureparams.radius}}
+  resnumbers {{struct.structureparams.resnumbers}} 
+{% for c in struct.structureparams.constraints_repeat %}
+  {% if c.constraints.constraint == 'fixed' %}
+   {% if c.constraints.center == 'Yes' %}
+  center
+   {% endif %}
+  {{c.constraints.constraint}} {{c.constraints.x}} {{c.constraints.y}} {{c.constraints.z}} {{c.constraints.a}} {{c.constraints.b}} {{c.constraints.g}}
+  {% elif c.constraints.constraint == 'cube' %}
+  {{c.constraints.placement}} {{c.constraints.constraint}} {{c.constraints.xmin}} {{c.constraints.ymin}} {{c.constraints.zmin}} {{c.constraints.d}}
+  {% elif c.constraints.constraint == 'box' %}
+  {{c.constraints.placement}} {{c.constraints.constraint}} {{c.constraints.xmin}} {{c.constraints.ymin}} {{c.constraints.zmin}} {{c.constraints.xmax}} {{c.constraints.ymax}} {{c.constraints.zmax}} 
+  {% elif c.constraints.constraint == 'sphere' %}
+  {{c.constraints.placement}} {{c.constraints.constraint}} {{c.constraints.a}} {{c.constraints.b}} {{c.constraints.c}} {{c.constraints.d}}
+  {% elif c.constraints.constraint == 'ellipsoid' %}
+  {{c.constraints.placement}} {{c.constraints.constraint}} {{c.constraints.a1}} {{c.constraints.b1}} {{c.constraints.c1}} {{c.constraints.a2}} {{c.constraints.b2}} {{c.constraints.c2}} {{c.constraints.d}} 
+  {% elif c.constraints.constraint == 'plane' %}
+  {{c.constraints.placement}} {{c.constraints.constraint}} {{c.constraints.a}} {{c.constraints.b}} {{c.constraints.c}} {{c.constraints.d}}
+  {% elif c.constraints.constraint == 'cylinder' %}
+  {{c.constraints.placement}} {{c.constraints.constraint}} {{c.constraints.a1}} {{c.constraints.b1}} {{c.constraints.c1}} {{c.constraints.a2}} {{c.constraints.b2}} {{c.constraints.c2}} {{c.constraints.d}} {{c.constraints.l}}
+  {% else %}
+ unknowntype specified {{c.constraints}}
+{% endif %}
+{% endfor %}
+end structure
+
+{% endfor %}
+
b
diff -r 000000000000 -r 0b8a0ce446f5 test-data/packmol_outfile1.pdb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/packmol_outfile1.pdb Mon Oct 08 05:31:29 2018 -0400
b
b'@@ -0,0 +1,306 @@\n+HEADER \n+TITLE     Built with Packmol                                             \n+REMARK   Packmol generated pdb file \n+REMARK   Home-Page: http://www.ime.unicamp.br/~martinez/packmol\n+REMARK\n+HETATM    1  H   HOH A   1       9.274  18.459  24.988                          \n+HETATM    2  H   HOH A   1       7.739  18.902  24.651                          \n+HETATM    3  O   HOH A   1       8.666  18.832  24.286                          \n+HETATM    4  H   HOH A   2      38.440  20.929  14.513                          \n+HETATM    5  H   HOH A   2      39.987  21.222  14.946                          \n+HETATM    6  O   HOH A   2      39.331  20.512  14.694                          \n+HETATM    7  H   HOH A   3       3.756  39.733  36.425                          \n+HETATM    8  H   HOH A   3       5.149  39.108  37.002                          \n+HETATM    9  O   HOH A   3       4.744  39.672  36.284                          \n+HETATM   10  H   HOH A   4      36.428  26.732  19.466                          \n+HETATM   11  H   HOH A   4      36.144  28.169  20.189                          \n+HETATM   12  O   HOH A   4      36.799  27.643  19.648                          \n+HETATM   13  H   HOH A   5      25.380  10.824  25.072                          \n+HETATM   14  H   HOH A   5      24.509  11.242  26.389                          \n+HETATM   15  O   HOH A   5      24.596  11.352  25.399                          \n+HETATM   16  H   HOH A   6      22.963  27.548   3.198                          \n+HETATM   17  H   HOH A   6      21.510  28.033   3.764                          \n+HETATM   18  O   HOH A   6      22.367  28.337   3.349                          \n+HETATM   19  H   HOH A   7       5.703   4.916   6.848                          \n+HETATM   20  H   HOH A   7       6.380   3.446   7.074                          \n+HETATM   21  O   HOH A   7       6.564   4.424   6.983                          \n+HETATM   22  H   HOH A   8      22.545  21.992  36.433                          \n+HETATM   23  H   HOH A   8      21.587  22.436  37.678                          \n+HETATM   24  O   HOH A   8      22.287  22.747  37.036                          \n+HETATM   25  H   HOH A   9      25.853  36.397  30.817                          \n+HETATM   26  H   HOH A   9      26.030  37.979  30.455                          \n+HETATM   27  O   HOH A   9      26.405  37.216  30.979                          \n+HETATM   28  H   HOH A  10      29.624  32.655  32.811                          \n+HETATM   29  H   HOH A  10      29.363  31.221  32.074                          \n+HETATM   30  O   HOH A  10      29.962  32.019  32.116                          \n+HETATM   31  H   HOH A  11      22.570   6.775   9.646                          \n+HETATM   32  H   HOH A  11      24.062   6.675  10.304                          \n+HETATM   33  O   HOH A  11      23.272   7.271  10.158                          \n+HETATM   34  H   HOH A  12       1.908   0.785   8.972                          \n+HETATM   35  H   HOH A  12       1.194   1.700   7.823                          \n+HETATM   36  O   HOH A  12       1.072   1.271   8.717                          \n+HETATM   37  H   HOH A  13      25.533  20.545  24.058                          \n+HETATM   38  H   HOH A  13      24.666  19.262  24.578                          \n+HETATM   39  O   HOH A  13      25.461  19.548  24.043                          \n+HETATM   40  H   HOH A  14       2.975  24.413  16.764                          \n+HETATM   41  H   HOH A  14       1.842  23.518  17.526                          \n+HETATM   42  O   HOH A  14       2.706  23.486  17.025                          \n+HETATM   43  H   HOH A  15       8.204  13.660  15.248                          \n+HETATM   44  H   HOH A  15       8.924  12.494  14.360                          \n+HETATM   45  O   HOH A  15       8.998  13.055  15.184                          \n+HETATM   46  H   HOH A  16       5.023  33.627   9.840                          \n+HETATM   47  '..b' 84       3.301  21.302  13.918                          \n+HETATM  253  H   HOH A  85      36.314  14.381  30.404                          \n+HETATM  254  H   HOH A  85      37.185  14.841  31.707                          \n+HETATM  255  O   HOH A  85      37.063  14.128  31.017                          \n+HETATM  256  H   HOH A  86      21.365  14.264  11.548                          \n+HETATM  257  H   HOH A  86      22.773  14.009  10.762                          \n+HETATM  258  O   HOH A  86      22.132  14.706  11.082                          \n+HETATM  259  H   HOH A  87      34.896  11.110   8.540                          \n+HETATM  260  H   HOH A  87      36.056  11.074   9.689                          \n+HETATM  261  O   HOH A  87      35.880  11.172   8.710                          \n+HETATM  262  H   HOH A  88      11.617  31.553  14.100                          \n+HETATM  263  H   HOH A  88      10.061  31.062  14.041                          \n+HETATM  264  O   HOH A  88      10.890  31.079  14.598                          \n+HETATM  265  H   HOH A  89       9.644  23.483  39.343                          \n+HETATM  266  H   HOH A  89       8.318  24.428  39.220                          \n+HETATM  267  O   HOH A  89       9.108  24.063  38.729                          \n+HETATM  268  H   HOH A  90      31.221  14.405  25.689                          \n+HETATM  269  H   HOH A  90      29.903  13.620  25.129                          \n+HETATM  270  O   HOH A  90      30.233  14.290  25.793                          \n+HETATM  271  H   HOH A  91       0.698  39.943  24.679                          \n+HETATM  272  H   HOH A  91       0.098  38.450  24.401                          \n+HETATM  273  O   HOH A  91       0.927  38.973  24.595                          \n+HETATM  274  H   HOH A  92      13.710   2.270  37.555                          \n+HETATM  275  H   HOH A  92      14.712   1.320  38.428                          \n+HETATM  276  O   HOH A  92      14.530   2.256  38.128                          \n+HETATM  277  H   HOH A  93      30.810  22.813  33.200                          \n+HETATM  278  H   HOH A  93      30.849  21.181  33.212                          \n+HETATM  279  O   HOH A  93      30.253  21.983  33.223                          \n+HETATM  280  H   HOH A  94      13.006  18.513   1.360                          \n+HETATM  281  H   HOH A  94      12.193  17.841   2.607                          \n+HETATM  282  O   HOH A  94      12.105  18.232   1.691                          \n+HETATM  283  H   HOH A  95      34.249   6.193  20.751                          \n+HETATM  284  H   HOH A  95      34.196   7.803  21.017                          \n+HETATM  285  O   HOH A  95      33.803   6.921  21.273                          \n+HETATM  286  H   HOH A  96      39.513  38.648   1.366                          \n+HETATM  287  H   HOH A  96      39.946  37.719   2.638                          \n+HETATM  288  O   HOH A  96      39.313  37.807   1.870                          \n+HETATM  289  H   HOH A  97      39.580  22.335  30.984                          \n+HETATM  290  H   HOH A  97      38.435  21.174  30.899                          \n+HETATM  291  O   HOH A  97      39.351  21.440  30.601                          \n+HETATM  292  H   HOH A  98      15.157  27.942   5.491                          \n+HETATM  293  H   HOH A  98      14.011  26.781   5.409                          \n+HETATM  294  O   HOH A  98      14.176  27.767   5.400                          \n+HETATM  295  H   HOH A  99      12.832  12.991  17.051                          \n+HETATM  296  H   HOH A  99      13.338  13.396  18.550                          \n+HETATM  297  O   HOH A  99      12.771  12.763  18.023                          \n+HETATM  298  H   HOH A 100      12.618  22.846  20.145                          \n+HETATM  299  H   HOH A 100      12.208  21.772  21.305                          \n+HETATM  300  O   HOH A 100      12.469  22.720  21.126                          \n+END\n'
b
diff -r 000000000000 -r 0b8a0ce446f5 test-data/packmol_outfile2.pdb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/packmol_outfile2.pdb Mon Oct 08 05:31:29 2018 -0400
b
b'@@ -0,0 +1,6206 @@\n+HEADER \n+TITLE     Built with Packmol                                             \n+REMARK   Packmol generated pdb file \n+REMARK   Home-Page: http://www.ime.unicamp.br/~martinez/packmol\n+REMARK\n+HETATM    1  H   HOH A   1       2.385  24.122   0.119                          \n+HETATM    2  H   HOH A   1       2.006  22.544   0.305                          \n+HETATM    3  O   HOH A   1       1.643  23.475   0.303                          \n+HETATM    4  H   HOH A   2      16.854  10.994  20.320                          \n+HETATM    5  H   HOH A   2      17.163  12.347  21.180                          \n+HETATM    6  O   HOH A   2      16.505  11.895  20.578                          \n+HETATM    7  H   HOH A   3      22.852  27.560  16.919                          \n+HETATM    8  H   HOH A   3      22.253  26.042  16.972                          \n+HETATM    9  O   HOH A   3      22.022  27.007  16.850                          \n+HETATM   10  H   HOH A   4      24.450  30.140  20.847                          \n+HETATM   11  H   HOH A   4      23.406  28.929  21.181                          \n+HETATM   12  O   HOH A   4      23.523  29.921  21.153                          \n+HETATM   13  H   HOH A   5      36.734  35.594  34.812                          \n+HETATM   14  H   HOH A   5      37.604  34.580  35.751                          \n+HETATM   15  O   HOH A   5      37.143  34.684  34.870                          \n+HETATM   16  H   HOH A   6      19.713  34.571  34.235                          \n+HETATM   17  H   HOH A   6      20.498  35.905  34.756                          \n+HETATM   18  O   HOH A   6      19.645  35.388  34.808                          \n+HETATM   19  H   HOH A   7      36.984  36.850  39.773                          \n+HETATM   20  H   HOH A   7      36.605  38.140  38.846                          \n+HETATM   21  O   HOH A   7      36.372  37.636  39.677                          \n+HETATM   22  H   HOH A   8       8.163  37.579   5.945                          \n+HETATM   23  H   HOH A   8       7.472  38.749   5.039                          \n+HETATM   24  O   HOH A   8       7.314  37.882   5.512                          \n+HETATM   25  H   HOH A   9      11.757   7.586   5.085                          \n+HETATM   26  H   HOH A   9      10.533   6.537   5.347                          \n+HETATM   27  O   HOH A   9      10.768   7.498   5.206                          \n+HETATM   28  H   HOH A  10       9.516  35.171   5.485                          \n+HETATM   29  H   HOH A  10       8.815  33.845   4.841                          \n+HETATM   30  O   HOH A  10       8.646  34.709   5.313                          \n+HETATM   31  H   HOH A  11       6.372  27.789  38.494                          \n+HETATM   32  H   HOH A  11       7.099  27.347  39.887                          \n+HETATM   33  O   HOH A  11       6.853  28.121  39.305                          \n+HETATM   34  H   HOH A  12      29.153  23.000  32.754                          \n+HETATM   35  H   HOH A  12      28.068  21.818  32.452                          \n+HETATM   36  O   HOH A  12      28.380  22.728  32.182                          \n+HETATM   37  H   HOH A  13      20.195  -0.004  27.989                          \n+HETATM   38  H   HOH A  13      21.139   1.295  28.287                          \n+HETATM   39  O   HOH A  13      20.865   0.392  28.617                          \n+HETATM   40  H   HOH A  14      10.418  21.031   2.909                          \n+HETATM   41  H   HOH A  14       9.761  22.518   3.062                          \n+HETATM   42  O   HOH A  14      10.616  22.010   2.964                          \n+HETATM   43  H   HOH A  15      31.210  17.895  21.940                          \n+HETATM   44  H   HOH A  15      31.973  18.845  23.027                          \n+HETATM   45  O   HOH A  15      32.096  18.258  22.228                          \n+HETATM   46  H   HOH A  16      11.086  23.831  30.350                          \n+HETATM   47 '..b'394      33.321  32.593  15.068                          \n+HETATM 6153  C     2 B 395      25.861  23.755  33.063                          \n+HETATM 6154  N     2 B 395      26.907  24.328  33.886                          \n+HETATM 6155  O     2 B 395      26.190  22.879  32.021                          \n+HETATM 6156  N     2 B 395      24.472  24.088  33.318                          \n+HETATM 6157  H     2 B 395      24.417  24.725  34.097                          \n+HETATM 6158  H     2 B 395      23.544  23.894  32.976                          \n+HETATM 6159  H     2 B 395      26.496  24.930  34.582                          \n+HETATM 6160  H     2 B 395      27.910  24.326  33.995                          \n+HETATM 6161  C     2 B 396      36.346   8.134  34.241                          \n+HETATM 6162  N     2 B 396      37.452   7.281  33.853                          \n+HETATM 6163  O     2 B 396      35.662   7.892  35.439                          \n+HETATM 6164  N     2 B 396      35.947   9.237  33.388                          \n+HETATM 6165  H     2 B 396      36.541   9.265  32.574                          \n+HETATM 6166  H     2 B 396      35.273   9.986  33.338                          \n+HETATM 6167  H     2 B 396      37.826   7.595  32.971                          \n+HETATM 6168  H     2 B 396      37.973   6.478  34.172                          \n+HETATM 6169  C     2 B 397       7.470  15.615  25.594                          \n+HETATM 6170  N     2 B 397       6.331  15.326  24.744                          \n+HETATM 6171  O     2 B 397       7.280  15.869  26.957                          \n+HETATM 6172  N     2 B 397       8.807  15.641  25.031                          \n+HETATM 6173  H     2 B 397       8.760  15.439  24.045                          \n+HETATM 6174  H     2 B 397       9.767  15.795  25.298                          \n+HETATM 6175  H     2 B 397       6.647  15.169  23.800                          \n+HETATM 6176  H     2 B 397       5.328  15.229  24.783                          \n+HETATM 6177  C     2 B 398      32.020  29.539  39.141                          \n+HETATM 6178  N     2 B 398      33.278  30.166  39.501                          \n+HETATM 6179  O     2 B 398      32.018  28.337  38.423                          \n+HETATM 6180  N     2 B 398      30.766  30.157  39.525                          \n+HETATM 6181  H     2 B 398      30.951  31.008  40.031                          \n+HETATM 6182  H     2 B 398      29.769  30.018  39.453                          \n+HETATM 6183  H     2 B 398      33.095  31.016  40.011                          \n+HETATM 6184  H     2 B 398      34.273  30.035  39.411                          \n+HETATM 6185  C     2 B 399      37.130  39.320  13.459                          \n+HETATM 6186  N     2 B 399      36.687  39.197  12.084                          \n+HETATM 6187  O     2 B 399      38.317  40.000  13.754                          \n+HETATM 6188  N     2 B 399      36.342  38.738  14.529                          \n+HETATM 6189  H     2 B 399      35.527  38.290  14.141                          \n+HETATM 6190  H     2 B 399      36.339  38.632  15.532                          \n+HETATM 6191  H     2 B 399      35.821  38.682  12.054                          \n+HETATM 6192  H     2 B 399      36.957  39.455  11.147                          \n+HETATM 6193  C     2 B 400      21.143  23.134  28.380                          \n+HETATM 6194  N     2 B 400      22.079  22.882  27.301                          \n+HETATM 6195  O     2 B 400      20.406  24.324  28.403                          \n+HETATM 6196  N     2 B 400      20.972  22.154  29.435                          \n+HETATM 6197  H     2 B 400      21.575  21.365  29.262                          \n+HETATM 6198  H     2 B 400      20.450  21.999  30.283                          \n+HETATM 6199  H     2 B 400      22.520  21.987  27.441                          \n+HETATM 6200  H     2 B 400      22.435  23.304  26.457                          \n+END\n'
b
diff -r 000000000000 -r 0b8a0ce446f5 test-data/packmol_parameteroutfile_1.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/packmol_parameteroutfile_1.txt Mon Oct 08 05:31:29 2018 -0400
b
@@ -0,0 +1,18 @@
+# Template for packmol in Galaxy
+#  
+
+tolerance 2.0
+nloop  20 
+maxit  20 
+seed  101 
+filetype pdb 
+output /tmp/tmprvsgniri/files/000/dataset_2.dat
+
+structure /tmp/tmprvsgniri/files/000/dataset_1.dat
+# Galaxy datasetname - water.pdb
+  number 100
+  radius 1.0
+  resnumbers 0 
+  inside cube 0.0 0.0 0.0 40.0
+end structure
+
b
diff -r 000000000000 -r 0b8a0ce446f5 test-data/packmol_parameteroutfile_2.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/packmol_parameteroutfile_2.txt Mon Oct 08 05:31:29 2018 -0400
b
@@ -0,0 +1,26 @@
+# Template for packmol in Galaxy
+#  
+
+tolerance 2.0
+nloop  20 
+maxit  20 
+seed  -1 
+filetype pdb 
+output /tmp/tmpgg9o1466/files/000/dataset_5.dat
+
+structure /tmp/tmpgg9o1466/files/000/dataset_1.dat
+# Galaxy datasetname - water.pdb
+  number 1000
+  radius 1.0
+  resnumbers 0 
+  inside box 0.0 0.0 0.0 40.0 40.0 40.0 
+end structure
+
+structure /tmp/tmpgg9o1466/files/000/dataset_4.dat
+# Galaxy datasetname - urea.pdb
+  number 400
+  radius 1.0
+  resnumbers 0 
+  inside box 0.0 0.0 0.0 40.0 40.0 40.0 
+end structure
+
b
diff -r 000000000000 -r 0b8a0ce446f5 test-data/urea.pdb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/urea.pdb Mon Oct 08 05:31:29 2018 -0400
b
@@ -0,0 +1,9 @@
+HEADER
+HETATM    1  C     2    2        0.000   0.000   1.400
+HETATM    2  N     2    2       -1.256   0.000   2.125
+HETATM    3  O     2    2        0.000   0.000   0.000
+HETATM    4  N     2    2        1.256   0.000   2.125
+HETATM    5  H     2    2        1.072   0.000   3.116
+HETATM    6  H     2    2        2.252   0.000   1.968
+HETATM    7  H     2    2       -1.072   0.000   3.116
+HETATM    8  H     2    2       -2.252   0.000   1.968
b
diff -r 000000000000 -r 0b8a0ce446f5 test-data/water.pdb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/water.pdb Mon Oct 08 05:31:29 2018 -0400
b
@@ -0,0 +1,10 @@
+HEADER    water
+COMPND
+SOURCE
+HETATM    1  H   HOH     1       9.626   6.787  12.673
+HETATM    2  H   HOH     1       9.626   8.420  12.673
+HETATM    3  O   HOH     1      10.203   7.604  12.673
+CONECT    1    3
+CONECT    2    3
+CONECT    3    1    2
+END