changeset 2:d52d6ee95cf2 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rdock commit db567a29443284f2cec1444ec9db9aa6bd913fad"
author bgruening
date Fri, 03 Apr 2020 13:32:38 -0400
parents 5f73eb32ddbf
children 2f218be61685
files rbdock.py test-data/broken_ligand.sdf
diffstat 2 files changed, 187 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rbdock.py	Fri Apr 03 13:32:38 2020 -0400
@@ -0,0 +1,28 @@
+import subprocess
+import argparse
+
+def main():
+    parser = argparse.ArgumentParser(description='Simple wrapper for rbdock')
+    parser.add_argument('-n', '--num', type=int, help='Number of docking poses to generate')
+    parser.add_argument('-s', '--seed', type=int, help='Random seed')
+    args = parser.parse_args()
+
+    cmd = ['rbdock', '-i', 'ligands.sdf', '-r', 'receptor.prm', '-p', 'dock.prm', '-n', str(args.num), '-o', 'rdock_output']
+    if args.seed != None:
+        cmd += ['-s', str(args.seed)]
+
+    ps = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+
+    error_counter = 0
+    for stdout_line in iter(ps.stdout.readline, ''):
+        if 'RBT_DOCKING_ERROR' in str(stdout_line):
+                error_counter += 1
+                if error_counter == 10:
+                    print(ps.stdout)
+                    exit(23)
+        if ps.poll() != None:
+            print(ps.stdout)
+            exit(int(ps.poll()))
+
+if __name__ == "__main__":
+    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/broken_ligand.sdf	Fri Apr 03 13:32:38 2020 -0400
@@ -0,0 +1,159 @@
+Cc1ccsc1C1(O)CCOC1
+ OpenBabel03262013053D
+
+ 18 19  0  0  1  0  0  0  0  0999 V2000
+    2.6244   -0.3204    0.0030 C   0  0  0  0  0  0  0  0  0  0  0  0
+    1.1487   -0.0653   -0.0019 C   0  0  0  0  0  0  0  0  0  0  0  0
+    0.5577    1.2199    0.0010 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -0.7851    1.2166   -0.0030 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.4005   -0.3714    0.0020 S   0  0  0  0  0  0  0  0  0  0  0  0
+    0.1829   -0.9540   -0.0102 C   0  0  0  0  0  0  0  0  0  0  0  0
+    0.7593   -3.2703    1.1063 C   0  0  3  0  0  0  0  0  0  0  0  0
+    0.3797   -2.5572    0.0072 O   0  0  0  0  0  0  0  0  0  0  0  0
+    0.7298   -2.3113   -0.2964 C   0  0  0  0  0  2  0  0  0  0  0  0
+    0.3797   -2.5572    0.0072 C   0  0  0  0  0  2  0  0  0  0  0  0
+    0.3797   -2.5572    0.0072 O   0  0  0  0  0  0  0  0  0  0  0  0
+    0.3797   -2.5572    0.0072 C   0  0  0  0  0  2  0  0  0  0  0  0
+    3.1460    0.6144    0.0045 H   0  0  0  0  0  0  0  0  0  0  0  0
+    2.8955   -0.8785   -0.8702 H   0  0  0  0  0  0  0  0  0  0  0  0
+    2.8896   -0.8781    0.8782 H   0  0  0  0  0  0  0  0  0  0  0  0
+    1.1148    2.0915    0.0058 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.3714    2.0694   -0.0084 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -0.6424   -1.9351    0.5862 H   0  0  0  0  0  0  0  0  0  0  0  0
+  1  2  1  0  0  0  0
+  1 13  1  0  0  0  0
+  1 14  1  0  0  0  0
+  1 15  1  0  0  0  0
+  2  3  1  0  0  0  0
+  2  6  2  0  0  0  0
+  3  4  2  0  0  0  0
+  3 16  1  0  0  0  0
+  4  5  1  0  0  0  0
+  4 17  1  0  0  0  0
+  5  6  1  0  0  0  0
+  6  7  1  0  0  0  0
+  7  8  1  0  0  0  0
+  7  9  1  0  0  0  0
+  7 12  1  0  0  0  0
+  8 18  1  0  0  0  0
+  9 10  1  0  0  0  0
+ 10 11  1  0  0  0  0
+ 11 12  1  0  0  0  0
+M  END
+$$$$
+1S3V
+ OpenBabel07031809403D
+
+ 54 56  0  0  1  0  0  0  0  0999 V2000
+   -0.0237   32.0851    0.4630 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.0257   32.5701    2.5090 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.5816   31.2781    2.5290 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.2645   30.7721    3.8370 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -3.1514   29.5300    3.5680 C   0  0  1  0  0  0  0  0  0  0  0  0
+   -2.3824   28.4990    2.7070 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.7845   29.0260    1.3530 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.3126   30.4241    1.4480 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -3.6244   28.9840    4.9610 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -4.2442   26.5599    4.7800 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -5.1391   25.6479    4.2580 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -4.8561   24.2849    4.1780 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -7.0120   23.8848    3.0290 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -3.6611   23.8468    4.6560 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.5581   22.0928    3.4830 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.7132   24.7349    5.1800 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -0.4583   25.1339    6.0060 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -3.0123   26.0899    5.2580 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -0.4676   30.8241    0.4170 N   0  0  0  0  0  0  0  0  0  0  0  0
+    0.8412   32.3751   -0.5420 N   0  0  0  0  0  0  0  0  0  0  0  0
+   -0.2388   32.9722    1.4960 N   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.2847   33.4632    3.4970 N   0  0  0  0  0  0  0  0  0  0  0  0
+   -4.6273   27.9210    4.8320 N   0  0  0  0  0  0  0  0  0  0  0  0
+   -5.8230   23.4168    3.6560 O   0  0  0  0  0  0  0  0  0  0  0  0
+   -3.1441   22.5778    4.6930 O   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.5192   24.2169    5.6340 O   0  0  0  0  0  0  0  0  0  0  0  0
+   -6.0522   28.2910    4.7350 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.8817   31.5647    4.2416 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.4982   30.5088    4.5555 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -4.0329   29.7742    2.9881 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -3.0645   27.6908    2.4734 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.5623   28.1183    3.3032 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.5506   28.9693    0.5897 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -0.9492   28.3958    1.0737 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -4.0540   29.8010    5.5275 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.7656   28.5900    5.4903 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -6.0962   26.0040    3.8974 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -6.7524   24.4932    2.1715 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -7.6062   23.0393    2.7052 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -7.5820   24.4781    3.7333 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.7376   22.7384    3.1952 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.1884   21.0868    3.6389 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -3.3042   22.0856    2.6981 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -0.8011   25.7764    6.8076 H   0  0  0  0  0  0  0  0  0  0  0  0
+    0.4051   24.5711    6.3386 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -0.1871   25.7386    5.1495 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.2964   26.7805    5.6864 H   0  0  0  0  0  0  0  0  0  0  0  0
+    1.2433   33.2980   -0.6110 H   0  0  0  0  0  0  0  0  0  0  0  0
+    1.0822   31.6679   -1.2201 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -0.8759   34.3850    3.4637 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.8862   33.2055    4.2651 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -6.2045   28.9156    3.8635 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -6.6528   27.3942    4.6458 H   0  0  0  0  0  0  0  0  0  0  0  0
+   -6.3454   28.8348    5.6245 H   0  0  0  0  0  0  0  0  0  0  0  0
+  1 19  1  0  0  0  0
+  1 20  1  0  0  0  0
+  2 22  1  0  0  0  0
+  3  2  2  0  0  0  0
+  3  8  1  0  0  0  0
+  4  3  1  0  0  0  0
+  4 28  1  0  0  0  0
+  4 29  1  0  0  0  0
+  5  4  1  0  0  0  0
+  5  6  1  0  0  0  0
+  5  9  1  0  0  0  0
+  5 30  1  6  0  0  0
+  6  7  1  0  0  0  0
+  6 31  1  0  0  0  0
+  6 32  1  0  0  0  0
+  7  8  1  0  0  0  0
+  7 33  1  0  0  0  0
+  7 34  1  0  0  0  0
+  8 19  2  0  0  0  0
+  9 35  1  0  0  0  0
+  9 36  1  0  0  0  0
+ 11 10  2  0  0  0  0
+ 11 37  1  0  0  0  0
+ 12 11  1  0  0  0  0
+ 13 38  1  0  0  0  0
+ 13 39  1  0  0  0  0
+ 13 40  1  0  0  0  0
+ 14 12  2  0  0  0  0
+ 15 25  1  0  0  0  0
+ 15 41  1  0  0  0  0
+ 15 42  1  0  0  0  0
+ 15 43  1  0  0  0  0
+ 16 14  1  0  0  0  0
+ 16 26  1  0  0  0  0
+ 17 26  1  0  0  0  0
+ 17 44  1  0  0  0  0
+ 17 45  1  0  0  0  0
+ 17 46  1  0  0  0  0
+ 18 10  1  0  0  0  0
+ 18 16  2  0  0  0  0
+ 18 47  1  0  0  0  0
+ 20 48  1  0  0  0  0
+ 20 49  1  0  0  0  0
+ 21  1  2  0  0  0  0
+ 21  2  1  0  0  0  0
+ 22 50  1  0  0  0  0
+ 22 51  1  0  0  0  0
+ 23  9  1  0  0  0  0
+ 23 10  1  0  0  0  0
+ 23 27  1  0  0  0  0
+ 24 12  1  0  0  0  0
+ 24 13  1  0  0  0  0
+ 25 14  1  0  0  0  0
+ 27 52  1  0  0  0  0
+ 27 53  1  0  0  0  0
+ 27 54  1  0  0  0  0
+M  END
+$$$$