annotate qed.py @ 1:ab73abead7fa draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit ed9b6859de648aa5f7cde483732f5df20aaff90e
author bgruening
date Tue, 07 May 2019 13:41:23 -0400
parents 5ccd3a432785
children 52a8d34dd08f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
1 #!/usr/bin/env python
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
2 __all__ = ['weights_max', 'weights_mean', 'weights_none', 'default']
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
3
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
4 # RDKit
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
5 from rdkit.Chem import Descriptors
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
6 from rdkit import Chem
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
7
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
8 # General
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
9 from copy import deepcopy
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
10 from math import exp, log
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
11 import sys, os, re
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
12 import argparse
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
13
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
14
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
15 class SilicosItError(Exception):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
16 """Base class for exceptions in Silicos-it code"""
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
17 pass
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
18
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
19 class WrongArgument(SilicosItError):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
20 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
21 Exception raised when argument to function is not of correct type.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
22
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
23 Attributes:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
24 function -- function in which error occurred
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
25 msg -- explanation of the error
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
26 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
27 def __init__(self, function, msg):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
28 self.function = function
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
29 self.msg = msg
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
30
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
31 def check_filetype(filepath):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
32 mol = False
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
33 possible_inchi = True
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
34 for line_counter, line in enumerate(open(filepath)):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
35 if line_counter > 10000:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
36 break
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
37 if line.find('$$$$') != -1:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
38 return 'sdf'
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
39 elif line.find('@<TRIPOS>MOLECULE') != -1:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
40 return 'mol2'
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
41 elif line.find('ligand id') != -1:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
42 return 'drf'
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
43 elif possible_inchi and re.findall('^InChI=', line):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
44 return 'inchi'
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
45 elif re.findall('^M\s+END', line):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
46 mol = True
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
47 # first line is not an InChI, so it can't be an InChI file
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
48 possible_inchi = False
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
49
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
50 if mol:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
51 # END can occures before $$$$, so and SDF file will
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
52 # be recognised as mol, if you not using this hack'
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
53 return 'mol'
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
54 return 'smi'
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
55
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
56 AliphaticRings = Chem.MolFromSmarts('[$([A;R][!a])]')
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
57
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
58 AcceptorSmarts = [
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
59 '[oH0;X2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
60 '[OH1;X2;v2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
61 '[OH0;X2;v2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
62 '[OH0;X1;v2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
63 '[O-;X1]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
64 '[SH0;X2;v2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
65 '[SH0;X1;v2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
66 '[S-;X1]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
67 '[nH0;X2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
68 '[NH0;X1;v3]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
69 '[$([N;+0;X3;v3]);!$(N[C,S]=O)]'
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
70 ]
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
71 Acceptors = []
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
72 for hba in AcceptorSmarts:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
73 Acceptors.append(Chem.MolFromSmarts(hba))
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
74
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
75 StructuralAlertSmarts = [
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
76 '*1[O,S,N]*1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
77 '[S,C](=[O,S])[F,Br,Cl,I]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
78 '[CX4][Cl,Br,I]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
79 '[C,c]S(=O)(=O)O[C,c]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
80 '[$([CH]),$(CC)]#CC(=O)[C,c]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
81 '[$([CH]),$(CC)]#CC(=O)O[C,c]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
82 'n[OH]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
83 '[$([CH]),$(CC)]#CS(=O)(=O)[C,c]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
84 'C=C(C=O)C=O',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
85 'n1c([F,Cl,Br,I])cccc1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
86 '[CH1](=O)',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
87 '[O,o][O,o]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
88 '[C;!R]=[N;!R]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
89 '[N!R]=[N!R]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
90 '[#6](=O)[#6](=O)',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
91 '[S,s][S,s]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
92 '[N,n][NH2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
93 'C(=O)N[NH2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
94 '[C,c]=S',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
95 '[$([CH2]),$([CH][CX4]),$(C([CX4])[CX4])]=[$([CH2]),$([CH][CX4]),$(C([CX4])[CX4])]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
96 'C1(=[O,N])C=CC(=[O,N])C=C1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
97 'C1(=[O,N])C(=[O,N])C=CC=C1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
98 'a21aa3a(aa1aaaa2)aaaa3',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
99 'a31a(a2a(aa1)aaaa2)aaaa3',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
100 'a1aa2a3a(a1)A=AA=A3=AA=A2',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
101 'c1cc([NH2])ccc1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
102 '[Hg,Fe,As,Sb,Zn,Se,se,Te,B,Si,Na,Ca,Ge,Ag,Mg,K,Ba,Sr,Be,Ti,Mo,Mn,Ru,Pd,Ni,Cu,Au,Cd,Al,Ga,Sn,Rh,Tl,Bi,Nb,Li,Pb,Hf,Ho]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
103 'I',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
104 'OS(=O)(=O)[O-]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
105 '[N+](=O)[O-]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
106 'C(=O)N[OH]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
107 'C1NC(=O)NC(=O)1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
108 '[SH]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
109 '[S-]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
110 'c1ccc([Cl,Br,I,F])c([Cl,Br,I,F])c1[Cl,Br,I,F]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
111 'c1cc([Cl,Br,I,F])cc([Cl,Br,I,F])c1[Cl,Br,I,F]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
112 '[CR1]1[CR1][CR1][CR1][CR1][CR1][CR1]1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
113 '[CR1]1[CR1][CR1]cc[CR1][CR1]1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
114 '[CR2]1[CR2][CR2][CR2][CR2][CR2][CR2][CR2]1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
115 '[CR2]1[CR2][CR2]cc[CR2][CR2][CR2]1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
116 '[CH2R2]1N[CH2R2][CH2R2][CH2R2][CH2R2][CH2R2]1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
117 '[CH2R2]1N[CH2R2][CH2R2][CH2R2][CH2R2][CH2R2][CH2R2]1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
118 'C#C',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
119 '[OR2,NR2]@[CR2]@[CR2]@[OR2,NR2]@[CR2]@[CR2]@[OR2,NR2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
120 '[$([N+R]),$([n+R]),$([N+]=C)][O-]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
121 '[C,c]=N[OH]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
122 '[C,c]=NOC=O',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
123 '[C,c](=O)[CX4,CR0X3,O][C,c](=O)',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
124 'c1ccc2c(c1)ccc(=O)o2',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
125 '[O+,o+,S+,s+]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
126 'N=C=O',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
127 '[NX3,NX4][F,Cl,Br,I]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
128 'c1ccccc1OC(=O)[#6]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
129 '[CR0]=[CR0][CR0]=[CR0]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
130 '[C+,c+,C-,c-]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
131 'N=[N+]=[N-]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
132 'C12C(NC(N1)=O)CSC2',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
133 'c1c([OH])c([OH,NH2,NH])ccc1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
134 'P',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
135 '[N,O,S]C#N',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
136 'C=C=O',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
137 '[Si][F,Cl,Br,I]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
138 '[SX2]O',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
139 '[SiR0,CR0](c1ccccc1)(c2ccccc2)(c3ccccc3)',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
140 'O1CCCCC1OC2CCC3CCCCC3C2',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
141 'N=[CR0][N,n,O,S]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
142 '[cR2]1[cR2][cR2]([Nv3X3,Nv4X4])[cR2][cR2][cR2]1[cR2]2[cR2][cR2][cR2]([Nv3X3,Nv4X4])[cR2][cR2]2',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
143 'C=[C!r]C#N',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
144 '[cR2]1[cR2]c([N+0X3R0,nX3R0])c([N+0X3R0,nX3R0])[cR2][cR2]1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
145 '[cR2]1[cR2]c([N+0X3R0,nX3R0])[cR2]c([N+0X3R0,nX3R0])[cR2]1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
146 '[cR2]1[cR2]c([N+0X3R0,nX3R0])[cR2][cR2]c1([N+0X3R0,nX3R0])',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
147 '[OH]c1ccc([OH,NH2,NH])cc1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
148 'c1ccccc1OC(=O)O',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
149 '[SX2H0][N]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
150 'c12ccccc1(SC(S)=N2)',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
151 'c12ccccc1(SC(=S)N2)',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
152 'c1nnnn1C=O',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
153 's1c(S)nnc1NC=O',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
154 'S1C=CSC1=S',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
155 'C(=O)Onnn',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
156 'OS(=O)(=O)C(F)(F)F',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
157 'N#CC[OH]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
158 'N#CC(=O)',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
159 'S(=O)(=O)C#N',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
160 'N[CH2]C#N',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
161 'C1(=O)NCC1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
162 'S(=O)(=O)[O-,OH]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
163 'NC[F,Cl,Br,I]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
164 'C=[C!r]O',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
165 '[NX2+0]=[O+0]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
166 '[OR0,NR0][OR0,NR0]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
167 'C(=O)O[C,H1].C(=O)O[C,H1].C(=O)O[C,H1]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
168 '[CX2R0][NX3R0]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
169 'c1ccccc1[C;!R]=[C;!R]c2ccccc2',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
170 '[NX3R0,NX4R0,OR0,SX2R0][CX4][NX3R0,NX4R0,OR0,SX2R0]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
171 '[s,S,c,C,n,N,o,O]~[n+,N+](~[s,S,c,C,n,N,o,O])(~[s,S,c,C,n,N,o,O])~[s,S,c,C,n,N,o,O]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
172 '[s,S,c,C,n,N,o,O]~[nX3+,NX3+](~[s,S,c,C,n,N])~[s,S,c,C,n,N]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
173 '[*]=[N+]=[*]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
174 '[SX3](=O)[O-,OH]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
175 'N#N',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
176 'F.F.F.F',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
177 '[R0;D2][R0;D2][R0;D2][R0;D2]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
178 '[cR,CR]~C(=O)NC(=O)~[cR,CR]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
179 'C=!@CC=[O,S]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
180 '[#6,#8,#16][C,c](=O)O[C,c]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
181 'c[C;R0](=[O,S])[C,c]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
182 'c[SX2][C;!R]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
183 'C=C=C',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
184 'c1nc([F,Cl,Br,I,S])ncc1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
185 'c1ncnc([F,Cl,Br,I,S])c1',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
186 'c1nc(c2c(n1)nc(n2)[F,Cl,Br,I])',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
187 '[C,c]S(=O)(=O)c1ccc(cc1)F',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
188 '[15N]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
189 '[13C]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
190 '[18O]',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
191 '[34S]'
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
192 ]
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
193
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
194 StructuralAlerts = []
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
195 for smarts in StructuralAlertSmarts:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
196 StructuralAlerts.append(Chem.MolFromSmarts(smarts))
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
197
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
198
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
199 # ADS parameters for the 8 molecular properties: [row][column]
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
200 # rows[8]: MW, ALOGP, HBA, HBD, PSA, ROTB, AROM, ALERTS
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
201 # columns[7]: A, B, C, D, E, F, DMAX
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
202 # ALOGP parameters from Gregory Gerebtzoff (2012, Roche)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
203 pads1 = [ [2.817065973, 392.5754953, 290.7489764, 2.419764353, 49.22325677, 65.37051707, 104.9805561],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
204 [0.486849448, 186.2293718, 2.066177165, 3.902720615, 1.027025453, 0.913012565, 145.4314800],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
205 [2.948620388, 160.4605972, 3.615294657, 4.435986202, 0.290141953, 1.300669958, 148.7763046],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
206 [1.618662227, 1010.051101, 0.985094388, 0.000000001, 0.713820843, 0.920922555, 258.1632616],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
207 [1.876861559, 125.2232657, 62.90773554, 87.83366614, 12.01999824, 28.51324732, 104.5686167],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
208 [0.010000000, 272.4121427, 2.558379970, 1.565547684, 1.271567166, 2.758063707, 105.4420403],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
209 [3.217788970, 957.7374108, 2.274627939, 0.000000001, 1.317690384, 0.375760881, 312.3372610],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
210 [0.010000000, 1199.094025, -0.09002883, 0.000000001, 0.185904477, 0.875193782, 417.7253140] ]
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
211 # ALOGP parameters from the original publication
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
212 pads2 = [ [2.817065973, 392.5754953, 290.7489764, 2.419764353, 49.22325677, 65.37051707, 104.9805561],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
213 [3.172690585, 137.8624751, 2.534937431, 4.581497897, 0.822739154, 0.576295591, 131.3186604],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
214 [2.948620388, 160.4605972, 3.615294657, 4.435986202, 0.290141953, 1.300669958, 148.7763046],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
215 [1.618662227, 1010.051101, 0.985094388, 0.000000001, 0.713820843, 0.920922555, 258.1632616],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
216 [1.876861559, 125.2232657, 62.90773554, 87.83366614, 12.01999824, 28.51324732, 104.5686167],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
217 [0.010000000, 272.4121427, 2.558379970, 1.565547684, 1.271567166, 2.758063707, 105.4420403],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
218 [3.217788970, 957.7374108, 2.274627939, 0.000000001, 1.317690384, 0.375760881, 312.3372610],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
219 [0.010000000, 1199.094025, -0.09002883, 0.000000001, 0.185904477, 0.875193782, 417.7253140] ]
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
220
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
221 def ads(x, a, b, c, d, e, f, dmax):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
222 return ((a+(b/(1+exp(-1*(x-c+d/2)/e))*(1-1/(1+exp(-1*(x-c-d/2)/f))))) / dmax)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
223
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
224 def properties(mol):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
225 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
226 Calculates the properties that are required to calculate the QED descriptor.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
227 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
228 matches = []
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
229 if mol is None:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
230 raise WrongArgument("properties(mol)", "mol argument is \'None\'")
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
231 x = [0] * 9
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
232 x[0] = Descriptors.MolWt(mol) # MW
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
233 x[1] = Descriptors.MolLogP(mol) # ALOGP
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
234 for hba in Acceptors: # HBA
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
235 if mol.HasSubstructMatch(hba):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
236 matches = mol.GetSubstructMatches(hba)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
237 x[2] += len(matches)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
238 x[3] = Descriptors.NumHDonors(mol) # HBD
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
239 x[4] = Descriptors.TPSA(mol) # PSA
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
240 x[5] = Descriptors.NumRotatableBonds(mol) # ROTB
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
241 x[6] = Chem.GetSSSR(Chem.DeleteSubstructs(deepcopy(mol), AliphaticRings)) # AROM
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
242 for alert in StructuralAlerts: # ALERTS
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
243 if (mol.HasSubstructMatch(alert)): x[7] += 1
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
244 ro5_failed = 0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
245 if x[3] > 5:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
246 ro5_failed += 1 #HBD
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
247 if x[2] > 10:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
248 ro5_failed += 1 #HBA
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
249 if x[0] >= 500:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
250 ro5_failed += 1
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
251 if x[1] > 5:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
252 ro5_failed += 1
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
253 x[8] = ro5_failed
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
254 return x
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
255
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
256
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
257 def qed(w, p, gerebtzoff):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
258 d = [0.00] * 8
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
259 if gerebtzoff:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
260 for i in range(0, 8):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
261 d[i] = ads(p[i], pads1[i][0], pads1[i][1], pads1[i][2], pads1[i][3], pads1[i][4], pads1[i][5], pads1[i][6])
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
262 else:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
263 for i in range(0, 8):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
264 d[i] = ads(p[i], pads2[i][0], pads2[i][1], pads2[i][2], pads2[i][3], pads2[i][4], pads2[i][5], pads2[i][6])
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
265 t = 0.0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
266 for i in range(0, 8):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
267 t += w[i] * log(d[i])
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
268 return (exp(t / sum(w)))
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
269
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
270
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
271 def weights_max(mol, gerebtzoff = True, props = False):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
272 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
273 Calculates the QED descriptor using maximal descriptor weights.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
274 If props is specified we skip the calculation step and use the props-list of properties.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
275 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
276 if not props:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
277 props = properties(mol)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
278 return qed([0.50, 0.25, 0.00, 0.50, 0.00, 0.50, 0.25, 1.00], props, gerebtzoff)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
279
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
280
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
281 def weights_mean(mol, gerebtzoff = True, props = False):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
282 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
283 Calculates the QED descriptor using average descriptor weights.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
284 If props is specified we skip the calculation step and use the props-list of properties.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
285 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
286 if not props:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
287 props = properties(mol)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
288 return qed([0.66, 0.46, 0.05, 0.61, 0.06, 0.65, 0.48, 0.95], props, gerebtzoff)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
289
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
290
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
291 def weights_none(mol, gerebtzoff = True, props = False):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
292 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
293 Calculates the QED descriptor using unit weights.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
294 If props is specified we skip the calculation step and use the props-list of properties.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
295 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
296 if not props:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
297 props = properties(mol)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
298 return qed([1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00], props, gerebtzoff)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
299
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
300
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
301 def default(mol, gerebtzoff = True):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
302 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
303 Calculates the QED descriptor using average descriptor weights and Gregory Gerebtzoff parameters.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
304 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
305 return weights_mean(mol, gerebtzoff)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
306
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
307
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
308 if __name__ == "__main__":
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
309 parser = argparse.ArgumentParser()
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
310 parser.add_argument('-i', '--input',
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
311 required=True,
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
312 help='path to the input file name')
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
313 parser.add_argument("-m", "--method",
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
314 dest="method",
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
315 choices=['max', 'mean', 'unweighted'],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
316 default="mean",
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
317 help="Specify the method you want to use.")
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
318 parser.add_argument("--iformat",
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
319 help="Input format. It must be supported by openbabel.")
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
320 parser.add_argument('-o', '--outfile', type=argparse.FileType('w+'),
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
321 default=sys.stdout,
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
322 help="path to the result file, default it sdtout")
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
323 parser.add_argument("--header", dest="header", action="store_true",
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
324 default=False,
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
325 help="Write header line.")
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
326
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
327
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
328 args = parser.parse_args()
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
329
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
330 # Elucidate filetype and open supplier
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
331 ifile = os.path.abspath(args.input)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
332 if not os.path.isfile(ifile):
1
ab73abead7fa planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents: 0
diff changeset
333 print("Error: ", ifile, " is not a file or cannot be found.")
0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
334 sys.exit(1)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
335 if not os.path.exists(ifile):
1
ab73abead7fa planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents: 0
diff changeset
336 print("Error: ", ifile, " does not exist or cannot be found.")
0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
337 sys.exit(1)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
338 if not os.access(ifile, os.R_OK):
1
ab73abead7fa planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents: 0
diff changeset
339 print("Error: ", ifile, " is not readable.")
0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
340 sys.exit(1)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
341
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
342 if not args.iformat:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
343 # try to guess the filetype
1
ab73abead7fa planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents: 0
diff changeset
344 filetype = check_filetype(ifile)
0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
345 else:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
346 filetype = args.iformat # sdf or smi
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
347
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
348
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
349 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
350 We want to store the original SMILES in the output. So in case of a SMILES file iterate over the file and convert each line separate.
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
351 """
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
352 if filetype == 'sdf':
1
ab73abead7fa planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents: 0
diff changeset
353 supplier = Chem.SDMolSupplier(ifile)
0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
354 # Process file
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
355 if args.header:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
356 args.outfile.write("MW\tALOGP\tHBA\tHBD\tPSA\tROTB\tAROM\tALERTS\tLRo5\tQED\tNAME\n")
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
357 count = 0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
358 for mol in supplier:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
359 count += 1
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
360 if mol is None:
1
ab73abead7fa planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents: 0
diff changeset
361 print("Warning: skipping molecule ", count, " and continuing with next.")
0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
362 continue
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
363 props = properties(mol)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
364
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
365 if args.method == 'max':
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
366 calc_qed = weights_max(mol, True, props)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
367 elif args.method == 'unweighted':
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
368 calc_qed = weights_none(mol, True, props)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
369 else:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
370 calc_qed = weights_mean(mol, True, props)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
371
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
372 args.outfile.write( "%.2f\t%.3f\t%d\t%d\t%.2f\t%d\t%d\t%d\t%s\t%.3f\t%-s\n" % (
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
373 props[0],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
374 props[1],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
375 props[2],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
376 props[3],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
377 props[4],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
378 props[5],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
379 props[6],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
380 props[7],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
381 props[8],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
382 calc_qed,
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
383 mol.GetProp("_Name"),
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
384 ))
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
385 elif filetype == 'smi':
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
386 supplier = Chem.SmilesMolSupplier( ifile, " \t", 0, 1, False, True )
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
387
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
388 # Process file
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
389 if args.header:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
390 args.outfile.write("MW\tALOGP\tHBA\tHBD\tPSA\tROTB\tAROM\tALERTS\tLRo5\tQED\tNAME\tSMILES\n")
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
391 count = 0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
392 for line in open(ifile):
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
393 tokens = line.strip().split('\t')
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
394 if len(tokens) > 1:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
395 smiles, title = tokens
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
396 else:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
397 smiles = tokens[0]
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
398 title = ''
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
399 mol = Chem.MolFromSmiles(smiles)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
400 count += 1
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
401 if mol is None:
1
ab73abead7fa planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit ed9b6859de648aa5f7cde483732f5df20aaff90e
bgruening
parents: 0
diff changeset
402 print("Warning: skipping molecule ", count, " and continuing with next.")
0
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
403 continue
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
404 props = properties(mol)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
405
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
406 if args.method == 'max':
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
407 calc_qed = weights_max(mol, True, props)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
408 elif args.method == 'unweighted':
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
409 calc_qed = weights_none(mol, True, props)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
410 else:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
411 calc_qed = weights_mean(mol, True, props)
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
412
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
413 args.outfile.write( "%.2f\t%.3f\t%d\t%d\t%.2f\t%d\t%d\t%d\t%s\t%.3f\t%-s\t%s\n" % (
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
414 props[0],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
415 props[1],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
416 props[2],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
417 props[3],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
418 props[4],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
419 props[5],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
420 props[6],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
421 props[7],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
422 props[8],
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
423 calc_qed,
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
424 title,
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
425 smiles
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
426 ))
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
427 else:
5ccd3a432785 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/silicos-it/qed commit 4379e712f76f2bb12ee2cc270dd8a0e806df2cd6
bgruening
parents:
diff changeset
428 sys.exit("Error: unknown file-type: %s" % filetype)