toxtree 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1384) hide show
  1. checksums.yaml +7 -0
  2. data/Toxtree-v2.6.13/LICENSE.txt +6 -0
  3. data/Toxtree-v2.6.13/README.txt +813 -0
  4. data/Toxtree-v2.6.13/Toxtree/Toxtree-2.6.13.jar +0 -0
  5. data/Toxtree-v2.6.13/Toxtree/example.java +41 -0
  6. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-ames-2.6.13.jar +0 -0
  7. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-biodegradation-2.6.13.jar +0 -0
  8. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-cramer-2.6.13-tests.jar +0 -0
  9. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-cramer-2.6.13.jar +0 -0
  10. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-cramer2-2.6.13.jar +0 -0
  11. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-dnabinding-2.6.13.jar +0 -0
  12. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-eye-2.6.13.jar +0 -0
  13. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-functional_groups-2.6.13.jar +0 -0
  14. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-kroes-2.6.13.jar +0 -0
  15. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-mic-2.6.13.jar +0 -0
  16. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-michaelacceptors-2.6.13.jar +0 -0
  17. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-mutant-2.6.13.jar +0 -0
  18. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-proteinbinding-2.6.13.jar +0 -0
  19. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-sicret-2.6.13.jar +0 -0
  20. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-skinsensitisation-2.6.13.jar +0 -0
  21. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-smartcyp-2.6.13.jar +0 -0
  22. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-verhaar-2.6.13.jar +0 -0
  23. data/Toxtree-v2.6.13/Toxtree/ext/toxtree-verhaar2-2.6.13.jar +0 -0
  24. data/Toxtree-v2.6.13/Toxtree/input.txt +4 -0
  25. data/Toxtree-v2.6.13/Toxtree/result.txt +2 -0
  26. data/Toxtree-v2.6.13/Toxtree/toxtree-plugins.properties +24 -0
  27. data/Toxtree-v2.6.13/doc/Toxtree_BenigniBossaRulebase_manual.pdf +0 -0
  28. data/Toxtree-v2.6.13/doc/Toxtree_CramerExtensions_manual.pdf +0 -0
  29. data/Toxtree-v2.6.13/doc/Toxtree_START_manual.pdf +0 -0
  30. data/Toxtree-v2.6.13/doc/Toxtree_ToxMic_manual.pdf +0 -0
  31. data/Toxtree-v2.6.13/doc/Toxtree_installation_manual.pdf +0 -0
  32. data/Toxtree-v2.6.13/doc/Toxtree_user_manual.pdf +0 -0
  33. data/Toxtree-v2.6.13/doc/src/toxtree-2.6.13-javadoc.jar +0 -0
  34. data/Toxtree-v2.6.13/lib/javacpl.exe +0 -0
  35. data/Toxtree-v2.6.13/src/META-INF/MANIFEST.MF +6 -0
  36. data/Toxtree-v2.6.13/src/bodymol.inchi +398 -0
  37. data/Toxtree-v2.6.13/src/bodymol.sdf +34220 -0
  38. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/BiodgeradationRules.java +205 -0
  39. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/BiodgeradationRules.properties +7 -0
  40. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/categories/CategoryBiodegradable.java +62 -0
  41. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/categories/CategoryPersistent.java +63 -0
  42. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/categories/CategoryUnknown.java +55 -0
  43. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/positive_examples.sml +32 -0
  44. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAlcohols.java +68 -0
  45. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAldehyde.java +68 -0
  46. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAliphaticCyclicNoBranches.java +70 -0
  47. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAliphaticEther.java +67 -0
  48. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAliphaticFusedRingsNonBranched.java +79 -0
  49. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAlyphaticSulphonicAcids.java +73 -0
  50. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAminoAcids.java +70 -0
  51. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAromaticHalogen.java +76 -0
  52. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAromaticNGroups.java +72 -0
  53. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAromaticSulphonicAcid.java +70 -0
  54. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleAzoGroup.java +68 -0
  55. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleCyanoGroupOnMoreThanEightAtomsChain.java +70 -0
  56. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleEpoxide.java +68 -0
  57. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleEsters.java +67 -0
  58. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleFormaldehyde.java +67 -0
  59. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleHalogenSubstitutedBranched.java +71 -0
  60. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleKetone.java +67 -0
  61. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleMoreThanTwoHydroxyOnAromaticRing.java +133 -0
  62. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleNNitroso.java +75 -0
  63. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleNitrile.java +68 -0
  64. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleOneHalogenOnUnbranched.java +135 -0
  65. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RulePhosphateEsters.java +71 -0
  66. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RulePyridineRing.java +67 -0
  67. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleTerminalIsopropylNonCyclic.java +132 -0
  68. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleTerminalTertButyl.java +68 -0
  69. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleTertiaryAmine.java +67 -0
  70. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleTriazineRing.java +68 -0
  71. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleTrifluoromethyl.java +69 -0
  72. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleTwoHalogensOnUnbranchedNonCyclic.java +137 -0
  73. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleTwoOrMoreRings.java +99 -0
  74. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleTwoTerminalDiaminoGroupsOnNonCyclic.java +132 -0
  75. data/Toxtree-v2.6.13/src/com/molecularnetworks/start/rules/RuleTwoTerminalDoubleBondsOnUnbranched.java +132 -0
  76. data/Toxtree-v2.6.13/src/cramer2/CramerRulesWithExtensions.java +283 -0
  77. data/Toxtree-v2.6.13/src/cramer2/CramerRulesWithExtensions.properties +10 -0
  78. data/Toxtree-v2.6.13/src/cramer2/MANIFEST.plugin +10 -0
  79. data/Toxtree-v2.6.13/src/cramer2/categories/CramerClass1.java +51 -0
  80. data/Toxtree-v2.6.13/src/cramer2/categories/CramerClass2.java +55 -0
  81. data/Toxtree-v2.6.13/src/cramer2/categories/CramerClass3.java +53 -0
  82. data/Toxtree-v2.6.13/src/cramer2/categories/CramerTreeResult.java +80 -0
  83. data/Toxtree-v2.6.13/src/cramer2/package.html +17 -0
  84. data/Toxtree-v2.6.13/src/cramer2/rules/RuleBenzeneAnalogues.java +58 -0
  85. data/Toxtree-v2.6.13/src/cramer2/rules/RuleDivalentSulphur.java +57 -0
  86. data/Toxtree-v2.6.13/src/cramer2/rules/RuleFreeABUnsaturatedHetero.java +52 -0
  87. data/Toxtree-v2.6.13/src/cramer2/rules/RuleHasOnlySaltSulphonateSulphate.java +279 -0
  88. data/Toxtree-v2.6.13/src/cramer2/rules/RuleNormalBodyConstituent.java +75 -0
  89. data/Toxtree-v2.6.13/src/cramer2/rules/RuleReadilyHydrolysedPO4.java +106 -0
  90. data/Toxtree-v2.6.13/src/cramer2/rules/RuleUnchargedOrganophosphates.java +53 -0
  91. data/Toxtree-v2.6.13/src/cramer2/rules/RuleUnchargedOrganophosphates_wrong.txt +207 -0
  92. data/Toxtree-v2.6.13/src/eye/EyeIrritationRules.java +356 -0
  93. data/Toxtree-v2.6.13/src/eye/EyeIrritationRules.properties +7 -0
  94. data/Toxtree-v2.6.13/src/eye/MANIFEST.plugin +11 -0
  95. data/Toxtree-v2.6.13/src/eye/categories/CategoryCorrosiveEye.java +45 -0
  96. data/Toxtree-v2.6.13/src/eye/categories/CategoryCorrosiveSkin.java +42 -0
  97. data/Toxtree-v2.6.13/src/eye/categories/CategoryModerateIrritation2Eye.java +42 -0
  98. data/Toxtree-v2.6.13/src/eye/categories/CategoryNotCorrosive2Eye.java +46 -0
  99. data/Toxtree-v2.6.13/src/eye/categories/CategoryNotCorrosive2Skin.java +46 -0
  100. data/Toxtree-v2.6.13/src/eye/categories/CategoryNotCorrosive2SkinAndIrritating2Eye.java +42 -0
  101. data/Toxtree-v2.6.13/src/eye/categories/CategoryNotCorrosive2SkinEye.java +45 -0
  102. data/Toxtree-v2.6.13/src/eye/categories/CategoryNotCorrosive2SkinOrIrritating2Eye.java +42 -0
  103. data/Toxtree-v2.6.13/src/eye/categories/CategoryNotIrritating2Eye.java +50 -0
  104. data/Toxtree-v2.6.13/src/eye/categories/CategoryNotIrritatingOrCorrosive2Eye.java +49 -0
  105. data/Toxtree-v2.6.13/src/eye/categories/CategoryUnknown.java +61 -0
  106. data/Toxtree-v2.6.13/src/eye/categories/package.html +77 -0
  107. data/Toxtree-v2.6.13/src/eye/package.html +17 -0
  108. data/Toxtree-v2.6.13/src/eye/rules/Rule1.java +41 -0
  109. data/Toxtree-v2.6.13/src/eye/rules/Rule13_AliphaticMonoalcohols.java +158 -0
  110. data/Toxtree-v2.6.13/src/eye/rules/Rule14Aliphatic_glycerol_monoethers.java +52 -0
  111. data/Toxtree-v2.6.13/src/eye/rules/Rule15.java +61 -0
  112. data/Toxtree-v2.6.13/src/eye/rules/Rule16.java +69 -0
  113. data/Toxtree-v2.6.13/src/eye/rules/Rule17.java +55 -0
  114. data/Toxtree-v2.6.13/src/eye/rules/Rule18.java +54 -0
  115. data/Toxtree-v2.6.13/src/eye/rules/Rule19.java +59 -0
  116. data/Toxtree-v2.6.13/src/eye/rules/Rule20.java +53 -0
  117. data/Toxtree-v2.6.13/src/eye/rules/Rule21.java +56 -0
  118. data/Toxtree-v2.6.13/src/eye/rules/Rule22.java +57 -0
  119. data/Toxtree-v2.6.13/src/eye/rules/Rule23.java +61 -0
  120. data/Toxtree-v2.6.13/src/eye/rules/Rule24.java +128 -0
  121. data/Toxtree-v2.6.13/src/eye/rules/Rule25.java +52 -0
  122. data/Toxtree-v2.6.13/src/eye/rules/Rule26.java +57 -0
  123. data/Toxtree-v2.6.13/src/eye/rules/Rule27.java +52 -0
  124. data/Toxtree-v2.6.13/src/eye/rules/Rule28.java +53 -0
  125. data/Toxtree-v2.6.13/src/eye/rules/Rule29.java +52 -0
  126. data/Toxtree-v2.6.13/src/eye/rules/Rule30.java +60 -0
  127. data/Toxtree-v2.6.13/src/eye/rules/Rule31.java +57 -0
  128. data/Toxtree-v2.6.13/src/eye/rules/Rule32.java +56 -0
  129. data/Toxtree-v2.6.13/src/eye/rules/Rule33.java +84 -0
  130. data/Toxtree-v2.6.13/src/eye/rules/Rule34.java +58 -0
  131. data/Toxtree-v2.6.13/src/eye/rules/Rule35.java +61 -0
  132. data/Toxtree-v2.6.13/src/eye/rules/Rule36.java +56 -0
  133. data/Toxtree-v2.6.13/src/eye/rules/Rule37.java +56 -0
  134. data/Toxtree-v2.6.13/src/eye/rules/Rule38.java +156 -0
  135. data/Toxtree-v2.6.13/src/eye/rules/Rule39.java +60 -0
  136. data/Toxtree-v2.6.13/src/eye/rules/RuleAqueousSolubility.java +48 -0
  137. data/Toxtree-v2.6.13/src/eye/rules/RuleAqueousSolubility1.java +47 -0
  138. data/Toxtree-v2.6.13/src/eye/rules/RuleAqueousSolubility_10_2.java +67 -0
  139. data/Toxtree-v2.6.13/src/eye/rules/RuleAqueousSolubility_10_5.java +51 -0
  140. data/Toxtree-v2.6.13/src/eye/rules/RuleAqueousSolubility_11_7.java +49 -0
  141. data/Toxtree-v2.6.13/src/eye/rules/RuleAqueousSolubility_8_3.java +50 -0
  142. data/Toxtree-v2.6.13/src/eye/rules/RuleAqueousSolubility_8_4.java +48 -0
  143. data/Toxtree-v2.6.13/src/eye/rules/RuleAqueousSolubility_9_3.java +51 -0
  144. data/Toxtree-v2.6.13/src/eye/rules/RuleHasOnlyC_H_O.java +36 -0
  145. data/Toxtree-v2.6.13/src/eye/rules/RuleHasOnlyC_H_O_Halogen.java +44 -0
  146. data/Toxtree-v2.6.13/src/eye/rules/RuleHasOnlyC_H_O_N.java +45 -0
  147. data/Toxtree-v2.6.13/src/eye/rules/RuleHasOnlyC_H_O_N_Halogen.java +40 -0
  148. data/Toxtree-v2.6.13/src/eye/rules/RuleHasOnlyC_H_O_N_S.java +51 -0
  149. data/Toxtree-v2.6.13/src/eye/rules/RuleLipidSolubility.java +47 -0
  150. data/Toxtree-v2.6.13/src/eye/rules/RuleLipidSolubility_10_4.java +50 -0
  151. data/Toxtree-v2.6.13/src/eye/rules/RuleLipidSolubility_9_1.java +50 -0
  152. data/Toxtree-v2.6.13/src/eye/rules/RuleLogP.java +52 -0
  153. data/Toxtree-v2.6.13/src/eye/rules/RuleLogP1.java +49 -0
  154. data/Toxtree-v2.6.13/src/eye/rules/RuleLogP_10_1.java +48 -0
  155. data/Toxtree-v2.6.13/src/eye/rules/RuleLogP_11_4.java +43 -0
  156. data/Toxtree-v2.6.13/src/eye/rules/RuleLogP_11_5.java +47 -0
  157. data/Toxtree-v2.6.13/src/eye/rules/RuleLogP_11_6.java +45 -0
  158. data/Toxtree-v2.6.13/src/eye/rules/RuleLogP_12_4.java +41 -0
  159. data/Toxtree-v2.6.13/src/eye/rules/RuleLogP_9_4.java +47 -0
  160. data/Toxtree-v2.6.13/src/eye/rules/RuleMeltingPoint_11_2.java +44 -0
  161. data/Toxtree-v2.6.13/src/eye/rules/RuleMeltingPoint_12_3.java +48 -0
  162. data/Toxtree-v2.6.13/src/eye/rules/RuleMeltingPoint_8_1.java +49 -0
  163. data/Toxtree-v2.6.13/src/eye/rules/RuleMelting_Point_11_3.java +45 -0
  164. data/Toxtree-v2.6.13/src/eye/rules/RuleMolWeight.java +53 -0
  165. data/Toxtree-v2.6.13/src/eye/rules/RuleMolWeight_10_3.java +46 -0
  166. data/Toxtree-v2.6.13/src/eye/rules/RuleMolWeight_11_1.java +45 -0
  167. data/Toxtree-v2.6.13/src/eye/rules/RuleMolWeight_12_2.java +65 -0
  168. data/Toxtree-v2.6.13/src/eye/rules/RuleMolWeight_8_2.java +46 -0
  169. data/Toxtree-v2.6.13/src/eye/rules/RuleMolWeight_9_2.java +54 -0
  170. data/Toxtree-v2.6.13/src/eye/rules/RuleMolweight_12_1.java +49 -0
  171. data/Toxtree-v2.6.13/src/eye/rules/package.html +15 -0
  172. data/Toxtree-v2.6.13/src/foodmol.inchi +104 -0
  173. data/Toxtree-v2.6.13/src/foodmol.sdf +6200 -0
  174. data/Toxtree-v2.6.13/src/kroes/KroesFig1Q1.sdf +110 -0
  175. data/Toxtree-v2.6.13/src/mic/MICRules.java +260 -0
  176. data/Toxtree-v2.6.13/src/mic/MICRules.properties +5 -0
  177. data/Toxtree-v2.6.13/src/mic/categories/micronucleusClass1.java +53 -0
  178. data/Toxtree-v2.6.13/src/mic/categories/micronucleusClass2.java +53 -0
  179. data/Toxtree-v2.6.13/src/mic/rules/MICTreeResult.java +158 -0
  180. data/Toxtree-v2.6.13/src/mic/rules/PB29.java +67 -0
  181. data/Toxtree-v2.6.13/src/mic/rules/PB30.java +68 -0
  182. data/Toxtree-v2.6.13/src/mic/rules/RuleAlertsForMIC.java +47 -0
  183. data/Toxtree-v2.6.13/src/mic/rules/SA1.java +59 -0
  184. data/Toxtree-v2.6.13/src/mic/rules/SA10.java +128 -0
  185. data/Toxtree-v2.6.13/src/mic/rules/SA11.java +76 -0
  186. data/Toxtree-v2.6.13/src/mic/rules/SA12.java +71 -0
  187. data/Toxtree-v2.6.13/src/mic/rules/SA13.java +70 -0
  188. data/Toxtree-v2.6.13/src/mic/rules/SA14.java +64 -0
  189. data/Toxtree-v2.6.13/src/mic/rules/SA15.java +59 -0
  190. data/Toxtree-v2.6.13/src/mic/rules/SA16.java +61 -0
  191. data/Toxtree-v2.6.13/src/mic/rules/SA18.java +211 -0
  192. data/Toxtree-v2.6.13/src/mic/rules/SA19.java +87 -0
  193. data/Toxtree-v2.6.13/src/mic/rules/SA2.java +184 -0
  194. data/Toxtree-v2.6.13/src/mic/rules/SA21.java +66 -0
  195. data/Toxtree-v2.6.13/src/mic/rules/SA22.java +70 -0
  196. data/Toxtree-v2.6.13/src/mic/rules/SA23.java +67 -0
  197. data/Toxtree-v2.6.13/src/mic/rules/SA24.java +65 -0
  198. data/Toxtree-v2.6.13/src/mic/rules/SA25.java +110 -0
  199. data/Toxtree-v2.6.13/src/mic/rules/SA26.java +93 -0
  200. data/Toxtree-v2.6.13/src/mic/rules/SA27.java +146 -0
  201. data/Toxtree-v2.6.13/src/mic/rules/SA28.java +204 -0
  202. data/Toxtree-v2.6.13/src/mic/rules/SA28bis.java +108 -0
  203. data/Toxtree-v2.6.13/src/mic/rules/SA28ter.java +94 -0
  204. data/Toxtree-v2.6.13/src/mic/rules/SA29.java +83 -0
  205. data/Toxtree-v2.6.13/src/mic/rules/SA3.java +65 -0
  206. data/Toxtree-v2.6.13/src/mic/rules/SA30.java +63 -0
  207. data/Toxtree-v2.6.13/src/mic/rules/SA32.java +67 -0
  208. data/Toxtree-v2.6.13/src/mic/rules/SA33.java +67 -0
  209. data/Toxtree-v2.6.13/src/mic/rules/SA34.java +76 -0
  210. data/Toxtree-v2.6.13/src/mic/rules/SA35.java +67 -0
  211. data/Toxtree-v2.6.13/src/mic/rules/SA36.java +68 -0
  212. data/Toxtree-v2.6.13/src/mic/rules/SA4.java +68 -0
  213. data/Toxtree-v2.6.13/src/mic/rules/SA5.java +61 -0
  214. data/Toxtree-v2.6.13/src/mic/rules/SA6.java +64 -0
  215. data/Toxtree-v2.6.13/src/mic/rules/SA7.java +60 -0
  216. data/Toxtree-v2.6.13/src/mic/rules/SA8.java +128 -0
  217. data/Toxtree-v2.6.13/src/mic/rules/SA9.java +60 -0
  218. data/Toxtree-v2.6.13/src/michaelacceptors/MATreeResult.java +34 -0
  219. data/Toxtree-v2.6.13/src/michaelacceptors/MichaelAcceptorRules.java +186 -0
  220. data/Toxtree-v2.6.13/src/michaelacceptors/MichaelAcceptorRules.properties +6 -0
  221. data/Toxtree-v2.6.13/src/michaelacceptors/categories/CategoryMichaelAcceptor.java +43 -0
  222. data/Toxtree-v2.6.13/src/michaelacceptors/categories/CategoryUnknown.java +49 -0
  223. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule1.java +42 -0
  224. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule10A.java +26 -0
  225. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule10B.java +25 -0
  226. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule11.java +26 -0
  227. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule12A.java +26 -0
  228. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule12B.java +25 -0
  229. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule13A.java +24 -0
  230. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule13B.java +27 -0
  231. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule14.java +25 -0
  232. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule2.java +37 -0
  233. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule3.java +32 -0
  234. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule4A.java +28 -0
  235. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule4B.java +28 -0
  236. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule5.java +29 -0
  237. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule6.java +26 -0
  238. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule7.java +26 -0
  239. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule8.java +26 -0
  240. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule9A.java +24 -0
  241. data/Toxtree-v2.6.13/src/michaelacceptors/rules/Rule9B.java +27 -0
  242. data/Toxtree-v2.6.13/src/mutant/BB_CarcMutRules.java +375 -0
  243. data/Toxtree-v2.6.13/src/mutant/BB_CarcMutRules.properties +9 -0
  244. data/Toxtree-v2.6.13/src/mutant/categories/CategoryCarcinogen.java +47 -0
  245. data/Toxtree-v2.6.13/src/mutant/categories/CategoryError.java +18 -0
  246. data/Toxtree-v2.6.13/src/mutant/categories/CategoryMutagenTA100.java +48 -0
  247. data/Toxtree-v2.6.13/src/mutant/categories/CategoryNoGenotoxicAlert.java +52 -0
  248. data/Toxtree-v2.6.13/src/mutant/categories/CategoryNoNongenotoxicAlert.java +51 -0
  249. data/Toxtree-v2.6.13/src/mutant/categories/CategoryNonMutagen.java +45 -0
  250. data/Toxtree-v2.6.13/src/mutant/categories/CategoryNotCarcinogen.java +47 -0
  251. data/Toxtree-v2.6.13/src/mutant/categories/CategoryPositiveAlertGenotoxic.java +50 -0
  252. data/Toxtree-v2.6.13/src/mutant/categories/CategoryPositiveAlertNongenotoxic.java +50 -0
  253. data/Toxtree-v2.6.13/src/mutant/categories/MutantCategory.java +65 -0
  254. data/Toxtree-v2.6.13/src/mutant/categories/QSARApplicable.java +51 -0
  255. data/Toxtree-v2.6.13/src/mutant/descriptors/AromaticAmineSubstituentsDescriptor.java +584 -0
  256. data/Toxtree-v2.6.13/src/mutant/descriptors/DescriptorBridgedBiphenyl.java +45 -0
  257. data/Toxtree-v2.6.13/src/mutant/descriptors/DescriptorHasNO2Group.java +66 -0
  258. data/Toxtree-v2.6.13/src/mutant/descriptors/DescriptorIDist.java +152 -0
  259. data/Toxtree-v2.6.13/src/mutant/descriptors/DescriptorIsAniline.java +122 -0
  260. data/Toxtree-v2.6.13/src/mutant/descriptors/DescriptorMolarRefractivity.java +73 -0
  261. data/Toxtree-v2.6.13/src/mutant/descriptors/DescriptorStructurePresence.java +149 -0
  262. data/Toxtree-v2.6.13/src/mutant/descriptors/SubstituentExtractor.java +234 -0
  263. data/Toxtree-v2.6.13/src/mutant/descriptors/SubstituentPosition.java +63 -0
  264. data/Toxtree-v2.6.13/src/mutant/descriptors/SubstituentsDescriptor.java +115 -0
  265. data/Toxtree-v2.6.13/src/mutant/descriptors/whim_weights.txt +39 -0
  266. data/Toxtree-v2.6.13/src/mutant/rules/MutantTreeResult.java +348 -0
  267. data/Toxtree-v2.6.13/src/mutant/rules/QSAR6Applicable.java +162 -0
  268. data/Toxtree-v2.6.13/src/mutant/rules/RuleABUnsaturatedAldehyde.java +67 -0
  269. data/Toxtree-v2.6.13/src/mutant/rules/RuleAlertsForCarcinogenicity.java +47 -0
  270. data/Toxtree-v2.6.13/src/mutant/rules/RuleAlertsForGenotoxicCarcinogenicity.java +47 -0
  271. data/Toxtree-v2.6.13/src/mutant/rules/RuleAlertsNongenotoxicCarcinogenicity.java +54 -0
  272. data/Toxtree-v2.6.13/src/mutant/rules/RuleAromaticAmineNoSulfonicGroup.java +144 -0
  273. data/Toxtree-v2.6.13/src/mutant/rules/RuleAromaticDiazo.java +98 -0
  274. data/Toxtree-v2.6.13/src/mutant/rules/RuleDACancerogenicityAromaticAmines.java +217 -0
  275. data/Toxtree-v2.6.13/src/mutant/rules/RuleDAMutagenicityABUnsaturatedAldehydes.java +189 -0
  276. data/Toxtree-v2.6.13/src/mutant/rules/RuleDAMutagenicityAromaticAmines.java +239 -0
  277. data/Toxtree-v2.6.13/src/mutant/rules/RuleDerivedAromaticAmines.java +166 -0
  278. data/Toxtree-v2.6.13/src/mutant/rules/SA10_gen.java +127 -0
  279. data/Toxtree-v2.6.13/src/mutant/rules/SA11_gen.java +80 -0
  280. data/Toxtree-v2.6.13/src/mutant/rules/SA12_gen.java +68 -0
  281. data/Toxtree-v2.6.13/src/mutant/rules/SA13_gen.java +66 -0
  282. data/Toxtree-v2.6.13/src/mutant/rules/SA14_gen.java +61 -0
  283. data/Toxtree-v2.6.13/src/mutant/rules/SA15_gen.java +55 -0
  284. data/Toxtree-v2.6.13/src/mutant/rules/SA16_gen.java +57 -0
  285. data/Toxtree-v2.6.13/src/mutant/rules/SA17_nogen.java +76 -0
  286. data/Toxtree-v2.6.13/src/mutant/rules/SA18_gen.java +187 -0
  287. data/Toxtree-v2.6.13/src/mutant/rules/SA19_gen.java +71 -0
  288. data/Toxtree-v2.6.13/src/mutant/rules/SA1_gen.java +57 -0
  289. data/Toxtree-v2.6.13/src/mutant/rules/SA20_nogen.java +139 -0
  290. data/Toxtree-v2.6.13/src/mutant/rules/SA21_gen.java +66 -0
  291. data/Toxtree-v2.6.13/src/mutant/rules/SA22_gen.java +69 -0
  292. data/Toxtree-v2.6.13/src/mutant/rules/SA23_gen.java +62 -0
  293. data/Toxtree-v2.6.13/src/mutant/rules/SA24_gen.java +60 -0
  294. data/Toxtree-v2.6.13/src/mutant/rules/SA25_gen.java +104 -0
  295. data/Toxtree-v2.6.13/src/mutant/rules/SA26_gen.java +79 -0
  296. data/Toxtree-v2.6.13/src/mutant/rules/SA27_gen.java +131 -0
  297. data/Toxtree-v2.6.13/src/mutant/rules/SA28_gen.java +169 -0
  298. data/Toxtree-v2.6.13/src/mutant/rules/SA28bis_gen.java +92 -0
  299. data/Toxtree-v2.6.13/src/mutant/rules/SA28ter_gen.java +88 -0
  300. data/Toxtree-v2.6.13/src/mutant/rules/SA29_gen.java +78 -0
  301. data/Toxtree-v2.6.13/src/mutant/rules/SA2_gen.java +156 -0
  302. data/Toxtree-v2.6.13/src/mutant/rules/SA30_gen.java +63 -0
  303. data/Toxtree-v2.6.13/src/mutant/rules/SA31a_nogen.java +202 -0
  304. data/Toxtree-v2.6.13/src/mutant/rules/SA31b_nogen.java +64 -0
  305. data/Toxtree-v2.6.13/src/mutant/rules/SA31c_nogen.java +46 -0
  306. data/Toxtree-v2.6.13/src/mutant/rules/SA37_gen.java +59 -0
  307. data/Toxtree-v2.6.13/src/mutant/rules/SA38_gen.java +58 -0
  308. data/Toxtree-v2.6.13/src/mutant/rules/SA39_gen_and_nogen.java +59 -0
  309. data/Toxtree-v2.6.13/src/mutant/rules/SA3_gen.java +61 -0
  310. data/Toxtree-v2.6.13/src/mutant/rules/SA40_nogen.java +59 -0
  311. data/Toxtree-v2.6.13/src/mutant/rules/SA41_nogen.java +59 -0
  312. data/Toxtree-v2.6.13/src/mutant/rules/SA42_nogen.java +58 -0
  313. data/Toxtree-v2.6.13/src/mutant/rules/SA43_nogen.java +57 -0
  314. data/Toxtree-v2.6.13/src/mutant/rules/SA44_nogen.java +61 -0
  315. data/Toxtree-v2.6.13/src/mutant/rules/SA45_nogen.java +58 -0
  316. data/Toxtree-v2.6.13/src/mutant/rules/SA46_nogen.java +59 -0
  317. data/Toxtree-v2.6.13/src/mutant/rules/SA47_nogen.java +60 -0
  318. data/Toxtree-v2.6.13/src/mutant/rules/SA48_nogen.java +58 -0
  319. data/Toxtree-v2.6.13/src/mutant/rules/SA49_nogen.java +60 -0
  320. data/Toxtree-v2.6.13/src/mutant/rules/SA4_gen.java +63 -0
  321. data/Toxtree-v2.6.13/src/mutant/rules/SA50_nogen.java +59 -0
  322. data/Toxtree-v2.6.13/src/mutant/rules/SA51_nogen.java +58 -0
  323. data/Toxtree-v2.6.13/src/mutant/rules/SA52_nogen.java +57 -0
  324. data/Toxtree-v2.6.13/src/mutant/rules/SA53_nogen.java +61 -0
  325. data/Toxtree-v2.6.13/src/mutant/rules/SA54_nogen.java +58 -0
  326. data/Toxtree-v2.6.13/src/mutant/rules/SA55_nogen.java +59 -0
  327. data/Toxtree-v2.6.13/src/mutant/rules/SA56_nogen.java +59 -0
  328. data/Toxtree-v2.6.13/src/mutant/rules/SA5_gen.java +58 -0
  329. data/Toxtree-v2.6.13/src/mutant/rules/SA6_gen.java +61 -0
  330. data/Toxtree-v2.6.13/src/mutant/rules/SA7_gen.java +56 -0
  331. data/Toxtree-v2.6.13/src/mutant/rules/SA8_gen.java +121 -0
  332. data/Toxtree-v2.6.13/src/mutant/rules/SA9_gen.java +54 -0
  333. data/Toxtree-v2.6.13/src/mutant/rules/SMARTSGroup.java +60 -0
  334. data/Toxtree-v2.6.13/src/mutant/rules/SMARTSgroups.java +56 -0
  335. data/Toxtree-v2.6.13/src/mutant/rules/UserInputABUnsaturatedAldehyde.java +24 -0
  336. data/Toxtree-v2.6.13/src/mutant/rules/UserInputAromaticAmine.java +47 -0
  337. data/Toxtree-v2.6.13/src/mutant/rules/VerifyAlertsGenotoxic.java +42 -0
  338. data/Toxtree-v2.6.13/src/mutant/rules/VerifyAlertsNongenotoxic.java +42 -0
  339. data/Toxtree-v2.6.13/src/sicret/SicretRules.java +357 -0
  340. data/Toxtree-v2.6.13/src/sicret/SicretRules.properties +9 -0
  341. data/Toxtree-v2.6.13/src/sicret/categories/CategoryCorrosive.java +47 -0
  342. data/Toxtree-v2.6.13/src/sicret/categories/CategoryIrritating.java +46 -0
  343. data/Toxtree-v2.6.13/src/sicret/categories/CategoryIrritatingOrCorrosive.java +28 -0
  344. data/Toxtree-v2.6.13/src/sicret/categories/CategoryNotCorrosive.java +47 -0
  345. data/Toxtree-v2.6.13/src/sicret/categories/CategoryNotIrritating.java +46 -0
  346. data/Toxtree-v2.6.13/src/sicret/categories/CategoryNotIrritatingOrCorrosive.java +49 -0
  347. data/Toxtree-v2.6.13/src/sicret/categories/CategoryUnknown.java +60 -0
  348. data/Toxtree-v2.6.13/src/sicret/categories/package.html +16 -0
  349. data/Toxtree-v2.6.13/src/sicret/package.html +17 -0
  350. data/Toxtree-v2.6.13/src/sicret/rules/Rule11.java +42 -0
  351. data/Toxtree-v2.6.13/src/sicret/rules/Rule12.java +44 -0
  352. data/Toxtree-v2.6.13/src/sicret/rules/Rule13.java +47 -0
  353. data/Toxtree-v2.6.13/src/sicret/rules/Rule14.java +45 -0
  354. data/Toxtree-v2.6.13/src/sicret/rules/Rule15.java +47 -0
  355. data/Toxtree-v2.6.13/src/sicret/rules/Rule16.java +41 -0
  356. data/Toxtree-v2.6.13/src/sicret/rules/Rule17.java +42 -0
  357. data/Toxtree-v2.6.13/src/sicret/rules/Rule18.java +45 -0
  358. data/Toxtree-v2.6.13/src/sicret/rules/Rule19.java +47 -0
  359. data/Toxtree-v2.6.13/src/sicret/rules/Rule20.java +44 -0
  360. data/Toxtree-v2.6.13/src/sicret/rules/Rule21.java +54 -0
  361. data/Toxtree-v2.6.13/src/sicret/rules/Rule22.java +45 -0
  362. data/Toxtree-v2.6.13/src/sicret/rules/Rule23.java +47 -0
  363. data/Toxtree-v2.6.13/src/sicret/rules/Rule24.java +48 -0
  364. data/Toxtree-v2.6.13/src/sicret/rules/Rule25.java +46 -0
  365. data/Toxtree-v2.6.13/src/sicret/rules/Rule26.java +47 -0
  366. data/Toxtree-v2.6.13/src/sicret/rules/Rule27.java +47 -0
  367. data/Toxtree-v2.6.13/src/sicret/rules/Rule28.java +42 -0
  368. data/Toxtree-v2.6.13/src/sicret/rules/Rule29.java +46 -0
  369. data/Toxtree-v2.6.13/src/sicret/rules/Rule30.java +48 -0
  370. data/Toxtree-v2.6.13/src/sicret/rules/Rule4.java +46 -0
  371. data/Toxtree-v2.6.13/src/sicret/rules/Rule8.java +44 -0
  372. data/Toxtree-v2.6.13/src/sicret/rules/Rule9.java +46 -0
  373. data/Toxtree-v2.6.13/src/sicret/rules/RuleA_Lactams.java +55 -0
  374. data/Toxtree-v2.6.13/src/sicret/rules/RuleAcidAnhydrides.java +71 -0
  375. data/Toxtree-v2.6.13/src/sicret/rules/RuleAcidImides.java +55 -0
  376. data/Toxtree-v2.6.13/src/sicret/rules/RuleAcrylicAcids.java +74 -0
  377. data/Toxtree-v2.6.13/src/sicret/rules/RuleAcrylicAndMethacrylicEsters.java +71 -0
  378. data/Toxtree-v2.6.13/src/sicret/rules/RuleAldehydes.java +53 -0
  379. data/Toxtree-v2.6.13/src/sicret/rules/RuleAliphaticSaturatedAcidsAndHalogenatedAcids.java +63 -0
  380. data/Toxtree-v2.6.13/src/sicret/rules/RuleAlkylAlkanolAmines.java +53 -0
  381. data/Toxtree-v2.6.13/src/sicret/rules/RuleAlphaAlkynes.java +53 -0
  382. data/Toxtree-v2.6.13/src/sicret/rules/RuleAlphaHalogenatedAmidesAndThioamides.java +56 -0
  383. data/Toxtree-v2.6.13/src/sicret/rules/RuleAqueousSolubility.java +48 -0
  384. data/Toxtree-v2.6.13/src/sicret/rules/RuleAromaticAmines.java +77 -0
  385. data/Toxtree-v2.6.13/src/sicret/rules/RuleBenzylHalides.java +54 -0
  386. data/Toxtree-v2.6.13/src/sicret/rules/RuleBetaLactones.java +54 -0
  387. data/Toxtree-v2.6.13/src/sicret/rules/RuleC10_C20AliphaticAlcohols.java +108 -0
  388. data/Toxtree-v2.6.13/src/sicret/rules/RuleCarbamoylHalide.java +80 -0
  389. data/Toxtree-v2.6.13/src/sicret/rules/RuleCatecholsResorcinolsHydroquinones.java +73 -0
  390. data/Toxtree-v2.6.13/src/sicret/rules/RuleDi_Tri_Nitrobenzenes.java +76 -0
  391. data/Toxtree-v2.6.13/src/sicret/rules/RuleEpoxides.java +51 -0
  392. data/Toxtree-v2.6.13/src/sicret/rules/RuleEthyleneGlycolEthers.java +59 -0
  393. data/Toxtree-v2.6.13/src/sicret/rules/RuleHalogenatedAlkanesAndAlkenes.java +62 -0
  394. data/Toxtree-v2.6.13/src/sicret/rules/RuleHalonitrobenzene.java +76 -0
  395. data/Toxtree-v2.6.13/src/sicret/rules/RuleHasOnlyC_H_O.java +77 -0
  396. data/Toxtree-v2.6.13/src/sicret/rules/RuleHasOnlyC_H_O_Halogen.java +54 -0
  397. data/Toxtree-v2.6.13/src/sicret/rules/RuleHasOnlyC_H_O_N.java +52 -0
  398. data/Toxtree-v2.6.13/src/sicret/rules/RuleHasOnlyC_H_O_N_Halogen.java +92 -0
  399. data/Toxtree-v2.6.13/src/sicret/rules/RuleHasOnlyC_H_O_N_S.java +62 -0
  400. data/Toxtree-v2.6.13/src/sicret/rules/RuleHydroPeroxides.java +55 -0
  401. data/Toxtree-v2.6.13/src/sicret/rules/RuleKetenes.java +53 -0
  402. data/Toxtree-v2.6.13/src/sicret/rules/RuleKetones.java +55 -0
  403. data/Toxtree-v2.6.13/src/sicret/rules/RuleLactonesFusedOrUnsaturated.java +84 -0
  404. data/Toxtree-v2.6.13/src/sicret/rules/RuleLipidSolubility.java +45 -0
  405. data/Toxtree-v2.6.13/src/sicret/rules/RuleLogP.java +100 -0
  406. data/Toxtree-v2.6.13/src/sicret/rules/RuleMeltingPoint.java +54 -0
  407. data/Toxtree-v2.6.13/src/sicret/rules/RuleMolWeight.java +67 -0
  408. data/Toxtree-v2.6.13/src/sicret/rules/RuleOandPQuinones.java +78 -0
  409. data/Toxtree-v2.6.13/src/sicret/rules/RulePhenols.java +65 -0
  410. data/Toxtree-v2.6.13/src/sicret/rules/RuleQuaternaryOrganicAmmoniumAndPhosphoniumSalts.java +85 -0
  411. data/Toxtree-v2.6.13/src/sicret/rules/RuleSurfaceTension.java +52 -0
  412. data/Toxtree-v2.6.13/src/sicret/rules/RuleTriAndTetraHalogenatedBenzenes.java +70 -0
  413. data/Toxtree-v2.6.13/src/sicret/rules/RuleVapourPressure.java +53 -0
  414. data/Toxtree-v2.6.13/src/sicret/rules/package.html +15 -0
  415. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAlcohol.java +24 -0
  416. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAldehyde.java +25 -0
  417. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAlkylAldehyde.java +25 -0
  418. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAlkylHydrazine.java +27 -0
  419. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAlkylPhosphonate.java +28 -0
  420. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAmine.java +25 -0
  421. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAromaticAldehyde.java +26 -0
  422. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAromaticAzo.java +27 -0
  423. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAromaticNitro.java +26 -0
  424. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleArylMethylHalide.java +26 -0
  425. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAziridine.java +26 -0
  426. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleAzo.java +25 -0
  427. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleBenzene.java +36 -0
  428. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleEpoxide.java +25 -0
  429. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleEther.java +25 -0
  430. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleFuran.java +25 -0
  431. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleHalide.java +31 -0
  432. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleHeterocycle.java +36 -0
  433. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleHydrazine.java +26 -0
  434. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleIminomethyl.java +25 -0
  435. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleKetone.java +25 -0
  436. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleNChloramine.java +29 -0
  437. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleNHydroxy.java +26 -0
  438. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleNMethylol.java +29 -0
  439. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleNOxide.java +28 -0
  440. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleNitro.java +25 -0
  441. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleNitrogenMustard.java +25 -0
  442. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleNitrosamine.java +27 -0
  443. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleNitroso.java +25 -0
  444. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleNucleosides.java +30 -0
  445. data/Toxtree-v2.6.13/src/structurefeatures/rules/RulePhosphoricGroups.java +29 -0
  446. data/Toxtree-v2.6.13/src/structurefeatures/rules/RulePropiolactone.java +25 -0
  447. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleUrethaneDerivatives.java +26 -0
  448. data/Toxtree-v2.6.13/src/structurefeatures/rules/RuleprimaryAlkylHalide.java +29 -0
  449. data/Toxtree-v2.6.13/src/substituents.sdf +16605 -0
  450. data/Toxtree-v2.6.13/src/toxTree/apps/AbstractApplication.java +179 -0
  451. data/Toxtree-v2.6.13/src/toxTree/apps/CompoundMethodApplication.java +139 -0
  452. data/Toxtree-v2.6.13/src/toxTree/apps/ToxTreeApp.java +246 -0
  453. data/Toxtree-v2.6.13/src/toxTree/apps/ToxtreeHeadless.java +120 -0
  454. data/Toxtree-v2.6.13/src/toxTree/apps/ToxtreeOptions.java +185 -0
  455. data/Toxtree-v2.6.13/src/toxTree/apps/toxForest/ToxForestActions.java +51 -0
  456. data/Toxtree-v2.6.13/src/toxTree/apps/toxForest/ToxForestApp.java +208 -0
  457. data/Toxtree-v2.6.13/src/toxTree/apps/toxForest/ToxForestCompoundPanel.java +74 -0
  458. data/Toxtree-v2.6.13/src/toxTree/apps/toxForest/ToxForestData.java +100 -0
  459. data/Toxtree-v2.6.13/src/toxTree/apps/toxForest/ToxForestDataModule.java +229 -0
  460. data/Toxtree-v2.6.13/src/toxTree/apps/toxForest/ToxForestDataModulePanel.java +306 -0
  461. data/Toxtree-v2.6.13/src/toxTree/config/help/bird.gif +0 -0
  462. data/Toxtree-v2.6.13/src/toxTree/config/help/titlepage.html +245 -0
  463. data/Toxtree-v2.6.13/src/toxTree/config/help/toxTree.css +136 -0
  464. data/Toxtree-v2.6.13/src/toxTree/config/help/toxTree.hs +36 -0
  465. data/Toxtree-v2.6.13/src/toxTree/config/help/toxTree.html +189 -0
  466. data/Toxtree-v2.6.13/src/toxTree/config/help/toxTree.jhm +12 -0
  467. data/Toxtree-v2.6.13/src/toxTree/config/help/toxTreeTOC.xml +14 -0
  468. data/Toxtree-v2.6.13/src/toxTree/config/log4.console +13 -0
  469. data/Toxtree-v2.6.13/src/toxTree/config/log4.properties +12 -0
  470. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-hydrolize-C(dO)O.cml +61 -0
  471. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-hydrolize-C(dO)S.cml +61 -0
  472. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-hydrolize-C(dS)O.cml +61 -0
  473. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-hydrolize-C(dS)S.cml +61 -0
  474. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-hydrolize-P(dO)(O)(O)O.cml +72 -0
  475. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-hydrolize-P(dO)(O)(O)OX.cml +82 -0
  476. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-hydrolize-S(dO)(dO)O.cml +64 -0
  477. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-metabolize-CdC.cml +61 -0
  478. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-metabolize-NdN.cml +56 -0
  479. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-metabolize-Npd.cml +64 -0
  480. data/Toxtree-v2.6.13/src/toxTree/config/reactions/reaction-metabolize-R-N.cml +52 -0
  481. data/Toxtree-v2.6.13/src/toxTree/core/ConnectionMatrix.java +58 -0
  482. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionCategories.java +47 -0
  483. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionCategory.java +56 -0
  484. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionCategoryEditor.java +31 -0
  485. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionInteractive.java +117 -0
  486. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionMethod.java +95 -0
  487. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionMethodEditor.java +44 -0
  488. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionMethodPrority.java +29 -0
  489. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionMethodsList.java +41 -0
  490. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionResult.java +94 -0
  491. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionRule.java +152 -0
  492. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionRuleEditor.java +43 -0
  493. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionRuleList.java +42 -0
  494. data/Toxtree-v2.6.13/src/toxTree/core/IDecisionTransition.java +36 -0
  495. data/Toxtree-v2.6.13/src/toxTree/core/IDescriptorBased.java +37 -0
  496. data/Toxtree-v2.6.13/src/toxTree/core/IFilteredMolecules.java +48 -0
  497. data/Toxtree-v2.6.13/src/toxTree/core/IImplementationDetails.java +5 -0
  498. data/Toxtree-v2.6.13/src/toxTree/core/IMetaboliteGenerator.java +11 -0
  499. data/Toxtree-v2.6.13/src/toxTree/core/IMoleculesIterator.java +73 -0
  500. data/Toxtree-v2.6.13/src/toxTree/core/IProcessRule.java +35 -0
  501. data/Toxtree-v2.6.13/src/toxTree/core/IProgressStatus.java +36 -0
  502. data/Toxtree-v2.6.13/src/toxTree/core/IRuleRange.java +36 -0
  503. data/Toxtree-v2.6.13/src/toxTree/core/IRuleSubstructures.java +76 -0
  504. data/Toxtree-v2.6.13/src/toxTree/core/IRuleValue.java +35 -0
  505. data/Toxtree-v2.6.13/src/toxTree/core/IToxTreeEditor.java +41 -0
  506. data/Toxtree-v2.6.13/src/toxTree/core/Introspection.java +608 -0
  507. data/Toxtree-v2.6.13/src/toxTree/core/SmartElementsList.java +124 -0
  508. data/Toxtree-v2.6.13/src/toxTree/core/ToxTreeClassLoader.java +65 -0
  509. data/Toxtree-v2.6.13/src/toxTree/core/ToxTreeDescriptor.java +125 -0
  510. data/Toxtree-v2.6.13/src/toxTree/core/ToxTreeObjectInputStream.java +73 -0
  511. data/Toxtree-v2.6.13/src/toxTree/core/ToxTreePackageEntries.java +54 -0
  512. data/Toxtree-v2.6.13/src/toxTree/core/ToxTreePackageEntry.java +75 -0
  513. data/Toxtree-v2.6.13/src/toxTree/core/XMLSerializable.java +53 -0
  514. data/Toxtree-v2.6.13/src/toxTree/core/package.html +46 -0
  515. data/Toxtree-v2.6.13/src/toxTree/data/AbstractFilter.java +135 -0
  516. data/Toxtree-v2.6.13/src/toxTree/data/CategoryFilter.java +41 -0
  517. data/Toxtree-v2.6.13/src/toxTree/data/IMoleculeLookup.java +36 -0
  518. data/Toxtree-v2.6.13/src/toxTree/data/IObjectFilter.java +38 -0
  519. data/Toxtree-v2.6.13/src/toxTree/data/IPropertyFilter.java +34 -0
  520. data/Toxtree-v2.6.13/src/toxTree/data/ListOfAtomContainers.java +248 -0
  521. data/Toxtree-v2.6.13/src/toxTree/data/MoleculesFile.java +487 -0
  522. data/Toxtree-v2.6.13/src/toxTree/data/MoleculesIterator.java +439 -0
  523. data/Toxtree-v2.6.13/src/toxTree/data/ObjectPropertyFilter.java +210 -0
  524. data/Toxtree-v2.6.13/src/toxTree/data/SortedPropertyList.java +177 -0
  525. data/Toxtree-v2.6.13/src/toxTree/data/package.html +13 -0
  526. data/Toxtree-v2.6.13/src/toxTree/exceptions/DCategoryUnknown.java +84 -0
  527. data/Toxtree-v2.6.13/src/toxTree/exceptions/DMethodNotAssigned.java +85 -0
  528. data/Toxtree-v2.6.13/src/toxTree/exceptions/DRuleException.java +82 -0
  529. data/Toxtree-v2.6.13/src/toxTree/exceptions/DRuleNotImplemented.java +83 -0
  530. data/Toxtree-v2.6.13/src/toxTree/exceptions/DRulePropertyNotAvailable.java +76 -0
  531. data/Toxtree-v2.6.13/src/toxTree/exceptions/DecisionMethodException.java +77 -0
  532. data/Toxtree-v2.6.13/src/toxTree/exceptions/DecisionMethodIOException.java +73 -0
  533. data/Toxtree-v2.6.13/src/toxTree/exceptions/DecisionResultException.java +85 -0
  534. data/Toxtree-v2.6.13/src/toxTree/exceptions/DecisionResultIOException.java +78 -0
  535. data/Toxtree-v2.6.13/src/toxTree/exceptions/DecisionResultUIDException.java +76 -0
  536. data/Toxtree-v2.6.13/src/toxTree/exceptions/DesisionMethodUIDException.java +75 -0
  537. data/Toxtree-v2.6.13/src/toxTree/exceptions/FilterException.java +58 -0
  538. data/Toxtree-v2.6.13/src/toxTree/exceptions/IntrospectionException.java +75 -0
  539. data/Toxtree-v2.6.13/src/toxTree/exceptions/MolAnalyseException.java +97 -0
  540. data/Toxtree-v2.6.13/src/toxTree/exceptions/ReactionException.java +72 -0
  541. data/Toxtree-v2.6.13/src/toxTree/exceptions/ToxTreeIOException.java +67 -0
  542. data/Toxtree-v2.6.13/src/toxTree/exceptions/XMLDecisionMethodException.java +63 -0
  543. data/Toxtree-v2.6.13/src/toxTree/exceptions/package.html +15 -0
  544. data/Toxtree-v2.6.13/src/toxTree/io/MolFileFilter.java +111 -0
  545. data/Toxtree-v2.6.13/src/toxTree/io/PDFWriter.java +274 -0
  546. data/Toxtree-v2.6.13/src/toxTree/io/Tools.java +98 -0
  547. data/Toxtree-v2.6.13/src/toxTree/io/batch/BatchFactory.java +81 -0
  548. data/Toxtree-v2.6.13/src/toxTree/io/batch/BatchProcessing.java +497 -0
  549. data/Toxtree-v2.6.13/src/toxTree/io/batch/BatchProcessingException.java +83 -0
  550. data/Toxtree-v2.6.13/src/toxTree/io/batch/ChemObjectBatchProcessing.java +281 -0
  551. data/Toxtree-v2.6.13/src/toxTree/io/batch/FileState.java +232 -0
  552. data/Toxtree-v2.6.13/src/toxTree/io/batch/IBatchProcessing.java +83 -0
  553. data/Toxtree-v2.6.13/src/toxTree/io/batch/ToxTreeBatchProcessing.java +227 -0
  554. data/Toxtree-v2.6.13/src/toxTree/io/batch/package.html +26 -0
  555. data/Toxtree-v2.6.13/src/toxTree/io/package.html +22 -0
  556. data/Toxtree-v2.6.13/src/toxTree/logging/package.html +20 -0
  557. data/Toxtree-v2.6.13/src/toxTree/qsar/AbstractQSARModel.java +177 -0
  558. data/Toxtree-v2.6.13/src/toxTree/qsar/IDescriptorPreprocessor.java +37 -0
  559. data/Toxtree-v2.6.13/src/toxTree/qsar/LinearDiscriminantRule.java +134 -0
  560. data/Toxtree-v2.6.13/src/toxTree/qsar/LinearPreprocessor.java +100 -0
  561. data/Toxtree-v2.6.13/src/toxTree/qsar/LinearQSARModel.java +331 -0
  562. data/Toxtree-v2.6.13/src/toxTree/qsar/MatrixPreprocessor.java +73 -0
  563. data/Toxtree-v2.6.13/src/toxTree/qsar/QSARDescriptor.java +111 -0
  564. data/Toxtree-v2.6.13/src/toxTree/query/AliphaticCHQueryAtom.java +64 -0
  565. data/Toxtree-v2.6.13/src/toxTree/query/AssociationQueryBond.java +60 -0
  566. data/Toxtree-v2.6.13/src/toxTree/query/CHQueryAtom.java +85 -0
  567. data/Toxtree-v2.6.13/src/toxTree/query/FunctionalGroups.java +4045 -0
  568. data/Toxtree-v2.6.13/src/toxTree/query/MolAnalyser.java +300 -0
  569. data/Toxtree-v2.6.13/src/toxTree/query/MolFlags.java +188 -0
  570. data/Toxtree-v2.6.13/src/toxTree/query/MyAssociationBond.java +58 -0
  571. data/Toxtree-v2.6.13/src/toxTree/query/QueryAtomContainers.java +81 -0
  572. data/Toxtree-v2.6.13/src/toxTree/query/ReallyAnyAtom.java +34 -0
  573. data/Toxtree-v2.6.13/src/toxTree/query/SimpleReactions.java +789 -0
  574. data/Toxtree-v2.6.13/src/toxTree/query/SingleOrDoubleQueryBond.java +67 -0
  575. data/Toxtree-v2.6.13/src/toxTree/query/TopologyAnyAtom.java +56 -0
  576. data/Toxtree-v2.6.13/src/toxTree/query/TopologyAnyBond.java +88 -0
  577. data/Toxtree-v2.6.13/src/toxTree/query/TopologyOrderQueryBond.java +88 -0
  578. data/Toxtree-v2.6.13/src/toxTree/query/TopologySymbolQueryAtom.java +68 -0
  579. data/Toxtree-v2.6.13/src/toxTree/query/metabolite/MetabolyteRecycler.java +216 -0
  580. data/Toxtree-v2.6.13/src/toxTree/query/package.html +14 -0
  581. data/Toxtree-v2.6.13/src/toxTree/query/remote/RemoteCompoundLookup.java +36 -0
  582. data/Toxtree-v2.6.13/src/toxTree/tree/AbstractRule.java +404 -0
  583. data/Toxtree-v2.6.13/src/toxTree/tree/AbstractRuleHilightHits.java +74 -0
  584. data/Toxtree-v2.6.13/src/toxTree/tree/AbstractTree.java +837 -0
  585. data/Toxtree-v2.6.13/src/toxTree/tree/AbstractTreePrinter.java +48 -0
  586. data/Toxtree-v2.6.13/src/toxTree/tree/AbstractTreeWriter.java +63 -0
  587. data/Toxtree-v2.6.13/src/toxTree/tree/BatchDecisionResultsList.java +478 -0
  588. data/Toxtree-v2.6.13/src/toxTree/tree/CategoriesList.java +334 -0
  589. data/Toxtree-v2.6.13/src/toxTree/tree/DecisionMethodsList.java +373 -0
  590. data/Toxtree-v2.6.13/src/toxTree/tree/DecisionNode.java +407 -0
  591. data/Toxtree-v2.6.13/src/toxTree/tree/DecisionNodesFactory.java +64 -0
  592. data/Toxtree-v2.6.13/src/toxTree/tree/DecisionNodesList.java +356 -0
  593. data/Toxtree-v2.6.13/src/toxTree/tree/DecisionResultsList.java +89 -0
  594. data/Toxtree-v2.6.13/src/toxTree/tree/DefaultCategory.java +196 -0
  595. data/Toxtree-v2.6.13/src/toxTree/tree/IDecisionNodesFactory.java +37 -0
  596. data/Toxtree-v2.6.13/src/toxTree/tree/MultiLabelDecisionNode.java +78 -0
  597. data/Toxtree-v2.6.13/src/toxTree/tree/MultiLabelDecisionNodesList.java +52 -0
  598. data/Toxtree-v2.6.13/src/toxTree/tree/NonToxicCategory.java +57 -0
  599. data/Toxtree-v2.6.13/src/toxTree/tree/PDFTreePrinter.java +180 -0
  600. data/Toxtree-v2.6.13/src/toxTree/tree/ProgressStatus.java +123 -0
  601. data/Toxtree-v2.6.13/src/toxTree/tree/ReportTreePrinter.java +271 -0
  602. data/Toxtree-v2.6.13/src/toxTree/tree/RuleResult.java +240 -0
  603. data/Toxtree-v2.6.13/src/toxTree/tree/RulesList.java +263 -0
  604. data/Toxtree-v2.6.13/src/toxTree/tree/SimpleTreePrinter.java +123 -0
  605. data/Toxtree-v2.6.13/src/toxTree/tree/ToxicCategory.java +56 -0
  606. data/Toxtree-v2.6.13/src/toxTree/tree/Tree2PrefuseGraph.java +153 -0
  607. data/Toxtree-v2.6.13/src/toxTree/tree/TreeResult.java +633 -0
  608. data/Toxtree-v2.6.13/src/toxTree/tree/UserDefinedTree.java +647 -0
  609. data/Toxtree-v2.6.13/src/toxTree/tree/UserDefinedTree.properties +6 -0
  610. data/Toxtree-v2.6.13/src/toxTree/tree/categories/DefaultClass1.java +44 -0
  611. data/Toxtree-v2.6.13/src/toxTree/tree/categories/DefaultClass2.java +50 -0
  612. data/Toxtree-v2.6.13/src/toxTree/tree/categories/package.html +15 -0
  613. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/CramerClass1.java +52 -0
  614. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/CramerClass2.java +56 -0
  615. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/CramerClass3.java +53 -0
  616. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/CramerRules.java +266 -0
  617. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/CramerRules.properties +11 -0
  618. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/CramerTreeResult.java +80 -0
  619. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/Rule32.java +136 -0
  620. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/Rule3FuncGroups.java +95 -0
  621. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/Rule3MemberedHeterocycle.java +84 -0
  622. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleAcyclicAcetalEsterOfQ30.java +102 -0
  623. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleAliphaticWithSomeFuncGroups.java +181 -0
  624. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleCommonComponentOfFood.java +70 -0
  625. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleCyclopropaneEtc.java +104 -0
  626. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleHasOnlySaltSulphonateSulphate.java +263 -0
  627. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleHasOtherThanC_H_O_N_S2.java +172 -0
  628. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleHeteroaromatic.java +89 -0
  629. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleHeterocyclicComplexSubstituents.java +126 -0
  630. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleIsAromatic.java +67 -0
  631. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleIsCommonTerpene.java +60 -0
  632. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleIsHeterocyclic.java +62 -0
  633. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleIsOpenChain.java +55 -0
  634. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleKetoneAlcoholEtc.java +232 -0
  635. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleLactoneOrCyclicDiester.java +137 -0
  636. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleLactonesFusedOrUnsaturated.java +183 -0
  637. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleManyAromaticRings14.java +62 -0
  638. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleManyAromaticRings28.java +54 -0
  639. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleMonocarbocyclic.java +139 -0
  640. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleMonocycloalkanoneEtc.java +125 -0
  641. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleNormalBodyConstituent.java +76 -0
  642. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleOnlyFuncGroupsQ30.java +179 -0
  643. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleReadilyHydrolysed29.java +64 -0
  644. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleReadilyHydrolysedMononuclear.java +97 -0
  645. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleReadilyHydrolysedToCommonterpene.java +91 -0
  646. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleRingComplexSubstituents30.java +215 -0
  647. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleRingWithSubstituents.java +63 -0
  648. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleRingsWithSubstituents.java +66 -0
  649. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleSimplyBranchedAliphaticHydrocarbon.java +108 -0
  650. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleSomeBenzeneDerivatives.java +304 -0
  651. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleSufficientSulphonateGroups.java +184 -0
  652. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/RuleToxicFunctionalGroups.java +140 -0
  653. data/Toxtree-v2.6.13/src/toxTree/tree/cramer/package.html +17 -0
  654. data/Toxtree-v2.6.13/src/toxTree/tree/demo/SMARTSTree.java +76 -0
  655. data/Toxtree-v2.6.13/src/toxTree/tree/demo/SubstructureTree.java +106 -0
  656. data/Toxtree-v2.6.13/src/toxTree/tree/demo/package.html +14 -0
  657. data/Toxtree-v2.6.13/src/toxTree/tree/package.html +17 -0
  658. data/Toxtree-v2.6.13/src/toxTree/tree/rules/DefaultAlertCounter.java +59 -0
  659. data/Toxtree-v2.6.13/src/toxTree/tree/rules/IAlertCounter.java +35 -0
  660. data/Toxtree-v2.6.13/src/toxTree/tree/rules/ILookupFile.java +16 -0
  661. data/Toxtree-v2.6.13/src/toxTree/tree/rules/InChILookupFile.java +134 -0
  662. data/Toxtree-v2.6.13/src/toxTree/tree/rules/LookupFile.java +210 -0
  663. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleAllAllowedElements.java +45 -0
  664. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleAllSubstructures.java +63 -0
  665. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleAnySubstituents.java +83 -0
  666. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleAnySubstructure.java +74 -0
  667. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleAromatic.java +78 -0
  668. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleCarbohydrate.java +222 -0
  669. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleCommonTerpene.java +115 -0
  670. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleDescriptor.java +156 -0
  671. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleDescriptorRange.java +122 -0
  672. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleElements.java +278 -0
  673. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleHeterocyclic.java +84 -0
  674. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleInitAlertCounter.java +77 -0
  675. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleLipinski5.java +75 -0
  676. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleManyAromaticRings.java +122 -0
  677. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleMolecularMassRange.java +68 -0
  678. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleOnlyAllowedSubstructures.java +69 -0
  679. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleOpenChain.java +83 -0
  680. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleReadilyHydrolised.java +114 -0
  681. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleRingAllowedSubstituents.java +129 -0
  682. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleRingOtherThanAllowedSubstituents.java +170 -0
  683. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleRingSubstituents.java +156 -0
  684. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleRings.java +46 -0
  685. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleStructuresList.java +211 -0
  686. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleSubstructures.java +191 -0
  687. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleVerifyAlertsCounter.java +78 -0
  688. data/Toxtree-v2.6.13/src/toxTree/tree/rules/RuleVerifyProperty.java +320 -0
  689. data/Toxtree-v2.6.13/src/toxTree/tree/rules/StructureAlert.java +66 -0
  690. data/Toxtree-v2.6.13/src/toxTree/tree/rules/StructureAlertAmbit.java +64 -0
  691. data/Toxtree-v2.6.13/src/toxTree/tree/rules/StructureAlertCDK.java +39 -0
  692. data/Toxtree-v2.6.13/src/toxTree/tree/rules/UserInputRule.java +96 -0
  693. data/Toxtree-v2.6.13/src/toxTree/tree/rules/package.html +14 -0
  694. data/Toxtree-v2.6.13/src/toxTree/tree/rules/smarts/AbstractRuleSmartSubstructure.java +393 -0
  695. data/Toxtree-v2.6.13/src/toxTree/tree/rules/smarts/Convertor.java +358 -0
  696. data/Toxtree-v2.6.13/src/toxTree/tree/rules/smarts/IRuleSMARTSubstructures.java +51 -0
  697. data/Toxtree-v2.6.13/src/toxTree/tree/rules/smarts/RuleSMARTSSubstructureAmbit.java +61 -0
  698. data/Toxtree-v2.6.13/src/toxTree/tree/rules/smarts/RuleSMARTSubstructure.java +15 -0
  699. data/Toxtree-v2.6.13/src/toxTree/tree/rules/smarts/RuleSMARTSubstructureCDK.java +77 -0
  700. data/Toxtree-v2.6.13/src/toxTree/tree/rules/smarts/SmartsPattern.java +107 -0
  701. data/Toxtree-v2.6.13/src/toxTree/tree/rules/smarts/package.html +26 -0
  702. data/Toxtree-v2.6.13/src/toxTree/tree/stats/ConfusionMatrix.java +155 -0
  703. data/Toxtree-v2.6.13/src/toxTree/ui/EditorFactory.java +66 -0
  704. data/Toxtree-v2.6.13/src/toxTree/ui/IEditorFactory.java +26 -0
  705. data/Toxtree-v2.6.13/src/toxTree/ui/tree/categories/CategoriesRenderer.java +91 -0
  706. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/application_cascade.png +0 -0
  707. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/arrow_divide.png +0 -0
  708. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/bird.gif +0 -0
  709. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/bird1.gif +0 -0
  710. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/bird2.gif +0 -0
  711. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/bird3.gif +0 -0
  712. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/bird4.gif +0 -0
  713. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/chart_organisation.png +0 -0
  714. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/cog.png +0 -0
  715. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/control_fastforward_blue.png +0 -0
  716. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/control_play_blue.png +0 -0
  717. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/cross.png +0 -0
  718. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/disk_multiple.png +0 -0
  719. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/door_out.png +0 -0
  720. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/find.png +0 -0
  721. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/folder.png +0 -0
  722. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/help.png +0 -0
  723. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/information.png +0 -0
  724. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/molecule.png +0 -0
  725. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/open.gif +0 -0
  726. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/page_go.png +0 -0
  727. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/page_white.png +0 -0
  728. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/picture.png +0 -0
  729. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/picture_save.png +0 -0
  730. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/plugin.png +0 -0
  731. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/plugin_edit.png +0 -0
  732. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/report_magnify.png +0 -0
  733. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/save.png +0 -0
  734. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/tag_blue.png +0 -0
  735. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/tag_blue_add.png +0 -0
  736. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/tag_blue_delete.png +0 -0
  737. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/tag_blue_edit.png +0 -0
  738. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/tick.png +0 -0
  739. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/tree.png +0 -0
  740. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/tree_add.png +0 -0
  741. data/Toxtree-v2.6.13/src/toxTree/ui/tree/images/tree_delete.png +0 -0
  742. data/Toxtree-v2.6.13/src/toxTree/ui/tree/rules/package.html +15 -0
  743. data/Toxtree-v2.6.13/src/toxtree-2.6.13-sources.jar +0 -0
  744. data/Toxtree-v2.6.13/src/toxtree/data/ActionList.java +209 -0
  745. data/Toxtree-v2.6.13/src/toxtree/data/DataContainer.java +304 -0
  746. data/Toxtree-v2.6.13/src/toxtree/data/DataModule.java +240 -0
  747. data/Toxtree-v2.6.13/src/toxtree/data/DecisionMethodData.java +210 -0
  748. data/Toxtree-v2.6.13/src/toxtree/data/DecisionMethodsDataModule.java +212 -0
  749. data/Toxtree-v2.6.13/src/toxtree/data/FilteredMoleculesIterator.java +296 -0
  750. data/Toxtree-v2.6.13/src/toxtree/data/ToxTreeActions.java +211 -0
  751. data/Toxtree-v2.6.13/src/toxtree/data/ToxTreeModule.java +265 -0
  752. data/Toxtree-v2.6.13/src/toxtree/lookup/RemoteLookup.java +108 -0
  753. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/AmesMutagenicityRules.java +432 -0
  754. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/AmesMutagenicityRules.properties +7 -0
  755. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/categories/AmesMutagenicityCategory.java +60 -0
  756. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/categories/CategoryError.java +23 -0
  757. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/categories/CategoryMutagenTA100.java +48 -0
  758. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/categories/CategoryNoAlertAmes.java +47 -0
  759. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/categories/CategoryNonMutagen.java +47 -0
  760. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/categories/CategoryPositiveAlertAmes.java +51 -0
  761. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/categories/QSARApplicable.java +56 -0
  762. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/AromaticAmineSubstituentsDescriptor.java +719 -0
  763. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/DescriptorBridgedBiphenyl.java +69 -0
  764. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/DescriptorHasNO2Group.java +66 -0
  765. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/DescriptorIDist.java +153 -0
  766. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/DescriptorIsAniline.java +120 -0
  767. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/DescriptorMolarRefractivity.java +97 -0
  768. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/DescriptorStructurePresence.java +148 -0
  769. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/SubstituentExtractor.java +279 -0
  770. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/SubstituentPosition.java +58 -0
  771. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/SubstituentsDescriptor.java +139 -0
  772. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/descriptors/whim_weights.txt +39 -0
  773. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/AmesMutagenicityTreeResult.java +362 -0
  774. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/QSAR6Applicable.java +158 -0
  775. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleABUnsaturatedAldehyde.java +67 -0
  776. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleAlertsAmes.java +54 -0
  777. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleAlertsForAmesMutagenicity.java +47 -0
  778. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleAlertsForGenotoxicCarcinogenicity.java +47 -0
  779. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleAlertsForNewAmesMutagenicity.java +47 -0
  780. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleAromaticAmineNoSulfonicGroup.java +145 -0
  781. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleAromaticDiazo.java +98 -0
  782. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleDAMutagenicityABUnsaturatedAldehydes.java +188 -0
  783. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleDAMutagenicityAromaticAmines.java +257 -0
  784. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/RuleDerivedAromaticAmines.java +166 -0
  785. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA10_gen.java +124 -0
  786. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA11_gen.java +80 -0
  787. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA12_gen.java +68 -0
  788. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA13_gen.java +66 -0
  789. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA14_gen.java +61 -0
  790. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA15_gen.java +54 -0
  791. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA16_gen.java +57 -0
  792. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA18_gen.java +190 -0
  793. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA19_gen.java +71 -0
  794. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA1_gen.java +57 -0
  795. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA21_gen.java +65 -0
  796. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA22_gen.java +69 -0
  797. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA23_gen.java +62 -0
  798. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA24_gen.java +60 -0
  799. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA25_gen.java +104 -0
  800. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA26_gen.java +79 -0
  801. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA27_gen.java +131 -0
  802. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA28_gen.java +169 -0
  803. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA28bis_gen.java +115 -0
  804. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA28ter_gen.java +112 -0
  805. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA29_gen.java +78 -0
  806. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA2_gen.java +156 -0
  807. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA30_gen.java +63 -0
  808. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA37_gen.java +59 -0
  809. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA38_gen.java +58 -0
  810. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA39_gen_and_nogen.java +59 -0
  811. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA3_gen.java +61 -0
  812. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA4_gen.java +63 -0
  813. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA57_Ames.java +63 -0
  814. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA58_Ames.java +59 -0
  815. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA59_Ames.java +64 -0
  816. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA5_gen.java +58 -0
  817. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA60_Ames.java +61 -0
  818. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA61_Ames.java +59 -0
  819. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA62_Ames.java +57 -0
  820. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA63_Ames.java +59 -0
  821. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA64_Ames.java +60 -0
  822. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA65_Ames.java +59 -0
  823. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA66_Ames.java +62 -0
  824. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA67_Ames.java +60 -0
  825. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA68_Ames.java +58 -0
  826. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA69_Ames.java +57 -0
  827. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA6_gen.java +61 -0
  828. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA7_gen.java +56 -0
  829. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA8_gen.java +120 -0
  830. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SA9_gen.java +54 -0
  831. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SMARTSGroup.java +55 -0
  832. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/SMARTSgroups.java +50 -0
  833. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/UserInputABUnsaturatedAldehyde.java +48 -0
  834. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/UserInputAromaticAmine.java +47 -0
  835. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/VerifyAlertsAmes.java +42 -0
  836. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/VerifyAlertsGenotoxic.java +42 -0
  837. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/VerifyAlertsNewAmes.java +42 -0
  838. data/Toxtree-v2.6.13/src/toxtree/plugins/ames/rules/VerifyAlertsNongenotoxic.java +42 -0
  839. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/DNABindingPlugin.java +205 -0
  840. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/DNABindingPlugin.properties +7 -0
  841. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/categories/AcylTransferAlerts.java +43 -0
  842. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/categories/DNABindingAlerts.java +554 -0
  843. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/categories/DNABindingCategory.java +46 -0
  844. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/categories/MichaelAcceptors.java +43 -0
  845. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/categories/NoAlerts.java +48 -0
  846. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/categories/SN1Alerts.java +44 -0
  847. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/categories/SN2Alerts.java +44 -0
  848. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/categories/ShiffBaseAlerts.java +43 -0
  849. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/rules/AcylTransferRule.java +22 -0
  850. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/rules/DNABindingRule.java +43 -0
  851. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/rules/DNABindingTreeResult.java +225 -0
  852. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/rules/MichaelAcceptorRule.java +23 -0
  853. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/rules/RuleDNABindingAlerts.java +25 -0
  854. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/rules/SN1Rule.java +20 -0
  855. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/rules/SN2Rule.java +21 -0
  856. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/rules/ShiffBaseRule.java +23 -0
  857. data/Toxtree-v2.6.13/src/toxtree/plugins/dnabinding/rules/VerifyAlertsDNABinding.java +29 -0
  858. data/Toxtree-v2.6.13/src/toxtree/plugins/func/FuncRules.java +649 -0
  859. data/Toxtree-v2.6.13/src/toxtree/plugins/func/FuncRules.properties +5 -0
  860. data/Toxtree-v2.6.13/src/toxtree/plugins/func/categories/FuncCat1.java +58 -0
  861. data/Toxtree-v2.6.13/src/toxtree/plugins/func/categories/FuncCat2.java +57 -0
  862. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG.java +56 -0
  863. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG1.java +54 -0
  864. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG10.java +59 -0
  865. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG11.java +59 -0
  866. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG12.java +58 -0
  867. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG13.java +59 -0
  868. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG14.java +60 -0
  869. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG15.java +51 -0
  870. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG16.java +55 -0
  871. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG17.java +59 -0
  872. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG18.java +59 -0
  873. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG19.java +60 -0
  874. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG2.java +53 -0
  875. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG20.java +51 -0
  876. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG21.java +59 -0
  877. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG22.java +58 -0
  878. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG23_1.java +59 -0
  879. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG23_2.java +58 -0
  880. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG23_3.java +59 -0
  881. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG23_4.java +58 -0
  882. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG23_5.java +58 -0
  883. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG23_6.java +58 -0
  884. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG23_7.java +59 -0
  885. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG23_8.java +59 -0
  886. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG23_LS.java +59 -0
  887. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG24_1.java +59 -0
  888. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG24_2.java +58 -0
  889. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG24_3.java +58 -0
  890. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG24_LS.java +59 -0
  891. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG25.java +59 -0
  892. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG26.java +59 -0
  893. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG27.java +59 -0
  894. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG28.java +59 -0
  895. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG29.java +59 -0
  896. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG30.java +59 -0
  897. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_1.java +59 -0
  898. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_2.java +58 -0
  899. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_3.java +59 -0
  900. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_4.java +58 -0
  901. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_5.java +58 -0
  902. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_6.java +58 -0
  903. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_7.java +59 -0
  904. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_8.java +59 -0
  905. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_9.java +59 -0
  906. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG31_LS.java +59 -0
  907. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG32.java +59 -0
  908. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG33_1.java +59 -0
  909. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG33_2.java +58 -0
  910. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG33_3.java +59 -0
  911. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG33_4.java +58 -0
  912. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG33_5.java +58 -0
  913. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG33_6.java +58 -0
  914. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG33_7.java +59 -0
  915. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG33_8.java +59 -0
  916. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG33_LS.java +59 -0
  917. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG34_1.java +59 -0
  918. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG34_2.java +58 -0
  919. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG34_LS.java +59 -0
  920. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_1.java +59 -0
  921. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_10.java +59 -0
  922. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_11.java +59 -0
  923. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_12.java +59 -0
  924. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_13.java +59 -0
  925. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_2.java +59 -0
  926. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_3.java +59 -0
  927. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_4.java +59 -0
  928. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_5.java +59 -0
  929. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_6.java +59 -0
  930. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_7.java +59 -0
  931. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_8.java +59 -0
  932. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_9.java +59 -0
  933. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG35_LS.java +59 -0
  934. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG36.java +59 -0
  935. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG37_1.java +59 -0
  936. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG37_2.java +59 -0
  937. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG37_3.java +59 -0
  938. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG37_4.java +59 -0
  939. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG37_LS.java +59 -0
  940. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG38.java +59 -0
  941. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG39.java +59 -0
  942. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG3_1.java +58 -0
  943. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG3_2.java +58 -0
  944. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG3_LS.java +58 -0
  945. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG4.java +60 -0
  946. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG40.java +59 -0
  947. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG41_1.java +59 -0
  948. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG41_2.java +59 -0
  949. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG41_3.java +59 -0
  950. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG41_4.java +59 -0
  951. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG41_5.java +59 -0
  952. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG41_LS.java +59 -0
  953. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG42.java +59 -0
  954. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG43.java +59 -0
  955. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG44.java +59 -0
  956. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG45.java +59 -0
  957. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG46_1.java +59 -0
  958. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG46_2.java +59 -0
  959. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG46_LS.java +59 -0
  960. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG47.java +59 -0
  961. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG48_1.java +59 -0
  962. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG48_2.java +59 -0
  963. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG48_LS.java +59 -0
  964. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG49.java +59 -0
  965. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG4_1.java +58 -0
  966. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG4_2.java +58 -0
  967. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG4_LS.java +59 -0
  968. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG5.java +58 -0
  969. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG50_1.java +59 -0
  970. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG50_2.java +59 -0
  971. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG50_3.java +59 -0
  972. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG50_LS.java +59 -0
  973. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG51_1.java +59 -0
  974. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG51_2.java +59 -0
  975. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG51_3.java +59 -0
  976. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG51_LS.java +59 -0
  977. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG52_1.java +59 -0
  978. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG52_2.java +59 -0
  979. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG52_3.java +59 -0
  980. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG52_LS.java +59 -0
  981. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG53_1.java +59 -0
  982. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG53_2.java +59 -0
  983. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG53_3.java +59 -0
  984. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG53_LS.java +59 -0
  985. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG54.java +59 -0
  986. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG55.java +59 -0
  987. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG56.java +59 -0
  988. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG57.java +59 -0
  989. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG58.java +59 -0
  990. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG59.java +59 -0
  991. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG6.java +59 -0
  992. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG60.java +59 -0
  993. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG61.java +59 -0
  994. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG62.java +59 -0
  995. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG63.java +59 -0
  996. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG64.java +59 -0
  997. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG65.java +59 -0
  998. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG66.java +59 -0
  999. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG67.java +59 -0
  1000. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG68.java +59 -0
  1001. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG69.java +59 -0
  1002. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG7.java +51 -0
  1003. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG70.java +59 -0
  1004. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG71.java +59 -0
  1005. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG72.java +59 -0
  1006. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG73.java +59 -0
  1007. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG74_1.java +59 -0
  1008. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG74_2.java +59 -0
  1009. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG74_3.java +59 -0
  1010. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG74_4.java +59 -0
  1011. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG74_5.java +59 -0
  1012. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG74_6.java +59 -0
  1013. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG74_7.java +59 -0
  1014. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG74_LS.java +59 -0
  1015. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG75_1.java +59 -0
  1016. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG75_2.java +59 -0
  1017. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG75_3.java +59 -0
  1018. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG75_4.java +59 -0
  1019. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG75_LS.java +59 -0
  1020. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG76.java +59 -0
  1021. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG77.java +59 -0
  1022. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG78_1.java +59 -0
  1023. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG78_2.java +59 -0
  1024. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG78_3.java +59 -0
  1025. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG78_4.java +59 -0
  1026. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG78_LS.java +59 -0
  1027. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG79_1.java +59 -0
  1028. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG79_2.java +59 -0
  1029. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG79_3.java +59 -0
  1030. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG79_4.java +59 -0
  1031. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG79_LS.java +59 -0
  1032. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG8.java +59 -0
  1033. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG80_1.java +59 -0
  1034. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG80_2.java +59 -0
  1035. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG80_LS.java +59 -0
  1036. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG81_1.java +59 -0
  1037. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG81_2.java +59 -0
  1038. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG81_3.java +59 -0
  1039. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG81_4.java +59 -0
  1040. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG81_LS.java +59 -0
  1041. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG82_1.java +59 -0
  1042. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG82_2.java +59 -0
  1043. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG82_3.java +59 -0
  1044. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG82_4.java +59 -0
  1045. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG82_LS.java +59 -0
  1046. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG83_1.java +59 -0
  1047. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG83_2.java +59 -0
  1048. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG83_3.java +59 -0
  1049. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG83_4.java +59 -0
  1050. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG83_LS.java +59 -0
  1051. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG84_1.java +59 -0
  1052. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG84_2.java +59 -0
  1053. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG84_LS.java +59 -0
  1054. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG85.java +59 -0
  1055. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG86.java +59 -0
  1056. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG87.java +59 -0
  1057. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG88.java +59 -0
  1058. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG89.java +59 -0
  1059. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG9.java +59 -0
  1060. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FG90.java +59 -0
  1061. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/FuncTreeResult.java +154 -0
  1062. data/Toxtree-v2.6.13/src/toxtree/plugins/func/rules/RuleAlertsForFunc.java +47 -0
  1063. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/Kroes1Tree.java +151 -0
  1064. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/Kroes1Tree.properties +5 -0
  1065. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/categories/NegligibleRisk.java +18 -0
  1066. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/categories/NotASafetyConcern.java +27 -0
  1067. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/categories/RequireCompoundSpecificToxicityData.java +25 -0
  1068. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule10.java +25 -0
  1069. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule11.java +24 -0
  1070. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule12.java +23 -0
  1071. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule2.java +23 -0
  1072. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule3.java +33 -0
  1073. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule4.java +24 -0
  1074. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule5.java +25 -0
  1075. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule6.java +22 -0
  1076. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule7.java +23 -0
  1077. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule8.java +65 -0
  1078. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/KroesRule9.java +24 -0
  1079. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/MyOrderQueryBond.java +28 -0
  1080. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/RuleKroesFig1Q1.java +305 -0
  1081. data/Toxtree-v2.6.13/src/toxtree/plugins/kroes/rules/RuleVerifyIntake.java +27 -0
  1082. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/LewisTree.java +86 -0
  1083. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/LewisTree.properties +5 -0
  1084. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/categories/CYP1A2.java +46 -0
  1085. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/categories/CYP2A.java +48 -0
  1086. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/categories/CYP2B.java +48 -0
  1087. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/categories/CYP2C.java +48 -0
  1088. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/categories/CYP2D.java +46 -0
  1089. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/categories/CYP2E.java +47 -0
  1090. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/categories/CYP3A4.java +47 -0
  1091. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/rules/Rule_areadepthratio.java +26 -0
  1092. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/rules/Rule_highLogP.java +37 -0
  1093. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/rules/Rule_highVolume.java +32 -0
  1094. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/rules/Rule_high_AreaDepthRatio.java +33 -0
  1095. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/rules/Rule_high_pKa.java +34 -0
  1096. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/rules/Rule_lowVolume.java +32 -0
  1097. data/Toxtree-v2.6.13/src/toxtree/plugins/lewis/rules/Rule_volume.java +30 -0
  1098. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/MOARules.java +181 -0
  1099. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/MOARules.properties +7 -0
  1100. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/categories/CategoryAcetylcholinesteraseInhibitors.java +16 -0
  1101. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/categories/CategoryCentralNervousSystemSeizureAgents.java +17 -0
  1102. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/categories/CategoryElectrophileProelectrophileReactivity.java +17 -0
  1103. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/categories/CategoryNarcosis1.java +45 -0
  1104. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/categories/CategoryNarcosis2.java +17 -0
  1105. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/categories/CategoryNarcosis3.java +17 -0
  1106. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/categories/CategoryOxidativePhosphorylationUncouplers.java +17 -0
  1107. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/categories/CategoryUnknown.java +46 -0
  1108. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsAche.java +47 -0
  1109. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsCNS.java +47 -0
  1110. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsNarcosis1_1_1.java +70 -0
  1111. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsNarcosis1_1_1_1.java +45 -0
  1112. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsNarcosis1_1_2_1.java +41 -0
  1113. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsNarcosis1_1_2_3.java +12 -0
  1114. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsNarcosis1_1_3_1.java +5 -0
  1115. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsNarcosis1_1_4_1.java +5 -0
  1116. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsNarcosis1_1_4_2.java +5 -0
  1117. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsNarcosis2_2_1.java +47 -0
  1118. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsNarcosis3.java +47 -0
  1119. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsReactive.java +47 -0
  1120. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/RuleAlertsUncouplers.java +47 -0
  1121. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/VerifyAlertsAche.java +42 -0
  1122. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/VerifyAlertsCNS.java +42 -0
  1123. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/VerifyAlertsNarcosis1.java +42 -0
  1124. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/VerifyAlertsNarcosis2.java +42 -0
  1125. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/VerifyAlertsNarcosis3.java +42 -0
  1126. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/VerifyAlertsReactive.java +42 -0
  1127. data/Toxtree-v2.6.13/src/toxtree/plugins/moa/rules/VerifyAlertsUncouplers.java +42 -0
  1128. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/ProteinBindingPlugin.java +205 -0
  1129. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/ProteinBindingPlugin.properties +7 -0
  1130. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/categories/AcylTransferAlerts.java +19 -0
  1131. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/categories/MichaelAcceptors.java +20 -0
  1132. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/categories/NoAlerts.java +26 -0
  1133. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/categories/ProteinBindingAlerts.java +685 -0
  1134. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/categories/ProteinBindingCategory.java +50 -0
  1135. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/categories/SN2Alerts.java +19 -0
  1136. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/categories/SNArAlerts.java +19 -0
  1137. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/categories/ShiffBaseAlerts.java +20 -0
  1138. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/rules/AcylTransferRule.java +21 -0
  1139. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/rules/MichaelAcceptorRule.java +22 -0
  1140. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/rules/ProteinBindingRule.java +43 -0
  1141. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/rules/ProteinBindingTreeResult.java +225 -0
  1142. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/rules/RuleProteinBindingAlerts.java +25 -0
  1143. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/rules/SN2Rule.java +21 -0
  1144. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/rules/SNARRule.java +20 -0
  1145. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/rules/ShiffBaseRule.java +22 -0
  1146. data/Toxtree-v2.6.13/src/toxtree/plugins/proteinbinding/rules/VerifyAlertsProteinBinding.java +29 -0
  1147. data/Toxtree-v2.6.13/src/toxtree/plugins/search/CompoundLookup.java +38 -0
  1148. data/Toxtree-v2.6.13/src/toxtree/plugins/search/CompoundLookup.properties +4 -0
  1149. data/Toxtree-v2.6.13/src/toxtree/plugins/search/categories/Found.java +49 -0
  1150. data/Toxtree-v2.6.13/src/toxtree/plugins/search/categories/NotFound.java +51 -0
  1151. data/Toxtree-v2.6.13/src/toxtree/plugins/search/rules/Find.java +160 -0
  1152. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/SkinSensitisationPlugin.java +192 -0
  1153. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/SkinSensitisationPlugin.properties +7 -0
  1154. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/categories/AcylTransferAlerts.java +18 -0
  1155. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/categories/MichaelAcceptors.java +18 -0
  1156. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/categories/NoAlerts.java +26 -0
  1157. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/categories/SN2Alerts.java +19 -0
  1158. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/categories/SNArAlerts.java +19 -0
  1159. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/categories/ShiffBaseAlerts.java +18 -0
  1160. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/categories/SkinSensitisationAlerts.java +267 -0
  1161. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/categories/SkinSensitisationCategory.java +50 -0
  1162. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/rules/AcylTransferRule.java +20 -0
  1163. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/rules/MichaelAcceptorRule.java +21 -0
  1164. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/rules/RuleSkinSensitisationAlerts.java +25 -0
  1165. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/rules/SN2Rule.java +20 -0
  1166. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/rules/SNARRule.java +19 -0
  1167. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/rules/ShiffBaseRule.java +21 -0
  1168. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/rules/SkinSensitisationRule.java +42 -0
  1169. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/rules/SkinSensitisationTreeResult.java +226 -0
  1170. data/Toxtree-v2.6.13/src/toxtree/plugins/skinsensitisation/rules/VerifyAlertsSkinSensitisation.java +29 -0
  1171. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/SMARTCYPPlugin.java +275 -0
  1172. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/SMARTCYPPlugin.properties +10 -0
  1173. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/SMARTCypTreeResult.java +397 -0
  1174. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/categories/NoSites.java +21 -0
  1175. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/categories/SitesHigherRank.java +45 -0
  1176. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/categories/SitesRank1.java +45 -0
  1177. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/categories/SitesRank2.java +24 -0
  1178. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/categories/SitesRank3.java +46 -0
  1179. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/rules/MetaboliteGenerator.java +183 -0
  1180. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/rules/SMARTCYPRuleHigherRank.java +20 -0
  1181. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/rules/SMARTCYPRuleHigherRank.properties +2 -0
  1182. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/rules/SMARTCYPRuleRank1.java +244 -0
  1183. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/rules/SMARTCYPRuleRank1.properties +2 -0
  1184. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/rules/SMARTCYPRuleRank2.java +12 -0
  1185. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/rules/SMARTCYPRuleRank2.properties +2 -0
  1186. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/rules/SMARTCYPRuleRank3.java +12 -0
  1187. data/Toxtree-v2.6.13/src/toxtree/plugins/smartcyp/rules/SMARTCYPRuleRank3.properties +2 -0
  1188. data/Toxtree-v2.6.13/src/toxtree/plugins/verhaar2/VerhaarScheme2.java +80 -0
  1189. data/Toxtree-v2.6.13/src/toxtree/plugins/verhaar2/VerhaarScheme2.properties +8 -0
  1190. data/Toxtree-v2.6.13/src/toxtree/plugins/verhaar2/categories/package.html +16 -0
  1191. data/Toxtree-v2.6.13/src/toxtree/plugins/verhaar2/package.html +26 -0
  1192. data/Toxtree-v2.6.13/src/toxtree/plugins/verhaar2/rules/Verhaar2TreeResult.java +57 -0
  1193. data/Toxtree-v2.6.13/src/toxtree/plugins/verhaar2/rules/package.html +15 -0
  1194. data/Toxtree-v2.6.13/src/toxtree/tree/rules/ApplyRuleOptions.java +122 -0
  1195. data/Toxtree-v2.6.13/src/toxtree/ui/DataModulePanel.java +82 -0
  1196. data/Toxtree-v2.6.13/src/toxtree/ui/HashtableModel.java +164 -0
  1197. data/Toxtree-v2.6.13/src/toxtree/ui/HazardPanel.java +367 -0
  1198. data/Toxtree-v2.6.13/src/toxtree/ui/OptionsPanel.java +101 -0
  1199. data/Toxtree-v2.6.13/src/toxtree/ui/PropertyEditor.java +81 -0
  1200. data/Toxtree-v2.6.13/src/toxtree/ui/PropertyInput.java +42 -0
  1201. data/Toxtree-v2.6.13/src/toxtree/ui/SpringUtilities.java +217 -0
  1202. data/Toxtree-v2.6.13/src/toxtree/ui/StatusBar.java +172 -0
  1203. data/Toxtree-v2.6.13/src/toxtree/ui/actions/AboutAction.java +168 -0
  1204. data/Toxtree-v2.6.13/src/toxtree/ui/actions/BatchAction.java +134 -0
  1205. data/Toxtree-v2.6.13/src/toxtree/ui/actions/ClearResultAction.java +87 -0
  1206. data/Toxtree-v2.6.13/src/toxtree/ui/actions/DataContainerAction.java +54 -0
  1207. data/Toxtree-v2.6.13/src/toxtree/ui/actions/DataModuleAction.java +133 -0
  1208. data/Toxtree-v2.6.13/src/toxtree/ui/actions/EditCompoundAction.java +88 -0
  1209. data/Toxtree-v2.6.13/src/toxtree/ui/actions/EstimateAction.java +82 -0
  1210. data/Toxtree-v2.6.13/src/toxtree/ui/actions/EstimateAllAction.java +88 -0
  1211. data/Toxtree-v2.6.13/src/toxtree/ui/actions/ExplainAction.java +74 -0
  1212. data/Toxtree-v2.6.13/src/toxtree/ui/actions/HelpAction.java +122 -0
  1213. data/Toxtree-v2.6.13/src/toxtree/ui/actions/InfoAction.java +153 -0
  1214. data/Toxtree-v2.6.13/src/toxtree/ui/actions/NewMoleculeAction.java +94 -0
  1215. data/Toxtree-v2.6.13/src/toxtree/ui/actions/OpenFileAction.java +94 -0
  1216. data/Toxtree-v2.6.13/src/toxtree/ui/actions/QuitAction.java +94 -0
  1217. data/Toxtree-v2.6.13/src/toxtree/ui/actions/SaveFileAction.java +111 -0
  1218. data/Toxtree-v2.6.13/src/toxtree/ui/actions/package.html +16 -0
  1219. data/Toxtree-v2.6.13/src/toxtree/ui/batch/AbstractJobProcessingDialog.java +308 -0
  1220. data/Toxtree-v2.6.13/src/toxtree/ui/batch/BatchProcessingDialog.java +725 -0
  1221. data/Toxtree-v2.6.13/src/toxtree/ui/batch/package.html +15 -0
  1222. data/Toxtree-v2.6.13/src/toxtree/ui/editors/SwingEditorFactory.java +145 -0
  1223. data/Toxtree-v2.6.13/src/toxtree/ui/metabolites/MetabolitesFrame.java +64 -0
  1224. data/Toxtree-v2.6.13/src/toxtree/ui/metabolites/MetabolitesPanel.java +102 -0
  1225. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/AbstractMoleculeAction.java +69 -0
  1226. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/AtomContainerPropertyTableModel.java +129 -0
  1227. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/ClearFilteredSubsetsAction.java +67 -0
  1228. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/GoToRecordAction.java +49 -0
  1229. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/LookupCompoundAction.java +100 -0
  1230. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/MoleculeEditAction.java +305 -0
  1231. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/NavigationPanel.java +192 -0
  1232. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/PropertyPanel.java +115 -0
  1233. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/ShowFilteredFileAction.java +67 -0
  1234. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/SmilesEntryPanel.java +387 -0
  1235. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/SmilesEntryPanel.properties +16 -0
  1236. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/StructureEntryPanel.java +84 -0
  1237. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/TopPanel.java +123 -0
  1238. data/Toxtree-v2.6.13/src/toxtree/ui/molecule/package.html +17 -0
  1239. data/Toxtree-v2.6.13/src/toxtree/ui/package.html +15 -0
  1240. data/Toxtree-v2.6.13/src/toxtree/ui/tree/DecisionMethodsTableModel.java +86 -0
  1241. data/Toxtree-v2.6.13/src/toxtree/ui/tree/DecisionNodePanel.java +355 -0
  1242. data/Toxtree-v2.6.13/src/toxtree/ui/tree/DecisionTreeModel.java +262 -0
  1243. data/Toxtree-v2.6.13/src/toxtree/ui/tree/EditTreeActions.java +238 -0
  1244. data/Toxtree-v2.6.13/src/toxtree/ui/tree/ITreeView.java +44 -0
  1245. data/Toxtree-v2.6.13/src/toxtree/ui/tree/JCustomTreeComponent.java +145 -0
  1246. data/Toxtree-v2.6.13/src/toxtree/ui/tree/ListPanel.java +244 -0
  1247. data/Toxtree-v2.6.13/src/toxtree/ui/tree/ListTableModel.java +113 -0
  1248. data/Toxtree-v2.6.13/src/toxtree/ui/tree/QueryAtomContainersModel.java +77 -0
  1249. data/Toxtree-v2.6.13/src/toxtree/ui/tree/SelectListDialog.java +350 -0
  1250. data/Toxtree-v2.6.13/src/toxtree/ui/tree/ToxTreeEditorPanel.java +154 -0
  1251. data/Toxtree-v2.6.13/src/toxtree/ui/tree/ToxTreePackageEntryModel.java +70 -0
  1252. data/Toxtree-v2.6.13/src/toxtree/ui/tree/TreeDrawing.java +196 -0
  1253. data/Toxtree-v2.6.13/src/toxtree/ui/tree/TreeEditorPanel.java +345 -0
  1254. data/Toxtree-v2.6.13/src/toxtree/ui/tree/TreeFrame.java +134 -0
  1255. data/Toxtree-v2.6.13/src/toxtree/ui/tree/TreeLayout.java +502 -0
  1256. data/Toxtree-v2.6.13/src/toxtree/ui/tree/TreeOptions.java +253 -0
  1257. data/Toxtree-v2.6.13/src/toxtree/ui/tree/TreePanel.java +194 -0
  1258. data/Toxtree-v2.6.13/src/toxtree/ui/tree/TreePrefuse.java +393 -0
  1259. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/AbstractRuleAction.java +87 -0
  1260. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/AbstractTreeAction.java +98 -0
  1261. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/AddCategoryAction.java +96 -0
  1262. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/ClearMethodsList.java +63 -0
  1263. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/EditCategoryAction.java +80 -0
  1264. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/EditDecisionMethodAction.java +97 -0
  1265. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/EditRuleAction.java +90 -0
  1266. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/EditTreeExplanation.java +149 -0
  1267. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/ICategoryAction.java +31 -0
  1268. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/INodeAction.java +36 -0
  1269. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/IRuleAction.java +31 -0
  1270. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/ITreeAction.java +32 -0
  1271. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/LiadMethodsListAction.java +101 -0
  1272. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/LoadAndEditTreeAction.java +121 -0
  1273. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/LoadTreeAction.java +154 -0
  1274. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/NewRuleAction.java +184 -0
  1275. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/NewTreeAction.java +89 -0
  1276. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/SaveMethodsListAction.java +118 -0
  1277. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/SaveTreeAction.java +168 -0
  1278. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/SelectAndEditTreeAction.java +116 -0
  1279. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/SelectCategoryFromListAction.java +88 -0
  1280. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/SelectNewTreeAction.java +80 -0
  1281. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/SelectTreeAction.java +88 -0
  1282. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/SetBranchAction.java +175 -0
  1283. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/SubstructureFromListAction.java +99 -0
  1284. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/SubstructuresFromFileAction.java +113 -0
  1285. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/TreeOptionsAction.java +74 -0
  1286. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/VerifyUnreachableRulesAction.java +101 -0
  1287. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/VerifyUnusedCategories.java +78 -0
  1288. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/ViewTreeAction.java +86 -0
  1289. data/Toxtree-v2.6.13/src/toxtree/ui/tree/actions/package.html +16 -0
  1290. data/Toxtree-v2.6.13/src/toxtree/ui/tree/categories/CategoriesPanel.java +154 -0
  1291. data/Toxtree-v2.6.13/src/toxtree/ui/tree/categories/CategoriesTableModel.java +132 -0
  1292. data/Toxtree-v2.6.13/src/toxtree/ui/tree/categories/CategoryPanel.java +130 -0
  1293. data/Toxtree-v2.6.13/src/toxtree/ui/tree/categories/package.html +15 -0
  1294. data/Toxtree-v2.6.13/src/toxtree/ui/tree/molecule/CompoundPanel.java +215 -0
  1295. data/Toxtree-v2.6.13/src/toxtree/ui/tree/package.html +15 -0
  1296. data/Toxtree-v2.6.13/src/toxtree/ui/tree/qsar/DescriptorOptions.java +106 -0
  1297. data/Toxtree-v2.6.13/src/toxtree/ui/tree/qsar/OptionsPanel.java +181 -0
  1298. data/Toxtree-v2.6.13/src/toxtree/ui/tree/qsar/QSARModelEditor.java +140 -0
  1299. data/Toxtree-v2.6.13/src/toxtree/ui/tree/qsar/RuleQSARModelEditor.java +49 -0
  1300. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/DecisionNodesListTableModel.java +80 -0
  1301. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/RuleDeleteSubstructureAction.java +67 -0
  1302. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/RuleEditor.java +114 -0
  1303. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/RuleExampleEditAction.java +124 -0
  1304. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/RuleMoleculeEditAction.java +84 -0
  1305. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/RulePanel.java +284 -0
  1306. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/RulePropertyEditor.java +127 -0
  1307. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/RuleRangeEditor.java +138 -0
  1308. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/RuleStructuresPanel.java +122 -0
  1309. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/RuleSubstructuresEditAction.java +131 -0
  1310. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/SMARTSRuleEditor.java +272 -0
  1311. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/SmartsPanelEditor.java +367 -0
  1312. data/Toxtree-v2.6.13/src/toxtree/ui/tree/rules/SubstructureRulePanel.java +206 -0
  1313. data/Toxtree-v2.6.13/src/toxtree/ui/wizard/DecisionNodeWizard.java +531 -0
  1314. data/Toxtree-v2.6.13/src/toxtree/ui/wizard/DecisionTreeWizard.java +49 -0
  1315. data/Toxtree-v2.6.13/src/toxtree/ui/wizard/EditorPanel.java +65 -0
  1316. data/Toxtree-v2.6.13/src/toxtree/ui/wizard/ListPanelDescriptor.java +39 -0
  1317. data/Toxtree-v2.6.13/src/toxtree/ui/wizard/RadioBoxPanel.java +131 -0
  1318. data/Toxtree-v2.6.13/src/toxtree/ui/wizard/ToxTreeWizardPanelDescriptor.java +113 -0
  1319. data/Toxtree-v2.6.13/src/toxtree/ui/wizard/WizardWrapper.java +63 -0
  1320. data/Toxtree-v2.6.13/src/toxtree/ui/wizard/package.html +19 -0
  1321. data/Toxtree-v2.6.13/src/verhaar/VerhaarScheme.java +260 -0
  1322. data/Toxtree-v2.6.13/src/verhaar/VerhaarScheme.properties +7 -0
  1323. data/Toxtree-v2.6.13/src/verhaar/categories/Class1BaselineToxicity.java +42 -0
  1324. data/Toxtree-v2.6.13/src/verhaar/categories/Class2LessInertCompounds.java +42 -0
  1325. data/Toxtree-v2.6.13/src/verhaar/categories/Class3UnspecificReactivity.java +55 -0
  1326. data/Toxtree-v2.6.13/src/verhaar/categories/Class4SpecificMechanism.java +67 -0
  1327. data/Toxtree-v2.6.13/src/verhaar/categories/Class5Unknown.java +66 -0
  1328. data/Toxtree-v2.6.13/src/verhaar/categories/package.html +16 -0
  1329. data/Toxtree-v2.6.13/src/verhaar/package.html +20 -0
  1330. data/Toxtree-v2.6.13/src/verhaar/query/AromaticQueryBond.java +63 -0
  1331. data/Toxtree-v2.6.13/src/verhaar/query/FunctionalGroups.java +429 -0
  1332. data/Toxtree-v2.6.13/src/verhaar/query/OrderQueryBondAromatic.java +53 -0
  1333. data/Toxtree-v2.6.13/src/verhaar/query/QueryAssociationBond.java +88 -0
  1334. data/Toxtree-v2.6.13/src/verhaar/query/QueryUnsaturatedBond.java +100 -0
  1335. data/Toxtree-v2.6.13/src/verhaar/rules/Rule01.java +58 -0
  1336. data/Toxtree-v2.6.13/src/verhaar/rules/Rule03.java +80 -0
  1337. data/Toxtree-v2.6.13/src/verhaar/rules/Rule11.java +66 -0
  1338. data/Toxtree-v2.6.13/src/verhaar/rules/Rule13.java +52 -0
  1339. data/Toxtree-v2.6.13/src/verhaar/rules/Rule14.java +56 -0
  1340. data/Toxtree-v2.6.13/src/verhaar/rules/Rule141.java +85 -0
  1341. data/Toxtree-v2.6.13/src/verhaar/rules/Rule142.java +96 -0
  1342. data/Toxtree-v2.6.13/src/verhaar/rules/Rule143.java +123 -0
  1343. data/Toxtree-v2.6.13/src/verhaar/rules/Rule144.java +80 -0
  1344. data/Toxtree-v2.6.13/src/verhaar/rules/Rule15.java +53 -0
  1345. data/Toxtree-v2.6.13/src/verhaar/rules/Rule151.java +66 -0
  1346. data/Toxtree-v2.6.13/src/verhaar/rules/Rule152.java +109 -0
  1347. data/Toxtree-v2.6.13/src/verhaar/rules/Rule153.java +74 -0
  1348. data/Toxtree-v2.6.13/src/verhaar/rules/Rule154.java +66 -0
  1349. data/Toxtree-v2.6.13/src/verhaar/rules/Rule16.java +53 -0
  1350. data/Toxtree-v2.6.13/src/verhaar/rules/Rule161.java +75 -0
  1351. data/Toxtree-v2.6.13/src/verhaar/rules/Rule17.java +57 -0
  1352. data/Toxtree-v2.6.13/src/verhaar/rules/Rule171.java +77 -0
  1353. data/Toxtree-v2.6.13/src/verhaar/rules/Rule21.java +211 -0
  1354. data/Toxtree-v2.6.13/src/verhaar/rules/Rule22.java +56 -0
  1355. data/Toxtree-v2.6.13/src/verhaar/rules/Rule23.java +78 -0
  1356. data/Toxtree-v2.6.13/src/verhaar/rules/Rule24.java +95 -0
  1357. data/Toxtree-v2.6.13/src/verhaar/rules/Rule25.java +63 -0
  1358. data/Toxtree-v2.6.13/src/verhaar/rules/Rule31.java +82 -0
  1359. data/Toxtree-v2.6.13/src/verhaar/rules/Rule32.java +77 -0
  1360. data/Toxtree-v2.6.13/src/verhaar/rules/Rule33.java +71 -0
  1361. data/Toxtree-v2.6.13/src/verhaar/rules/Rule34.java +69 -0
  1362. data/Toxtree-v2.6.13/src/verhaar/rules/Rule35.java +69 -0
  1363. data/Toxtree-v2.6.13/src/verhaar/rules/Rule36.java +73 -0
  1364. data/Toxtree-v2.6.13/src/verhaar/rules/Rule37.java +72 -0
  1365. data/Toxtree-v2.6.13/src/verhaar/rules/Rule38.java +121 -0
  1366. data/Toxtree-v2.6.13/src/verhaar/rules/Rule4.java +97 -0
  1367. data/Toxtree-v2.6.13/src/verhaar/rules/RuleAlertsClass1.java +47 -0
  1368. data/Toxtree-v2.6.13/src/verhaar/rules/RuleAlertsClass2.java +47 -0
  1369. data/Toxtree-v2.6.13/src/verhaar/rules/RuleAlertsClass3.java +47 -0
  1370. data/Toxtree-v2.6.13/src/verhaar/rules/RuleIonicGroups.java +84 -0
  1371. data/Toxtree-v2.6.13/src/verhaar/rules/RuleLogPRange.java +96 -0
  1372. data/Toxtree-v2.6.13/src/verhaar/rules/RuleRingMainStrucSubstituents.java +38 -0
  1373. data/Toxtree-v2.6.13/src/verhaar/rules/RuleVerifyClass1Alerts.java +16 -0
  1374. data/Toxtree-v2.6.13/src/verhaar/rules/RuleVerifyClass2Alerts.java +16 -0
  1375. data/Toxtree-v2.6.13/src/verhaar/rules/RuleVerifyClass3Alerts.java +17 -0
  1376. data/Toxtree-v2.6.13/src/verhaar/rules/VerhaarTreeResult.java +57 -0
  1377. data/Toxtree-v2.6.13/src/verhaar/rules/helper/RuleAnySubstructureCounter.java +45 -0
  1378. data/Toxtree-v2.6.13/src/verhaar/rules/helper/RuleElementsCounter.java +44 -0
  1379. data/Toxtree-v2.6.13/src/verhaar/rules/helper/RuleOnlyAllowedSubstructuresCounter.java +44 -0
  1380. data/Toxtree-v2.6.13/src/verhaar/rules/package.html +15 -0
  1381. data/ext/toxtree/extconf.rb +21 -0
  1382. data/lib/toxtree.rb +91 -0
  1383. data/test/toxtree.rb +26 -0
  1384. metadata +1427 -0
@@ -0,0 +1,73 @@
1
+ /*
2
+ Copyright (C) 2005-2008
3
+
4
+ Contact: nina@acad.bg
5
+
6
+ This program is free software; you can redistribute it and/or
7
+ modify it under the terms of the GNU Lesser General Public License
8
+ as published by the Free Software Foundation; either version 2.1
9
+ of the License, or (at your option) any later version.
10
+ All we ask is that proper credit is given for our work, which includes
11
+ - but is not limited to - adding the above copyright notice to the beginning
12
+ of your source code files, and to any copyright notice that you may distribute
13
+ with programs based on this work.
14
+
15
+ This program is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU Lesser General Public License for more details.
19
+
20
+ You should have received a copy of the GNU Lesser General Public License
21
+ along with this program; if not, write to the Free Software
22
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
23
+ */
24
+
25
+ package toxTree.qsar;
26
+
27
+ public class MatrixPreprocessor implements IDescriptorPreprocessor {
28
+ protected double[][] matrix = null;
29
+ protected String explanation;
30
+ protected int dimension;
31
+ /**
32
+ *
33
+ */
34
+ private static final long serialVersionUID = 3014828295822399358L;
35
+
36
+ public MatrixPreprocessor(double[][] matrix) throws Exception {
37
+ setDimension(matrix.length);
38
+ setMatrix(matrix);
39
+ }
40
+ public double[] process(double[] values) throws Exception {
41
+ double[] sum = new double[matrix.length];
42
+ for (int i=0; i < matrix.length;i++) {
43
+ sum[i] = 0;
44
+ int n = matrix[i].length;
45
+ for (int j=0; j < (n-1);j++)
46
+ sum[i] += values[i]*matrix[i][j];
47
+ sum[i] += matrix[i][n-1];
48
+ }
49
+ return sum;
50
+ }
51
+ public double[][] getMatrix() {
52
+ return matrix;
53
+ }
54
+ public void setMatrix(double[][] matrix) throws Exception {
55
+ this.matrix = matrix;
56
+ if (getDimension() != matrix.length) throw new Exception("Incompatible lengths");
57
+ }
58
+ public String getExplanation() {
59
+ return explanation;
60
+ }
61
+ public void setExplanation(String explanation) {
62
+ this.explanation = explanation;
63
+ }
64
+ public int getDimension() {
65
+ return dimension;
66
+ }
67
+ public void setDimension(int dimension) {
68
+ this.dimension = dimension;
69
+ }
70
+
71
+ }
72
+
73
+
@@ -0,0 +1,111 @@
1
+ /*
2
+ Copyright (C) 2005-2008
3
+
4
+ Contact: nina@acad.bg
5
+
6
+ This program is free software; you can redistribute it and/or
7
+ modify it under the terms of the GNU Lesser General Public License
8
+ as published by the Free Software Foundation; either version 2.1
9
+ of the License, or (at your option) any later version.
10
+ All we ask is that proper credit is given for our work, which includes
11
+ - but is not limited to - adding the above copyright notice to the beginning
12
+ of your source code files, and to any copyright notice that you may distribute
13
+ with programs based on this work.
14
+
15
+ This program is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU Lesser General Public License for more details.
19
+
20
+ You should have received a copy of the GNU Lesser General Public License
21
+ along with this program; if not, write to the Free Software
22
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
23
+ */
24
+
25
+ package toxTree.qsar;
26
+
27
+ import java.io.IOException;
28
+ import java.io.ObjectInputStream;
29
+ import java.io.Serializable;
30
+
31
+ import org.openscience.cdk.qsar.IMolecularDescriptor;
32
+
33
+ import toxTree.core.Introspection;
34
+
35
+ /**
36
+ * Encapsulating descriptor name (in a model) and descriptor calculation
37
+ * @author nina
38
+ *
39
+ */
40
+ public class QSARDescriptor implements Serializable, Comparable<String> {
41
+ /**
42
+ *
43
+ */
44
+ private static final long serialVersionUID = -3702178459249696653L;
45
+ protected String descriptorName;
46
+ protected transient IMolecularDescriptor descriptor;
47
+ //protected IDescriptorPreprocessor preprocessor;
48
+ protected boolean calculated;
49
+ protected String descriptorClass;
50
+
51
+ public QSARDescriptor(String name, IMolecularDescriptor descriptor) {
52
+ setDescriptorName(name);
53
+ setDescriptor(descriptor);
54
+ //setPreprocessor(preprocessor);
55
+ setCalculated(false);
56
+ }
57
+ public IMolecularDescriptor getDescriptor() {
58
+ return descriptor;
59
+ }
60
+ public void setDescriptor(IMolecularDescriptor descriptor) {
61
+ this.descriptor = descriptor;
62
+ this.descriptorClass = descriptor.getClass().getName();
63
+ }
64
+ public String getDescriptorName() {
65
+ return descriptorName;
66
+ }
67
+ public void setDescriptorName(String descriptorName) {
68
+ this.descriptorName = descriptorName;
69
+ }
70
+ /*
71
+ public IDescriptorPreprocessor getPreprocessor() {
72
+ return preprocessor;
73
+ }
74
+ public void setPreprocessor(IDescriptorPreprocessor preprocessor) {
75
+ this.preprocessor = preprocessor;
76
+ }
77
+ */
78
+ public boolean isCalculated() {
79
+ return calculated;
80
+ }
81
+ public void setCalculated(boolean calculated) {
82
+ this.calculated = calculated;
83
+ }
84
+ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
85
+ Thread.currentThread().setContextClassLoader(Introspection.getLoader());
86
+ in.defaultReadObject();
87
+
88
+ if (!descriptorClass.equals(""))
89
+ try {
90
+ descriptor = (IMolecularDescriptor)Introspection.loadCreateObject(descriptorClass);
91
+ } catch (Exception x) {
92
+ x.printStackTrace();
93
+ descriptor = null;
94
+ }
95
+ setCalculated(false);
96
+
97
+ }
98
+ public int compareTo(String arg0) {
99
+ return descriptorName.compareTo(arg0);
100
+ }
101
+ @Override
102
+ public boolean equals(Object arg0) {
103
+ if (arg0 instanceof QSARDescriptor) {
104
+ QSARDescriptor qd = (QSARDescriptor) arg0;
105
+ return (qd.getDescriptor() == getDescriptor())
106
+ && (qd.getDescriptorName().equals(getDescriptorName()));
107
+ } else return descriptorName.equals(arg0.toString());
108
+ }
109
+ }
110
+
111
+
@@ -0,0 +1,64 @@
1
+ /*
2
+ Copyright Ideaconsult Ltd. (C) 2005-2007
3
+
4
+ Contact: nina@acad.bg
5
+
6
+ This program is free software; you can redistribute it and/or
7
+ modify it under the terms of the GNU General Public License
8
+ as published by the Free Software Foundation; either version 2
9
+ of the License, or (at your option) any later version.
10
+ All we ask is that proper credit is given for our work, which includes
11
+ - but is not limited to - adding the above copyright notice to the beginning
12
+ of your source code files, and to any copyright notice that you may distribute
13
+ with programs based on this work.
14
+
15
+ This program is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU General Public License for more details.
19
+
20
+ You should have received a copy of the GNU General Public License
21
+ along with this program; if not, write to the Free Software
22
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
+
24
+ */
25
+ package toxTree.query;
26
+
27
+
28
+ import org.openscience.cdk.CDKConstants;
29
+ import org.openscience.cdk.interfaces.IAtom;
30
+
31
+ /**
32
+ * Matches if not aromatic and of type set
33
+ * @author Nina Jeliazkova
34
+ * <b>Modified</b> 2005-8-20
35
+ */
36
+ public class AliphaticCHQueryAtom extends CHQueryAtom {
37
+
38
+ /**
39
+ * Comment for <code>serialVersionUID</code>
40
+ */
41
+ private static final long serialVersionUID = 416309648893347645L;
42
+
43
+ /**
44
+ *
45
+ */
46
+ public AliphaticCHQueryAtom() {
47
+ super();
48
+
49
+ }
50
+
51
+ /**
52
+ * @param atom
53
+ */
54
+ public AliphaticCHQueryAtom(IAtom atom) {
55
+ super(atom);
56
+ }
57
+ /* (non-Javadoc)
58
+ * @see toxTree.tree.rules.CHQueryAtom#matches(org.openscience.cdk.Atom)
59
+ */
60
+ @Override
61
+ public boolean matches(IAtom atom) {
62
+ return (!atom.getFlag(CDKConstants.ISAROMATIC)) && super.matches(atom) ;
63
+ }
64
+ }
@@ -0,0 +1,60 @@
1
+ /*
2
+ Copyright Ideaconsult Ltd. (C) 2005-2007
3
+
4
+ Contact: nina@acad.bg
5
+
6
+ This program is free software; you can redistribute it and/or
7
+ modify it under the terms of the GNU General Public License
8
+ as published by the Free Software Foundation; either version 2
9
+ of the License, or (at your option) any later version.
10
+ All we ask is that proper credit is given for our work, which includes
11
+ - but is not limited to - adding the above copyright notice to the beginning
12
+ of your source code files, and to any copyright notice that you may distribute
13
+ with programs based on this work.
14
+
15
+ This program is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU General Public License for more details.
19
+
20
+ You should have received a copy of the GNU General Public License
21
+ along with this program; if not, write to the Free Software
22
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
+
24
+ */
25
+ package toxTree.query;
26
+
27
+
28
+ import org.openscience.cdk.interfaces.IAtom;
29
+ import org.openscience.cdk.interfaces.IBond;
30
+ import org.openscience.cdk.isomorphism.matchers.IQueryBond;
31
+
32
+
33
+
34
+ /**
35
+ * TODO add description
36
+ * @author ThinClient
37
+ * <b>Modified</b> 2005-9-23
38
+ */
39
+ public class AssociationQueryBond extends MyAssociationBond implements IQueryBond {
40
+
41
+ private static final long serialVersionUID = 2683414374611772988L;
42
+
43
+ /**
44
+ * @param atom1
45
+ * @param atom2
46
+ */
47
+ public AssociationQueryBond(IAtom atom1, IAtom atom2) {
48
+ super(atom1, atom2);
49
+ }
50
+
51
+ /**
52
+ *
53
+ */
54
+ public AssociationQueryBond() {
55
+ super();
56
+ }
57
+ public boolean matches(IBond bond) {
58
+ return bond instanceof MyAssociationBond;
59
+ }
60
+ }
@@ -0,0 +1,85 @@
1
+ /*
2
+ Copyright Ideaconsult Ltd. (C) 2005-2007
3
+
4
+ Contact: nina@acad.bg
5
+
6
+ This program is free software; you can redistribute it and/or
7
+ modify it under the terms of the GNU General Public License
8
+ as published by the Free Software Foundation; either version 2
9
+ of the License, or (at your option) any later version.
10
+ All we ask is that proper credit is given for our work, which includes
11
+ - but is not limited to - adding the above copyright notice to the beginning
12
+ of your source code files, and to any copyright notice that you may distribute
13
+ with programs based on this work.
14
+
15
+ This program is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU General Public License for more details.
19
+
20
+ You should have received a copy of the GNU General Public License
21
+ along with this program; if not, write to the Free Software
22
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
+
24
+ */
25
+ package toxTree.query;
26
+
27
+
28
+ import org.openscience.cdk.interfaces.IAtom;
29
+ import org.openscience.cdk.isomorphism.matchers.SymbolQueryAtom;
30
+
31
+ /**
32
+ * This is to match a hydrocarbon atom in subgraph query
33
+ * Molecule should be preprocessed with FunctionalGroups.markCHn(), otherwise results will not be correct
34
+ * @author Nina Jeliazkova
35
+ * <b>Modified</b> 2005-8-20
36
+ */
37
+ public class CHQueryAtom extends SymbolQueryAtom {
38
+ //protected static TTLogger logger = new TTLogger(CHQueryAtom.class);
39
+ protected static String[] marks = {
40
+ FunctionalGroups.C,
41
+ FunctionalGroups.CH,
42
+ FunctionalGroups.CH2,
43
+ FunctionalGroups.CH3
44
+ };
45
+ /**
46
+ * Comment for <code>serialVersionUID</code>
47
+ */
48
+ private static final long serialVersionUID = -7209347862505140304L;
49
+
50
+ /**
51
+ *
52
+ */
53
+ public CHQueryAtom() {
54
+ super();
55
+
56
+ }
57
+
58
+ /**
59
+ * @param atom
60
+ */
61
+ public CHQueryAtom(IAtom atom) {
62
+ super(atom);
63
+
64
+ }
65
+ /* (non-Javadoc)
66
+ * @see org.openscience.cdk.isomorphism.matchers.SymbolQueryAtom#matches(org.openscience.cdk.Atom)
67
+ */
68
+ @Override
69
+ public boolean matches(IAtom atom) {
70
+ if (!atom.getSymbol().equals("C")) return false;
71
+ if (super.matches(atom)) {
72
+ for (int i=0; i<marks.length; i++) {
73
+ Object o = atom.getProperty(marks[i]);
74
+ if (o != null) {
75
+ //logger.debug("Mark found\t",marks[i]);
76
+ return true;
77
+ }
78
+ }
79
+ // logger.debug("NO CHn mark found! Was the molecule preprocessed by FunctionalGroups.markCHn(Molecule mol) ?\t");
80
+ }
81
+ return false;
82
+
83
+ }
84
+
85
+ }
@@ -0,0 +1,4045 @@
1
+ /*
2
+ Copyright Ideaconsult Ltd. (C) 2005-2007
3
+
4
+ Contact: nina@acad.bg
5
+
6
+ This program is free software; you can redistribute it and/or
7
+ modify it under the terms of the GNU General Public License
8
+ as published by the Free Software Foundation; either version 2
9
+ of the License, or (at your option) any later version.
10
+ All we ask is that proper credit is given for our work, which includes
11
+ - but is not limited to - adding the above copyright notice to the beginning
12
+ of your source code files, and to any copyright notice that you may distribute
13
+ with programs based on this work.
14
+
15
+ This program is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU General Public License for more details.
19
+
20
+ You should have received a copy of the GNU General Public License
21
+ along with this program; if not, write to the Free Software
22
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
+
24
+ *//**
25
+ * <b>Filename</b> FunctionalGroups.java
26
+ * @author Nina Jeliazkova nina@acad.bg
27
+ * <b>Created</b> 2005-8-8
28
+ * <b>Project</b> toxTree
29
+ *
30
+ */
31
+ package toxTree.query;
32
+
33
+ import java.util.ArrayList;
34
+ import java.util.Collection;
35
+ import java.util.Hashtable;
36
+ import java.util.Iterator;
37
+ import java.util.List;
38
+ import java.util.Map;
39
+ import java.util.TreeMap;
40
+ import java.util.logging.Level;
41
+ import java.util.logging.Logger;
42
+
43
+ import org.openscience.cdk.CDKConstants;
44
+ import org.openscience.cdk.config.Elements;
45
+ import org.openscience.cdk.exception.CDKException;
46
+ import org.openscience.cdk.exception.InvalidSmilesException;
47
+ import org.openscience.cdk.graph.ConnectivityChecker;
48
+ import org.openscience.cdk.graph.PathTools;
49
+ import org.openscience.cdk.interfaces.IAtom;
50
+ import org.openscience.cdk.interfaces.IAtomContainer;
51
+ import org.openscience.cdk.interfaces.IBond;
52
+ import org.openscience.cdk.interfaces.IChemObjectBuilder;
53
+ import org.openscience.cdk.interfaces.IElement;
54
+ import org.openscience.cdk.interfaces.IMolecularFormula;
55
+ import org.openscience.cdk.interfaces.IMolecule;
56
+ import org.openscience.cdk.interfaces.IMoleculeSet;
57
+ import org.openscience.cdk.interfaces.IRing;
58
+ import org.openscience.cdk.interfaces.IRingSet;
59
+ import org.openscience.cdk.isomorphism.UniversalIsomorphismTester;
60
+ import org.openscience.cdk.isomorphism.matchers.IQueryAtom;
61
+ import org.openscience.cdk.isomorphism.matchers.InverseSymbolSetQueryAtom;
62
+ import org.openscience.cdk.isomorphism.matchers.OrderQueryBond;
63
+ import org.openscience.cdk.isomorphism.matchers.QueryAtomContainer;
64
+ import org.openscience.cdk.isomorphism.matchers.QueryAtomContainerCreator;
65
+ import org.openscience.cdk.isomorphism.matchers.SymbolAndChargeQueryAtom;
66
+ import org.openscience.cdk.isomorphism.matchers.SymbolQueryAtom;
67
+ import org.openscience.cdk.isomorphism.matchers.SymbolSetQueryAtom;
68
+ import org.openscience.cdk.isomorphism.matchers.smarts.AliphaticSymbolAtom;
69
+ import org.openscience.cdk.isomorphism.matchers.smarts.AnyOrderQueryBond;
70
+ import org.openscience.cdk.isomorphism.matchers.smarts.AromaticSymbolAtom;
71
+ import org.openscience.cdk.isomorphism.mcss.RMap;
72
+ import org.openscience.cdk.ringsearch.SSSRFinder;
73
+ import org.openscience.cdk.silent.AtomContainer;
74
+ import org.openscience.cdk.silent.SilentChemObjectBuilder;
75
+ import org.openscience.cdk.tools.CDKHydrogenAdder;
76
+ import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
77
+ import org.openscience.cdk.tools.manipulator.MolecularFormulaManipulator;
78
+
79
+ import toxTree.core.ConnectionMatrix;
80
+ import toxTree.tree.AbstractRule;
81
+ import ambit2.core.data.MoleculeTools;
82
+ import ambit2.core.processors.structure.HydrogenAdderProcessor;
83
+ import ambit2.core.smiles.SmilesParserWrapper;
84
+ import ambit2.core.smiles.SmilesParserWrapper.SMILES_PARSER;
85
+
86
+ /**
87
+ * This class provides static methods for various functional groups
88
+ * In addition there are several static methods to manipulate searching
89
+ * @author Nina Jeliazkova <br>
90
+ * <b>Modified</b> 2005-8-8
91
+ */
92
+ public class FunctionalGroups {
93
+ public static Logger logger = Logger.getLogger(FunctionalGroups.class.getName());
94
+ /**
95
+ * Messages
96
+ */
97
+ public static final String MSG_HASGROUP = "\thas group \t";
98
+ public static final String MSG_MOLECULEIS = "Molecule is\t";
99
+ /**
100
+ * These constants are used in Atom.setProperty(CH3,true) fashion
101
+ * in order to mark which atoms/bonds belong to the corresponding group
102
+ * Used by {@link #markMaps(IAtomContainer, IAtomContainer, List)} method
103
+ */
104
+ public static final String CH3 = "CH3";
105
+ public static final String CH2 = "CH2";
106
+ public static final String CH = "CH";
107
+ public static final String C = "C";
108
+ public static final String HYDROCARBON = "hydrocarbon";
109
+ public static final String PRIMARY_AMINE = "Primary amine";
110
+ public static final String SECONDARY_AMINE = "Secondary amine";
111
+ public static final String TERTIARY_AMINE = "tertiary amine";
112
+ public static final String AROMATIC_AMINE = "aromatic amine";
113
+
114
+ public static final String SECONDARY_AMINE_ALIPHATIC = "Aliphatic Secondary amine";
115
+ public static final String CYANO = "cyano";
116
+ public static final String NITRO = "nitro";
117
+ public static final String NNITROSO = "N-nitroso";
118
+ public static final String DIAZO = "diazo";
119
+ public static final String TRIAZENO = "triazeno";
120
+ public static final String CARBOXYLIC_ACID_SALT = "carboxylic acid salt";
121
+ public static final String CARBOXYLIC_ACID = "carboxylic acid";
122
+ public static final String ACETAL = "acetal";
123
+ public static final String ETHER = "ether";
124
+ public static final String METHYLETHER = "methylether";
125
+ public static final String SULPHIDE = "sulphide";
126
+ public static final String MERCAPTAN = "mercaptan";
127
+ public static final String ESTER = "ester";
128
+ public static final String THIOESTER = "thioester";
129
+ public static final String KETONE = "ketone";
130
+ public static final String KETONE_SIDECHAIN = "ketone_sidechain";
131
+ public static final String ALDEHYDE = "aldehyde";
132
+ public static final String CARBONYL = "carbonyl";
133
+ public static final String CARBONYL_ABUNSATURATED="CARBONYL_ABUNSATURATED";
134
+ public static final String ALCOHOL = "alcohol";
135
+ public static final String SULPHONATE = "sulphonate";
136
+ public static final String SULPHAMATE = "sulphamate";
137
+ public static final String SULPHATE = "sulphate";
138
+ public static final String PHOSPHATE = "phosphate";
139
+ public static final String POLYOXYETHYLENE = "polyoxyethylene";
140
+ public static final String HYDROCHLORIDE_OF_AMINE = "hydrochloride of amine";
141
+ public static final String SULPHATE_OF_AMINE = "sulphate of amine";
142
+ public static final String ACETYLENIC = "acetylenic";
143
+ public static final String LACTONE = "lactone";
144
+ public static final String CYCLIC_DIESTER = "cyclic diester";
145
+ public static final String ISOPRENE = "isoprene unit";
146
+ public static final String HYDROXY = "hydroxy";
147
+ public static final String METHOXY = "methoxy";
148
+ public static final String HYDROXY1 = "1'hydroxy";
149
+ public static final String HYDROXYESTERSUBSTITED = "hydroxy ester substituted";
150
+ public static final String QUATERNARY_NITROGEN= "quaternary nitrogen";
151
+ public static final String QUATERNARY_NITROGEN_EXCEPTION= "quaternary nitrogen exception";
152
+ public static final String ANHYDRIDE="ANHYDRIDE";
153
+ public static final String CARBONATE="CARBONATE";
154
+ public static final String AROMATIC_N_OXIDE="Aromatic ring N oxide";
155
+
156
+ public static final String RING_NUMBERING="RingNumbering";
157
+ /**
158
+ * Use DONTMARK constant when building a query
159
+ * QueryAtom atom;
160
+ * atom.setProperty(DONTMARK,query.getID());
161
+ * This is used as a flag that the atom belongs not to the group but to the neighboring radicals
162
+ * It is also essential for the {@link #detachGroup(IAtomContainer, QueryAtomContainer)} procedure to work,
163
+ * as the bond to break is the one with one atom having the property set, while the other has the property unset
164
+ */
165
+ public static final String DONTMARK = "DONTMARK";
166
+ //TODO replace current marking with ALLOCATED
167
+ /**
168
+ * The intention is to use this property to mark if an atom/bond was already associated with a functional group.
169
+ * It will help to avoid wrong overlapping allocation of different group to the same atom
170
+ * Finally, marking by setProperty(query.getID(),new Boolean(true)) may be replaced with setProperty(ALLOCATED,query.getID())
171
+ * perhaps in v0.04 release :)
172
+ */
173
+ public static final String ALLOCATED = "ALLOCATED";
174
+
175
+
176
+ protected static CDKHydrogenAdder h = CDKHydrogenAdder.getInstance(SilentChemObjectBuilder.getInstance());
177
+ /**
178
+ *
179
+ */
180
+ protected FunctionalGroups() {
181
+ super();
182
+ }
183
+ /**
184
+ * Query for Methyl group.
185
+ * @return
186
+ */
187
+ public static QueryAtomContainer methyl() {
188
+ QueryAtomContainer query = new QueryAtomContainer();
189
+ query.setID(CH3);
190
+
191
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
192
+ SymbolQueryAtom h1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
193
+ SymbolQueryAtom h2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
194
+ SymbolQueryAtom h3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
195
+ query.addAtom(c);
196
+ query.addAtom(h1);
197
+ query.addAtom(h2);
198
+ query.addAtom(h3);
199
+ query.addBond(new OrderQueryBond(c, h1, CDKConstants.BONDORDER_SINGLE));
200
+ query.addBond(new OrderQueryBond(c, h2, CDKConstants.BONDORDER_SINGLE));
201
+ query.addBond(new OrderQueryBond(c, h3, CDKConstants.BONDORDER_SINGLE));
202
+ return query;
203
+ }
204
+ /**
205
+ * Query for methoxy group.
206
+ * @return
207
+ */
208
+ public static QueryAtomContainer methoxy() {
209
+ QueryAtomContainer query = new QueryAtomContainer();
210
+ query.setID(METHOXY);
211
+ ReallyAnyAtom r = new ReallyAnyAtom(); r.setSymbol("R");
212
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
213
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
214
+ SymbolQueryAtom h1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
215
+ SymbolQueryAtom h2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
216
+ SymbolQueryAtom h3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
217
+ query.addAtom(r);
218
+ query.addAtom(o);
219
+ query.addAtom(c);
220
+ query.addAtom(h1);
221
+ query.addAtom(h2);
222
+ query.addAtom(h3);
223
+ query.addBond(new OrderQueryBond(r, o, CDKConstants.BONDORDER_SINGLE));
224
+ query.addBond(new OrderQueryBond(o, c, CDKConstants.BONDORDER_SINGLE));
225
+ query.addBond(new OrderQueryBond(c, h1, CDKConstants.BONDORDER_SINGLE));
226
+ query.addBond(new OrderQueryBond(c, h2, CDKConstants.BONDORDER_SINGLE));
227
+ query.addBond(new OrderQueryBond(c, h3, CDKConstants.BONDORDER_SINGLE));
228
+ return query;
229
+ }
230
+ public static QueryAtomContainer methoxy_ring() {
231
+ QueryAtomContainer query = new QueryAtomContainer();
232
+ query.setID(METHOXY);
233
+ TopologyAnyAtom r = new TopologyAnyAtom(true); r.setSymbol("R");
234
+ r.setProperty(DONTMARK,query.getID());
235
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
236
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
237
+ SymbolQueryAtom h1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
238
+ SymbolQueryAtom h2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
239
+ SymbolQueryAtom h3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
240
+ query.addAtom(r);
241
+ query.addAtom(o);
242
+ query.addAtom(c);
243
+ query.addAtom(h1);
244
+ query.addAtom(h2);
245
+ query.addAtom(h3);
246
+ query.addBond(new OrderQueryBond(r, o, CDKConstants.BONDORDER_SINGLE));
247
+ query.addBond(new OrderQueryBond(o, c, CDKConstants.BONDORDER_SINGLE));
248
+ query.addBond(new OrderQueryBond(c, h1, CDKConstants.BONDORDER_SINGLE));
249
+ query.addBond(new OrderQueryBond(c, h2, CDKConstants.BONDORDER_SINGLE));
250
+ query.addBond(new OrderQueryBond(c, h3, CDKConstants.BONDORDER_SINGLE));
251
+ return query;
252
+ }
253
+
254
+ public static QueryAtomContainer noxide_aromatic() {
255
+ QueryAtomContainer query = new QueryAtomContainer();
256
+ query.setID(AROMATIC_N_OXIDE);
257
+ AromaticSymbolAtom n = new AromaticSymbolAtom("N");
258
+ n.setCharge(1.0);
259
+ TopologySymbolQueryAtom o = new TopologySymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN),false);
260
+ o.setCharge(-1.0);
261
+ query.addAtom(o);
262
+ query.addAtom(n);
263
+ query.addBond(new OrderQueryBond(o, n, CDKConstants.BONDORDER_SINGLE));
264
+
265
+ return query;
266
+ }
267
+ public static QueryAtomContainer hydroxy_ring() {
268
+ QueryAtomContainer query = new QueryAtomContainer();
269
+ query.setID(HYDROXY);
270
+ TopologySymbolQueryAtom c = new TopologySymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON),true);
271
+ c.setProperty(DONTMARK,query.getID());
272
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
273
+ SymbolQueryAtom h = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
274
+ query.addAtom(h);
275
+ query.addAtom(o);
276
+ query.addAtom(c);
277
+ query.addBond(new OrderQueryBond(o, c, CDKConstants.BONDORDER_SINGLE));
278
+ query.addBond(new OrderQueryBond(o, h, CDKConstants.BONDORDER_SINGLE));
279
+ return query;
280
+ }
281
+ public static QueryAtomContainer hydroxy1() {
282
+ QueryAtomContainer query = new QueryAtomContainer();
283
+ query.setID(HYDROXY1);
284
+ //aliphatic c
285
+ IQueryAtom c = new AliphaticSymbolAtom("C");
286
+ //old - fails to match safrole TopologySymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON),false);
287
+ c.setProperty(DONTMARK,query.getID());
288
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
289
+ SymbolQueryAtom h = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
290
+ query.addAtom(h);
291
+ query.addAtom(o);
292
+ query.addAtom(c);
293
+ query.addBond(new OrderQueryBond(o, c, CDKConstants.BONDORDER_SINGLE));
294
+ query.addBond(new OrderQueryBond(o, h, CDKConstants.BONDORDER_SINGLE));
295
+ return query;
296
+ }
297
+ // CCCC...COC(=O)R
298
+ public static QueryAtomContainer hydroxyEsterSubstituted() {
299
+ QueryAtomContainer query = new QueryAtomContainer();
300
+ query.setID(HYDROXYESTERSUBSTITED);
301
+ SymbolQueryAtom c1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
302
+ SymbolQueryAtom c2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
303
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
304
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
305
+ SymbolQueryAtom r = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
306
+ query.addAtom(r);
307
+ query.addAtom(o);query.addAtom(o2);
308
+ query.addAtom(c1);query.addAtom(c2);
309
+ query.addBond(new OrderQueryBond(c1, o, CDKConstants.BONDORDER_SINGLE));
310
+ query.addBond(new OrderQueryBond(o, c2, CDKConstants.BONDORDER_SINGLE));
311
+ query.addBond(new OrderQueryBond(o2, c2, CDKConstants.BONDORDER_DOUBLE));
312
+ query.addBond(new OrderQueryBond(r, c2, CDKConstants.BONDORDER_SINGLE));
313
+ return query;
314
+ }
315
+ //R-CH2-R
316
+ public static QueryAtomContainer ethyl() {
317
+ QueryAtomContainer query = new QueryAtomContainer();
318
+ query.setID(CH2);
319
+
320
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
321
+ SymbolQueryAtom h1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
322
+ SymbolQueryAtom h2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
323
+ InverseSymbolSetQueryAtom h3 = new InverseSymbolSetQueryAtom();
324
+ h3.addSymbol("H");
325
+ h3.setProperty(DONTMARK,query.getID());
326
+ InverseSymbolSetQueryAtom h4 = new InverseSymbolSetQueryAtom();
327
+ h4.addSymbol("H");
328
+ h4.setProperty(DONTMARK,query.getID());
329
+
330
+ query.addAtom(c);
331
+ query.addAtom(h1);
332
+ query.addAtom(h2);
333
+ query.addAtom(h3);
334
+ query.addBond(new OrderQueryBond(c, h1, CDKConstants.BONDORDER_SINGLE));
335
+ query.addBond(new OrderQueryBond(c, h2, CDKConstants.BONDORDER_SINGLE));
336
+ query.addBond(new AnyOrderQueryBond(c, h3,CDKConstants.BONDORDER_SINGLE));
337
+ query.addBond(new AnyOrderQueryBond(c, h3,CDKConstants.BONDORDER_SINGLE));
338
+ return query;
339
+ }
340
+ public static QueryAtomContainer hydrocarbon() {
341
+ QueryAtomContainer query = new QueryAtomContainer();
342
+ query.setID(CH);
343
+
344
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
345
+ query.addAtom(c);
346
+ SymbolSetQueryAtom[] neighbors = new SymbolSetQueryAtom[4];
347
+ for (int i =0; i < 4; i++) {
348
+ neighbors[i] = new SymbolSetQueryAtom();
349
+ neighbors[i].addSymbol("C");
350
+ neighbors[i].addSymbol("H");
351
+ query.addAtom(neighbors[i]);
352
+ query.addBond(new OrderQueryBond(c, neighbors[i], CDKConstants.BONDORDER_SINGLE));
353
+ }
354
+ return query;
355
+ }
356
+
357
+
358
+ public static QueryAtomContainer primaryAmine(boolean aliphatic) {
359
+ QueryAtomContainer query = new QueryAtomContainer();
360
+ query.setID(PRIMARY_AMINE);
361
+ IQueryAtom r;
362
+ if (aliphatic) r= new TopologySymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON),false);
363
+ else r = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
364
+ ((IAtom)r).setProperty(DONTMARK,query.getID());
365
+ SymbolQueryAtom n = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
366
+ SymbolQueryAtom h1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
367
+ SymbolQueryAtom h2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
368
+ query.addAtom((IAtom)r);
369
+ query.addAtom(n);
370
+ query.addAtom(h1);
371
+ query.addAtom(h2);
372
+ query.addBond(new OrderQueryBond(r, n, CDKConstants.BONDORDER_SINGLE));
373
+ query.addBond(new OrderQueryBond(n, h1, CDKConstants.BONDORDER_SINGLE));
374
+ query.addBond(new OrderQueryBond(n, h2, CDKConstants.BONDORDER_SINGLE));
375
+ return query;
376
+ }
377
+ /**
378
+ * SMARTS: [C;R0]-;!@[N;R0;H1]-;!@[C;R0]
379
+ * @param aliphatic
380
+ * @return
381
+ */
382
+ public static QueryAtomContainer secondaryAmine(boolean aliphatic) {
383
+ QueryAtomContainer query = new QueryAtomContainer();
384
+ if (aliphatic) query.setID(SECONDARY_AMINE_ALIPHATIC);
385
+ else query.setID(SECONDARY_AMINE);
386
+ SymbolQueryAtom[] c = new SymbolQueryAtom[2];
387
+
388
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN);
389
+ a.setFormalCharge(0);
390
+ SymbolAndChargeQueryAtom n = new SymbolAndChargeQueryAtom(a);
391
+ SymbolQueryAtom h = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
392
+
393
+ for (int i=0; i<2; i++) {
394
+ //if (aliphatic) c[i]= new TopologySymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON),false);
395
+ //else
396
+ if (aliphatic)
397
+ c[i] = new CHQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
398
+ else c[i]= new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
399
+ query.addAtom(c[i]);
400
+ if (aliphatic)
401
+ query.addBond(new TopologyOrderQueryBond(c[i], n, CDKConstants.BONDORDER_SINGLE,false));
402
+ else
403
+ query.addBond(new OrderQueryBond(c[i], n, CDKConstants.BONDORDER_SINGLE));
404
+ }
405
+ query.addAtom(n);
406
+ query.addAtom(h);
407
+ query.addBond(new OrderQueryBond(n, h, CDKConstants.BONDORDER_SINGLE));
408
+ return query;
409
+ }
410
+
411
+ public static QueryAtomContainer tertiaryAmine() {
412
+ QueryAtomContainer query = new QueryAtomContainer();
413
+ query.setID(TERTIARY_AMINE);
414
+ InverseSymbolSetQueryAtom[] r = new InverseSymbolSetQueryAtom[3];
415
+ SymbolQueryAtom n = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
416
+ for (int i =0; i < 3; i++) {
417
+ r[i] = new InverseSymbolSetQueryAtom();
418
+ r[i].setSymbol("*");
419
+ r[i].addSymbol("H");
420
+
421
+ query.addAtom(r[i]);
422
+ query.addBond(new OrderQueryBond(r[i], n, CDKConstants.BONDORDER_SINGLE));
423
+ }
424
+ return query;
425
+ }
426
+
427
+ /*
428
+ public static QueryAtomContainer amine(int order, boolean aliphatic) {
429
+ QueryAtomContainer query = new QueryAtomContainer();
430
+ switch (order) {
431
+ //primary
432
+ case 1:{query.setID(PRIMARY_AMINE); break;}
433
+ //secondary
434
+ case 2:{query.setID(SECONDARY_AMINE); break;}
435
+ //tertiary
436
+ case 3: {query.setID(TERTIARY_AMINE); break;}
437
+ //any
438
+ default : {order= 0;query.setID(AMINE); break;}
439
+ }
440
+ InverseSymbolSetQueryAtom[] r = new InverseSymbolSetQueryAtom[3];
441
+ SymbolQueryAtom n = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
442
+ for (int i =0; i < order; i++) {
443
+ r[i] = new InverseSymbolSetQueryAtom();
444
+ r[i].addSymbol("H");
445
+ query.addAtom(r[i]);
446
+ query.addBond(new OrderQueryBond(r[i], n, CDKConstants.BONDORDER_SINGLE));
447
+ }
448
+ return query;
449
+ }
450
+ */
451
+ // [N+].[Cl-]
452
+ public static QueryAtomContainer hydrochlorideOfAmine(int amine) {
453
+ //TODO verify the correct way of representation hydrochlorideOfAmine
454
+ QueryAtomContainer query = new QueryAtomContainer();
455
+ query.setID(HYDROCHLORIDE_OF_AMINE);
456
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN);
457
+ a.setFormalCharge(1);
458
+ SymbolAndChargeQueryAtom n = new SymbolAndChargeQueryAtom(a);
459
+ //SymbolQueryAtom n = new SymbolQueryAtom(a);
460
+ query.addAtom(n);
461
+
462
+ IAtom chlor = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CHLORINE);
463
+ chlor.setFormalCharge(-1);
464
+ SymbolAndChargeQueryAtom cl = new SymbolAndChargeQueryAtom(chlor);
465
+ query.addAtom(cl);
466
+ SymbolQueryAtom[] r = new SymbolQueryAtom[4];
467
+ for (int i=0; i < 4; i++) {
468
+
469
+ if ((i+1) > amine) r[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
470
+ else r[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
471
+ query.addAtom(r[i]);
472
+ query.addBond(new OrderQueryBond(n, r[i], CDKConstants.BONDORDER_SINGLE));
473
+ }
474
+ //TODO should verify somehow for ionic bond, not any ...
475
+ query.addBond(new AnyOrderQueryBond(n,cl, CDKConstants.BONDORDER_SINGLE));
476
+ return query;
477
+ }
478
+
479
+ public static QueryAtomContainer hydrochlorideOfAmine3() {
480
+ //TODO verify the correct way of representation hydrochlorideOfAmine
481
+ QueryAtomContainer query = new QueryAtomContainer();
482
+ query.setID(HYDROCHLORIDE_OF_AMINE);
483
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN);
484
+ a.setFormalCharge(1);
485
+ SymbolAndChargeQueryAtom n = new SymbolAndChargeQueryAtom(a);
486
+ //SymbolQueryAtom n = new SymbolQueryAtom(a);
487
+ query.addAtom(n);
488
+
489
+ IAtom chlor = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CHLORINE);
490
+ chlor.setFormalCharge(-1);
491
+ SymbolAndChargeQueryAtom cl = new SymbolAndChargeQueryAtom(chlor);
492
+ query.addAtom(cl);
493
+ SymbolQueryAtom[] r = new SymbolQueryAtom[3];
494
+ for (int i=0; i < 3; i++) {
495
+
496
+ r[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
497
+ query.addAtom(r[i]);
498
+ if (i==0)
499
+ query.addBond(new OrderQueryBond(n, r[i], CDKConstants.BONDORDER_DOUBLE));
500
+ else
501
+ query.addBond(new OrderQueryBond(n, r[i], CDKConstants.BONDORDER_SINGLE));
502
+ }
503
+ //TODO should verify somehow for ionic bond, not any ...
504
+ query.addBond(new AnyOrderQueryBond(n,cl, CDKConstants.BONDORDER_SINGLE));
505
+ return query;
506
+ }
507
+
508
+ // [N+].[Cl-]
509
+
510
+ public static QueryAtomContainer hydrochlorideOfAmineBreakable() {
511
+ //TODO verify the correct way of representation hydrochlorideOfAmine
512
+ QueryAtomContainer query = new QueryAtomContainer();
513
+ query.setID(HYDROCHLORIDE_OF_AMINE);
514
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN);
515
+ a.setFormalCharge(1);
516
+ SymbolAndChargeQueryAtom n = new SymbolAndChargeQueryAtom(a);
517
+ query.addAtom(n);
518
+
519
+ IAtom chlor = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CHLORINE);
520
+ chlor.setFormalCharge(-1);
521
+
522
+ SymbolAndChargeQueryAtom cl = new SymbolAndChargeQueryAtom(chlor);
523
+ cl.setProperty(DONTMARK,query.getID());
524
+ query.addAtom(cl);
525
+
526
+ //TODO moze li da ima drugi elementi zakaceni za N
527
+ SymbolSetQueryAtom[] r = new SymbolSetQueryAtom[2];
528
+ for (int i=0; i < r.length; i++) {
529
+ r[i] = new SymbolSetQueryAtom();
530
+ r[i].addSymbol("C");
531
+ r[i].addSymbol("H");
532
+ query.addAtom(r[i]);
533
+ query.addBond(new SingleOrDoubleQueryBond(n, r[i]));
534
+ }
535
+ //TODO should verify somehow for ionic bond, not any ...
536
+ query.addBond(new OrderQueryBond(n,cl, CDKConstants.BONDORDER_SINGLE));
537
+ return query;
538
+ }
539
+
540
+ //S(=O)(=O)(OH)[O-][N+]
541
+ public static QueryAtomContainer sulphateOfAmine(int amine) {
542
+ QueryAtomContainer query = new QueryAtomContainer();
543
+ query.setID(SULPHATE_OF_AMINE);
544
+ SymbolQueryAtom s = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.SULFUR));
545
+ query.addAtom(s);
546
+ IQueryAtom[] o = new IQueryAtom[4];
547
+ for (int i=0; i < 4; i++) {
548
+ if (i==0) {
549
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
550
+ a.setFormalCharge(-1);
551
+ o[i] = new SymbolAndChargeQueryAtom(a);
552
+ } else o[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
553
+ query.addAtom((IAtom)o[i]);
554
+ if (i<2)
555
+ query.addBond(new OrderQueryBond(s, o[i], CDKConstants.BONDORDER_SINGLE));
556
+ else
557
+ query.addBond(new OrderQueryBond(s, o[i], CDKConstants.BONDORDER_DOUBLE));
558
+ }
559
+
560
+
561
+ /*
562
+ * S-[O-].[N+]
563
+ * S-O
564
+ * S=O
565
+ * S=O
566
+ *
567
+ */
568
+ /*TODO verify if this is necessary
569
+ SymbolQueryAtom h = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
570
+ query.addAtom(h);
571
+ query.addBond(new OrderQueryBond(h, o[1], CDKConstants.BONDORDER_SINGLE));
572
+ */
573
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN);
574
+ a.setFormalCharge(1);
575
+ SymbolAndChargeQueryAtom n = new SymbolAndChargeQueryAtom(a);
576
+ //SymbolQueryAtom n = new SymbolQueryAtom(a);
577
+ query.addAtom(n);
578
+
579
+ if (amine > 0) { //primary, sec, etc
580
+ SymbolSetQueryAtom[] r = new SymbolSetQueryAtom[4];
581
+ for (int i=0; i < 4; i++) {
582
+ r[i] = new SymbolSetQueryAtom();
583
+ if ((i+1) > amine) r[i].addSymbol("H");
584
+ else r[i].addSymbol("C");
585
+ query.addAtom(r[i]);
586
+ query.addBond(new OrderQueryBond(n, r[i], CDKConstants.BONDORDER_SINGLE)); //[N+]-R or [N+]-H
587
+ }
588
+ }
589
+ //TODO should verify somehow for ionic bond, not any ...
590
+ query.addBond(new AnyOrderQueryBond(n,o[0], CDKConstants.BONDORDER_SINGLE)); //[N+]-[O-]
591
+ return query;
592
+ }
593
+ /**
594
+ * This is {@link #sulphateOfAmine(int)} with the ionic bonnd between [N+] and [O-]
595
+ * marked with {@link #DONTMARK} so it can be broken by {@link #detachGroup(IAtomContainer, QueryAtomContainer)} method
596
+ * @return QueryAtomContainer the query
597
+ */
598
+ public static QueryAtomContainer sulphateOfAmineBreakable() {
599
+ QueryAtomContainer aminoSulphate = FunctionalGroups.sulphateOfAmine(0);
600
+ //find [N+].[O-] bond and mark it as DONTMARK
601
+ for (int i=0; i <aminoSulphate.getBondCount();i++) {
602
+ Iterator ai = aminoSulphate.getBond(i).atoms().iterator();
603
+ IAtom n = null;
604
+ IAtom o = null;
605
+ while (ai.hasNext()) {
606
+ IAtom a = (IAtom)ai.next();
607
+ if (a.getSymbol().equals("N")) n = a;
608
+ else if (a.getSymbol().equals("O")) o = a;
609
+ }
610
+
611
+
612
+ if ((n !=null) && (o !=null)) { //this is the bond
613
+ n.setProperty(FunctionalGroups.DONTMARK,aminoSulphate.getID());
614
+ logger.fine("Ma");
615
+ break;
616
+ }
617
+ }
618
+ return aminoSulphate;
619
+ }
620
+ /**
621
+ * SMARTS: C(#N)([C,#1])
622
+ * @return
623
+ */
624
+ public static QueryAtomContainer cyano() {
625
+ QueryAtomContainer query = new QueryAtomContainer();
626
+ query.setID(CYANO);
627
+
628
+ SymbolSetQueryAtom a = new SymbolSetQueryAtom();
629
+ a.addSymbol("N");
630
+ a.addSymbol("C");
631
+ a.addSymbol("H");
632
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
633
+ SymbolQueryAtom n = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
634
+
635
+ query.addAtom(a);
636
+ query.addAtom(c);
637
+ query.addAtom(n);
638
+ query.addBond(new OrderQueryBond(a, c, CDKConstants.BONDORDER_SINGLE));
639
+ query.addBond(new OrderQueryBond(c, n, CDKConstants.BONDORDER_TRIPLE));
640
+ return query;
641
+ }
642
+ /**
643
+ * SMARTS: N(=O)(=O)([!#1])
644
+ * @return
645
+ */
646
+ public static QueryAtomContainer nitro2double() {
647
+ QueryAtomContainer query = new QueryAtomContainer();
648
+ query.setID(NITRO);
649
+ InverseSymbolSetQueryAtom r = new InverseSymbolSetQueryAtom();
650
+ r.addSymbol("H");
651
+ SymbolQueryAtom n = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
652
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
653
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
654
+
655
+ query.addAtom(r);query.addAtom(n);
656
+ query.addAtom(o1);query.addAtom(o2);
657
+ query.addBond(new OrderQueryBond(r, n, CDKConstants.BONDORDER_SINGLE));
658
+ query.addBond(new OrderQueryBond(n, o1, CDKConstants.BONDORDER_DOUBLE));
659
+ query.addBond(new OrderQueryBond(n, o2, CDKConstants.BONDORDER_DOUBLE));
660
+ return query;
661
+ }
662
+ /**
663
+ * SMARTS: [N+](=O)([O-])([!#1])
664
+ * @return
665
+ */
666
+ public static QueryAtomContainer nitro1double() {
667
+ QueryAtomContainer query = new QueryAtomContainer();
668
+ query.setID(NITRO);
669
+ InverseSymbolSetQueryAtom r = new InverseSymbolSetQueryAtom();
670
+
671
+ r.addSymbol("H");
672
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN); a.setFormalCharge(+1);
673
+ SymbolAndChargeQueryAtom n = new SymbolAndChargeQueryAtom(a);
674
+
675
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
676
+
677
+ IAtom o = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN); o.setFormalCharge(-1);
678
+ SymbolAndChargeQueryAtom o2 = new SymbolAndChargeQueryAtom(o);
679
+
680
+
681
+ query.addAtom(r);query.addAtom(n);
682
+ query.addAtom(o1);query.addAtom(o2);
683
+ query.addBond(new OrderQueryBond(r, n, CDKConstants.BONDORDER_SINGLE));
684
+ query.addBond(new OrderQueryBond(n, o1, CDKConstants.BONDORDER_DOUBLE));
685
+ query.addBond(new OrderQueryBond(n, o2, CDKConstants.BONDORDER_SINGLE));
686
+ return query;
687
+ }
688
+ /**
689
+ * SMARTS: O=NN([!#1])([!#1])
690
+ * @return
691
+ */
692
+ public static QueryAtomContainer Nnitroso() {
693
+ QueryAtomContainer query = new QueryAtomContainer();
694
+ query.setID(NNITROSO);
695
+ InverseSymbolSetQueryAtom r1 = new InverseSymbolSetQueryAtom();
696
+ r1.addSymbol("H");
697
+ InverseSymbolSetQueryAtom r2 = new InverseSymbolSetQueryAtom();
698
+ r2.addSymbol("H");
699
+ SymbolQueryAtom n1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
700
+ SymbolQueryAtom n2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
701
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
702
+
703
+ query.addAtom(r1);query.addAtom(r2);
704
+ query.addAtom(n1);query.addAtom(n2);
705
+ query.addAtom(o);
706
+ query.addBond(new OrderQueryBond(r1, n1, CDKConstants.BONDORDER_SINGLE));
707
+ query.addBond(new OrderQueryBond(r2, n1, CDKConstants.BONDORDER_SINGLE));
708
+ query.addBond(new OrderQueryBond(n1, n2, CDKConstants.BONDORDER_SINGLE));
709
+ query.addBond(new OrderQueryBond(n2, o, CDKConstants.BONDORDER_DOUBLE));
710
+ return query;
711
+ }
712
+ /*
713
+ * SMARTS: N#N
714
+ */
715
+ public static QueryAtomContainer diAzo() {
716
+ SymbolQueryAtom n1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
717
+ SymbolQueryAtom n2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
718
+ QueryAtomContainer query = new QueryAtomContainer();
719
+ query.setID(DIAZO);
720
+ query.addAtom(n1);query.addAtom(n2);
721
+ query.addBond(new OrderQueryBond(n1, n2, CDKConstants.BONDORDER_TRIPLE));
722
+ return query;
723
+ }
724
+ /**
725
+ * SMARTS: [#6][#7]=[#7][#7;H2]
726
+ * @return
727
+ */
728
+ public static QueryAtomContainer triAzeno() {
729
+
730
+ QueryAtomContainer query = new QueryAtomContainer();
731
+ query.setID(TRIAZENO);
732
+
733
+ SymbolQueryAtom r = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
734
+ r.setProperty(DONTMARK,query.getID());
735
+ SymbolQueryAtom n1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
736
+ SymbolQueryAtom n2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
737
+ SymbolQueryAtom n3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
738
+ SymbolQueryAtom h1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
739
+ SymbolQueryAtom h2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
740
+
741
+ query.addAtom(r);query.addAtom(n1);
742
+ query.addAtom(n2);query.addAtom(n3);
743
+ query.addAtom(h1);query.addAtom(h2);
744
+ query.addBond(new OrderQueryBond(r, n1, CDKConstants.BONDORDER_SINGLE));
745
+ query.addBond(new OrderQueryBond(n1, n2, CDKConstants.BONDORDER_DOUBLE));
746
+ query.addBond(new OrderQueryBond(n2, n3, CDKConstants.BONDORDER_SINGLE));
747
+ query.addBond(new OrderQueryBond(n3, h1, CDKConstants.BONDORDER_SINGLE));
748
+ query.addBond(new OrderQueryBond(n3, h2, CDKConstants.BONDORDER_SINGLE));
749
+ return query;
750
+ }
751
+
752
+
753
+ public static QueryAtomContainer quaternaryNitrogen1(boolean charged) {
754
+
755
+ ReallyAnyAtom r1 = new ReallyAnyAtom();
756
+ ReallyAnyAtom r2 = new ReallyAnyAtom();
757
+ ReallyAnyAtom r3 = new ReallyAnyAtom();
758
+ ReallyAnyAtom r4 = new ReallyAnyAtom();
759
+
760
+ //SymbolQueryAtom n = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
761
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN);
762
+ IQueryAtom n;
763
+ if (charged) {
764
+ a.setFormalCharge(1);
765
+ n = new SymbolAndChargeQueryAtom(a);
766
+ } else n = new SymbolQueryAtom(a);
767
+
768
+ QueryAtomContainer query = new QueryAtomContainer();
769
+ query.setID(QUATERNARY_NITROGEN);
770
+ query.addAtom(r1);query.addAtom(r2);
771
+ query.addAtom(r3);query.addAtom(r4);
772
+ query.addAtom((IAtom)n);
773
+ query.addBond(new OrderQueryBond(r1, n, CDKConstants.BONDORDER_SINGLE));
774
+ query.addBond(new OrderQueryBond(r2, n, CDKConstants.BONDORDER_SINGLE));
775
+ query.addBond(new OrderQueryBond(r3, n, CDKConstants.BONDORDER_SINGLE));
776
+ query.addBond(new OrderQueryBond(r4, n, CDKConstants.BONDORDER_SINGLE));
777
+
778
+ return query;
779
+ }
780
+
781
+ public static QueryAtomContainer quaternaryNitrogen2(boolean charged) {
782
+
783
+ ReallyAnyAtom r1 = new ReallyAnyAtom();
784
+ ReallyAnyAtom r2 = new ReallyAnyAtom();
785
+ ReallyAnyAtom r3 = new ReallyAnyAtom();
786
+
787
+ //SymbolQueryAtom n = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN));
788
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN);
789
+ IQueryAtom n;
790
+ if (charged) {
791
+ a.setFormalCharge(1);
792
+ n = new SymbolAndChargeQueryAtom(a);
793
+ } else n = new SymbolQueryAtom(a); //else to cope with wrong record
794
+
795
+ QueryAtomContainer query = new QueryAtomContainer();
796
+ query.setID(QUATERNARY_NITROGEN);
797
+ query.addAtom(r1);query.addAtom(r2);
798
+ query.addAtom(r3);
799
+ query.addAtom((IAtom)n);
800
+ query.addBond(new OrderQueryBond(r1, n, CDKConstants.BONDORDER_SINGLE));
801
+ query.addBond(new OrderQueryBond(r2, n, CDKConstants.BONDORDER_SINGLE));
802
+ query.addBond(new OrderQueryBond(r3, n, CDKConstants.BONDORDER_DOUBLE));
803
+
804
+ return query;
805
+ }
806
+
807
+
808
+ public static QueryAtomContainer quarternaryNitrogenException() {
809
+ ReallyAnyAtom nr1 = new ReallyAnyAtom();
810
+ ReallyAnyAtom nr2 = new ReallyAnyAtom();
811
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
812
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN);
813
+ a.setFormalCharge(1);
814
+ SymbolAndChargeQueryAtom n = new SymbolAndChargeQueryAtom(a);
815
+ InverseSymbolSetQueryAtom cr1 = new InverseSymbolSetQueryAtom();
816
+ cr1.addSymbol("H");
817
+ InverseSymbolSetQueryAtom cr2 = new InverseSymbolSetQueryAtom();
818
+ cr2.addSymbol("H");
819
+
820
+ QueryAtomContainer query = new QueryAtomContainer();
821
+ query.setID(QUATERNARY_NITROGEN_EXCEPTION);
822
+ query.addAtom(nr1);query.addAtom(nr2);
823
+ query.addAtom(cr1);query.addAtom(cr2);
824
+ query.addAtom(n);query.addAtom(c);
825
+ query.addAtom(n);
826
+ query.addBond(new OrderQueryBond(nr1, n, CDKConstants.BONDORDER_SINGLE));
827
+ query.addBond(new OrderQueryBond(nr2, n, CDKConstants.BONDORDER_SINGLE));
828
+ query.addBond(new OrderQueryBond(c, n, CDKConstants.BONDORDER_DOUBLE));
829
+ query.addBond(new OrderQueryBond(cr1, c, CDKConstants.BONDORDER_SINGLE));
830
+ query.addBond(new OrderQueryBond(cr2, c, CDKConstants.BONDORDER_SINGLE));
831
+
832
+ return query;
833
+ }
834
+ // R-C(=O)-OH
835
+ public static QueryAtomContainer carboxylicAcid() {
836
+ QueryAtomContainer query = new QueryAtomContainer();
837
+ query.setID(CARBOXYLIC_ACID);
838
+ ReallyAnyAtom r = new ReallyAnyAtom();
839
+ r.setProperty(DONTMARK,query.getID());
840
+
841
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
842
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
843
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
844
+ SymbolQueryAtom h = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
845
+ query.addAtom(r); query.addAtom(c);
846
+ query.addAtom(o1); query.addAtom(o2);query.addAtom(h);
847
+ query.addBond(new OrderQueryBond(r, c, CDKConstants.BONDORDER_SINGLE));
848
+ query.addBond(new OrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE));
849
+ query.addBond(new OrderQueryBond(h, o1, CDKConstants.BONDORDER_SINGLE));
850
+ query.addBond(new OrderQueryBond(c, o2, CDKConstants.BONDORDER_DOUBLE));
851
+ return query;
852
+ }
853
+ public static QueryAtomContainer acyclic_acetal() {
854
+ QueryAtomContainer query = new QueryAtomContainer();
855
+ query.setID(ACETAL);
856
+ SymbolQueryAtom[] c = new SymbolQueryAtom[3];
857
+ for (int i =0; i < 3; i++) {
858
+ c[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
859
+ query.addAtom(c[i]);
860
+ }
861
+ SymbolQueryAtom[] o = new SymbolQueryAtom[2];
862
+ for (int i =0; i < 2; i++) {
863
+ o[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
864
+ query.addAtom(o[i]);
865
+ }
866
+ query.addBond(new TopologyOrderQueryBond(c[0], o[0], CDKConstants.BONDORDER_SINGLE,false));
867
+ query.addBond(new TopologyOrderQueryBond(c[1], o[0], CDKConstants.BONDORDER_SINGLE,false));
868
+ query.addBond(new TopologyOrderQueryBond(c[1], o[1], CDKConstants.BONDORDER_SINGLE,false));
869
+ query.addBond(new TopologyOrderQueryBond(c[2], o[1], CDKConstants.BONDORDER_SINGLE,false));
870
+ return query;
871
+
872
+ }
873
+ // -C-O-C-O-C-
874
+ public static QueryAtomContainer acetal() {
875
+ QueryAtomContainer query = new QueryAtomContainer();
876
+ query.setID(ACETAL);
877
+ SymbolQueryAtom[] c = new SymbolQueryAtom[3];
878
+ for (int i =0; i < 3; i++) {
879
+ c[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
880
+ query.addAtom(c[i]);
881
+ }
882
+ SymbolQueryAtom[] o = new SymbolQueryAtom[2];
883
+ for (int i =0; i < 2; i++) {
884
+ o[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
885
+ query.addAtom(o[i]);
886
+ }
887
+ query.addBond(new OrderQueryBond(c[0], o[0], CDKConstants.BONDORDER_SINGLE));
888
+ query.addBond(new OrderQueryBond(c[1], o[0], CDKConstants.BONDORDER_SINGLE));
889
+ query.addBond(new OrderQueryBond(c[1], o[1], CDKConstants.BONDORDER_SINGLE));
890
+ query.addBond(new OrderQueryBond(c[2], o[1], CDKConstants.BONDORDER_SINGLE));
891
+ return query;
892
+ }
893
+
894
+ // C-O-C have to check if substituted
895
+ public static QueryAtomContainer ether() {
896
+ QueryAtomContainer query = new QueryAtomContainer();
897
+ query.setID(ETHER);
898
+ SymbolQueryAtom[] r = new SymbolQueryAtom[2];
899
+ for (int i =0; i < 2; i++) {
900
+ r[i] = new CHQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
901
+ // r[i].setProperty(DONTMARK,query.getID());
902
+ query.addAtom(r[i]);
903
+ }
904
+ //TotalValencyAtom s = new TotalValencyAtom(2);
905
+ SymbolQueryAtom s = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
906
+ query.addAtom(s);
907
+ query.addBond(new OrderQueryBond(r[0], s, CDKConstants.BONDORDER_SINGLE));
908
+ query.addBond(new OrderQueryBond(r[1], s, CDKConstants.BONDORDER_SINGLE));
909
+ return query;
910
+ }
911
+ // C-O-C have to check if substituted
912
+ public static QueryAtomContainer alkoxy() {
913
+ QueryAtomContainer query = new QueryAtomContainer();
914
+ query.setID(ETHER);
915
+ SymbolQueryAtom[] r = new SymbolQueryAtom[2];
916
+ for (int i =0; i < 2; i++) {
917
+ r[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
918
+ query.addAtom(r[i]);
919
+ }
920
+ //TotalValencyAtom s = new TotalValencyAtom(2);
921
+ SymbolQueryAtom s = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
922
+ query.addAtom(s);
923
+ query.addBond(new OrderQueryBond(r[0], s, CDKConstants.BONDORDER_SINGLE));
924
+ query.addBond(new OrderQueryBond(r[1], s, CDKConstants.BONDORDER_SINGLE));
925
+ return query;
926
+ }
927
+ // C-O-C have to check if substituted
928
+ public static QueryAtomContainer methylether() {
929
+ QueryAtomContainer query = new QueryAtomContainer();
930
+ query.setID(METHYLETHER);
931
+
932
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
933
+ query.addAtom(o);
934
+ SymbolQueryAtom[] r = new SymbolQueryAtom[2];
935
+ for (int i =0; i < 2; i++) {
936
+ r[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
937
+ query.addAtom(r[i]);
938
+ query.addBond(new OrderQueryBond(r[i], o, CDKConstants.BONDORDER_SINGLE));
939
+ }
940
+ SymbolQueryAtom[] h = new SymbolQueryAtom[3];
941
+ for (int i =0; i < 3; i++) {
942
+ h[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
943
+ query.addAtom(h[i]);
944
+ query.addBond(new OrderQueryBond(h[i], r[0], CDKConstants.BONDORDER_SINGLE));
945
+ }
946
+ return query;
947
+ }
948
+
949
+ // C-S-C
950
+ public static QueryAtomContainer sulphide() {
951
+ QueryAtomContainer query = new QueryAtomContainer();
952
+ query.setID(SULPHIDE);
953
+ SymbolQueryAtom[] r = new SymbolQueryAtom[2];
954
+ for (int i =0; i < 2; i++) {
955
+ r[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
956
+ query.addAtom(r[i]);
957
+ }
958
+ //TotalValencyAtom s = new TotalValencyAtom(2);
959
+ SymbolQueryAtom s = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.SULFUR));
960
+ query.addAtom(s);
961
+ query.addBond(new OrderQueryBond(r[0], s, CDKConstants.BONDORDER_SINGLE));
962
+ query.addBond(new OrderQueryBond(r[1], s, CDKConstants.BONDORDER_SINGLE));
963
+ return query;
964
+ }
965
+
966
+ // R-SH
967
+ public static QueryAtomContainer mercaptan() {
968
+ QueryAtomContainer query = new QueryAtomContainer();
969
+ query.setID(MERCAPTAN);
970
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
971
+ SymbolQueryAtom s = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.SULFUR));
972
+ SymbolQueryAtom h = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
973
+
974
+ query.addAtom(s);query.addAtom(c);query.addAtom(h);
975
+ query.addBond(new OrderQueryBond(c, s, CDKConstants.BONDORDER_SINGLE));
976
+ query.addBond(new OrderQueryBond(s, h, CDKConstants.BONDORDER_SINGLE));
977
+ return query;
978
+ }
979
+ //R-S-C(=O)-R'
980
+ //R-S-C(=S)-R'
981
+ public static QueryAtomContainer thioester() {
982
+ QueryAtomContainer query = new QueryAtomContainer();
983
+ query.setID(THIOESTER);
984
+ InverseSymbolSetQueryAtom r = new InverseSymbolSetQueryAtom();
985
+ r.addSymbol("H");
986
+ r.addSymbol("S");
987
+ r.addSymbol("O");
988
+ r.setProperty(DONTMARK,query.getID());
989
+
990
+ InverseSymbolSetQueryAtom e = new InverseSymbolSetQueryAtom();
991
+ e.addSymbol("H");
992
+ e.setProperty(DONTMARK,query.getID());
993
+
994
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
995
+ SymbolQueryAtom s = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.SULFUR));
996
+ SymbolSetQueryAtom o2 = new SymbolSetQueryAtom();
997
+ o2.addSymbol("O");
998
+ o2.addSymbol("S");
999
+
1000
+ query.addAtom(r); query.addAtom(e); query.addAtom(c);
1001
+ query.addAtom(s); query.addAtom(o2);
1002
+ query.addBond(new OrderQueryBond(r, c, CDKConstants.BONDORDER_SINGLE));
1003
+ query.addBond(new OrderQueryBond(c, s, CDKConstants.BONDORDER_SINGLE));
1004
+ query.addBond(new OrderQueryBond(c, o2, CDKConstants.BONDORDER_DOUBLE));
1005
+ query.addBond(new OrderQueryBond(s, e, CDKConstants.BONDORDER_SINGLE));
1006
+ return query;
1007
+ }
1008
+
1009
+ // RC(=O)OR
1010
+ public static QueryAtomContainer ester() {
1011
+ QueryAtomContainer query = new QueryAtomContainer();
1012
+ query.setID(ESTER);
1013
+ ReallyAnyAtom r = new ReallyAnyAtom();
1014
+ r.setProperty(DONTMARK,query.getID());
1015
+ InverseSymbolSetQueryAtom e = new InverseSymbolSetQueryAtom();
1016
+ e.addSymbol("H");
1017
+ e.setProperty(DONTMARK,query.getID());
1018
+
1019
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1020
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1021
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1022
+ query.addAtom(r);
1023
+ query.addAtom(e);
1024
+ query.addAtom(c);
1025
+ query.addAtom(o1); query.addAtom(o2);
1026
+ query.addBond(new OrderQueryBond(r, c, CDKConstants.BONDORDER_SINGLE));
1027
+ query.addBond(new OrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE));
1028
+ query.addBond(new OrderQueryBond(c, o2, CDKConstants.BONDORDER_DOUBLE));
1029
+ query.addBond(new OrderQueryBond(o1, e, CDKConstants.BONDORDER_SINGLE));
1030
+ return query;
1031
+ }
1032
+ // ROC(=O)OR
1033
+ public static QueryAtomContainer carbonate() {
1034
+ QueryAtomContainer query = new QueryAtomContainer();
1035
+ query.setID(CARBONATE);
1036
+ ReallyAnyAtom r = new ReallyAnyAtom();
1037
+ r.setProperty(DONTMARK,query.getID());
1038
+ InverseSymbolSetQueryAtom e = new InverseSymbolSetQueryAtom();
1039
+ e.addSymbol("H");
1040
+ e.setProperty(DONTMARK,query.getID());
1041
+
1042
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1043
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1044
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1045
+ SymbolQueryAtom o3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1046
+ query.addAtom(r); query.addAtom(e); query.addAtom(c);
1047
+ query.addAtom(o1); query.addAtom(o2); query.addAtom(o3);
1048
+ query.addBond(new OrderQueryBond(o3, r, CDKConstants.BONDORDER_SINGLE));
1049
+ query.addBond(new OrderQueryBond(o3, c, CDKConstants.BONDORDER_SINGLE));
1050
+ query.addBond(new OrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE));
1051
+ query.addBond(new OrderQueryBond(c, o2, CDKConstants.BONDORDER_DOUBLE));
1052
+ query.addBond(new OrderQueryBond(o1, e, CDKConstants.BONDORDER_SINGLE));
1053
+ return query;
1054
+ }
1055
+ public static QueryAtomContainer anhydride() {
1056
+ QueryAtomContainer query = new QueryAtomContainer();
1057
+ query.setID(ANHYDRIDE);
1058
+
1059
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1060
+
1061
+ SymbolQueryAtom r = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1062
+ r.setProperty(DONTMARK,query.getID());
1063
+
1064
+ SymbolQueryAtom e = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1065
+ r.setProperty(DONTMARK,query.getID());
1066
+
1067
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1068
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1069
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1070
+ query.addAtom(r); query.addAtom(e); query.addAtom(c);
1071
+ query.addAtom(o1); query.addAtom(o2);
1072
+ query.addBond(new TopologyAnyBond(r, c, true));
1073
+ query.addBond(new TopologyOrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE,true));
1074
+ query.addBond(new TopologyOrderQueryBond(c, o2, CDKConstants.BONDORDER_DOUBLE,false));
1075
+ query.addBond(new TopologyAnyBond(o1, e, true));
1076
+
1077
+ query.addBond(new TopologyOrderQueryBond(e, o, CDKConstants.BONDORDER_DOUBLE,false));
1078
+ return query;
1079
+ }
1080
+ /**
1081
+ *
1082
+ * @param abUnsaturated if true, this will be alpha -beta unsaturated lactone
1083
+ * @return
1084
+ */
1085
+ public static QueryAtomContainer lactone(boolean abUnsaturated) {
1086
+ QueryAtomContainer query = new QueryAtomContainer();
1087
+ query.setID(LACTONE);
1088
+
1089
+ SymbolQueryAtom r = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1090
+ r.setProperty(DONTMARK,query.getID());
1091
+
1092
+
1093
+ SymbolQueryAtom e = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1094
+ r.setProperty(DONTMARK,query.getID());
1095
+
1096
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1097
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1098
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1099
+ query.addAtom(r); query.addAtom(e); query.addAtom(c);
1100
+ query.addAtom(o1); query.addAtom(o2);
1101
+ query.addBond(new TopologyAnyBond(r, c, true));
1102
+ query.addBond(new TopologyOrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE,true));
1103
+ query.addBond(new TopologyOrderQueryBond(c, o2, CDKConstants.BONDORDER_DOUBLE,false));
1104
+ query.addBond(new TopologyAnyBond(o1, e, true));
1105
+
1106
+ if (abUnsaturated) {
1107
+ SymbolQueryAtom ab = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1108
+ ab.setProperty(DONTMARK,query.getID());
1109
+ query.addAtom(ab);
1110
+ query.addBond(new TopologyOrderQueryBond(r, ab,CDKConstants.BONDORDER_DOUBLE, true));
1111
+ }
1112
+
1113
+ return query;
1114
+ }
1115
+
1116
+
1117
+ public static QueryAtomContainer lactoneBreakable() {
1118
+ QueryAtomContainer query = new QueryAtomContainer();
1119
+ query.setID(LACTONE);
1120
+ SymbolQueryAtom r = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1121
+ //AnyAtom r = new AnyAtom();
1122
+ SymbolQueryAtom e = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1123
+ e.setProperty(DONTMARK,query.getID());
1124
+
1125
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1126
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1127
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1128
+ query.addAtom(r); query.addAtom(e); query.addAtom(c);
1129
+ query.addAtom(o1); query.addAtom(o2);
1130
+ query.addBond(new TopologyOrderQueryBond(r, c, CDKConstants.BONDORDER_SINGLE,true));
1131
+ query.addBond(new TopologyOrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE,true));
1132
+ query.addBond(new TopologyOrderQueryBond(c, o2, CDKConstants.BONDORDER_DOUBLE,false));
1133
+ TopologyOrderQueryBond b = new TopologyOrderQueryBond(o1, e, CDKConstants.BONDORDER_SINGLE,true);
1134
+ b.setProperty(DONTMARK,query.getID());
1135
+ query.addBond(b);
1136
+ return query;
1137
+ }
1138
+
1139
+ public static boolean isCyclicDiester(IAtomContainer mol, IRingSet rings) {
1140
+ QueryAtomContainer query = lactone(false);
1141
+ query.setID(CYCLIC_DIESTER);
1142
+ List list = getUniqueBondMap(mol,query,false);
1143
+
1144
+ ArrayList esterGroups = new ArrayList();
1145
+ /*Count ester groups per ring, should be exactly 2
1146
+ * Use the fact that bond map marks each ester group with unique identifier
1147
+ */
1148
+ if ((list !=null) && (list.size()>=2)) { //can be
1149
+ markMaps(mol,query,list);
1150
+ for (int i=0; i < rings.getAtomContainerCount(); i++) {
1151
+ IRing ring = (IRing) rings.getAtomContainer(i);
1152
+ esterGroups.clear();
1153
+ for (int b=0;b<ring.getBondCount();b++) {
1154
+ Object o = ring.getBond(b).getProperty(query.getID());
1155
+ if (o==null) continue;
1156
+ else if (!esterGroups.contains(o)) esterGroups.add(o);
1157
+ }
1158
+ if (esterGroups.size() == 2) {
1159
+ logger.fine("Ring with two ester groups\tNO");
1160
+ for (int a=0;a<ring.getAtomCount();a++)
1161
+ if (ring.getAtom(a).getSymbol().equals("C")) continue;
1162
+ else if (ring.getAtom(a).getSymbol().equals("O")) {
1163
+ if (ring.getAtom(a).getProperty(query.getID()) == null) {
1164
+ // O atom only allowed if from ester group
1165
+ logger.fine("Heteroring\tYES");
1166
+ return false;
1167
+ }
1168
+ } else {
1169
+ logger.fine("Heteroring\tYES");
1170
+ return false;
1171
+ }
1172
+ logger.fine("Cyclic diester\tYES");
1173
+ return true;
1174
+ }
1175
+ }
1176
+ logger.fine("Ring with two ester groups\tNO");
1177
+ return false;
1178
+ } else {
1179
+ logger.fine("Less than 2 ester groups ");
1180
+ return false;
1181
+ }
1182
+ }
1183
+ public static QueryAtomContainer isopreneUnit() {
1184
+ QueryAtomContainer query = new QueryAtomContainer();
1185
+ query.setID(ISOPRENE);
1186
+ SymbolQueryAtom[] c = new SymbolQueryAtom[5];
1187
+ for (int i =0; i < c.length; i++) {
1188
+ c[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1189
+ query.addAtom(c[i]);
1190
+
1191
+ }
1192
+ for (int i =1; i < c.length-1; i++)
1193
+ query.addBond(new SingleOrDoubleQueryBond(c[i-1], c[i]));
1194
+ query.addBond(new OrderQueryBond(c[1], c[4],CDKConstants.BONDORDER_SINGLE));
1195
+
1196
+ return query;
1197
+ }
1198
+ //CC(=O)C
1199
+ public static QueryAtomContainer ketone() {
1200
+ QueryAtomContainer query = new QueryAtomContainer();
1201
+ query.setID(KETONE);
1202
+
1203
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1204
+ InverseSymbolSetQueryAtom[] r = new InverseSymbolSetQueryAtom[2];
1205
+ for (int i =0; i < 2; i++) {
1206
+ r[i] = new InverseSymbolSetQueryAtom();
1207
+ r[i].addSymbol("H");
1208
+ r[i].addSymbol("O");
1209
+ r[i].addSymbol("S");
1210
+ r[i].addSymbol("N");
1211
+ r[i].setProperty(DONTMARK,query.getID());
1212
+ query.addAtom(r[i]);
1213
+ }
1214
+
1215
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1216
+ query.addAtom(o);
1217
+ query.addBond(new OrderQueryBond(r[0], c, CDKConstants.BONDORDER_SINGLE));
1218
+ query.addBond(new OrderQueryBond(c, o, CDKConstants.BONDORDER_DOUBLE));
1219
+ query.addBond(new OrderQueryBond(r[1], c, CDKConstants.BONDORDER_SINGLE));
1220
+ return query;
1221
+ }
1222
+ public static QueryAtomContainer ketone_ring() {
1223
+ QueryAtomContainer query = new QueryAtomContainer();
1224
+ query.setID(KETONE);
1225
+ SymbolQueryAtom[] c = new SymbolQueryAtom[3];
1226
+ for (int i =0; i < 3; i++) {
1227
+ c[i] = new TopologySymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON),true);
1228
+ query.addAtom(c[i]);
1229
+ }
1230
+
1231
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1232
+ query.addAtom(o);
1233
+ query.addBond(new OrderQueryBond(c[0], c[1], CDKConstants.BONDORDER_SINGLE));
1234
+ query.addBond(new OrderQueryBond(c[1], o, CDKConstants.BONDORDER_DOUBLE));
1235
+ query.addBond(new OrderQueryBond(c[1], c[2], CDKConstants.BONDORDER_SINGLE));
1236
+ return query;
1237
+ }
1238
+
1239
+ public static QueryAtomContainer sidechain_ketone() {
1240
+ QueryAtomContainer query = new QueryAtomContainer();
1241
+ query.setID(KETONE_SIDECHAIN);
1242
+ SymbolQueryAtom[] c = new SymbolQueryAtom[3];
1243
+ for (int i =0; i < 3; i++) {
1244
+ if (i==1)
1245
+ c[i] = new TopologySymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON),false);
1246
+ else
1247
+ c[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1248
+ query.addAtom(c[i]);
1249
+ }
1250
+
1251
+ SymbolQueryAtom o = new TopologySymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN),false);
1252
+ query.addAtom(o);
1253
+ query.addBond(new OrderQueryBond(c[0], c[1], CDKConstants.BONDORDER_SINGLE));
1254
+ query.addBond(new TopologyOrderQueryBond(c[1], o, CDKConstants.BONDORDER_DOUBLE,false));
1255
+ query.addBond(new OrderQueryBond(c[1], c[2], CDKConstants.BONDORDER_SINGLE));
1256
+ return query;
1257
+ }
1258
+
1259
+ /**
1260
+ * RC(=O)H
1261
+ * An aldehyde is either a functional group consisting of a terminal carbonyl group,
1262
+ * or a compound containing a terminal carbonyl group.
1263
+ * (Where -R represents the carbon chain.)
1264
+ */
1265
+ public static QueryAtomContainer aldehyde() {
1266
+ QueryAtomContainer query = new QueryAtomContainer();
1267
+ query.setID(ALDEHYDE);
1268
+ /*
1269
+ InverseSymbolSetQueryAtom r = new InverseSymbolSetQueryAtom();
1270
+ //r.addSymbol("H"); ne moze da poznae formaldehyde
1271
+ r.addSymbol("O"); //shte bude ester ako e O
1272
+ */
1273
+ SymbolSetQueryAtom r = new SymbolSetQueryAtom();
1274
+ r.addSymbol("C");
1275
+ r.addSymbol("H");
1276
+ r.setProperty(DONTMARK,query.getID());
1277
+
1278
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1279
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1280
+ SymbolQueryAtom h = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
1281
+ query.addAtom(r);query.addAtom(c);query.addAtom(o);query.addAtom(h);
1282
+ query.addBond(new OrderQueryBond(c, h, CDKConstants.BONDORDER_SINGLE));
1283
+ query.addBond(new OrderQueryBond(c, o, CDKConstants.BONDORDER_DOUBLE));
1284
+ query.addBond(new OrderQueryBond(r, c, CDKConstants.BONDORDER_SINGLE));
1285
+ return query;
1286
+ }
1287
+ //C=O
1288
+ public static QueryAtomContainer carbonyl() {
1289
+ QueryAtomContainer query = new QueryAtomContainer();
1290
+ query.setID(CARBONYL);
1291
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1292
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1293
+ query.addAtom(c);query.addAtom(o);
1294
+ query.addBond(new OrderQueryBond(c, o, CDKConstants.BONDORDER_DOUBLE));
1295
+ return query;
1296
+ }
1297
+ public static QueryAtomContainer ab_unsaturated_carbonyl() {
1298
+ QueryAtomContainer query = new QueryAtomContainer();
1299
+ query.setID(CARBONYL_ABUNSATURATED);
1300
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1301
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1302
+ query.addAtom(c);query.addAtom(o);
1303
+ query.addBond(new OrderQueryBond(c, o, CDKConstants.BONDORDER_DOUBLE));
1304
+ SymbolQueryAtom c1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1305
+ query.addBond(new OrderQueryBond(c, c1, CDKConstants.BONDORDER_SINGLE));
1306
+ SymbolQueryAtom c2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1307
+ query.addBond(new OrderQueryBond(c2, c1, CDKConstants.BONDORDER_DOUBLE));
1308
+ ReallyAnyAtom a = new ReallyAnyAtom();
1309
+ query.addBond(new AnyOrderQueryBond(c2, a, CDKConstants.BONDORDER_DOUBLE));
1310
+ a.setProperty(DONTMARK,query.getID());
1311
+ return query;
1312
+ }
1313
+ /**
1314
+ *
1315
+ * @param aliphatic - if true looks for aliphatic alcohols, if not for any alcohols
1316
+ * @return
1317
+ */
1318
+ public static QueryAtomContainer alcohol(boolean aliphatic) {
1319
+ QueryAtomContainer query = new QueryAtomContainer();
1320
+ query.setID(ALCOHOL);
1321
+ CHQueryAtom r;
1322
+ if (aliphatic) {
1323
+ r= new AliphaticCHQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1324
+ query.addAtom(r);
1325
+ } else {
1326
+ r = new CHQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1327
+ query.addAtom((SymbolQueryAtom)r);
1328
+ }
1329
+ r.setProperty(DONTMARK,query.getID());
1330
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1331
+ query.addAtom(o);
1332
+ SymbolQueryAtom h = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
1333
+ query.addAtom(h);
1334
+ query.addBond(new OrderQueryBond(r, o, CDKConstants.BONDORDER_SINGLE));
1335
+ query.addBond(new OrderQueryBond(o, h, CDKConstants.BONDORDER_SINGLE));
1336
+ return query;
1337
+ }
1338
+ //HNS(=O)(=O)(O-Me)N
1339
+
1340
+ public static QueryAtomContainer sulphamate(String[] metals) {
1341
+ SymbolSetQueryAtom me = null;
1342
+ if (metals != null) {
1343
+ me = new SymbolSetQueryAtom();
1344
+ for (int i=0; i < metals.length; i++) me.addSymbol(metals[i]);
1345
+ }
1346
+ QueryAtomContainer q = new QueryAtomContainer();
1347
+ q.setID(SULPHAMATE);
1348
+ IElement atoms[] = {Elements.SULFUR,Elements.NITROGEN,Elements.OXYGEN,Elements.OXYGEN,Elements.OXYGEN,Elements.HYDROGEN};
1349
+ SymbolQueryAtom[] a = new SymbolQueryAtom[6];
1350
+ for (int i= 0; i<(atoms.length-1);i++) {
1351
+ a[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),atoms[i]));
1352
+ q.addAtom(a[i]);
1353
+ }
1354
+ q.addBond(new OrderQueryBond(a[0], a[1], CDKConstants.BONDORDER_SINGLE));//S-N
1355
+ q.addBond(new OrderQueryBond(a[0], a[2], CDKConstants.BONDORDER_DOUBLE));//S=O
1356
+ q.addBond(new OrderQueryBond(a[0], a[3], CDKConstants.BONDORDER_DOUBLE));//S=O
1357
+ q.addBond(new OrderQueryBond(a[0], a[4], CDKConstants.BONDORDER_SINGLE));//S-O
1358
+ //q.addBond(new OrderQueryBond(a[1], a[5], CDKConstants.BONDORDER_SINGLE));//N-H
1359
+ if (me != null)
1360
+ q.addBond(new OrderQueryBond(a[4], me, CDKConstants.BONDORDER_SINGLE));//O-Me
1361
+ return q;
1362
+
1363
+ }
1364
+ //R-C(=O)O-Me
1365
+ public static QueryAtomContainer saltOfCarboxylicAcid(String[] metals) {
1366
+ QueryAtomContainer query = new QueryAtomContainer();
1367
+ query.setID(CARBOXYLIC_ACID_SALT);
1368
+ SymbolSetQueryAtom m = new SymbolSetQueryAtom();
1369
+ for (int i=0; i < metals.length; i++)
1370
+ m.addSymbol(metals[i]);
1371
+
1372
+ SymbolSetQueryAtom r = new SymbolSetQueryAtom();
1373
+ r.setSymbol("*"); r.addSymbol("C"); r.addSymbol("H");
1374
+ r.setProperty(DONTMARK,query.getID());
1375
+
1376
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1377
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1378
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1379
+ query.addAtom(r); query.addAtom(c);
1380
+ query.addAtom(o1); query.addAtom(o2);
1381
+ query.addBond(new OrderQueryBond(r, c, CDKConstants.BONDORDER_SINGLE));//R-C
1382
+ query.addBond(new OrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE));//C-O
1383
+ query.addBond(new OrderQueryBond(c, o2, CDKConstants.BONDORDER_DOUBLE));//C=O
1384
+ query.addBond(new OrderQueryBond(o1, m, CDKConstants.BONDORDER_SINGLE));//O-Me
1385
+ return query;
1386
+ }
1387
+
1388
+ //C[O-] Me+
1389
+ public static QueryAtomContainer saltOfCarboxylicAcid1(String[] metals) {
1390
+ QueryAtomContainer query = new QueryAtomContainer();
1391
+ query.setID(CARBOXYLIC_ACID_SALT);
1392
+ SymbolSetQueryAtom m = new SymbolSetQueryAtom();
1393
+ for (int i=0; i < metals.length; i++)
1394
+ m.addSymbol(metals[i]);
1395
+
1396
+
1397
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1398
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
1399
+ a.setFormalCharge(-1);
1400
+ SymbolAndChargeQueryAtom o1 = new SymbolAndChargeQueryAtom(a);
1401
+ query.addAtom(c);
1402
+ query.addAtom(o1);
1403
+
1404
+ query.addBond(new OrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE));//C-O
1405
+ query.addBond(new OrderQueryBond(o1, m, CDKConstants.BONDORDER_SINGLE));//O-Me
1406
+ return query;
1407
+ }
1408
+ //C[O-] Me+
1409
+ public static QueryAtomContainer saltOfCarboxylicAcid2(String[] metals) {
1410
+ QueryAtomContainer query = new QueryAtomContainer();
1411
+ query.setID(CARBOXYLIC_ACID_SALT);
1412
+ SymbolSetQueryAtom m = new SymbolSetQueryAtom();
1413
+ for (int i=0; i < metals.length; i++)
1414
+ m.addSymbol(metals[i]);
1415
+
1416
+
1417
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1418
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
1419
+ a.setFormalCharge(-1);
1420
+ SymbolAndChargeQueryAtom o1 = new SymbolAndChargeQueryAtom(a);
1421
+ query.addAtom(c);
1422
+ query.addAtom(o1);
1423
+
1424
+ query.addBond(new OrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE));//C-O
1425
+ query.addBond(new OrderQueryBond(o1, m, CDKConstants.BONDORDER_SINGLE));//O-Me
1426
+ return query;
1427
+ }
1428
+
1429
+ public static QueryAtomContainer saltOfCarboxylicAcidBreakable(String[] metals) {
1430
+ QueryAtomContainer query = new QueryAtomContainer();
1431
+ query.setID(CARBOXYLIC_ACID_SALT);
1432
+ SymbolSetQueryAtom m = new SymbolSetQueryAtom();
1433
+ for (int i=0; i < metals.length; i++)
1434
+ m.addSymbol(metals[i]);
1435
+ m.setProperty(DONTMARK,query.getID());
1436
+
1437
+
1438
+ SymbolSetQueryAtom r = new SymbolSetQueryAtom();
1439
+ r.setSymbol("*"); r.addSymbol("C"); r.addSymbol("H");
1440
+
1441
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1442
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1443
+
1444
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1445
+ query.addAtom(r); query.addAtom(c);
1446
+ query.addAtom(o1); query.addAtom(o2);
1447
+ query.addBond(new OrderQueryBond(r, c, CDKConstants.BONDORDER_SINGLE));//R-C
1448
+ query.addBond(new OrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE));//C-O
1449
+ query.addBond(new OrderQueryBond(c, o2, CDKConstants.BONDORDER_DOUBLE));//C=O
1450
+ query.addBond(new OrderQueryBond(o1, m, CDKConstants.BONDORDER_SINGLE));//O-Me
1451
+ return query;
1452
+ }
1453
+
1454
+ //C-[O-] Me+
1455
+ public static QueryAtomContainer saltOfCarboxylicAcidBreakable1(String[] metals) {
1456
+ QueryAtomContainer query = new QueryAtomContainer();
1457
+ query.setID(CARBOXYLIC_ACID_SALT);
1458
+ SymbolSetQueryAtom m = new SymbolSetQueryAtom();
1459
+ for (int i=0; i < metals.length; i++)
1460
+ m.addSymbol(metals[i]);
1461
+ m.setProperty(DONTMARK,query.getID());
1462
+
1463
+
1464
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1465
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
1466
+ a.setFormalCharge(-1);
1467
+ SymbolAndChargeQueryAtom o1 = new SymbolAndChargeQueryAtom(a);
1468
+
1469
+ query.addAtom(c);
1470
+ query.addAtom(o1);
1471
+ query.addBond(new OrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE));//C-O
1472
+ query.addBond(new OrderQueryBond(o1, m, CDKConstants.BONDORDER_SINGLE));//O-Me
1473
+ return query;
1474
+ }
1475
+ public static QueryAtomContainer saltOfCarboxylicAcidBreakable2(String[] metals) {
1476
+ QueryAtomContainer query = new QueryAtomContainer();
1477
+ query.setID(CARBOXYLIC_ACID_SALT);
1478
+ SymbolSetQueryAtom m = new SymbolSetQueryAtom();
1479
+ for (int i=0; i < metals.length; i++)
1480
+ m.addSymbol(metals[i]);
1481
+ m.setProperty(DONTMARK,query.getID());
1482
+
1483
+
1484
+ SymbolQueryAtom c = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
1485
+ IAtom a = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
1486
+ a.setFormalCharge(-1);
1487
+ SymbolAndChargeQueryAtom o1 = new SymbolAndChargeQueryAtom(a);
1488
+
1489
+ query.addAtom(c);
1490
+ query.addAtom(o1);
1491
+ query.addBond(new OrderQueryBond(c, o1, CDKConstants.BONDORDER_SINGLE));//C-O
1492
+ query.addBond(new OrderQueryBond(o1, m, CDKConstants.BONDORDER_SINGLE));//O-Me
1493
+ return query;
1494
+ }
1495
+
1496
+ //RS(=O)(=O)O
1497
+ public static QueryAtomContainer sulphonate(String[] metals) {
1498
+ return sulphonate(metals,true);
1499
+ }
1500
+ public static QueryAtomContainer sulphonate(String[] metals,boolean bonded) {
1501
+ QueryAtomContainer query = new QueryAtomContainer();
1502
+ query.setID(SULPHONATE);
1503
+ SymbolSetQueryAtom m = null;
1504
+ if (metals != null) {
1505
+ m = new SymbolSetQueryAtom();
1506
+ for (int i=0; i < metals.length; i++)
1507
+ m.addSymbol(metals[i]);
1508
+ query.addAtom(m);
1509
+ }
1510
+ //TODO moze li da ima izob sto atom razlicen ot C na towa miasto
1511
+ InverseSymbolSetQueryAtom r = new InverseSymbolSetQueryAtom();
1512
+ r.addSymbol("O");
1513
+ r.addSymbol("H");
1514
+ r.addSymbol("N");
1515
+
1516
+
1517
+ r.setProperty(DONTMARK,query.getID());
1518
+
1519
+ SymbolQueryAtom s = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.SULFUR));
1520
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1521
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1522
+ SymbolQueryAtom o3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1523
+ query.addAtom(r); query.addAtom(s);
1524
+ query.addAtom(o1); query.addAtom(o2); query.addAtom(o3);
1525
+ query.addBond(new OrderQueryBond(r, s, CDKConstants.BONDORDER_SINGLE));
1526
+ query.addBond(new OrderQueryBond(s, o1, CDKConstants.BONDORDER_SINGLE));
1527
+ query.addBond(new OrderQueryBond(s, o2, CDKConstants.BONDORDER_DOUBLE));
1528
+ query.addBond(new OrderQueryBond(s, o3, CDKConstants.BONDORDER_DOUBLE));
1529
+ if ((m != null) && bonded)
1530
+ query.addBond(new OrderQueryBond(o1, m, CDKConstants.BONDORDER_SINGLE));
1531
+ return query;
1532
+ }
1533
+ //[setOfAtoms]-OS(O-subst)(=O)(=O)O
1534
+ public static QueryAtomContainer sulphate(String[] setOfAtoms) {
1535
+ QueryAtomContainer query = new QueryAtomContainer();
1536
+ query.setID(SULPHATE);
1537
+ SymbolSetQueryAtom m = null;
1538
+ if (setOfAtoms != null) {
1539
+ m = new SymbolSetQueryAtom();
1540
+ for (int i=0; i < setOfAtoms.length; i++)
1541
+ m.addSymbol(setOfAtoms[i]);
1542
+ }
1543
+ ReallyAnyAtom r = new ReallyAnyAtom();
1544
+ r.setProperty(DONTMARK,query.getID());
1545
+
1546
+ SymbolQueryAtom s = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.SULFUR));
1547
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1548
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1549
+ SymbolQueryAtom o3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1550
+ SymbolQueryAtom o4 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1551
+
1552
+ query.addAtom(s);query.addAtom(r);
1553
+ query.addAtom(o1); query.addAtom(o2); query.addAtom(o3);
1554
+
1555
+ query.addBond(new OrderQueryBond(s, o1, CDKConstants.BONDORDER_SINGLE));
1556
+ query.addBond(new OrderQueryBond(s, o2, CDKConstants.BONDORDER_DOUBLE));
1557
+ query.addBond(new OrderQueryBond(s, o3, CDKConstants.BONDORDER_DOUBLE));
1558
+ query.addBond(new OrderQueryBond(s, o4, CDKConstants.BONDORDER_SINGLE));
1559
+ if (m != null)
1560
+ query.addBond(new OrderQueryBond(o1, m, CDKConstants.BONDORDER_SINGLE));
1561
+ query.addBond(new OrderQueryBond(o4, r, CDKConstants.BONDORDER_SINGLE));
1562
+ return query;
1563
+ }
1564
+
1565
+ public static QueryAtomContainer phosphate(String[] setOfAtoms) {
1566
+ QueryAtomContainer query = new QueryAtomContainer();
1567
+ query.setID(PHOSPHATE);
1568
+ SymbolSetQueryAtom m = null;
1569
+ if (setOfAtoms != null) {
1570
+ m = new SymbolSetQueryAtom();
1571
+ for (int i=0; i < setOfAtoms.length; i++)
1572
+ m.addSymbol(setOfAtoms[i]);
1573
+ }
1574
+ ReallyAnyAtom r = new ReallyAnyAtom();
1575
+ r.setProperty(DONTMARK,query.getID());
1576
+
1577
+ SymbolQueryAtom p = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.PHOSPHORUS));
1578
+ SymbolQueryAtom o1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1579
+ //o1.setCharge(-1.0);
1580
+ SymbolQueryAtom o2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1581
+ SymbolQueryAtom o3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
1582
+
1583
+
1584
+ query.addAtom(p);query.addAtom(r);
1585
+ query.addAtom(o1); query.addAtom(o2); query.addAtom(o3);
1586
+
1587
+ query.addBond(new OrderQueryBond(p, o1, CDKConstants.BONDORDER_SINGLE));
1588
+ query.addBond(new OrderQueryBond(p, o2, CDKConstants.BONDORDER_SINGLE));
1589
+ query.addBond(new OrderQueryBond(p, o3, CDKConstants.BONDORDER_DOUBLE));
1590
+
1591
+ if (m != null)
1592
+ query.addBond(new OrderQueryBond(o1, m, CDKConstants.BONDORDER_SINGLE));
1593
+ query.addBond(new OrderQueryBond(o2, r, CDKConstants.BONDORDER_SINGLE));
1594
+ return query;
1595
+ }
1596
+
1597
+ //polyoxyethylene
1598
+ public static QueryAtomContainer polyoxyethylene(int n) {
1599
+ QueryAtomContainer query = new QueryAtomContainer();
1600
+ query.setID(POLYOXYETHYLENE);
1601
+ ReallyAnyAtom a1 = new ReallyAnyAtom();
1602
+ a1.setProperty(DONTMARK,query.getID());
1603
+ ReallyAnyAtom a2 = new ReallyAnyAtom();
1604
+ a2.setProperty(DONTMARK,query.getID());
1605
+
1606
+ SymbolQueryAtom o;
1607
+ SymbolQueryAtom[] c = new SymbolQueryAtom[2];
1608
+ SymbolQueryAtom[] h = new SymbolQueryAtom[4];
1609
+ for (int i = 0; i < n; i++) {
1610
+ o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN)); query.addAtom(o);
1611
+ if (i>0)
1612
+ query.addBond(new OrderQueryBond(o, c[1], CDKConstants.BONDORDER_SINGLE));
1613
+ else
1614
+ query.addBond(new OrderQueryBond(o, a1, CDKConstants.BONDORDER_SINGLE));
1615
+ for (int j=0; j < 2; j++) {
1616
+ c[j] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON)); query.addAtom(c[j]);
1617
+ for (int j1=0; j1 < 2; j1++) {
1618
+ h[j*2+j1] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
1619
+ query.addAtom(h[j*2+j1]);
1620
+ query.addBond(new OrderQueryBond(c[j], h[j*2+j1], CDKConstants.BONDORDER_SINGLE));
1621
+ }
1622
+ }
1623
+ query.addBond(new OrderQueryBond(o, c[0], CDKConstants.BONDORDER_SINGLE));
1624
+ query.addBond(new OrderQueryBond(c[0], c[1], CDKConstants.BONDORDER_SINGLE));
1625
+ if (i==(n-1))
1626
+ query.addBond(new OrderQueryBond(a2, c[1], CDKConstants.BONDORDER_SINGLE));
1627
+ }
1628
+ return query;
1629
+
1630
+ }
1631
+ public static IAtomContainer cloneDiscardRingAtomAndBonds(
1632
+ IAtomContainer ac, IRing ring ) {
1633
+ IAtomContainer result = new org.openscience.cdk.AtomContainer();
1634
+ Hashtable table = new Hashtable();
1635
+ for (int i =0; i < ac.getAtomCount(); i++) {
1636
+ IAtom a = ac.getAtom(i);
1637
+ if (ring.contains(a)) {
1638
+ //if (!a.getSymbol().equals("C")) continue;
1639
+ continue;
1640
+ }
1641
+ //Atom newAtom = (Atom) a.clone();
1642
+ table.put(a,a);
1643
+ result.addAtom(a);
1644
+ }
1645
+
1646
+ for (int i =0; i < ac.getBondCount(); i++) {
1647
+ IBond b = ac.getBond(i);
1648
+
1649
+
1650
+ IAtom a1 = (IAtom) table.get(b.getAtom(0));
1651
+ if (a1 == null) continue;
1652
+ IAtom a2 = (IAtom) table.get(b.getAtom(1));
1653
+ if (a2 == null) continue;
1654
+ //Bond newBond = MoleculeTools.newBond(builder,a1, a2, b.getOrder());
1655
+ //newBond.setFlag(CDKConstants.ISAROMATIC,b.getFlag(CDKConstants.ISAROMATIC));
1656
+ //if (ring.contains(a1) && ring.contains(a2)) continue;
1657
+ result.addBond(b);
1658
+ }
1659
+ return result;
1660
+ }
1661
+
1662
+
1663
+ /**
1664
+ *
1665
+ * @param mol - The molecule to be searched {@link AtomContainer}
1666
+ * @param q - The query {@link AtomContainer}
1667
+ * @param isPreprocessed - whether the molecule was preprocessed by {@link #preProcess(IAtomContainer)}
1668
+ * @return List {@link List}
1669
+ */
1670
+ public static List getBondMap(IAtomContainer mol, IAtomContainer q,boolean isPreprocessed) {
1671
+ logger.fine("getBondMap\t"+q.getID());
1672
+ List list = null;
1673
+ if (!isPreprocessed && needsPreprocessing(q)) {
1674
+ preProcess(mol);
1675
+ isPreprocessed = true;
1676
+ }
1677
+ try {
1678
+ list = UniversalIsomorphismTester.getSubgraphMaps(mol,q);
1679
+ markMaps(mol,q,list);
1680
+
1681
+ } catch (Exception x) {
1682
+ logger.log(Level.SEVERE,x.getMessage(),x);
1683
+ list = null;
1684
+ }
1685
+
1686
+
1687
+ return list;
1688
+ }
1689
+ protected static String getKeyFromMap(RMap rmap) {
1690
+ return rmap.getId1() + "-" + rmap.getId2();
1691
+ }
1692
+ protected static boolean isOverlapped(
1693
+ IAtomContainer mol,
1694
+ IAtomContainer q, List first) {
1695
+ String id = q.getID();
1696
+ boolean overlaped = false;
1697
+ for (int i = 0; i < first.size(); i++) {
1698
+ RMap rmap = (RMap)first.get(i);
1699
+ IBond b1 = ((IBond) mol.getBond(rmap.getId1()));
1700
+ IBond b2 = ((IBond) q.getBond(rmap.getId2()));
1701
+
1702
+ Object o = b2.getProperty(DONTMARK);
1703
+ if ((o != null) && (o.equals(id))) continue;
1704
+
1705
+ o = b1.getProperty(ALLOCATED);
1706
+ if ((o != null) && (!o.equals(id))) {
1707
+ logger.fine("Possible overlap of group\t"+id+"\tand\t"+o.toString()+"\t");
1708
+ overlaped = true;
1709
+ break;
1710
+ }
1711
+ }
1712
+ return overlaped;
1713
+
1714
+ }
1715
+
1716
+ public static List getUniqueBondMap(IAtomContainer mol, IAtomContainer q, boolean isPreprocessed) {
1717
+ if (q.getAtomCount() > mol.getAtomCount()) {
1718
+ logger.fine("A query with more atoms than a molecule!");
1719
+ return null;
1720
+ }
1721
+ List list = null;
1722
+ //try {
1723
+ //this is bonds map
1724
+ if (!isPreprocessed && needsPreprocessing(q)) {
1725
+ preProcess(mol);
1726
+ isPreprocessed = true;
1727
+ }
1728
+ try {
1729
+ list = UniversalIsomorphismTester.getSubgraphMaps(mol,q);
1730
+ } catch (CDKException x) {
1731
+ list = null;
1732
+ logger.log(Level.SEVERE,x.getMessage(),x);
1733
+ }
1734
+ if ((list == null) || (list.size()==0))
1735
+ logger.fine("getUniqueBondMap\t"+q.getID()+"\t"+AbstractRule.MSG_NO);
1736
+ else
1737
+ logger.fine("getUniqueBondMap\t"+q.getID()+"\t"+AbstractRule.MSG_YES);
1738
+ if (list.size() < 2) return list;
1739
+ //else delete redundant solutions
1740
+ TreeMap all = new TreeMap(); //to contain all redundant solutions
1741
+ TreeMap aMap = new TreeMap(); //current analyzed list of Rmap in string form
1742
+
1743
+ //this is to get rid of symmetric and overlaping solutions (if any)
1744
+ boolean[] keep = new boolean[list.size()];
1745
+ int[] mappedBonds = new int[mol.getBondCount()];
1746
+ for (int j=0; j < mappedBonds.length; j++) mappedBonds[j] = -1;
1747
+
1748
+ //TODO have to take care if ArrayList of RMap is returned instead of ArrayList of ArrayList of RMap
1749
+ //logger.fine(FunctionalGroups.mapToString(mol));
1750
+
1751
+ for (int j = list.size()-1; j >=0 ; j--)
1752
+ if (isOverlapped(mol, q,(List)list.get(j))) {
1753
+ logger.fine("Remove overlaped group "+q.getID());
1754
+ list.remove(j);
1755
+ }
1756
+
1757
+ for (int j = 0; j < list.size(); j++) {
1758
+ List thisMap = (List)list.get(j);
1759
+ aMap.clear();
1760
+ for (int i = 0; i < thisMap.size(); i++) {
1761
+ RMap rmap = (RMap)thisMap.get(i);
1762
+
1763
+ //IAtom[] a2 = ((IBond) q.getBond(rmap.getId2())).getAtoms();
1764
+ IBond b2 = (IBond) q.getBond(rmap.getId2());
1765
+
1766
+ if (mappedBonds[rmap.getId1()] > 0) {
1767
+ //this bond is already mapped (i.e. overlapped patterns)
1768
+ //clear mark for bonds only in the current map
1769
+ for (int k=0; k < mappedBonds.length; k++)
1770
+ if (mappedBonds[k]==0) mappedBonds[k] =-1;
1771
+ aMap.clear();
1772
+ break;
1773
+ } else {
1774
+ //mark bonds in the current map
1775
+
1776
+ if (b2.getAtom(0).getSymbol().equals("R")) continue;
1777
+ if (b2.getAtom(1).getSymbol().equals("R")) continue;
1778
+
1779
+ /*
1780
+ Object o = a2[0].getProperty(DONTMARK);
1781
+ if (o != null) continue;
1782
+ o = a2[1].getProperty(DONTMARK);
1783
+ if (o != null) continue;
1784
+ */
1785
+
1786
+ mappedBonds[rmap.getId1()] = 0;
1787
+ //if (a2[0].getSymbol().equals("H")) continue;
1788
+ //if (a2[1].getSymbol().equals("H")) continue;
1789
+
1790
+ aMap.put(getKeyFromMap(rmap),rmap);
1791
+ }
1792
+ }
1793
+ for (int k=0; k < mappedBonds.length; k++)
1794
+ if (mappedBonds[k]==0) mappedBonds[k] =1;
1795
+ if (aMap.size() == 0) {
1796
+ keep[j] = false; continue;
1797
+ } else {
1798
+ String bondMap = aMap.keySet().toString();
1799
+
1800
+ //logger.fine(bondMap);
1801
+ if (all.containsKey(bondMap))
1802
+ keep[j] = false;
1803
+ else {
1804
+ keep[j] = true;
1805
+ all.put(bondMap,thisMap);
1806
+ }
1807
+ }
1808
+ }
1809
+ for (int j = (list.size()-1); j >=0 ; j--)
1810
+ if (!keep[j]) list.remove(j);
1811
+
1812
+ return list;
1813
+
1814
+ }
1815
+ public static int mark(IAtomContainer mol,ArrayList elements) {
1816
+ int hydroCarbonCount = 0;
1817
+ for (int i =0; i < mol.getAtomCount(); i++) {
1818
+ IAtom a = mol.getAtom(i);
1819
+ if (elements.contains(a.getSymbol()))
1820
+ a.setProperty(a.getSymbol(),new Integer(i));
1821
+ }
1822
+ return hydroCarbonCount;
1823
+ }
1824
+
1825
+ public static int markCHn(IAtomContainer mol) {
1826
+ List neighbors = null;
1827
+ int hydroCarbonCount = 0;
1828
+ for (int i =0; i < mol.getAtomCount(); i++) {
1829
+ IAtom a = mol.getAtom(i);
1830
+ if (!a.getSymbol().equals("C")) continue;
1831
+ neighbors = mol.getConnectedAtomsList(a);
1832
+
1833
+ int hydrogens = 0;
1834
+ int carbons = 0;
1835
+ for (int j=0; j < neighbors.size(); j++) {
1836
+ IAtom n = (IAtom) neighbors.get(j);
1837
+ if (n.getSymbol().equals("H")) hydrogens++;
1838
+ else if (n.getSymbol().equals("C")) carbons++;
1839
+ }
1840
+
1841
+ String key = "";
1842
+ switch (hydrogens) {
1843
+ case 0: {
1844
+ if (carbons==neighbors.size())
1845
+ key = C; break;
1846
+ }
1847
+ case 1: {
1848
+ key = CH; break;
1849
+ }
1850
+ case 2: {
1851
+ key = CH2;break;
1852
+ }
1853
+ case 3: {
1854
+ key = CH3;break;
1855
+
1856
+ }
1857
+ default : {
1858
+ }
1859
+ }
1860
+ hydroCarbonCount++;
1861
+ a.setProperty(key,new Integer(hydroCarbonCount));
1862
+ }
1863
+ return hydroCarbonCount;
1864
+ }
1865
+ public static void markOneMap(
1866
+ IAtomContainer mol,
1867
+ IAtomContainer q, List first, int j) {
1868
+ String id = q.getID();
1869
+ for (int i = 0; i < first.size(); i++) {
1870
+ RMap rmap = (RMap)first.get(i);
1871
+ IBond b2 = q.getBond(rmap.getId2());
1872
+ //IAtom[] a2 = b2.getAtoms();
1873
+
1874
+ //will not mark bonds that does not belong to the group but to the connected fragments
1875
+ boolean markIt = true;
1876
+ for (int k=0; k<b2.getAtomCount();k++) {
1877
+ IAtom a2 = b2.getAtom(k);
1878
+ if (a2 instanceof ReallyAnyAtom) {
1879
+ markIt = false; break;
1880
+ }
1881
+ Object o =a2.getProperty(DONTMARK);
1882
+ if (o != null) {
1883
+ markIt = false;break;
1884
+ }
1885
+ }
1886
+ if (!markIt) continue; //will not mark this bond
1887
+
1888
+ Integer m = new Integer(j+1);
1889
+ IBond b1 = mol.getBond(rmap.getId1());
1890
+ b1.setProperty(id,m);
1891
+ b1.setProperty(ALLOCATED,id);
1892
+
1893
+
1894
+ for (int k=0; k < b1.getAtomCount(); k++) {
1895
+ b1.getAtom(k).setProperty(id,m);
1896
+ b1.getAtom(k).setProperty(ALLOCATED,id);
1897
+ }
1898
+ }
1899
+
1900
+ }
1901
+
1902
+ public static void markMaps(
1903
+ IAtomContainer mol,
1904
+ IAtomContainer q, List list) {
1905
+ if (list == null) return;
1906
+
1907
+ if ((list.size()>0) && (list.get(0) instanceof RMap)) {
1908
+ markOneMap(mol,q,list,1);
1909
+ } else
1910
+ for (int j = 0; j < list.size(); j++) {
1911
+ List first = (List)list.get(j);
1912
+ markOneMap(mol,q,first,j);
1913
+ }
1914
+ }
1915
+
1916
+ public static void mapHydrocarbon(IMolecule mol) {
1917
+ for (int i=0; i < mol.getAtomCount(); i++) {
1918
+
1919
+ }
1920
+ }
1921
+ public static StringBuffer mapToString(IAtomContainer mol,String id) {
1922
+ StringBuffer b = new StringBuffer();
1923
+
1924
+ b.append("Atoms\t");
1925
+ for (int i =0; i < mol.getAtomCount(); i++) {
1926
+ Object o = mol.getAtom(i).getProperty(id);
1927
+ b.append((i+1));
1928
+ b.append('\t');
1929
+ b.append(mol.getAtom(i).getSymbol());
1930
+ b.append('\t');
1931
+ b.append(id);
1932
+ b.append('\t');
1933
+ b.append(o);
1934
+ b.append('\t');
1935
+ }
1936
+ b.append("Bonds\t");
1937
+ for (int i =0; i < mol.getBondCount(); i++) {
1938
+ Object o = mol.getBond(i).getProperty(id);
1939
+ b.append((i+1));
1940
+ b.append('\t');
1941
+ b.append(mol.getBond(i).getAtom(0).getSymbol());
1942
+ b.append('-');
1943
+ b.append(mol.getBond(i).getAtom(1).getSymbol());
1944
+ b.append('\t');
1945
+ b.append(id);
1946
+ b.append('\t');
1947
+ b.append(o);
1948
+ b.append('\t');
1949
+ }
1950
+ return b;
1951
+
1952
+ }
1953
+
1954
+ public static StringBuffer mapToString(IAtomContainer mol,
1955
+ Collection id) {
1956
+ StringBuffer b = new StringBuffer();
1957
+ boolean[] f = null;
1958
+ IAtom a = null;
1959
+ for (int i =0; i < mol.getAtomCount(); i++) {
1960
+ a = mol.getAtom(i);
1961
+ b.append((i+1));
1962
+ b.append('\t');
1963
+ b.append(a.getSymbol());
1964
+ f = a.getFlags();
1965
+ for (int j=0; j < f.length; j++) if (f[j])
1966
+ switch (j) {
1967
+ case (CDKConstants.ISALIPHATIC): { b.append("\taliphatic\t"); break;}
1968
+ case (CDKConstants.ISAROMATIC): { b.append("\taromatic\t"); break;}
1969
+ case (CDKConstants.ISINRING): { b.append("\tin ring\t"); break;}
1970
+ }
1971
+
1972
+ Iterator iterator = id.iterator();
1973
+ while(iterator.hasNext()) {
1974
+ Object anID = iterator.next();
1975
+ Object o = a.getProperty(anID);
1976
+ if (o!=null) {
1977
+ b.append('\t');
1978
+ b.append(anID);
1979
+ b.append('\t');
1980
+ b.append(o);
1981
+ }
1982
+ }
1983
+ b.append('\t');
1984
+ }
1985
+ return b;
1986
+ }
1987
+
1988
+ public static StringBuilder mapToString(IAtomContainer mol) {
1989
+ StringBuilder b = new StringBuilder();
1990
+ boolean[] f = null;
1991
+ for (int i =0; i < mol.getAtomCount(); i++) {
1992
+
1993
+ IAtom a = mol.getAtom(i);
1994
+ b.append((i+1));
1995
+ b.append(')');
1996
+ b.append(a.getSymbol());
1997
+
1998
+ if ((a.getFormalCharge() != null) && (a.getFormalCharge() != 0))
1999
+ b.append(a.getFormalCharge());
2000
+ b.append(' ');
2001
+
2002
+ f = a.getFlags();
2003
+ for (int j=0; j < f.length; j++) if (f[j])
2004
+ switch (j) {
2005
+ case (CDKConstants.ISALIPHATIC): { b.append("[aliphatic] "); break;}
2006
+ case (CDKConstants.ISAROMATIC): { b.append("[aromatic] "); break;}
2007
+ case (CDKConstants.ISINRING): { b.append("[in ring] "); break;}
2008
+ }
2009
+
2010
+ Map h = a.getProperties();
2011
+ for (Iterator e = h.keySet().iterator();e.hasNext();) {
2012
+ Object key = e.next();
2013
+ Object o = a.getProperty(key);
2014
+ if (o!=null) {
2015
+ b.append('[');
2016
+ b.append(key);
2017
+ b.append("] ");
2018
+ b.append(o);
2019
+ }
2020
+ }
2021
+
2022
+ b.append(' ');
2023
+
2024
+ }
2025
+ b.append("\nBonds\t");
2026
+ for (int i =0; i < mol.getBondCount(); i++) {
2027
+ b.append((i+1));
2028
+ b.append('\t');
2029
+ b.append(mol.getBond(i).getAtom(0).getSymbol());
2030
+ b.append('-');
2031
+ b.append(mol.getBond(i).getAtom(1).getSymbol());
2032
+ b.append('\t');
2033
+ Map h = mol.getBond(i).getProperties();
2034
+ for (Iterator e = h.keySet().iterator();e.hasNext();) {
2035
+ Object key = e.next();
2036
+ Object o = mol.getBond(i).getProperty(key);
2037
+ if (o!=null) {
2038
+ b.append('[');
2039
+ b.append(key);
2040
+ b.append("] ");
2041
+ b.append(o);
2042
+ }
2043
+ }
2044
+ b.append('\t');
2045
+ }
2046
+
2047
+ return b;
2048
+ }
2049
+
2050
+ /*
2051
+ public static boolean isSubstructure(AtomContainer mol, AtomContainer query ) throws CDKException {
2052
+ logger.fine("Checking if has substructure \t",query.getID());
2053
+ if (UniversalIsomorphismTester.isSubgraph(mol,query)) {
2054
+ logger.fine("Substructure FOUND \t",query.getID());
2055
+ return true;
2056
+ } else {
2057
+ logger.fine("Substructure NOT found \t",query.getID());
2058
+ return false;
2059
+ }
2060
+ }
2061
+ */
2062
+ /**
2063
+ * @param mol
2064
+ * @param query ArrayList of AtomContainer - - the list of substructures to be searched for
2065
+ * @return true if any of the fragments are a substructure of mol
2066
+ * @throws CDKException
2067
+ */
2068
+ public static boolean hasAnySubstructure(IAtomContainer mol, ArrayList query ) throws CDKException {
2069
+ return hasAnySubstructure(mol, query,null);
2070
+ }
2071
+ public static boolean hasAnySubstructure(IAtomContainer mol, ArrayList query ,IAtomContainer selected) throws CDKException {
2072
+ if ((query == null) || (query.size() == 0)) return false;
2073
+ else
2074
+ for (int i=0; i < query.size(); i++)
2075
+ if (FunctionalGroups.hasGroup(mol, (IAtomContainer) query.get(i),selected)) return true;
2076
+ return false;
2077
+ }
2078
+ /**
2079
+ * @param mol
2080
+ * @param query ArrayList of AtomContainer - - the list of substructures to be searched for
2081
+ * @return true if all of the fragments are a substructure of mol
2082
+ * @throws CDKException
2083
+ */
2084
+ public static boolean hasAllSubstructure(IAtomContainer mol, ArrayList query, boolean isPreprocessed) throws CDKException {
2085
+ if ((query == null) || (query.size() == 0)) return false;
2086
+ else
2087
+ for (int i=0; i < query.size(); i++) {
2088
+ IAtomContainer q = (IAtomContainer) query.get(i);
2089
+ if (!isPreprocessed && needsPreprocessing(q)) {
2090
+ preProcess(mol);
2091
+ isPreprocessed = true;
2092
+ }
2093
+ if (!FunctionalGroups.hasGroup(mol, q,false)) return false;
2094
+ }
2095
+ return true;
2096
+ }
2097
+ protected static boolean needsPreprocessing(IAtomContainer query) {
2098
+ String id = query.getID();
2099
+ return (id != null) &&
2100
+ (
2101
+ (id.equals(ALCOHOL)) ||
2102
+ (id.equals(ETHER)) ||
2103
+ (id.equals(SECONDARY_AMINE_ALIPHATIC)) ||
2104
+ (id.equals(SECONDARY_AMINE)) ||
2105
+ (id.equals(LACTONE))
2106
+ )
2107
+ ;
2108
+ }
2109
+ public static void preProcess(IAtomContainer mol) {
2110
+ markCHn(mol);
2111
+ }
2112
+ public static boolean markUniqueBondMap(IMolecule mol, ArrayList query, boolean isPreprocessed) {
2113
+ if ((query == null) || (query.size() == 0)) return false;
2114
+ else
2115
+ for (int i=0; i < query.size(); i++) {
2116
+ QueryAtomContainer q = (QueryAtomContainer) query.get(i);
2117
+ if (!isPreprocessed && needsPreprocessing(q)) {
2118
+ preProcess(mol);
2119
+ isPreprocessed = true;
2120
+ }
2121
+ List list = FunctionalGroups.getUniqueBondMap(mol, q,isPreprocessed);
2122
+ FunctionalGroups.markMaps(mol, q, list);
2123
+ }
2124
+ return true;
2125
+ }
2126
+ public static boolean hasOnlyTheseGroups(IAtomContainer mol,
2127
+ QueryAtomContainers query,Collection ids,boolean isPreprocessed) {
2128
+ return hasOnlyTheseGroups(mol,query,ids,isPreprocessed,null);
2129
+ }
2130
+ public static boolean hasOnlyTheseGroups(IAtomContainer mol,
2131
+ QueryAtomContainers query,Collection ids,boolean isPreprocessed,IAtomContainer selected) {
2132
+ final String MSG = "Has only these groups\t";
2133
+ if ((query == null) || (query.size() == 0)) return false;
2134
+ else {
2135
+ logger.fine("Checking if it has only these groups\t"+ids);
2136
+ List list = null;
2137
+ int found = 0;
2138
+ for (int i=0; i < query.size(); i++) {
2139
+ IAtomContainer q = (IAtomContainer) query.get(i);
2140
+ list = FunctionalGroups.getUniqueBondMap(mol, q,isPreprocessed);
2141
+ if ((list == null) || (list.size() == 0)) continue;
2142
+ FunctionalGroups.markMaps(mol, q, list);
2143
+ logger.fine(mapToString(mol).toString());
2144
+ if (hasMarkedOnlyTheseGroups(mol,ids,selected,null)) {
2145
+ logger.fine(MSG+ids+"\tYES");
2146
+ return true;
2147
+ }
2148
+ else found ++;
2149
+ }
2150
+ if (logger.isLoggable(Level.FINE)) {
2151
+ logger.fine(mapToString(mol,ids).toString());
2152
+ }
2153
+ if (hasMarkedOnlyTheseGroups(mol,ids,selected,null)) {
2154
+ logger.fine(MSG+ids+"\tYES");
2155
+ return true;
2156
+ } else {
2157
+ logger.fine("Has only these groups\t"+ids+"\tNO");
2158
+ return false;
2159
+ }
2160
+ }
2161
+ }
2162
+ /**
2163
+ * Has to be preprocessed with getBondMap or getUniqueBondMap and markMaps
2164
+ *
2165
+ * @param mol
2166
+ * @param id Collection of functional group identifiers as used by the procedures listed above
2167
+ * @return true if mol contains only specified groups (i.e. there are no unmarked atoms)
2168
+ */
2169
+
2170
+ public static boolean hasMarkedOnlyTheseGroups(IAtomContainer mol,Collection id) {
2171
+ return hasMarkedOnlyTheseGroups(mol,id,null,null);
2172
+ }
2173
+ public static boolean hasMarkedOnlyTheseGroups(IAtomContainer mol,Collection id,IAtomContainer selection,IAtomContainer selectionOther) {
2174
+ IAtom a = null;
2175
+
2176
+ for (int i =0; i < mol.getAtomCount(); i++) {
2177
+ a = mol.getAtom(i);
2178
+ if (a.getSymbol().equals("H")) continue;
2179
+ if (a.getSymbol().equals("C")) continue;
2180
+ Iterator iterator = id.iterator();
2181
+ boolean ok = false;
2182
+ while(iterator.hasNext()) {
2183
+ Object anID = iterator.next();
2184
+ Object o = a.getProperty(anID);
2185
+
2186
+ if (o!=null) {
2187
+ //this atom has at least one mark, no need to check for more
2188
+ ok = true;
2189
+ break;
2190
+ }
2191
+
2192
+
2193
+ }
2194
+ if (!ok) {
2195
+ if (selectionOther != null) selectionOther.addAtom(a);
2196
+ logger.fine("Atom "+ a.getSymbol() + " belongs to a forbidden group");
2197
+ logger.fine(mapToString(mol,id).toString());
2198
+ return false; //at least one atom is unmarked
2199
+ } else if (selection!=null) selection.addAtom(a);
2200
+ }
2201
+ logger.fine("No forbidden groups found");
2202
+ return true;
2203
+ }
2204
+ /*
2205
+ public static boolean hasOtherThanMarkedGroups(IAtomContainer mol,Collection id,IAtomContainer selection) {
2206
+ IAtom a = null;
2207
+ for (int i =0; i < mol.getAtomCount(); i++) {
2208
+ a = mol.getAtom(i);
2209
+ if (a.getSymbol().equals("H")) continue;
2210
+ Iterator iterator = id.iterator();
2211
+ boolean otherAtom = false;
2212
+ while(iterator.hasNext()) {
2213
+ Object anID = iterator.next();
2214
+ Object o = a.getProperty(anID);
2215
+ if (o==null) {
2216
+ //this atom has at least one mark, no need to check for more
2217
+ otherAtom = true; break;
2218
+ }
2219
+ }
2220
+
2221
+
2222
+ if (otherAtom) {
2223
+ logger.fine("Atom "+ a.getSymbol() + " belongs to a forbidden group");
2224
+ logger.fine(mapToString(mol,id));
2225
+ if (selection != null) selection.addAtom(a);
2226
+ else return true; //at least one atom is unmarked
2227
+ }
2228
+ }
2229
+ logger.fine("No forbidden groups found");
2230
+ return selection==null?false:selection.getAtomCount()>0;
2231
+ }
2232
+ */
2233
+ public static boolean hasGroupMarked(IAtomContainer mol,String id) {
2234
+ for (int i =0; i < mol.getAtomCount(); i++)
2235
+ if (mol.getAtom(i).getProperty(id) != null) return true;
2236
+ return false;
2237
+ }
2238
+ public static boolean hasGroupMarked(IAtomContainer mol,String id,IAtomContainer selection) {
2239
+ if (selection==null) return hasGroupMarked(mol, id);
2240
+ boolean ok = false;
2241
+ for (int i =0; i < mol.getAtomCount(); i++)
2242
+ if (mol.getAtom(i).getProperty(id) != null) {
2243
+ ok = true;
2244
+ if (selection!=null) selection.addAtom(mol.getAtom(i));
2245
+ }
2246
+ return ok;
2247
+ }
2248
+ public static boolean hasMarkedOnlyTheseGroups(IAtomContainer mol,QueryAtomContainers query) {
2249
+ IAtom a = null;
2250
+
2251
+ for (int i =0; i < mol.getAtomCount(); i++) {
2252
+ a = mol.getAtom(i);
2253
+ if (a.getSymbol().equals("H")) continue;
2254
+ Iterator iterator = query.iterator();
2255
+ boolean ok = false;
2256
+ while(iterator.hasNext()) {
2257
+ QueryAtomContainer q = (QueryAtomContainer) iterator.next();
2258
+ Object o = a.getProperty(q.getID());
2259
+ if (o!=null) {
2260
+ //this atom has at least one mark, no need to check for more
2261
+ ok = true; break;
2262
+ }
2263
+ }
2264
+
2265
+ if (!ok) {
2266
+
2267
+ logger.fine("Atom "+ a.toString() + " belongs to a forbidden group");
2268
+
2269
+ return false; //at least one atom is unmarked
2270
+ }
2271
+ }
2272
+ logger.fine("No forbidden groups found");
2273
+ return true;
2274
+ }
2275
+ public static IAtomContainer createAtomContainer(String smiles, String id) {
2276
+ return createAtomContainer(smiles,false,id,null);
2277
+ }
2278
+ public static IAtomContainer createAtomContainer(String smiles, String id,SMILES_PARSER mode) {
2279
+ return createAtomContainer(smiles,false,id,mode);
2280
+ }
2281
+ public static IAtomContainer createAtomContainer(String smiles) {
2282
+ return createAtomContainer(smiles,(SMILES_PARSER)null);
2283
+ }
2284
+ public static IAtomContainer createAtomContainer(String smiles,SMILES_PARSER mode) {
2285
+ return createAtomContainer(smiles,false,smiles,mode);
2286
+ }
2287
+ public static IAtomContainer createAtomContainer(String smiles,boolean addHydrogens) {
2288
+ return createAtomContainer(smiles,addHydrogens,smiles);
2289
+ }
2290
+ public static IAtomContainer createAtomContainer(String smiles,boolean addHydrogens,String id) {
2291
+ return createAtomContainer(smiles, addHydrogens, id,null);
2292
+ }
2293
+ public static IAtomContainer createAtomContainer(String smiles,boolean addHydrogens,String id,SMILES_PARSER mode) {
2294
+ try {
2295
+ //logger.fine("Creating molecule from SMILES\t",smiles);
2296
+ SmilesParserWrapper sp = mode==null?SmilesParserWrapper.getInstance(SMILES_PARSER.CDK):SmilesParserWrapper.getInstance(mode);
2297
+
2298
+ IAtomContainer mol = sp.parseSmiles(smiles);
2299
+ if ((mol != null) && (mol.getAtomCount()==0)) return null;
2300
+
2301
+ if (addHydrogens)
2302
+ try {
2303
+ //logger.fine("Adding explicit hydrogens");
2304
+ AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
2305
+ h.addImplicitHydrogens(mol);
2306
+ HydrogenAdderProcessor.convertImplicitToExplicitHydrogens(mol);
2307
+
2308
+ //h.addExplicitHydrogensToSatisfyValency((IMolecule)mol);
2309
+ } catch (InvalidSmilesException x ) {
2310
+ logger.log(Level.SEVERE,x.getMessage(),x);
2311
+ return null;
2312
+ } catch (CDKException x) {
2313
+ logger.log(Level.SEVERE,x.getMessage(),x);
2314
+ return null;
2315
+ }
2316
+
2317
+ mol.setID(id);
2318
+ sp = null;
2319
+ return mol;
2320
+ } catch (InvalidSmilesException x ) {
2321
+ logger.log(Level.SEVERE,x.getMessage(),x);
2322
+ return null;
2323
+ }
2324
+ }
2325
+ public static QueryAtomContainer createQuery(String smiles) {
2326
+ return createQuery(smiles,smiles);
2327
+ }
2328
+ public static QueryAtomContainer createQuery(String smiles,String id) {
2329
+ IAtomContainer mol = createAtomContainer(smiles,id,SMILES_PARSER.CDK);
2330
+ if (mol !=null) {
2331
+ QueryAtomContainer q = QueryAtomContainerCreator.createBasicQueryContainer(mol);
2332
+ q.setID(id);
2333
+ return q;
2334
+ }
2335
+ else return null;
2336
+ }
2337
+ public static QueryAtomContainer vicinalDiKetone() {
2338
+ //TODO "[*]C(=O)C(=O)[*]"
2339
+
2340
+ QueryAtomContainer q = new QueryAtomContainer();
2341
+ q.setID("vicinal diketone");
2342
+ SymbolQueryAtom a1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
2343
+ q.addAtom(a1);
2344
+ SymbolQueryAtom a2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
2345
+ q.addAtom(a2);
2346
+ InverseSymbolSetQueryAtom a3 = new InverseSymbolSetQueryAtom();
2347
+ a3.addSymbol("O"); a3.addSymbol("S"); q.addAtom(a3);
2348
+ SymbolQueryAtom a4 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
2349
+ q.addAtom(a4);
2350
+ SymbolQueryAtom a5 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
2351
+ q.addAtom(a5);
2352
+ InverseSymbolSetQueryAtom a6 = new InverseSymbolSetQueryAtom();
2353
+ a6.addSymbol("O"); a6.addSymbol("S"); q.addAtom(a6);
2354
+ OrderQueryBond b1 = new OrderQueryBond(a2, a1, IBond.Order.DOUBLE);
2355
+ q.addBond(b1);
2356
+ OrderQueryBond b2 = new OrderQueryBond(a3, a2, IBond.Order.SINGLE);
2357
+ q.addBond(b2);
2358
+ OrderQueryBond b3 = new OrderQueryBond(a4, a2, IBond.Order.SINGLE);
2359
+ q.addBond(b3);
2360
+ OrderQueryBond b4 = new OrderQueryBond(a5, a4, IBond.Order.DOUBLE);
2361
+ q.addBond(b4);
2362
+ OrderQueryBond b5 = new OrderQueryBond(a6, a4, IBond.Order.SINGLE);
2363
+ q.addBond(b5);
2364
+ return q;
2365
+ }
2366
+ public static QueryAtomContainer ketoneAttachedToTerminalVinyl() {
2367
+ QueryAtomContainer mol = new QueryAtomContainer();
2368
+ mol.setID("Ketone attached to terminal vinyl");
2369
+ SymbolQueryAtom c1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
2370
+ mol.addAtom(c1);
2371
+ InverseSymbolSetQueryAtom r = new InverseSymbolSetQueryAtom();
2372
+ r.addSymbol("O"); r.addSymbol("S"); r.addSymbol("N"); mol.addAtom(r);
2373
+ SymbolQueryAtom c2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
2374
+ mol.addAtom(c2);
2375
+ SymbolQueryAtom o = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
2376
+ mol.addAtom(o);
2377
+ SymbolQueryAtom c3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
2378
+ mol.addAtom(c3);
2379
+ SymbolQueryAtom h1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
2380
+ mol.addAtom(h1);
2381
+ SymbolQueryAtom h2 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
2382
+ mol.addAtom(h2);
2383
+ SymbolQueryAtom h3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
2384
+ mol.addAtom(h3);
2385
+ OrderQueryBond b1 = new OrderQueryBond(r, c1, IBond.Order.SINGLE);
2386
+ mol.addBond(b1);
2387
+ OrderQueryBond b2 = new OrderQueryBond(c1, c2, IBond.Order.SINGLE);
2388
+ mol.addBond(b2);
2389
+ OrderQueryBond b3 = new OrderQueryBond(c1,o, IBond.Order.DOUBLE);
2390
+ mol.addBond(b3);
2391
+ OrderQueryBond b4 = new OrderQueryBond(c2, c3, IBond.Order.DOUBLE);
2392
+ mol.addBond(b4);
2393
+ OrderQueryBond b5 = new OrderQueryBond(c3, h1, IBond.Order.SINGLE);
2394
+ mol.addBond(b5);
2395
+ OrderQueryBond b6 = new OrderQueryBond(c3, h2, IBond.Order.SINGLE);
2396
+ mol.addBond(b6);
2397
+ OrderQueryBond b7 = new OrderQueryBond(c2,h3, IBond.Order.SINGLE);
2398
+ mol.addBond(b7);
2399
+ return mol;
2400
+ }
2401
+ public static QueryAtomContainer ketalAttachedToTerminalVinyl() {
2402
+ //TODO "[*]C(O)(O)C=C"
2403
+ QueryAtomContainer mol = new QueryAtomContainer();
2404
+ mol.setID("ketal attached to terminal vinyl");
2405
+ InverseSymbolSetQueryAtom r1 = new InverseSymbolSetQueryAtom();
2406
+ r1.addSymbol("O"); r1.addSymbol("H"); mol.addAtom(r1);
2407
+ InverseSymbolSetQueryAtom r2 = new InverseSymbolSetQueryAtom();
2408
+ r2.addSymbol("O"); r2.addSymbol("H"); mol.addAtom(r2);
2409
+ InverseSymbolSetQueryAtom r3 = new InverseSymbolSetQueryAtom();
2410
+ r3.addSymbol("O"); r3.addSymbol("H"); mol.addAtom(r3);
2411
+
2412
+ SymbolQueryAtom a1 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
2413
+ mol.addAtom(a1);
2414
+ SymbolQueryAtom a3 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
2415
+ mol.addAtom(a3);
2416
+ SymbolQueryAtom a4 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
2417
+ mol.addAtom(a4);
2418
+ SymbolQueryAtom a5 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN));
2419
+ mol.addAtom(a5);
2420
+ SymbolQueryAtom a6 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
2421
+ mol.addAtom(a6);
2422
+ SymbolQueryAtom a9 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
2423
+ mol.addAtom(a9);
2424
+ SymbolQueryAtom a10 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN));
2425
+ mol.addAtom(a10);
2426
+ OrderQueryBond b1 = new OrderQueryBond(r1, a1, IBond.Order.SINGLE);
2427
+ mol.addBond(b1);
2428
+ OrderQueryBond b2 = new OrderQueryBond(a1, a3, IBond.Order.SINGLE);
2429
+ mol.addBond(b2);
2430
+ OrderQueryBond b3 = new OrderQueryBond(a1, a4, IBond.Order.SINGLE);
2431
+ mol.addBond(b3);
2432
+ OrderQueryBond b4 = new OrderQueryBond(a1, a5, IBond.Order.SINGLE);
2433
+ mol.addBond(b4);
2434
+ OrderQueryBond b5 = new OrderQueryBond(a3, a6, IBond.Order.DOUBLE);
2435
+ mol.addBond(b5);
2436
+ OrderQueryBond b6 = new OrderQueryBond(a4, r2, IBond.Order.SINGLE);
2437
+ mol.addBond(b6);
2438
+ OrderQueryBond b7 = new OrderQueryBond(a5, r3, IBond.Order.SINGLE);
2439
+ mol.addBond(b7);
2440
+ OrderQueryBond b8 = new OrderQueryBond(a6, a9, IBond.Order.SINGLE);
2441
+ mol.addBond(b8);
2442
+ OrderQueryBond b9 = new OrderQueryBond(a6, a10, IBond.Order.SINGLE);
2443
+ mol.addBond(b9);
2444
+ return mol;
2445
+ }
2446
+ public static QueryAtomContainer alcoholSecondaryAttachedToTerminalVinyl() {
2447
+ //TODO "[*]C(O)C=C"
2448
+ //return createQuery("CC(O)C=C",);
2449
+ //return createQuery("[H]OC([H])(C)C([H])=C([H])[H]","secondary alcohol attached to terminal vinyl group");
2450
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2451
+ IMolecule mol = new org.openscience.cdk.Molecule();
2452
+ IAtom a1 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2453
+ mol.addAtom(a1);
2454
+ IAtom a2 = MoleculeTools.newAtom(builder,Elements.OXYGEN);
2455
+ mol.addAtom(a2);
2456
+ IAtom a3 = MoleculeTools.newAtom(builder,Elements.CARBON);
2457
+ mol.addAtom(a3);
2458
+ IAtom a4 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2459
+ mol.addAtom(a4);
2460
+ IAtom a5 = MoleculeTools.newAtom(builder,Elements.CARBON);
2461
+ mol.addAtom(a5);
2462
+ IAtom a6 = MoleculeTools.newAtom(builder,Elements.CARBON);
2463
+ mol.addAtom(a6);
2464
+ IAtom a7 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2465
+ mol.addAtom(a7);
2466
+ IAtom a8 = MoleculeTools.newAtom(builder,Elements.CARBON);
2467
+ mol.addAtom(a8);
2468
+ IAtom a9 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2469
+ mol.addAtom(a9);
2470
+ IAtom a10 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2471
+ mol.addAtom(a10);
2472
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.SINGLE);
2473
+ mol.addBond(b1);
2474
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
2475
+ mol.addBond(b2);
2476
+ IBond b3 = MoleculeTools.newBond(builder,a4, a3, IBond.Order.SINGLE);
2477
+ mol.addBond(b3);
2478
+ IBond b4 = MoleculeTools.newBond(builder,a5, a3, IBond.Order.SINGLE);
2479
+ mol.addBond(b4);
2480
+ IBond b5 = MoleculeTools.newBond(builder,a6, a3, IBond.Order.SINGLE);
2481
+ mol.addBond(b5);
2482
+ IBond b6 = MoleculeTools.newBond(builder,a7, a6, IBond.Order.SINGLE);
2483
+ mol.addBond(b6);
2484
+ IBond b7 = MoleculeTools.newBond(builder,a8, a6, IBond.Order.SINGLE);
2485
+ mol.addBond(b7);
2486
+ IBond b8 = MoleculeTools.newBond(builder,a9, a8, IBond.Order.SINGLE);
2487
+ mol.addBond(b8);
2488
+ IBond b9 = MoleculeTools.newBond(builder,a10, a8, IBond.Order.SINGLE);
2489
+ mol.addBond(b9);
2490
+ QueryAtomContainer q = QueryAtomContainerCreator.createBasicQueryContainer(mol);
2491
+ q.setID("secondary alcohol attached to terminal vinyl group");
2492
+ return q;
2493
+
2494
+
2495
+ }
2496
+ public static QueryAtomContainer esterOfalcoholSecondaryAttachedToTerminalVinyl() {
2497
+ //TODO ""CC(C(=O)O[*])C=C""
2498
+ //return createQuery("CC(C(=O)OC)C=C","ester of secondary alcohol attached to terminal vinyl group");
2499
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2500
+ IMolecule mol = MoleculeTools.newMolecule(builder);
2501
+ IAtom a1 = MoleculeTools.newAtom(builder,Elements.CARBON);
2502
+ mol.addAtom(a1);
2503
+ IAtom a2 = MoleculeTools.newAtom(builder,Elements.CARBON);
2504
+ mol.addAtom(a2);
2505
+ IAtom a3 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2506
+ mol.addAtom(a3);
2507
+ IAtom a4 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2508
+ mol.addAtom(a4);
2509
+ IAtom a5 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2510
+ mol.addAtom(a5);
2511
+ IAtom a6 = MoleculeTools.newAtom(builder,Elements.CARBON);
2512
+ mol.addAtom(a6);
2513
+ IAtom a7 = MoleculeTools.newAtom(builder,Elements.CARBON);
2514
+ mol.addAtom(a7);
2515
+ IAtom a8 = MoleculeTools.newAtom(builder,Elements.CARBON);
2516
+ mol.addAtom(a8);
2517
+ IAtom a9 = MoleculeTools.newAtom(builder,Elements.OXYGEN);
2518
+ mol.addAtom(a9);
2519
+ IAtom a10 = MoleculeTools.newAtom(builder,Elements.OXYGEN);
2520
+ mol.addAtom(a10);
2521
+ IAtom a11 = MoleculeTools.newAtom(builder,Elements.CARBON);
2522
+ mol.addAtom(a11);
2523
+ IAtom a12 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2524
+ mol.addAtom(a12);
2525
+ IBond b1 = MoleculeTools.newBond(builder,a1, a2, IBond.Order.DOUBLE);
2526
+ mol.addBond(b1);
2527
+ IBond b2 = MoleculeTools.newBond(builder,a1, a3, IBond.Order.SINGLE);
2528
+ mol.addBond(b2);
2529
+ IBond b3 = MoleculeTools.newBond(builder,a1, a4, IBond.Order.SINGLE);
2530
+ mol.addBond(b3);
2531
+ IBond b4 = MoleculeTools.newBond(builder,a2, a5, IBond.Order.SINGLE);
2532
+ mol.addBond(b4);
2533
+ IBond b5 = MoleculeTools.newBond(builder,a2, a6, IBond.Order.SINGLE);
2534
+ mol.addBond(b5);
2535
+ IBond b6 = MoleculeTools.newBond(builder,a6, a7, IBond.Order.SINGLE);
2536
+ mol.addBond(b6);
2537
+ IBond b7 = MoleculeTools.newBond(builder,a6, a8, IBond.Order.SINGLE);
2538
+ mol.addBond(b7);
2539
+ IBond b8 = MoleculeTools.newBond(builder,a8, a9, IBond.Order.DOUBLE);
2540
+ mol.addBond(b8);
2541
+ IBond b9 = MoleculeTools.newBond(builder,a8, a10, IBond.Order.SINGLE);
2542
+ mol.addBond(b9);
2543
+ IBond b10 = MoleculeTools.newBond(builder,a10, a11, IBond.Order.SINGLE);
2544
+ mol.addBond(b10);
2545
+ IBond b11 = MoleculeTools.newBond(builder,a6, a12, IBond.Order.SINGLE);
2546
+ mol.addBond(b11);
2547
+ QueryAtomContainer q = QueryAtomContainerCreator.createBasicQueryContainer(mol);
2548
+ q.setID("ester of secondary alcohol attached to terminal vinyl group");
2549
+ return q;
2550
+ }
2551
+ public static IAtomContainer allylAlcohol() {
2552
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2553
+ IMolecule mol = MoleculeTools.newMolecule(builder);
2554
+ IAtom a1 = MoleculeTools.newAtom(builder,Elements.CARBON);
2555
+ mol.addAtom(a1);
2556
+ IAtom a2 = MoleculeTools.newAtom(builder,Elements.CARBON);
2557
+ mol.addAtom(a2);
2558
+ IAtom a3 = MoleculeTools.newAtom(builder,Elements.CARBON);
2559
+ mol.addAtom(a3);
2560
+ IAtom a4 = MoleculeTools.newAtom(builder,Elements.OXYGEN);
2561
+ mol.addAtom(a4);
2562
+ IAtom a5 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2563
+ mol.addAtom(a5);
2564
+ IAtom a6 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2565
+ mol.addAtom(a6);
2566
+ IAtom a7 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2567
+ mol.addAtom(a7);
2568
+ IAtom a8 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2569
+ mol.addAtom(a8);
2570
+ IAtom a9 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2571
+ mol.addAtom(a9);
2572
+ IAtom a10 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2573
+ mol.addAtom(a10);
2574
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
2575
+ mol.addBond(b1);
2576
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
2577
+ mol.addBond(b2);
2578
+ IBond b3 = MoleculeTools.newBond(builder,a4, a3, IBond.Order.SINGLE);
2579
+ mol.addBond(b3);
2580
+ IBond b4 = MoleculeTools.newBond(builder,a1, a5, IBond.Order.SINGLE);
2581
+ mol.addBond(b4);
2582
+ IBond b5 = MoleculeTools.newBond(builder,a1, a6, IBond.Order.SINGLE);
2583
+ mol.addBond(b5);
2584
+ IBond b6 = MoleculeTools.newBond(builder,a2, a7, IBond.Order.SINGLE);
2585
+ mol.addBond(b6);
2586
+ IBond b7 = MoleculeTools.newBond(builder,a3, a8, IBond.Order.SINGLE);
2587
+ mol.addBond(b7);
2588
+ IBond b8 = MoleculeTools.newBond(builder,a3, a9, IBond.Order.SINGLE);
2589
+ mol.addBond(b8);
2590
+ IBond b9 = MoleculeTools.newBond(builder,a4, a10, IBond.Order.SINGLE);
2591
+ mol.addBond(b9);
2592
+ mol.setID("allyl alcohol");
2593
+ return mol;
2594
+ //return createAtomContainer("C=CCO",);
2595
+ }
2596
+ public static QueryAtomContainer allylAlcoholAcetal() {
2597
+ //TODO "[*]C(OCC=C)(OCC=C)[H]"
2598
+ //return createQuery("C(OCC=C)(OCC=C)[H]","allyl alcohol acetal");
2599
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2600
+ IMolecule mol = MoleculeTools.newMolecule(builder);
2601
+ IAtom a1 = MoleculeTools.newAtom(builder,Elements.CARBON);
2602
+ mol.addAtom(a1);
2603
+ IAtom a2 = MoleculeTools.newAtom(builder,Elements.OXYGEN);
2604
+ mol.addAtom(a2);
2605
+ IAtom a3 = MoleculeTools.newAtom(builder,Elements.CARBON);
2606
+ mol.addAtom(a3);
2607
+ IAtom a4 = MoleculeTools.newAtom(builder,Elements.CARBON);
2608
+ mol.addAtom(a4);
2609
+ IAtom a5 = MoleculeTools.newAtom(builder,Elements.CARBON);
2610
+ mol.addAtom(a5);
2611
+ IAtom a6 = MoleculeTools.newAtom(builder,Elements.OXYGEN);
2612
+ mol.addAtom(a6);
2613
+ IAtom a7 = MoleculeTools.newAtom(builder,Elements.CARBON);
2614
+ mol.addAtom(a7);
2615
+ IAtom a8 = MoleculeTools.newAtom(builder,Elements.CARBON);
2616
+ mol.addAtom(a8);
2617
+ IAtom a9 = MoleculeTools.newAtom(builder,Elements.CARBON);
2618
+ mol.addAtom(a9);
2619
+ IAtom a10 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2620
+ mol.addAtom(a10);
2621
+ IAtom a11 = MoleculeTools.newAtom(builder,Elements.CARBON);
2622
+ mol.addAtom(a11);
2623
+ IAtom a12 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2624
+ mol.addAtom(a12);
2625
+ IAtom a13 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2626
+ mol.addAtom(a13);
2627
+ IAtom a14 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2628
+ mol.addAtom(a14);
2629
+ IAtom a15 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2630
+ mol.addAtom(a15);
2631
+ IAtom a16 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2632
+ mol.addAtom(a16);
2633
+ IAtom a17 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2634
+ mol.addAtom(a17);
2635
+ IAtom a18 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2636
+ mol.addAtom(a18);
2637
+ IAtom a19 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2638
+ mol.addAtom(a19);
2639
+ IAtom a20 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2640
+ mol.addAtom(a20);
2641
+ IAtom a21 = MoleculeTools.newAtom(builder,Elements.HYDROGEN);
2642
+ mol.addAtom(a21);
2643
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.SINGLE);
2644
+ mol.addBond(b1);
2645
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
2646
+ mol.addBond(b2);
2647
+ IBond b3 = MoleculeTools.newBond(builder,a4, a3, IBond.Order.SINGLE);
2648
+ mol.addBond(b3);
2649
+ IBond b4 = MoleculeTools.newBond(builder,a5, a4, IBond.Order.DOUBLE);
2650
+ mol.addBond(b4);
2651
+ IBond b5 = MoleculeTools.newBond(builder,a6, a1, IBond.Order.SINGLE);
2652
+ mol.addBond(b5);
2653
+ IBond b6 = MoleculeTools.newBond(builder,a7, a6, IBond.Order.SINGLE);
2654
+ mol.addBond(b6);
2655
+ IBond b7 = MoleculeTools.newBond(builder,a8, a7, IBond.Order.SINGLE);
2656
+ mol.addBond(b7);
2657
+ IBond b8 = MoleculeTools.newBond(builder,a9, a8, IBond.Order.DOUBLE);
2658
+ mol.addBond(b8);
2659
+ IBond b9 = MoleculeTools.newBond(builder,a10, a1, IBond.Order.SINGLE);
2660
+ mol.addBond(b9);
2661
+ IBond b10 = MoleculeTools.newBond(builder,a1, a11, IBond.Order.SINGLE);
2662
+ mol.addBond(b10);
2663
+ IBond b11 = MoleculeTools.newBond(builder,a3, a12, IBond.Order.SINGLE);
2664
+ mol.addBond(b11);
2665
+ IBond b12 = MoleculeTools.newBond(builder,a3, a13, IBond.Order.SINGLE);
2666
+ mol.addBond(b12);
2667
+ IBond b13 = MoleculeTools.newBond(builder,a7, a14, IBond.Order.SINGLE);
2668
+ mol.addBond(b13);
2669
+ IBond b14 = MoleculeTools.newBond(builder,a7, a15, IBond.Order.SINGLE);
2670
+ mol.addBond(b14);
2671
+ IBond b15 = MoleculeTools.newBond(builder,a4, a16, IBond.Order.SINGLE);
2672
+ mol.addBond(b15);
2673
+ IBond b16 = MoleculeTools.newBond(builder,a8, a17, IBond.Order.SINGLE);
2674
+ mol.addBond(b16);
2675
+ IBond b17 = MoleculeTools.newBond(builder,a5, a18, IBond.Order.SINGLE);
2676
+ mol.addBond(b17);
2677
+ IBond b18 = MoleculeTools.newBond(builder,a5, a19, IBond.Order.SINGLE);
2678
+ mol.addBond(b18);
2679
+ IBond b19 = MoleculeTools.newBond(builder,a9, a20, IBond.Order.SINGLE);
2680
+ mol.addBond(b19);
2681
+ IBond b20 = MoleculeTools.newBond(builder,a9, a21, IBond.Order.SINGLE);
2682
+ mol.addBond(b20);
2683
+ QueryAtomContainer q = QueryAtomContainerCreator.createBasicQueryContainer(mol);
2684
+ q.setID("allyl alcohol acetal");
2685
+ return q;
2686
+
2687
+ }
2688
+ public static QueryAtomContainer allylAlcoholEsterDerivative() {
2689
+ //TODO "CC=CCOC(=O)C[*]"
2690
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2691
+ IMolecule mol = MoleculeTools.newMolecule(builder);
2692
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
2693
+ mol.addAtom(a1);
2694
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2695
+ mol.addAtom(a2);
2696
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2697
+ mol.addAtom(a3);
2698
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
2699
+ mol.addAtom(a4);
2700
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2701
+ mol.addAtom(a5);
2702
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2703
+ mol.addAtom(a6);
2704
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2705
+ mol.addAtom(a7);
2706
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2707
+ mol.addAtom(a8);
2708
+ IAtom a9 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2709
+ mol.addAtom(a9);
2710
+ IAtom a10 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2711
+ mol.addAtom(a10);
2712
+ IAtom a11 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2713
+ mol.addAtom(a11);
2714
+ IAtom a12 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2715
+ mol.addAtom(a12);
2716
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
2717
+ mol.addBond(b1);
2718
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
2719
+ mol.addBond(b2);
2720
+ IBond b3 = MoleculeTools.newBond(builder,a4, a2, IBond.Order.SINGLE);
2721
+ mol.addBond(b3);
2722
+ IBond b4 = MoleculeTools.newBond(builder,a5, a4, IBond.Order.SINGLE);
2723
+ mol.addBond(b4);
2724
+ IBond b5 = MoleculeTools.newBond(builder,a6, a5, IBond.Order.SINGLE);
2725
+ mol.addBond(b5);
2726
+ IBond b6 = MoleculeTools.newBond(builder,a7, a5, IBond.Order.SINGLE);
2727
+ mol.addBond(b6);
2728
+ IBond b7 = MoleculeTools.newBond(builder,a8, a5, IBond.Order.SINGLE);
2729
+ mol.addBond(b7);
2730
+ IBond b8 = MoleculeTools.newBond(builder,a9, a8, IBond.Order.SINGLE);
2731
+ mol.addBond(b8);
2732
+ IBond b9 = MoleculeTools.newBond(builder,a10, a8, IBond.Order.DOUBLE);
2733
+ mol.addBond(b9);
2734
+ IBond b10 = MoleculeTools.newBond(builder,a11, a10, IBond.Order.SINGLE);
2735
+ mol.addBond(b10);
2736
+ IBond b11 = MoleculeTools.newBond(builder,a12, a10, IBond.Order.SINGLE);
2737
+ mol.addBond(b11);
2738
+ QueryAtomContainer q = QueryAtomContainerCreator.createBasicQueryContainer(mol);
2739
+ q.setID("allyl alcohol ester derivative");
2740
+ return q;
2741
+
2742
+ //return createQuery("O=C(C)OC([H])([H])C([H])=C([H])[H]","allyl alcohol ester derivative");
2743
+ }
2744
+ public static IAtomContainer allylMercaptan() {
2745
+ //return createAtomContainer("[H]SC([H])([H])C([H])=C([H])[H]","allyl mercaptan");
2746
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2747
+ IMolecule mol = MoleculeTools.newMolecule(builder);
2748
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2749
+ mol.addAtom(a1);
2750
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2751
+ mol.addAtom(a2);
2752
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2753
+ mol.addAtom(a3);
2754
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.SULFUR);
2755
+ mol.addAtom(a4);
2756
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2757
+ mol.addAtom(a5);
2758
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2759
+ mol.addAtom(a6);
2760
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2761
+ mol.addAtom(a7);
2762
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2763
+ mol.addAtom(a8);
2764
+ IAtom a9 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2765
+ mol.addAtom(a9);
2766
+ IAtom a10 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2767
+ mol.addAtom(a10);
2768
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
2769
+ mol.addBond(b1);
2770
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
2771
+ mol.addBond(b2);
2772
+ IBond b3 = MoleculeTools.newBond(builder,a4, a3, IBond.Order.SINGLE);
2773
+ mol.addBond(b3);
2774
+ IBond b4 = MoleculeTools.newBond(builder,a1, a5, IBond.Order.SINGLE);
2775
+ mol.addBond(b4);
2776
+ IBond b5 = MoleculeTools.newBond(builder,a1, a6, IBond.Order.SINGLE);
2777
+ mol.addBond(b5);
2778
+ IBond b6 = MoleculeTools.newBond(builder,a2, a7, IBond.Order.SINGLE);
2779
+ mol.addBond(b6);
2780
+ IBond b7 = MoleculeTools.newBond(builder,a3, a8, IBond.Order.SINGLE);
2781
+ mol.addBond(b7);
2782
+ IBond b8 = MoleculeTools.newBond(builder,a3, a9, IBond.Order.SINGLE);
2783
+ mol.addBond(b8);
2784
+ IBond b9 = MoleculeTools.newBond(builder,a4, a10, IBond.Order.SINGLE);
2785
+ mol.addBond(b9);
2786
+ mol.setID("allyl mercaptan");
2787
+ return mol;
2788
+ }
2789
+ public static IAtomContainer allylAmine() {
2790
+ // return createAtomContainer("C=CCN","allyl amine");
2791
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2792
+ IMolecule mol = MoleculeTools.newMolecule(builder);
2793
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2794
+ mol.addAtom(a1);
2795
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2796
+ mol.addAtom(a2);
2797
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2798
+ mol.addAtom(a3);
2799
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.NITROGEN);
2800
+ mol.addAtom(a4);
2801
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2802
+ mol.addAtom(a5);
2803
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2804
+ mol.addAtom(a6);
2805
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2806
+ mol.addAtom(a7);
2807
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2808
+ mol.addAtom(a8);
2809
+ IAtom a9 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2810
+ mol.addAtom(a9);
2811
+ IAtom a10 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2812
+ mol.addAtom(a10);
2813
+ IAtom a11 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2814
+ mol.addAtom(a11);
2815
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
2816
+ mol.addBond(b1);
2817
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
2818
+ mol.addBond(b2);
2819
+ IBond b3 = MoleculeTools.newBond(builder,a4, a3, IBond.Order.SINGLE);
2820
+ mol.addBond(b3);
2821
+ IBond b4 = MoleculeTools.newBond(builder,a1, a5, IBond.Order.SINGLE);
2822
+ mol.addBond(b4);
2823
+ IBond b5 = MoleculeTools.newBond(builder,a1, a6, IBond.Order.SINGLE);
2824
+ mol.addBond(b5);
2825
+ IBond b6 = MoleculeTools.newBond(builder,a2, a7, IBond.Order.SINGLE);
2826
+ mol.addBond(b6);
2827
+ IBond b7 = MoleculeTools.newBond(builder,a3, a8, IBond.Order.SINGLE);
2828
+ mol.addBond(b7);
2829
+ IBond b8 = MoleculeTools.newBond(builder,a3, a9, IBond.Order.SINGLE);
2830
+ mol.addBond(b8);
2831
+ IBond b9 = MoleculeTools.newBond(builder,a4, a10, IBond.Order.SINGLE);
2832
+ mol.addBond(b9);
2833
+ IBond b10 = MoleculeTools.newBond(builder,a4, a11, IBond.Order.SINGLE);
2834
+ mol.addBond(b10);
2835
+ mol.setID("allyl amine");
2836
+ return mol;
2837
+ }
2838
+ public static IAtomContainer allylSulphide() {
2839
+ //return createAtomContainer("C=CCSCC=C","allyl sulphide");
2840
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2841
+ IMolecule mol = MoleculeTools.newMolecule(builder);
2842
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2843
+ mol.addAtom(a1);
2844
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2845
+ mol.addAtom(a2);
2846
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2847
+ mol.addAtom(a3);
2848
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.SULFUR);
2849
+ mol.addAtom(a4);
2850
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2851
+ mol.addAtom(a5);
2852
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2853
+ mol.addAtom(a6);
2854
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2855
+ mol.addAtom(a7);
2856
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2857
+ mol.addAtom(a8);
2858
+ IAtom a9 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2859
+ mol.addAtom(a9);
2860
+ IAtom a10 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2861
+ mol.addAtom(a10);
2862
+ IAtom a11 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2863
+ mol.addAtom(a11);
2864
+ IAtom a12 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2865
+ mol.addAtom(a12);
2866
+ IAtom a13 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2867
+ mol.addAtom(a13);
2868
+ IAtom a14 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2869
+ mol.addAtom(a14);
2870
+ IAtom a15 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2871
+ mol.addAtom(a15);
2872
+ IAtom a16 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2873
+ mol.addAtom(a16);
2874
+ IAtom a17 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2875
+ mol.addAtom(a17);
2876
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
2877
+ mol.addBond(b1);
2878
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
2879
+ mol.addBond(b2);
2880
+ IBond b3 = MoleculeTools.newBond(builder,a4, a3, IBond.Order.SINGLE);
2881
+ mol.addBond(b3);
2882
+ IBond b4 = MoleculeTools.newBond(builder,a5, a4, IBond.Order.SINGLE);
2883
+ mol.addBond(b4);
2884
+ IBond b5 = MoleculeTools.newBond(builder,a6, a5, IBond.Order.SINGLE);
2885
+ mol.addBond(b5);
2886
+ IBond b6 = MoleculeTools.newBond(builder,a7, a6, IBond.Order.DOUBLE);
2887
+ mol.addBond(b6);
2888
+ IBond b7 = MoleculeTools.newBond(builder,a1, a8, IBond.Order.SINGLE);
2889
+ mol.addBond(b7);
2890
+ IBond b8 = MoleculeTools.newBond(builder,a1, a9, IBond.Order.SINGLE);
2891
+ mol.addBond(b8);
2892
+ IBond b9 = MoleculeTools.newBond(builder,a2, a10, IBond.Order.SINGLE);
2893
+ mol.addBond(b9);
2894
+ IBond b10 = MoleculeTools.newBond(builder,a3, a11, IBond.Order.SINGLE);
2895
+ mol.addBond(b10);
2896
+ IBond b11 = MoleculeTools.newBond(builder,a3, a12, IBond.Order.SINGLE);
2897
+ mol.addBond(b11);
2898
+ IBond b12 = MoleculeTools.newBond(builder,a5, a13, IBond.Order.SINGLE);
2899
+ mol.addBond(b12);
2900
+ IBond b13 = MoleculeTools.newBond(builder,a5, a14, IBond.Order.SINGLE);
2901
+ mol.addBond(b13);
2902
+ IBond b14 = MoleculeTools.newBond(builder,a6, a15, IBond.Order.SINGLE);
2903
+ mol.addBond(b14);
2904
+ IBond b15 = MoleculeTools.newBond(builder,a7, a16, IBond.Order.SINGLE);
2905
+ mol.addBond(b15);
2906
+ IBond b16 = MoleculeTools.newBond(builder,a7, a17, IBond.Order.SINGLE);
2907
+ mol.addBond(b16);
2908
+ mol.setID("allyl sulphide");
2909
+ return mol;
2910
+ }
2911
+ public static IAtomContainer allylThioester() {
2912
+ // return createQuery("C(=O)SCC=C","allyl thioester");
2913
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2914
+ IMolecule mol = MoleculeTools.newMolecule(builder);
2915
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2916
+ mol.addAtom(a1);
2917
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
2918
+ mol.addAtom(a2);
2919
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.SULFUR);
2920
+ mol.addAtom(a3);
2921
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2922
+ mol.addAtom(a4);
2923
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2924
+ mol.addAtom(a5);
2925
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2926
+ mol.addAtom(a6);
2927
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2928
+ mol.addAtom(a7);
2929
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2930
+ mol.addAtom(a8);
2931
+ IAtom a9 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2932
+ mol.addAtom(a9);
2933
+ IAtom a10 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2934
+ mol.addAtom(a10);
2935
+ IAtom a11 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2936
+ mol.addAtom(a11);
2937
+ IAtom a12 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2938
+ mol.addAtom(a12);
2939
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
2940
+ mol.addBond(b1);
2941
+ IBond b2 = MoleculeTools.newBond(builder,a3, a1, IBond.Order.SINGLE);
2942
+ mol.addBond(b2);
2943
+ IBond b3 = MoleculeTools.newBond(builder,a4, a3, IBond.Order.SINGLE);
2944
+ mol.addBond(b3);
2945
+ IBond b4 = MoleculeTools.newBond(builder,a5, a4, IBond.Order.SINGLE);
2946
+ mol.addBond(b4);
2947
+ IBond b5 = MoleculeTools.newBond(builder,a6, a5, IBond.Order.DOUBLE);
2948
+ mol.addBond(b5);
2949
+ IBond b6 = MoleculeTools.newBond(builder,a1, a7, IBond.Order.SINGLE);
2950
+ mol.addBond(b6);
2951
+ IBond b7 = MoleculeTools.newBond(builder,a4, a8, IBond.Order.SINGLE);
2952
+ mol.addBond(b7);
2953
+ IBond b8 = MoleculeTools.newBond(builder,a4, a9, IBond.Order.SINGLE);
2954
+ mol.addBond(b8);
2955
+ IBond b9 = MoleculeTools.newBond(builder,a5, a10, IBond.Order.SINGLE);
2956
+ mol.addBond(b9);
2957
+ IBond b10 = MoleculeTools.newBond(builder,a6, a11, IBond.Order.SINGLE);
2958
+ mol.addBond(b10);
2959
+ IBond b11 = MoleculeTools.newBond(builder,a6, a12, IBond.Order.SINGLE);
2960
+ mol.addBond(b11);
2961
+ mol.setID("allyl thioester");
2962
+ return mol;
2963
+ }
2964
+ public static IAtomContainer acrolein() {
2965
+ //return createAtomContainer("C=CC=O","acrolein");
2966
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
2967
+ IMolecule mol = MoleculeTools.newMolecule(builder);
2968
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2969
+ mol.addAtom(a1);
2970
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2971
+ mol.addAtom(a2);
2972
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
2973
+ mol.addAtom(a3);
2974
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
2975
+ mol.addAtom(a4);
2976
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2977
+ mol.addAtom(a5);
2978
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2979
+ mol.addAtom(a6);
2980
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2981
+ mol.addAtom(a7);
2982
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
2983
+ mol.addAtom(a8);
2984
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
2985
+ mol.addBond(b1);
2986
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
2987
+ mol.addBond(b2);
2988
+ IBond b3 = MoleculeTools.newBond(builder,a4, a3, IBond.Order.DOUBLE);
2989
+ mol.addBond(b3);
2990
+ IBond b4 = MoleculeTools.newBond(builder,a1, a5, IBond.Order.SINGLE);
2991
+ mol.addBond(b4);
2992
+ IBond b5 = MoleculeTools.newBond(builder,a1, a6, IBond.Order.SINGLE);
2993
+ mol.addBond(b5);
2994
+ IBond b6 = MoleculeTools.newBond(builder,a2, a7, IBond.Order.SINGLE);
2995
+ mol.addBond(b6);
2996
+ IBond b7 = MoleculeTools.newBond(builder,a3, a8, IBond.Order.SINGLE);
2997
+ mol.addBond(b7);
2998
+ mol.setID("acrolein");
2999
+ return mol;
3000
+ }
3001
+ public static IAtomContainer methacrolein() {
3002
+ //return createAtomContainer("C=C(C)C=O","methacrolein");
3003
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
3004
+ IMolecule mol = MoleculeTools.newMolecule(builder);
3005
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3006
+ mol.addAtom(a1);
3007
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3008
+ mol.addAtom(a2);
3009
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3010
+ mol.addAtom(a3);
3011
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3012
+ mol.addAtom(a4);
3013
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
3014
+ mol.addAtom(a5);
3015
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3016
+ mol.addAtom(a6);
3017
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3018
+ mol.addAtom(a7);
3019
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3020
+ mol.addAtom(a8);
3021
+ IAtom a9 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3022
+ mol.addAtom(a9);
3023
+ IAtom a10 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3024
+ mol.addAtom(a10);
3025
+ IAtom a11 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3026
+ mol.addAtom(a11);
3027
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
3028
+ mol.addBond(b1);
3029
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
3030
+ mol.addBond(b2);
3031
+ IBond b3 = MoleculeTools.newBond(builder,a4, a2, IBond.Order.SINGLE);
3032
+ mol.addBond(b3);
3033
+ IBond b4 = MoleculeTools.newBond(builder,a5, a4, IBond.Order.DOUBLE);
3034
+ mol.addBond(b4);
3035
+ IBond b5 = MoleculeTools.newBond(builder,a1, a6, IBond.Order.SINGLE);
3036
+ mol.addBond(b5);
3037
+ IBond b6 = MoleculeTools.newBond(builder,a1, a7, IBond.Order.SINGLE);
3038
+ mol.addBond(b6);
3039
+ IBond b7 = MoleculeTools.newBond(builder,a3, a8, IBond.Order.SINGLE);
3040
+ mol.addBond(b7);
3041
+ IBond b8 = MoleculeTools.newBond(builder,a3, a9, IBond.Order.SINGLE);
3042
+ mol.addBond(b8);
3043
+ IBond b9 = MoleculeTools.newBond(builder,a3, a10, IBond.Order.SINGLE);
3044
+ mol.addBond(b9);
3045
+ IBond b10 = MoleculeTools.newBond(builder,a4, a11, IBond.Order.SINGLE);
3046
+ mol.addBond(b10);
3047
+ mol.setID("Methacrolein");
3048
+ return mol;
3049
+ }
3050
+ public static IAtomContainer methacroleinAcetal() {
3051
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
3052
+ IMolecule mol = MoleculeTools.newMolecule(builder);
3053
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3054
+ mol.addAtom(a1);
3055
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3056
+ mol.addAtom(a2);
3057
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3058
+ mol.addAtom(a3);
3059
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3060
+ mol.addAtom(a4);
3061
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
3062
+ mol.addAtom(a5);
3063
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
3064
+ mol.addAtom(a6);
3065
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3066
+ mol.addAtom(a7);
3067
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3068
+ mol.addAtom(a8);
3069
+ IAtom a9 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3070
+ mol.addAtom(a9);
3071
+ IAtom a10 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3072
+ mol.addAtom(a10);
3073
+ IAtom a11 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3074
+ mol.addAtom(a11);
3075
+ IAtom a12 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3076
+ mol.addAtom(a12);
3077
+ IAtom a13 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3078
+ mol.addAtom(a13);
3079
+ IAtom a14 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3080
+ mol.addAtom(a14);
3081
+ IAtom a15 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3082
+ mol.addAtom(a15);
3083
+ IAtom a16 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3084
+ mol.addAtom(a16);
3085
+ IAtom a17 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3086
+ mol.addAtom(a17);
3087
+ IAtom a18 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3088
+ mol.addAtom(a18);
3089
+ IAtom a19 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3090
+ mol.addAtom(a19);
3091
+ IAtom a20 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3092
+ mol.addAtom(a20);
3093
+ IBond b1 = MoleculeTools.newBond(builder,a1, a2, IBond.Order.SINGLE);
3094
+ mol.addBond(b1);
3095
+ IBond b2 = MoleculeTools.newBond(builder,a2, a3, IBond.Order.SINGLE);
3096
+ mol.addBond(b2);
3097
+ IBond b3 = MoleculeTools.newBond(builder,a3, a4, IBond.Order.DOUBLE);
3098
+ mol.addBond(b3);
3099
+ IBond b4 = MoleculeTools.newBond(builder,a2, a5, IBond.Order.SINGLE);
3100
+ mol.addBond(b4);
3101
+ IBond b5 = MoleculeTools.newBond(builder,a2, a6, IBond.Order.SINGLE);
3102
+ mol.addBond(b5);
3103
+ IBond b6 = MoleculeTools.newBond(builder,a1, a7, IBond.Order.SINGLE);
3104
+ mol.addBond(b6);
3105
+ IBond b7 = MoleculeTools.newBond(builder,a1, a8, IBond.Order.SINGLE);
3106
+ mol.addBond(b7);
3107
+ IBond b8 = MoleculeTools.newBond(builder,a1, a9, IBond.Order.SINGLE);
3108
+ mol.addBond(b8);
3109
+ IBond b9 = MoleculeTools.newBond(builder,a3, a10, IBond.Order.SINGLE);
3110
+ mol.addBond(b9);
3111
+ IBond b10 = MoleculeTools.newBond(builder,a5, a11, IBond.Order.SINGLE);
3112
+ mol.addBond(b10);
3113
+ IBond b11 = MoleculeTools.newBond(builder,a6, a12, IBond.Order.SINGLE);
3114
+ mol.addBond(b11);
3115
+ IBond b12 = MoleculeTools.newBond(builder,a4, a13, IBond.Order.SINGLE);
3116
+ mol.addBond(b12);
3117
+ IBond b13 = MoleculeTools.newBond(builder,a4, a14, IBond.Order.SINGLE);
3118
+ mol.addBond(b13);
3119
+ IBond b14 = MoleculeTools.newBond(builder,a12, a15, IBond.Order.SINGLE);
3120
+ mol.addBond(b14);
3121
+ IBond b15 = MoleculeTools.newBond(builder,a12, a16, IBond.Order.SINGLE);
3122
+ mol.addBond(b15);
3123
+ IBond b16 = MoleculeTools.newBond(builder,a12, a17, IBond.Order.SINGLE);
3124
+ mol.addBond(b16);
3125
+ IBond b17 = MoleculeTools.newBond(builder,a11, a18, IBond.Order.SINGLE);
3126
+ mol.addBond(b17);
3127
+ IBond b18 = MoleculeTools.newBond(builder,a11, a19, IBond.Order.SINGLE);
3128
+ mol.addBond(b18);
3129
+ IBond b19 = MoleculeTools.newBond(builder,a11, a20, IBond.Order.SINGLE);
3130
+ mol.addBond(b19);
3131
+ mol.setID("Methacrolein acetal");
3132
+ return mol;
3133
+
3134
+ }
3135
+ public static IAtomContainer acrylicAcid() {
3136
+ //return createAtomContainer("C=CC(O)=O","acrylic acid");
3137
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
3138
+ IMolecule mol = MoleculeTools.newMolecule(builder);
3139
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3140
+ mol.addAtom(a1);
3141
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3142
+ mol.addAtom(a2);
3143
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3144
+ mol.addAtom(a3);
3145
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
3146
+ mol.addAtom(a4);
3147
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
3148
+ mol.addAtom(a5);
3149
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3150
+ mol.addAtom(a6);
3151
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3152
+ mol.addAtom(a7);
3153
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3154
+ mol.addAtom(a8);
3155
+ IAtom a9 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3156
+ mol.addAtom(a9);
3157
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
3158
+ mol.addBond(b1);
3159
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
3160
+ mol.addBond(b2);
3161
+ IBond b3 = MoleculeTools.newBond(builder,a4, a3, IBond.Order.SINGLE);
3162
+ mol.addBond(b3);
3163
+ IBond b4 = MoleculeTools.newBond(builder,a5, a3, IBond.Order.DOUBLE);
3164
+ mol.addBond(b4);
3165
+ IBond b5 = MoleculeTools.newBond(builder,a1, a6, IBond.Order.SINGLE);
3166
+ mol.addBond(b5);
3167
+ IBond b6 = MoleculeTools.newBond(builder,a1, a7, IBond.Order.SINGLE);
3168
+ mol.addBond(b6);
3169
+ IBond b7 = MoleculeTools.newBond(builder,a2, a8, IBond.Order.SINGLE);
3170
+ mol.addBond(b7);
3171
+ IBond b8 = MoleculeTools.newBond(builder,a4, a9, IBond.Order.SINGLE);
3172
+ mol.addBond(b8);
3173
+ mol.setID("acrylic acid");
3174
+ return mol;
3175
+ }
3176
+ public static IAtomContainer methacrylicAcid() {
3177
+ //return createAtomContainer("C=C(C)C(O)=O","methacrylic acid");
3178
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
3179
+ IMolecule mol = MoleculeTools.newMolecule(builder);
3180
+ IAtom a1 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3181
+ mol.addAtom(a1);
3182
+ IAtom a2 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3183
+ mol.addAtom(a2);
3184
+ IAtom a3 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3185
+ mol.addAtom(a3);
3186
+ IAtom a4 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON);
3187
+ mol.addAtom(a4);
3188
+ IAtom a5 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
3189
+ mol.addAtom(a5);
3190
+ IAtom a6 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
3191
+ mol.addAtom(a6);
3192
+ IAtom a7 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3193
+ mol.addAtom(a7);
3194
+ IAtom a8 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3195
+ mol.addAtom(a8);
3196
+ IAtom a9 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3197
+ mol.addAtom(a9);
3198
+ IAtom a10 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3199
+ mol.addAtom(a10);
3200
+ IAtom a11 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3201
+ mol.addAtom(a11);
3202
+ IAtom a12 = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3203
+ mol.addAtom(a12);
3204
+ IBond b1 = MoleculeTools.newBond(builder,a2, a1, IBond.Order.DOUBLE);
3205
+ mol.addBond(b1);
3206
+ IBond b2 = MoleculeTools.newBond(builder,a3, a2, IBond.Order.SINGLE);
3207
+ mol.addBond(b2);
3208
+ IBond b3 = MoleculeTools.newBond(builder,a4, a2, IBond.Order.SINGLE);
3209
+ mol.addBond(b3);
3210
+ IBond b4 = MoleculeTools.newBond(builder,a5, a4, IBond.Order.SINGLE);
3211
+ mol.addBond(b4);
3212
+ IBond b5 = MoleculeTools.newBond(builder,a6, a4, IBond.Order.DOUBLE);
3213
+ mol.addBond(b5);
3214
+ IBond b6 = MoleculeTools.newBond(builder,a1, a7, IBond.Order.SINGLE);
3215
+ mol.addBond(b6);
3216
+ IBond b7 = MoleculeTools.newBond(builder,a1, a8, IBond.Order.SINGLE);
3217
+ mol.addBond(b7);
3218
+ IBond b8 = MoleculeTools.newBond(builder,a3, a9, IBond.Order.SINGLE);
3219
+ mol.addBond(b8);
3220
+ IBond b9 = MoleculeTools.newBond(builder,a3, a10, IBond.Order.SINGLE);
3221
+ mol.addBond(b9);
3222
+ IBond b10 = MoleculeTools.newBond(builder,a3, a11, IBond.Order.SINGLE);
3223
+ mol.addBond(b10);
3224
+ IBond b11 = MoleculeTools.newBond(builder,a5, a12, IBond.Order.SINGLE);
3225
+ mol.addBond(b11);
3226
+ mol.setID("methacrylic acid");
3227
+ return mol;
3228
+ }
3229
+ public static boolean isAcetylenic(IAtomContainer mol) {
3230
+ for (int i = 0; i < mol.getBondCount(); i++) {
3231
+ IBond b = mol.getBond(i);
3232
+ if ((b.getOrder() == CDKConstants.BONDORDER_TRIPLE) &&
3233
+ (b.getAtom(0).getSymbol().equals("C")) &&
3234
+ (b.getAtom(1).getSymbol().equals("C"))
3235
+ ) {
3236
+ logger.fine("Acetylenic group found");
3237
+ return true;
3238
+ }
3239
+ }
3240
+ return false;
3241
+ }
3242
+
3243
+ public static QueryAtomContainer stericallyHindered() {
3244
+
3245
+ QueryAtomContainer mol = new QueryAtomContainer();
3246
+ SymbolQueryAtom a[] = new SymbolQueryAtom[6];
3247
+
3248
+ InverseSymbolSetQueryAtom[] r = new InverseSymbolSetQueryAtom[6];
3249
+ for (int i=0; i < 6; i++) {
3250
+ r[i] = new InverseSymbolSetQueryAtom();
3251
+ a[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
3252
+ mol.addAtom(a[i]);
3253
+ r[i].addSymbol("H");
3254
+ mol.addAtom(r[i]);
3255
+ if (i>0) {
3256
+ AnyOrderQueryBond b = new AnyOrderQueryBond(a[i], a[i-1],IBond.Order.SINGLE);
3257
+ mol.addBond(b);
3258
+ }
3259
+ }
3260
+ SymbolQueryAtom a7 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
3261
+ mol.addAtom(a7);
3262
+ SymbolQueryAtom a11 = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
3263
+ mol.addAtom(a11);
3264
+
3265
+ InverseSymbolSetQueryAtom hindered = new InverseSymbolSetQueryAtom();
3266
+ hindered.addSymbol("H"); //anything but H
3267
+ //hindered.addSymbol("C");
3268
+ mol.addAtom(hindered);
3269
+ AnyOrderQueryBond b = new AnyOrderQueryBond(a[3], hindered,IBond.Order.SINGLE);
3270
+ mol.addBond(b);
3271
+
3272
+ OrderQueryBond b7 = new OrderQueryBond(a[2], a7, IBond.Order.SINGLE);
3273
+ mol.addBond(b7);
3274
+ OrderQueryBond b8 = new OrderQueryBond(a7, r[0], IBond.Order.SINGLE);
3275
+ mol.addBond(b8);
3276
+ OrderQueryBond b9 = new OrderQueryBond(a7, r[1], IBond.Order.SINGLE);
3277
+ mol.addBond(b9);
3278
+ OrderQueryBond b10 = new OrderQueryBond(a7, r[2], IBond.Order.SINGLE);
3279
+ mol.addBond(b10);
3280
+ OrderQueryBond b11 = new OrderQueryBond(a[4], a11, IBond.Order.SINGLE);
3281
+ mol.addBond(b11);
3282
+ OrderQueryBond b12 = new OrderQueryBond(a11, r[3], IBond.Order.SINGLE);
3283
+ mol.addBond(b12);
3284
+ OrderQueryBond b13 = new OrderQueryBond(a11, r[4], IBond.Order.SINGLE);
3285
+ mol.addBond(b13);
3286
+ OrderQueryBond b14 = new OrderQueryBond(a11, r[5], IBond.Order.SINGLE);
3287
+ mol.addBond(b14);
3288
+
3289
+ mol.setID("Sterically hindered\t");
3290
+ return mol;
3291
+ }
3292
+ public static boolean hasSubstituents(IAtomContainer mol, IRingSet rings) {
3293
+
3294
+ if ((rings == null) || (rings.getAtomContainerCount()==0)) return false;
3295
+ int size = rings.getAtomContainerCount();
3296
+ IRing r = null;
3297
+ //Atom[] neighbors = null;
3298
+ List neighbors = null;
3299
+ for (int i=0; i < size; i++) {
3300
+ r = (IRing) rings.getAtomContainer(i);
3301
+ for (int j=0; j< r.getAtomCount(); j++) {
3302
+ //
3303
+ neighbors = mol.getConnectedBondsList(r.getAtom(j));
3304
+ for (int n=0; n< neighbors.size(); n++) {
3305
+ IBond nb = (IBond) neighbors.get(n);
3306
+ if (nb.getAtom(0).getSymbol().equals("H")) continue;
3307
+ if (nb.getAtom(1).getSymbol().equals("H")) continue;
3308
+ //if there is acyclic bond then it is substituent
3309
+ if (!nb.getFlag(CDKConstants.ISINRING)) return true;
3310
+ /*
3311
+ if (!r.contains(neighbors[n])) {
3312
+ logger.fine("Ring has substituent(s)\t","YES\t",neighbors[n].getSymbol());
3313
+ return true;
3314
+ }
3315
+ */
3316
+ }
3317
+ }
3318
+ }
3319
+ logger.fine("Ring with substituent(s)\tNO");
3320
+ return false;
3321
+ }
3322
+ public static boolean isCommonTerpene(IAtomContainer mol) {
3323
+ SSSRFinder ssrf = new SSSRFinder(mol);
3324
+ return isCommonTerpene(mol,ssrf.findSSSR());
3325
+ }
3326
+ public static boolean isCommonTerpene(IAtomContainer mol, IRingSet rings) {
3327
+
3328
+ IMolecularFormula formula = MolecularFormulaManipulator.getMolecularFormula(mol);
3329
+ int c = MolecularFormulaManipulator.getElementCount(formula,MoleculeTools.newElement(formula.getBuilder(),"C"));
3330
+
3331
+ if ((c % 5) != 0) return false;
3332
+ int n = c / 5;
3333
+ if (n < 2) return false;
3334
+ int h = MolecularFormulaManipulator.getElementCount(formula,MoleculeTools.newElement(formula.getBuilder(),"H"));
3335
+
3336
+
3337
+ if (h/8 != n) {
3338
+ logger.fine(MolecularFormulaManipulator.getHillString(formula));
3339
+ return false;
3340
+ }
3341
+ int o = MolecularFormulaManipulator.getElementCount(formula,MoleculeTools.newElement(formula.getBuilder(),"O"));
3342
+ if ((c + h + o) < mol.getAtomCount()) return false; //athoms different than C,H,O
3343
+
3344
+ QueryAtomContainer q = isopreneUnit();
3345
+ List list = FunctionalGroups.getBondMap(mol, q,false);
3346
+ if ((list == null) || (list.size() == 0)) {
3347
+ logger.fine("NO isoprene unit found");
3348
+ return false;
3349
+ }
3350
+ FunctionalGroups.markMaps(mol, q, list);
3351
+
3352
+ ArrayList ids = new ArrayList();
3353
+ ids.add(q.getID());
3354
+
3355
+ int size = 0;
3356
+ if (rings != null) size = rings.getAtomContainerCount();
3357
+ if ((rings!=null) && (size > 0) && ((c + h) == mol.getAtomCount())) {
3358
+ // w monociklicnite ima 2 double bond, w biciklicnite ima 1 double
3359
+ int db = 0;
3360
+ for (int i=0; i< mol.getBondCount(); i++)
3361
+ if (mol.getBond(i).getOrder() == CDKConstants.BONDORDER_DOUBLE) db++;
3362
+ if ((size == 1) && (db != 2)) {
3363
+ logger.fine("Single ring , double bonds "+db);
3364
+ return false;
3365
+ }
3366
+ if ((size == 2) && (db != 1)) {
3367
+ logger.fine("Two rings , double bonds "+db);
3368
+ return false;
3369
+ }
3370
+ logger.fine("May be terpene");
3371
+ //za ostanalite neznam
3372
+ }
3373
+
3374
+ if (o>0) { //check for alcohol, aldehyde, carboxylic acid
3375
+ preProcess(mol);
3376
+ q= alcohol(false); ids.add(q.getID());
3377
+ list = FunctionalGroups.getBondMap(mol, q,true);
3378
+ FunctionalGroups.markMaps(mol, q, list);
3379
+ q= aldehyde(); ids.add(q.getID());
3380
+ list = FunctionalGroups.getBondMap(mol, q,true);
3381
+ FunctionalGroups.markMaps(mol, q, list);
3382
+ q= carboxylicAcid(); ids.add(q.getID());
3383
+ list = FunctionalGroups.getBondMap(mol, q,true);
3384
+ FunctionalGroups.markMaps(mol, q, list);
3385
+ }
3386
+
3387
+ boolean b = hasMarkedOnlyTheseGroups(mol,ids);
3388
+ if (logger.isLoggable(Level.FINE)) {
3389
+ logger.fine(mapToString(mol).toString());
3390
+ if (b) logger.fine("This compound is a terpene (terpenoid)");
3391
+ else logger.fine("This compound is NOT a terpene");
3392
+ }
3393
+ return b;
3394
+
3395
+ }
3396
+ public static boolean singleFusedRing(IAtomContainer mol, IRingSet rings) {
3397
+
3398
+ if ((rings == null) || (rings.getAtomContainerCount() ==0) ) return false;
3399
+ int size = rings.getAtomContainerCount();
3400
+ if (size==1) return true;
3401
+ IRingSet allRings = rings.getConnectedRings((IRing)rings.getAtomContainer(0));
3402
+ boolean b = (allRings.getAtomContainerCount() == size);
3403
+ if (b) logger.fine("Single fused ring found");
3404
+ allRings = null;
3405
+ return b;
3406
+ }
3407
+ public static boolean hasGroup(IAtomContainer mol, IAtomContainer q) {
3408
+ return hasGroup(mol, q, null);
3409
+ }
3410
+ public static boolean hasGroup(IAtomContainer mol, IAtomContainer q, IAtomContainer selected) {
3411
+ //search for these groups relies on CHn marks set by markCHn
3412
+ return hasGroup(mol,q,needsPreprocessing(q),selected);
3413
+ }
3414
+ public static boolean hasGroup(IAtomContainer mol, IAtomContainer q, boolean preprocess) {
3415
+ return hasGroup(mol, q,preprocess, null);
3416
+ }
3417
+ public static boolean hasGroup(IAtomContainer mol, IAtomContainer q, boolean preprocess, IAtomContainer selected) {
3418
+ if (q==null || mol==null) return false;
3419
+ if (q.getAtomCount() > mol.getAtomCount()) {
3420
+ logger.fine("A query with more atoms than a molecule!");
3421
+ return false;
3422
+ }
3423
+ if (preprocess) {
3424
+ logger.fine("Marking CHn groups");
3425
+ preProcess(mol);
3426
+ }
3427
+ if (selected==null)
3428
+ try {
3429
+
3430
+ if (UniversalIsomorphismTester.isSubgraph(mol,q)) {
3431
+ //logger.fine(mapToString(mol));
3432
+ logger.fine("Molecule \t"+mol.getID()+MSG_HASGROUP+q.getID()+"\tYES");
3433
+ return true;
3434
+ } else {
3435
+ //logger.fine(mapToString(mol));
3436
+ logger.fine("Molecule \t"+mol.getID()+MSG_HASGROUP+q.getID()+"\tNO");
3437
+ return false;
3438
+ }
3439
+ } catch (Exception x) {
3440
+ logger.log(Level.SEVERE,x.getMessage(),x);
3441
+ return false;
3442
+ }
3443
+ else
3444
+ try {
3445
+ List<RMap> list = UniversalIsomorphismTester.getSubgraphAtomsMap(mol,q);
3446
+ if (list != null)
3447
+ for (int i=0; i < list.size();i++) {
3448
+ RMap map = list.get(i);
3449
+ selected.addAtom(mol.getAtom(map.getId1()));
3450
+ }
3451
+ return (list != null) && (list.size()>0);
3452
+
3453
+ } catch (CDKException x) {
3454
+ logger.log(Level.SEVERE,x.getMessage(),x);
3455
+ return false;
3456
+ }
3457
+ }
3458
+ public static boolean isSubstance(IAtomContainer mol, IAtomContainer q) {
3459
+ try {
3460
+ if (mol.getAtomCount() != q.getAtomCount()) return false; // no need to spend time on isomorphism ...
3461
+ if (mol.getBondCount() != q.getBondCount()) return false; // no need to spend time on isomorphism ...
3462
+ boolean b= (UniversalIsomorphismTester.isIsomorph(mol,q));
3463
+
3464
+ if (logger.isLoggable(Level.FINE))
3465
+ if (b) logger.fine(MSG_MOLECULEIS+q.getID()+"\tYES");
3466
+ else logger.fine(MSG_MOLECULEIS+q.getID()+"\tNO");
3467
+ return b;
3468
+ } catch (CDKException x) {
3469
+ logger.log(Level.SEVERE,x.getMessage(),x);
3470
+ return false;
3471
+ }
3472
+
3473
+ }
3474
+ private static int countGroups(IAtomContainer mol, QueryAtomContainer q) {
3475
+ List list = getUniqueBondMap(mol,q,false);
3476
+ if (list == null) return 0;
3477
+ else if (list.size() == 0) return 0;
3478
+ else {
3479
+ markMaps(mol,q,list);
3480
+ return 1;
3481
+ }
3482
+ }
3483
+ public static boolean hasManyDifferentFunctionalGroups(IAtomContainer mol,int threshold) {
3484
+ int groups = 0;
3485
+ boolean group = false;
3486
+ String metals[] = {"Na","K","Ca","Mg","Al"};
3487
+ IMolecularFormula formula = MolecularFormulaManipulator.getMolecularFormula(mol);
3488
+ markCHn(mol);
3489
+ List<IElement> elements = MolecularFormulaManipulator.elements(formula);
3490
+ logger.fine("Checking for more than " + threshold +" groups");
3491
+ for (int i=0; i< elements.size(); i++) {
3492
+ String element = elements.get(i).getSymbol();
3493
+ if (element.equals("H")) continue;
3494
+ if (element.equals("C")) {
3495
+ if (isAcetylenic(mol)) groups++;
3496
+ continue;
3497
+ }
3498
+ if (element.equals("N")) {
3499
+ group = FunctionalGroups.hasGroup(mol,secondaryAmine(false)) ||
3500
+ FunctionalGroups.hasGroup(mol,tertiaryAmine()) ||
3501
+ FunctionalGroups.hasGroup(mol,primaryAmine(false));
3502
+ if (group) {
3503
+ groups++;
3504
+ logger.fine("amino group found");
3505
+ }
3506
+ groups += countGroups(mol,cyano());
3507
+ groups += countGroups(mol,nitro1double());
3508
+ groups += countGroups(mol,nitro2double());
3509
+ groups += countGroups(mol,Nnitroso());
3510
+ groups += countGroups(mol,diAzo());
3511
+ groups += countGroups(mol,triAzeno());
3512
+ if (groups >= threshold) break;
3513
+ } else
3514
+
3515
+ if (element.equals("O")) {
3516
+ int g = countGroups(mol,carboxylicAcid()) + countGroups(mol,FunctionalGroups.ester());
3517
+ if (g > 0 ) {
3518
+ groups ++; //count once
3519
+ logger.fine("acid or ester group found");
3520
+ }
3521
+ groups += countGroups(mol,saltOfCarboxylicAcid(metals));
3522
+ groups += countGroups(mol,acetal());
3523
+ groups += countGroups(mol,ether());
3524
+ groups += countGroups(mol,aldehyde());
3525
+ groups += countGroups(mol,ketone());
3526
+ int alcohols = countGroups(mol,alcohol(false));
3527
+ groups += alcohols;
3528
+ if (groups >= threshold) break;
3529
+ } else
3530
+
3531
+ if (element.equals("S")) {
3532
+ groups += countGroups(mol,sulphide());
3533
+ groups += countGroups(mol,mercaptan());
3534
+ groups += countGroups(mol,thioester());
3535
+ if (groups >= threshold) break;
3536
+ groups += countGroups(mol,sulphate(metals));
3537
+ groups += countGroups(mol,sulphamate(metals));
3538
+ groups += countGroups(mol,sulphonate(metals));
3539
+ if (groups >= threshold) break;
3540
+ } else {
3541
+ //count each unlisted atom as group ... quite rude ;)
3542
+ if (groups >= threshold) break;
3543
+ groups++;
3544
+ }
3545
+
3546
+ }
3547
+ logger.fine("Different groups found\t"+groups);
3548
+ return (groups >= threshold);
3549
+ }
3550
+ /*
3551
+ public static boolean hasManyDifferentFunctionalGroups(org.openscience.cdk.interfaces.AtomContainer mol,int threshold) {
3552
+ int groups = 0;
3553
+ boolean group = false;
3554
+ String metals[] = {"Na","K","Ca","Mg","Al"};
3555
+ MFAnalyser mf= new MFAnalyser(mol);
3556
+ markCHn(mol);
3557
+ Vector elements = mf.getElements();
3558
+ logger.fine("Checking for more than " + threshold ," groups");
3559
+ for (int i=0; i< elements.size(); i++) {
3560
+ String element = (String) elements.get(i);
3561
+ if (element.equals("H")) continue;
3562
+ if (element.equals("C")) {
3563
+ if (isAcetylenic(mol)) groups++;
3564
+ continue;
3565
+ }
3566
+ if (element.equals("N")) {
3567
+ group = FunctionalGroups.hasGroup(mol,secondaryAmine(false)) ||
3568
+ FunctionalGroups.hasGroup(mol,tertiaryAmine()) ||
3569
+ FunctionalGroups.hasGroup(mol,primaryAmine(false));
3570
+ if (group) {
3571
+ groups++;
3572
+ logger.fine("amino group found");
3573
+ }
3574
+ groups += countGroups(mol,cyano());
3575
+ groups += countGroups(mol,nitro1double());
3576
+ groups += countGroups(mol,nitro2double());
3577
+ groups += countGroups(mol,Nnitroso());
3578
+ groups += countGroups(mol,diAzo());
3579
+ groups += countGroups(mol,triAzeno());
3580
+ if (groups >= threshold) break;
3581
+ } else
3582
+
3583
+ if (element.equals("O")) {
3584
+ group = FunctionalGroups.hasGroup(mol,carboxylicAcid()) ||
3585
+
3586
+ FunctionalGroups.hasGroup(mol,ester());
3587
+ if (group) {
3588
+ groups++;
3589
+ logger.fine("acid or ester group found");
3590
+ }
3591
+ groups += countGroups(mol,saltOfCarboxylicAcid(metals));
3592
+ groups += countGroups(mol,acetal());
3593
+ groups += countGroups(mol,ether());
3594
+ groups += countGroups(mol,aldehyde());
3595
+ groups += countGroups(mol,ketone());
3596
+ groups += countGroups(mol,alcohol(false));
3597
+ if (groups >= threshold) break;
3598
+ } else
3599
+
3600
+ if (element.equals("S")) {
3601
+ groups += countGroups(mol,sulphide());
3602
+ groups += countGroups(mol,mercaptan());
3603
+ groups += countGroups(mol,thioester());
3604
+ if (groups >= threshold) break;
3605
+ groups += countGroups(mol,sulphate(metals));
3606
+ groups += countGroups(mol,sulphamate(metals));
3607
+ groups += countGroups(mol,sulphonate(metals));
3608
+ if (groups >= threshold) break;
3609
+ } else {
3610
+ //count each unlisted atom as group ... quite rude ;)
3611
+ if (groups >= threshold) break;
3612
+ groups++;
3613
+ }
3614
+
3615
+ }
3616
+ logger.fine("Different groups found\t",groups);
3617
+ return (groups >= threshold);
3618
+ }
3619
+ */
3620
+ public static int associateIonic(IAtomContainer a) throws CDKException {
3621
+
3622
+ IMoleculeSet c = ConnectivityChecker.partitionIntoMolecules(a);
3623
+ //clear VISITED flag
3624
+ for (int i=0; i<a.getAtomCount();i++) a.getAtom(i).setFlag(CDKConstants.VISITED,false);
3625
+
3626
+ int n = c.getAtomContainerCount();
3627
+ if (n == 1) return 0;
3628
+ logger.fine("Trying to find ionic bonds (if any)");
3629
+ IAtomContainer ac = null;
3630
+ ArrayList match = new ArrayList();
3631
+ StringBuffer notMatched = new StringBuffer();
3632
+ int ionicBonds = 0;
3633
+ for (int i=0; i<n; i++) {
3634
+ ac = c.getAtomContainer(i);
3635
+ logger.fine("AtomContainer \t"+Integer.toString(i+1)+" atom\t"+Integer.toString(ac.getAtomCount()));
3636
+ //if there are atoms with formal charge != 0
3637
+ for (int k=0; k<ac.getAtomCount(); k++) {
3638
+ IAtom atom = ac.getAtom(k);
3639
+ if ((atom.getFormalCharge() != null) && (atom.getFormalCharge() != 0))
3640
+ match.add(atom);
3641
+ }
3642
+ if (match.size() == 0) continue; //nothing to match
3643
+
3644
+ for (int j=i+1; j<n; j++) {
3645
+ ac = c.getAtomContainer(j);
3646
+ for (int k=0; k<ac.getAtomCount(); k++) {
3647
+ IAtom atom = ac.getAtom(k);
3648
+
3649
+ if ((atom.getFormalCharge() != null) && (atom.getFormalCharge() != 0)) {//lookup in match
3650
+ Object aCharge = atom.getProperty(ChargeConsumed.CHARGECONSUMED);
3651
+ if (aCharge == null) {
3652
+ aCharge = new ChargeConsumed(atom);
3653
+ atom.setProperty(ChargeConsumed.CHARGECONSUMED,aCharge);
3654
+ } else if (((ChargeConsumed)aCharge).getCharge()==0) continue;
3655
+
3656
+ for (int m=0; m<match.size(); m++) {
3657
+ IAtom mAtom = (IAtom) match.get(m);
3658
+ if ((mAtom.getFormalCharge() != null) && (mAtom.getFormalCharge() == 0)) continue;
3659
+
3660
+ Object o = mAtom.getProperty(ChargeConsumed.CHARGECONSUMED);
3661
+ if (o == null) mAtom.setProperty(ChargeConsumed.CHARGECONSUMED,new ChargeConsumed(mAtom));
3662
+ else if (((ChargeConsumed)o).getCharge()==0) continue; //already associated
3663
+
3664
+ ChargeConsumed mCharge = (ChargeConsumed)mAtom.getProperty(ChargeConsumed.CHARGECONSUMED);
3665
+
3666
+ if (mCharge.compatible((ChargeConsumed) aCharge)) {
3667
+ mCharge.consume((ChargeConsumed) aCharge);
3668
+ if (a.getBond(atom,mAtom) == null) {
3669
+ /*TODO replace MyAssociationBond with Association
3670
+ * once QueryBond matches method accepts ElectronContainer instead of Bond
3671
+ */
3672
+ //Association ionicBond = new Association(atom,mAtom);
3673
+ MyAssociationBond ionicBond = new MyAssociationBond(atom,mAtom);
3674
+ logger.fine("Association between atom\t"+atom.getSymbol()+"\tand\t"+mAtom.getSymbol());
3675
+
3676
+ a.addElectronContainer(ionicBond);
3677
+ ionicBonds ++;
3678
+ } else logger.fine("Bond already exists : atom\t"+atom.getSymbol()+"\tand\t"+mAtom.getSymbol());
3679
+ break;
3680
+ }
3681
+ }
3682
+ }
3683
+ }
3684
+ }
3685
+ //verify if all atoms are matched
3686
+ for (int j=0;j<match.size();j++) {
3687
+ Object o = ((IAtom) match.get(j)).getProperty(ChargeConsumed.CHARGECONSUMED);
3688
+ if (o==null) {
3689
+ notMatched.append('\t');
3690
+ notMatched.append(((IAtom)match.get(j)).getSymbol());
3691
+ } else if (( (ChargeConsumed) o).getCharge() != 0) {
3692
+ notMatched.append('\t');
3693
+ notMatched.append(((IAtom)match.get(j)).getSymbol());
3694
+ }
3695
+ }
3696
+
3697
+ }
3698
+ if (notMatched.toString().length()>0)
3699
+ throw new CDKException("Can't find an ionic bond for atom(s)\t"+notMatched.toString());
3700
+
3701
+ logger.fine("Ionic bonds found\t"+ionicBonds);
3702
+ return ionicBonds;
3703
+ }
3704
+ /**
3705
+ * Identifies the fragment to be detached and breaks the relevant bonds
3706
+ * In order to function properly, the group has to be defined with at least one atom
3707
+ * marked with setProperty(DONTMARK,dontMark). This defined the bond to break.
3708
+ * See {@link #DONTMARK}
3709
+ * @param a AtomContainer to be processed
3710
+ * @param q {@link QueryAtomContainer} defines the group to be detached
3711
+ * @return {@link SetOfAtomContainers} set of {@link AtomContainer} resulted
3712
+ * by breaking bonds as above. Hydrogens are added on the broken end of each bond
3713
+ *TODO care for bond orders!
3714
+ */
3715
+ public static IMoleculeSet detachGroup(IAtomContainer a, QueryAtomContainer q) {
3716
+ IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
3717
+
3718
+ List list = FunctionalGroups.getUniqueBondMap(a, q,needsPreprocessing(q));
3719
+ if ((list == null) || (list.size() == 0)) return null;
3720
+ markMaps(a,q,list);
3721
+ ArrayList<IBond> bondsToBreak = new ArrayList<IBond>();
3722
+ for (int j = 0; j < list.size(); j++) {
3723
+ List first = (List)list.get(j);
3724
+ for (int i = 0; i < first.size(); i++) {
3725
+ RMap rmap = (RMap)first.get(i);
3726
+ IBond b2 = q.getBond(rmap.getId2());
3727
+ //IAtom[] a2 = b2.getAtoms();
3728
+
3729
+ //will break bonds that does not belong to the group but to the connected fragments
3730
+ //org.openscience.cdk.interfaces.Atom deleteAtom = null;
3731
+ IAtom stayAtom = null;
3732
+ //if the bond belongs to the group, the stayAtom will remain null
3733
+ for (int k=0; k<b2.getAtomCount();k++)
3734
+ if (b2.getAtom(k) instanceof ReallyAnyAtom) stayAtom = b2.getAtom(k);
3735
+ else {
3736
+ Object o = b2.getAtom(k).getProperty(DONTMARK);
3737
+ if ((o != null) && (o.equals(q.getID()))) stayAtom = b2.getAtom(k);
3738
+ //else deleteAtom = a2[k];
3739
+ }
3740
+
3741
+ if (stayAtom != null) {
3742
+ //gather all bonds to be broken in a list
3743
+ IBond b1 = a.getBond(rmap.getId1());
3744
+ if (bondsToBreak.indexOf(b1) == -1)
3745
+ bondsToBreak.add(b1);
3746
+ break;
3747
+ }
3748
+ }
3749
+
3750
+ }
3751
+ if (logger.isLoggable(Level.FINE))
3752
+ for (int i=0; i< bondsToBreak.size();i++) {
3753
+ IBond b = (IBond)bondsToBreak.get(i);
3754
+ logger.fine("Break bond between\t"+b.getAtom(0).getSymbol()+"\t"+b.getAtom(1).getSymbol());
3755
+ }
3756
+ for (int i=0; i< bondsToBreak.size();i++) {
3757
+ IBond b = bondsToBreak.get(i);
3758
+ //IAtom[] a1 = b.getAtoms();
3759
+ a.removeElectronContainer(b);
3760
+ IAtom h = null;
3761
+ for (int k=0; k<b.getAtomCount();k++) {
3762
+ IAtom a1 = b.getAtom(k);
3763
+ if (q.getID().equals(CARBOXYLIC_ACID_SALT))
3764
+ if (a1.getSymbol().equals("O") && (a1.getFormalCharge() != null) && (a1.getFormalCharge()==-1)) {
3765
+ a1.setFormalCharge(0);
3766
+ h = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3767
+ a.addAtom(h);
3768
+ a.addBond(MoleculeTools.newBond(builder,a1,h));
3769
+ a1.removeProperty(q.getID());
3770
+ } else {
3771
+ a1.setFormalCharge(0);
3772
+ //a1[k].removeProperty(DONTMARK);
3773
+ //a1[k].setProperty(q.getID(),new Boolean(true));
3774
+ }
3775
+ else if (q.getID().equals(HYDROCHLORIDE_OF_AMINE)) {
3776
+ if (a1.getSymbol().equals("N") && (a1.getFormalCharge() != null) && (a1.getFormalCharge()==1)) {
3777
+ a1.setFormalCharge(0);
3778
+ //remove h
3779
+ List neighbors = a.getConnectedAtomsList(a1);
3780
+ IAtom cl = null;
3781
+ for (int ih=0;ih<neighbors.size();ih++) {
3782
+ IAtom nh = (IAtom)neighbors.get(ih);
3783
+ if (nh.getSymbol().equals("H")) {
3784
+ logger.fine("a H atom connected to N will be moved to Cl");
3785
+ a.removeBond(a1,nh);
3786
+ cl = b.getAtom((k+1)%2);
3787
+ //cl = a1[(k+1)%2]; //TODO this assumes two atoms in the bond
3788
+ if (cl.getSymbol().equals("Cl")) {
3789
+ cl.setFormalCharge(0);
3790
+ a.addBond(MoleculeTools.newBond(builder,cl,nh));
3791
+ nh.removeProperty(q.getID());
3792
+ } else logger.fine("Expected Cl atom but found\t"+cl);
3793
+ break;
3794
+ }
3795
+ }
3796
+
3797
+ } else;
3798
+ /*{
3799
+ a1[k].setFormalCharge(0);
3800
+ h = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3801
+ a.addAtom(h);
3802
+ a.addBond(MoleculeTools.newBond(builder,a1[k],h));
3803
+ }*/
3804
+ }else if (q.getID().equals(LACTONE)) {
3805
+ if (a1.getSymbol().equals("O")) {
3806
+ h = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3807
+ a.addAtom(h);
3808
+ a.addBond(MoleculeTools.newBond(builder,a1,h));
3809
+ a1.removeProperty(q.getID());
3810
+ } else { // atatch OH
3811
+ h = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3812
+ a.addAtom(h);
3813
+ IAtom o = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.OXYGEN);
3814
+ a.addAtom(o);
3815
+ a.addBond(MoleculeTools.newBond(builder,o,h));
3816
+ a.addBond(MoleculeTools.newBond(builder,a1,o));
3817
+
3818
+ }
3819
+ } else {
3820
+ int hydrogens = a1.getValency() - a.getConnectedAtomsCount(a1);
3821
+ for (int nh=0; nh < hydrogens; nh++) {
3822
+ h = MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.HYDROGEN);
3823
+ a.addAtom(h);
3824
+ a.addBond(MoleculeTools.newBond(builder,a1,h));
3825
+ }
3826
+ }
3827
+ }
3828
+ }
3829
+ if ( bondsToBreak.size() > 0)
3830
+ return ConnectivityChecker.partitionIntoMolecules(a);
3831
+ else return null;
3832
+ }
3833
+ public static void clearMark(IAtomContainer a, QueryAtomContainer q) {
3834
+ clearMark(a,q.getID());
3835
+ }
3836
+ public static void clearMark(IAtomContainer a, Object id) {
3837
+
3838
+
3839
+ for (int i=0; i < a.getBondCount();i++) {
3840
+ IBond b = a.getBond(i);
3841
+ b.removeProperty(id);
3842
+ b.removeProperty(ALLOCATED);
3843
+ b.removeProperty(DONTMARK);
3844
+
3845
+ for (int k=0; k < b.getAtomCount();k++) {
3846
+ IAtom atom = b.getAtom(k);
3847
+ atom.removeProperty(id);
3848
+ atom.removeProperty(DONTMARK);
3849
+ atom.removeProperty(ALLOCATED);
3850
+ }
3851
+ }
3852
+
3853
+ }
3854
+ public static void clearMarks(IAtomContainer a) {
3855
+ for (int i=0; i < a.getBondCount();i++)
3856
+ a.getBond(i).getProperties().clear();
3857
+ for (int k=0; k < a.getAtomCount();k++)
3858
+ a.getAtom(k).getProperties().clear();
3859
+
3860
+ }
3861
+ /**
3862
+ *
3863
+ * @param size
3864
+ * @return ring
3865
+ */
3866
+ public static QueryAtomContainer ring(int size) {
3867
+ QueryAtomContainer q = new QueryAtomContainer();
3868
+ q.setID("RING "+Integer.toString(size));
3869
+ SymbolQueryAtom[] c= new SymbolQueryAtom[size];
3870
+ ReallyAnyAtom[] h= new ReallyAnyAtom[size];
3871
+ for (int i=0;i < size; i++) {
3872
+ c[i] = new SymbolQueryAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
3873
+ c[i].setProperty(RING_NUMBERING,new Integer(i));
3874
+ q.addAtom(c[i]);
3875
+ if (i>0) q.addBond(new AnyOrderQueryBond(c[i],c[i-1],IBond.Order.SINGLE));
3876
+ h[i] = new ReallyAnyAtom();
3877
+ h[i].setProperty(RING_NUMBERING,new Integer(i));
3878
+ q.addAtom(h[i]);
3879
+ q.addBond(new AnyOrderQueryBond(c[i],h[i],IBond.Order.SINGLE));
3880
+ }
3881
+ q.addBond(new AnyOrderQueryBond(c[0],c[size-1],IBond.Order.SINGLE));
3882
+ return q;
3883
+ }
3884
+ /**
3885
+ *
3886
+ * @param mol
3887
+ * @param q
3888
+ */
3889
+ public static void markAtomsInRing(IAtomContainer mol, QueryAtomContainer q) {
3890
+ try {
3891
+ List list = UniversalIsomorphismTester.getSubgraphAtomsMap(mol,q);
3892
+ if (list != null)
3893
+ for (int i=0; i < list.size();i++) {
3894
+ RMap map = (RMap)list.get(i);
3895
+ Object p = q.getAtom(map.getId2()).getProperty(RING_NUMBERING);
3896
+ if (p != null)
3897
+ mol.getAtom(map.getId1()).setProperty(RING_NUMBERING,p);
3898
+ }
3899
+
3900
+ } catch (CDKException x) {
3901
+ logger.log(Level.SEVERE,x.getMessage(),x);
3902
+ }
3903
+
3904
+ }
3905
+
3906
+ /**
3907
+ *
3908
+ * @param mol {@link AtomContainer}
3909
+ * @return the length of the longest carbon chain
3910
+ */
3911
+ public static int getLongestCarbonChainLength(IAtomContainer mol) {
3912
+ double[][] conMat = ConnectionMatrix.getMatrix(mol);
3913
+ int[][] apsp = PathTools.computeFloydAPSP(conMat);
3914
+ int maxPathLength = 0;
3915
+ int bestStartAtom = -1;
3916
+ int bestEndAtom = -1;
3917
+ IAtom atom = null;
3918
+ IAtomContainer path = new org.openscience.cdk.AtomContainer();
3919
+
3920
+ for (int f = 0; f < apsp.length; f++) {
3921
+ atom = mol.getAtom(f);
3922
+ if (mol.getConnectedBondsCount(atom) == 1) {
3923
+ for (int g = 0; g < apsp.length; g++) {
3924
+ if (apsp[f][g] > maxPathLength) {
3925
+ try {
3926
+ path.removeAllElements();
3927
+ for (int i=0;i< mol.getAtomCount();i++)
3928
+ mol.getAtom(i).setFlag(CDKConstants.VISITED,false);
3929
+ if (PathTools.depthFirstTargetSearch(
3930
+ mol,
3931
+ mol.getAtom(f),
3932
+ mol.getAtom(g),path)) {
3933
+
3934
+ int c =0;
3935
+ for (int i=0;i< path.getAtomCount();i++)
3936
+ if (path.getAtom(i).getSymbol().equals("C")) c++;
3937
+
3938
+ if (c > maxPathLength) {
3939
+ maxPathLength = c;
3940
+ bestStartAtom = f;
3941
+ bestEndAtom = g;
3942
+ }
3943
+ }
3944
+ } catch (Exception x) {
3945
+ x.printStackTrace();
3946
+ }
3947
+ }
3948
+ }
3949
+ }
3950
+ }
3951
+ for (int i=0;i< mol.getAtomCount();i++)
3952
+ mol.getAtom(i).setFlag(CDKConstants.VISITED,false);
3953
+ logger.fine("Longest chaing in molecule is of length " + maxPathLength + " between atoms " + (bestStartAtom+1) + " and " + (bestEndAtom+1) );
3954
+
3955
+ return maxPathLength;
3956
+ }
3957
+
3958
+ public static QueryAtomContainers getAllGroups() {
3959
+ String[] metals = {"Na","K","Ca"};
3960
+ QueryAtomContainers list = new QueryAtomContainers();
3961
+ IAtomContainer m = new org.openscience.cdk.AtomContainer();
3962
+ m.addAtom(MoleculeTools.newAtom(SilentChemObjectBuilder.getInstance(),Elements.CARBON));
3963
+ m.setID("Empty fragment");
3964
+ list.add(m);
3965
+ list.add(methyl());
3966
+ list.add(methoxy());
3967
+ list.add(ethyl());
3968
+ list.add(primaryAmine(false));
3969
+ list.add(secondaryAmine(false));
3970
+ list.add(tertiaryAmine());
3971
+ list.add(hydrochlorideOfAmine(1));
3972
+ list.add(sulphateOfAmine(1));
3973
+ list.add(cyano());
3974
+ list.add(nitro2double());
3975
+ list.add(nitro1double());
3976
+ list.add(Nnitroso());
3977
+ list.add(diAzo());
3978
+ list.add(triAzeno());
3979
+ list.add(quaternaryNitrogen1(false));
3980
+ list.add(carboxylicAcid());
3981
+ list.add(acyclic_acetal());
3982
+ list.add(acetal());
3983
+ list.add(ether());
3984
+ list.add(sulphide());
3985
+ list.add(mercaptan());
3986
+ list.add(thioester());
3987
+ list.add(ester());
3988
+ list.add(carbonate());
3989
+ list.add(anhydride());
3990
+ list.add(lactone(false));
3991
+ list.add(ketone());
3992
+ list.add(aldehyde());
3993
+ list.add(alcohol(false));
3994
+ list.add(sulphamate(metals));
3995
+ list.add(saltOfCarboxylicAcid(metals));
3996
+ list.add(sulphonate(metals));
3997
+ list.add(sulphate(metals));
3998
+ return list;
3999
+ }
4000
+
4001
+ }
4002
+ /**
4003
+ *
4004
+ * Used when recognising ionic bonds
4005
+ * @author Nina Jeliazkova
4006
+ * <b>Modified</b> 2005-10-22
4007
+ */
4008
+ class ChargeConsumed {
4009
+ protected IAtom atom;
4010
+ public static String CHARGECONSUMED = "ChargeConsumed";
4011
+ protected int charge=0;
4012
+ public ChargeConsumed(IAtom atom) {
4013
+ this.atom = atom;
4014
+ this.charge = atom.getFormalCharge();
4015
+ }
4016
+ public void consume(int amount) {
4017
+ charge = charge + amount;
4018
+ }
4019
+ public void consume(ChargeConsumed amount) {
4020
+ if (charge == - amount.getCharge()) {
4021
+ int newCharge = charge + amount.getCharge();
4022
+ amount.consume(charge);
4023
+ charge = newCharge;
4024
+ } else {
4025
+ int minCharge = charge;
4026
+ if (Math.abs(amount.getCharge()) < Math.abs(charge))
4027
+ minCharge = -amount.getCharge();
4028
+
4029
+ amount.consume(minCharge);
4030
+ consume(-minCharge);
4031
+ }
4032
+ }
4033
+ public int getCharge() {
4034
+ return charge;
4035
+ }
4036
+ public boolean compatible(ChargeConsumed c) {
4037
+ return (this.charge * c.getCharge()) < 0;
4038
+ }
4039
+ public String toString() {
4040
+ return atom.getSymbol() + "\tFormalCharge=" + atom.getFormalCharge() + "\tCharge Left=" + charge;
4041
+ }
4042
+
4043
+ }
4044
+
4045
+