rdkit_chem 2025.09.3.1-x86_64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. checksums.yaml +7 -0
  2. data/CMakeLists.txt +713 -0
  3. data/Code/CMakeLists.txt +44 -0
  4. data/Code/RubyWrappers/Abbreviations.i +19 -0
  5. data/Code/RubyWrappers/AddHs.i +34 -0
  6. data/Code/RubyWrappers/Atom.i +165 -0
  7. data/Code/RubyWrappers/AtomIterators.i +77 -0
  8. data/Code/RubyWrappers/AtomPairs.i +95 -0
  9. data/Code/RubyWrappers/AvalonLib.i +41 -0
  10. data/Code/RubyWrappers/BitOps.i +72 -0
  11. data/Code/RubyWrappers/Bond.i +87 -0
  12. data/Code/RubyWrappers/BondIterators.i +61 -0
  13. data/Code/RubyWrappers/CMakeLists.txt +67 -0
  14. data/Code/RubyWrappers/Canon.i +40 -0
  15. data/Code/RubyWrappers/ChemDraw.i +81 -0
  16. data/Code/RubyWrappers/ChemReactions.i +166 -0
  17. data/Code/RubyWrappers/ChemTransforms.i +126 -0
  18. data/Code/RubyWrappers/Conformer.i +69 -0
  19. data/Code/RubyWrappers/Descriptors.i +64 -0
  20. data/Code/RubyWrappers/Dict.i +45 -0
  21. data/Code/RubyWrappers/DistGeom.i +217 -0
  22. data/Code/RubyWrappers/DiversityPick.h +49 -0
  23. data/Code/RubyWrappers/DiversityPick.i +10 -0
  24. data/Code/RubyWrappers/ErrorGenerator.i +73 -0
  25. data/Code/RubyWrappers/ExplicitBitVect.i +76 -0
  26. data/Code/RubyWrappers/FMCS.i +63 -0
  27. data/Code/RubyWrappers/FilterCatalog.i +154 -0
  28. data/Code/RubyWrappers/Fingerprints.i +56 -0
  29. data/Code/RubyWrappers/ForceField.i +161 -0
  30. data/Code/RubyWrappers/GeneralizedSubstruct.i +38 -0
  31. data/Code/RubyWrappers/GenericRDKitException.h +27 -0
  32. data/Code/RubyWrappers/Inchi.i +38 -0
  33. data/Code/RubyWrappers/MolBundle.i +16 -0
  34. data/Code/RubyWrappers/MolDraw2D.i +117 -0
  35. data/Code/RubyWrappers/MolEnumerator.i +45 -0
  36. data/Code/RubyWrappers/MolHash.i +25 -0
  37. data/Code/RubyWrappers/MolOps.i +72 -0
  38. data/Code/RubyWrappers/MolStandardize.i +37 -0
  39. data/Code/RubyWrappers/MolSupplier.i +83 -0
  40. data/Code/RubyWrappers/MolTransforms.i +39 -0
  41. data/Code/RubyWrappers/MolWriters.i +41 -0
  42. data/Code/RubyWrappers/MonomerInfo.i +42 -0
  43. data/Code/RubyWrappers/MorganFingerprints.h +21 -0
  44. data/Code/RubyWrappers/MorganFingerprints.i +66 -0
  45. data/Code/RubyWrappers/PeriodicTable.i +44 -0
  46. data/Code/RubyWrappers/Queries.i +289 -0
  47. data/Code/RubyWrappers/QueryAtom.i +47 -0
  48. data/Code/RubyWrappers/QueryBond.i +47 -0
  49. data/Code/RubyWrappers/QueryOps.i +44 -0
  50. data/Code/RubyWrappers/RDKitExceptions.i +75 -0
  51. data/Code/RubyWrappers/RDLogger.i +74 -0
  52. data/Code/RubyWrappers/RDProps.i +44 -0
  53. data/Code/RubyWrappers/RGroupDecomposition.i +52 -0
  54. data/Code/RubyWrappers/ROMol.i +695 -0
  55. data/Code/RubyWrappers/RWMol.i +241 -0
  56. data/Code/RubyWrappers/RascalMCES.i +71 -0
  57. data/Code/RubyWrappers/ReactionFingerprints.i +37 -0
  58. data/Code/RubyWrappers/RingInfo.i +40 -0
  59. data/Code/RubyWrappers/Rings.i +40 -0
  60. data/Code/RubyWrappers/SanitException.i +100 -0
  61. data/Code/RubyWrappers/ScaffoldNetwork.i +28 -0
  62. data/Code/RubyWrappers/SmartsWrite.i +38 -0
  63. data/Code/RubyWrappers/SmilesParse.i +40 -0
  64. data/Code/RubyWrappers/SmilesWrite.i +42 -0
  65. data/Code/RubyWrappers/StereoGroup.i +16 -0
  66. data/Code/RubyWrappers/Streams.i +67 -0
  67. data/Code/RubyWrappers/Subgraphs.i +53 -0
  68. data/Code/RubyWrappers/Subset.i +75 -0
  69. data/Code/RubyWrappers/SubstanceGroup.i +91 -0
  70. data/Code/RubyWrappers/SubstructLibrary.i +80 -0
  71. data/Code/RubyWrappers/TautomerQuery.i +19 -0
  72. data/Code/RubyWrappers/Trajectory.i +34 -0
  73. data/Code/RubyWrappers/boost_tuple.i +64 -0
  74. data/Code/RubyWrappers/extend_std_vector.i +10 -0
  75. data/Code/RubyWrappers/gmwrapper/CMakeLists.txt +69 -0
  76. data/Code/RubyWrappers/gmwrapper/GraphMolRuby.i +431 -0
  77. data/Code/RubyWrappers/gmwrapper/std_list.i +65 -0
  78. data/Code/RubyWrappers/point.i +56 -0
  79. data/Code/RubyWrappers/transforms.i +60 -0
  80. data/Code/RubyWrappers/types.i +40 -0
  81. data/README.md +24 -0
  82. data/Rakefile +130 -0
  83. data/ext/rdkit_chem/CMakeLists.txt +69 -0
  84. data/ext/rdkit_chem/Makefile +5 -0
  85. data/ext/rdkit_chem/extconf.rb +84 -0
  86. data/lib/rdkit_chem/3.3.0/RDKitChem.so +0 -0
  87. data/lib/rdkit_chem/3.3.0/libRDKitAbbreviations.so +1 -0
  88. data/lib/rdkit_chem/3.3.0/libRDKitAbbreviations.so.1 +1 -0
  89. data/lib/rdkit_chem/3.3.0/libRDKitAbbreviations.so.1.2026.03.1pre +0 -0
  90. data/lib/rdkit_chem/3.3.0/libRDKitAlignment.so +1 -0
  91. data/lib/rdkit_chem/3.3.0/libRDKitAlignment.so.1 +1 -0
  92. data/lib/rdkit_chem/3.3.0/libRDKitAlignment.so.1.2026.03.1pre +0 -0
  93. data/lib/rdkit_chem/3.3.0/libRDKitCIPLabeler.so +1 -0
  94. data/lib/rdkit_chem/3.3.0/libRDKitCIPLabeler.so.1 +1 -0
  95. data/lib/rdkit_chem/3.3.0/libRDKitCIPLabeler.so.1.2026.03.1pre +0 -0
  96. data/lib/rdkit_chem/3.3.0/libRDKitCatalogs.so +1 -0
  97. data/lib/rdkit_chem/3.3.0/libRDKitCatalogs.so.1 +1 -0
  98. data/lib/rdkit_chem/3.3.0/libRDKitCatalogs.so.1.2026.03.1pre +0 -0
  99. data/lib/rdkit_chem/3.3.0/libRDKitChemDraw.so +1 -0
  100. data/lib/rdkit_chem/3.3.0/libRDKitChemDraw.so.1 +1 -0
  101. data/lib/rdkit_chem/3.3.0/libRDKitChemDraw.so.1.2026.03.1pre +0 -0
  102. data/lib/rdkit_chem/3.3.0/libRDKitChemReactions.so +1 -0
  103. data/lib/rdkit_chem/3.3.0/libRDKitChemReactions.so.1 +1 -0
  104. data/lib/rdkit_chem/3.3.0/libRDKitChemReactions.so.1.2026.03.1pre +0 -0
  105. data/lib/rdkit_chem/3.3.0/libRDKitChemTransforms.so +1 -0
  106. data/lib/rdkit_chem/3.3.0/libRDKitChemTransforms.so.1 +1 -0
  107. data/lib/rdkit_chem/3.3.0/libRDKitChemTransforms.so.1.2026.03.1pre +0 -0
  108. data/lib/rdkit_chem/3.3.0/libRDKitChemicalFeatures.so +1 -0
  109. data/lib/rdkit_chem/3.3.0/libRDKitChemicalFeatures.so.1 +1 -0
  110. data/lib/rdkit_chem/3.3.0/libRDKitChemicalFeatures.so.1.2026.03.1pre +0 -0
  111. data/lib/rdkit_chem/3.3.0/libRDKitDataStructs.so +1 -0
  112. data/lib/rdkit_chem/3.3.0/libRDKitDataStructs.so.1 +1 -0
  113. data/lib/rdkit_chem/3.3.0/libRDKitDataStructs.so.1.2026.03.1pre +0 -0
  114. data/lib/rdkit_chem/3.3.0/libRDKitDepictor.so +1 -0
  115. data/lib/rdkit_chem/3.3.0/libRDKitDepictor.so.1 +1 -0
  116. data/lib/rdkit_chem/3.3.0/libRDKitDepictor.so.1.2026.03.1pre +0 -0
  117. data/lib/rdkit_chem/3.3.0/libRDKitDeprotect.so +1 -0
  118. data/lib/rdkit_chem/3.3.0/libRDKitDeprotect.so.1 +1 -0
  119. data/lib/rdkit_chem/3.3.0/libRDKitDeprotect.so.1.2026.03.1pre +0 -0
  120. data/lib/rdkit_chem/3.3.0/libRDKitDescriptors.so +1 -0
  121. data/lib/rdkit_chem/3.3.0/libRDKitDescriptors.so.1 +1 -0
  122. data/lib/rdkit_chem/3.3.0/libRDKitDescriptors.so.1.2026.03.1pre +0 -0
  123. data/lib/rdkit_chem/3.3.0/libRDKitDistGeomHelpers.so +1 -0
  124. data/lib/rdkit_chem/3.3.0/libRDKitDistGeomHelpers.so.1 +1 -0
  125. data/lib/rdkit_chem/3.3.0/libRDKitDistGeomHelpers.so.1.2026.03.1pre +0 -0
  126. data/lib/rdkit_chem/3.3.0/libRDKitDistGeometry.so +1 -0
  127. data/lib/rdkit_chem/3.3.0/libRDKitDistGeometry.so.1 +1 -0
  128. data/lib/rdkit_chem/3.3.0/libRDKitDistGeometry.so.1.2026.03.1pre +0 -0
  129. data/lib/rdkit_chem/3.3.0/libRDKitEigenSolvers.so +1 -0
  130. data/lib/rdkit_chem/3.3.0/libRDKitEigenSolvers.so.1 +1 -0
  131. data/lib/rdkit_chem/3.3.0/libRDKitEigenSolvers.so.1.2026.03.1pre +0 -0
  132. data/lib/rdkit_chem/3.3.0/libRDKitEnumerateStereoisomers.so +1 -0
  133. data/lib/rdkit_chem/3.3.0/libRDKitEnumerateStereoisomers.so.1 +1 -0
  134. data/lib/rdkit_chem/3.3.0/libRDKitEnumerateStereoisomers.so.1.2026.03.1pre +0 -0
  135. data/lib/rdkit_chem/3.3.0/libRDKitFMCS.so +1 -0
  136. data/lib/rdkit_chem/3.3.0/libRDKitFMCS.so.1 +1 -0
  137. data/lib/rdkit_chem/3.3.0/libRDKitFMCS.so.1.2026.03.1pre +0 -0
  138. data/lib/rdkit_chem/3.3.0/libRDKitFileParsers.so +1 -0
  139. data/lib/rdkit_chem/3.3.0/libRDKitFileParsers.so.1 +1 -0
  140. data/lib/rdkit_chem/3.3.0/libRDKitFileParsers.so.1.2026.03.1pre +0 -0
  141. data/lib/rdkit_chem/3.3.0/libRDKitFilterCatalog.so +1 -0
  142. data/lib/rdkit_chem/3.3.0/libRDKitFilterCatalog.so.1 +1 -0
  143. data/lib/rdkit_chem/3.3.0/libRDKitFilterCatalog.so.1.2026.03.1pre +0 -0
  144. data/lib/rdkit_chem/3.3.0/libRDKitFingerprints.so +1 -0
  145. data/lib/rdkit_chem/3.3.0/libRDKitFingerprints.so.1 +1 -0
  146. data/lib/rdkit_chem/3.3.0/libRDKitFingerprints.so.1.2026.03.1pre +0 -0
  147. data/lib/rdkit_chem/3.3.0/libRDKitForceField.so +1 -0
  148. data/lib/rdkit_chem/3.3.0/libRDKitForceField.so.1 +1 -0
  149. data/lib/rdkit_chem/3.3.0/libRDKitForceField.so.1.2026.03.1pre +0 -0
  150. data/lib/rdkit_chem/3.3.0/libRDKitForceFieldHelpers.so +1 -0
  151. data/lib/rdkit_chem/3.3.0/libRDKitForceFieldHelpers.so.1 +1 -0
  152. data/lib/rdkit_chem/3.3.0/libRDKitForceFieldHelpers.so.1.2026.03.1pre +0 -0
  153. data/lib/rdkit_chem/3.3.0/libRDKitFragCatalog.so +1 -0
  154. data/lib/rdkit_chem/3.3.0/libRDKitFragCatalog.so.1 +1 -0
  155. data/lib/rdkit_chem/3.3.0/libRDKitFragCatalog.so.1.2026.03.1pre +0 -0
  156. data/lib/rdkit_chem/3.3.0/libRDKitGeneralizedSubstruct.so +1 -0
  157. data/lib/rdkit_chem/3.3.0/libRDKitGeneralizedSubstruct.so.1 +1 -0
  158. data/lib/rdkit_chem/3.3.0/libRDKitGeneralizedSubstruct.so.1.2026.03.1pre +0 -0
  159. data/lib/rdkit_chem/3.3.0/libRDKitGenericGroups.so +1 -0
  160. data/lib/rdkit_chem/3.3.0/libRDKitGenericGroups.so.1 +1 -0
  161. data/lib/rdkit_chem/3.3.0/libRDKitGenericGroups.so.1.2026.03.1pre +0 -0
  162. data/lib/rdkit_chem/3.3.0/libRDKitGraphMol.so +1 -0
  163. data/lib/rdkit_chem/3.3.0/libRDKitGraphMol.so.1 +1 -0
  164. data/lib/rdkit_chem/3.3.0/libRDKitGraphMol.so.1.2026.03.1pre +0 -0
  165. data/lib/rdkit_chem/3.3.0/libRDKitInfoTheory.so +1 -0
  166. data/lib/rdkit_chem/3.3.0/libRDKitInfoTheory.so.1 +1 -0
  167. data/lib/rdkit_chem/3.3.0/libRDKitInfoTheory.so.1.2026.03.1pre +0 -0
  168. data/lib/rdkit_chem/3.3.0/libRDKitMMPA.so +1 -0
  169. data/lib/rdkit_chem/3.3.0/libRDKitMMPA.so.1 +1 -0
  170. data/lib/rdkit_chem/3.3.0/libRDKitMMPA.so.1.2026.03.1pre +0 -0
  171. data/lib/rdkit_chem/3.3.0/libRDKitMarvinParser.so +1 -0
  172. data/lib/rdkit_chem/3.3.0/libRDKitMarvinParser.so.1 +1 -0
  173. data/lib/rdkit_chem/3.3.0/libRDKitMarvinParser.so.1.2026.03.1pre +0 -0
  174. data/lib/rdkit_chem/3.3.0/libRDKitMolAlign.so +1 -0
  175. data/lib/rdkit_chem/3.3.0/libRDKitMolAlign.so.1 +1 -0
  176. data/lib/rdkit_chem/3.3.0/libRDKitMolAlign.so.1.2026.03.1pre +0 -0
  177. data/lib/rdkit_chem/3.3.0/libRDKitMolCatalog.so +1 -0
  178. data/lib/rdkit_chem/3.3.0/libRDKitMolCatalog.so.1 +1 -0
  179. data/lib/rdkit_chem/3.3.0/libRDKitMolCatalog.so.1.2026.03.1pre +0 -0
  180. data/lib/rdkit_chem/3.3.0/libRDKitMolChemicalFeatures.so +1 -0
  181. data/lib/rdkit_chem/3.3.0/libRDKitMolChemicalFeatures.so.1 +1 -0
  182. data/lib/rdkit_chem/3.3.0/libRDKitMolChemicalFeatures.so.1.2026.03.1pre +0 -0
  183. data/lib/rdkit_chem/3.3.0/libRDKitMolDraw2D.so +1 -0
  184. data/lib/rdkit_chem/3.3.0/libRDKitMolDraw2D.so.1 +1 -0
  185. data/lib/rdkit_chem/3.3.0/libRDKitMolDraw2D.so.1.2026.03.1pre +0 -0
  186. data/lib/rdkit_chem/3.3.0/libRDKitMolEnumerator.so +1 -0
  187. data/lib/rdkit_chem/3.3.0/libRDKitMolEnumerator.so.1 +1 -0
  188. data/lib/rdkit_chem/3.3.0/libRDKitMolEnumerator.so.1.2026.03.1pre +0 -0
  189. data/lib/rdkit_chem/3.3.0/libRDKitMolHash.so +1 -0
  190. data/lib/rdkit_chem/3.3.0/libRDKitMolHash.so.1 +1 -0
  191. data/lib/rdkit_chem/3.3.0/libRDKitMolHash.so.1.2026.03.1pre +0 -0
  192. data/lib/rdkit_chem/3.3.0/libRDKitMolInteractionFields.so +1 -0
  193. data/lib/rdkit_chem/3.3.0/libRDKitMolInteractionFields.so.1 +1 -0
  194. data/lib/rdkit_chem/3.3.0/libRDKitMolInteractionFields.so.1.2026.03.1pre +0 -0
  195. data/lib/rdkit_chem/3.3.0/libRDKitMolInterchange.so +1 -0
  196. data/lib/rdkit_chem/3.3.0/libRDKitMolInterchange.so.1 +1 -0
  197. data/lib/rdkit_chem/3.3.0/libRDKitMolInterchange.so.1.2026.03.1pre +0 -0
  198. data/lib/rdkit_chem/3.3.0/libRDKitMolProcessing.so +1 -0
  199. data/lib/rdkit_chem/3.3.0/libRDKitMolProcessing.so.1 +1 -0
  200. data/lib/rdkit_chem/3.3.0/libRDKitMolProcessing.so.1.2026.03.1pre +0 -0
  201. data/lib/rdkit_chem/3.3.0/libRDKitMolStandardize.so +1 -0
  202. data/lib/rdkit_chem/3.3.0/libRDKitMolStandardize.so.1 +1 -0
  203. data/lib/rdkit_chem/3.3.0/libRDKitMolStandardize.so.1.2026.03.1pre +0 -0
  204. data/lib/rdkit_chem/3.3.0/libRDKitMolTransforms.so +1 -0
  205. data/lib/rdkit_chem/3.3.0/libRDKitMolTransforms.so.1 +1 -0
  206. data/lib/rdkit_chem/3.3.0/libRDKitMolTransforms.so.1.2026.03.1pre +0 -0
  207. data/lib/rdkit_chem/3.3.0/libRDKitO3AAlign.so +1 -0
  208. data/lib/rdkit_chem/3.3.0/libRDKitO3AAlign.so.1 +1 -0
  209. data/lib/rdkit_chem/3.3.0/libRDKitO3AAlign.so.1.2026.03.1pre +0 -0
  210. data/lib/rdkit_chem/3.3.0/libRDKitOptimizer.so +1 -0
  211. data/lib/rdkit_chem/3.3.0/libRDKitOptimizer.so.1 +1 -0
  212. data/lib/rdkit_chem/3.3.0/libRDKitOptimizer.so.1.2026.03.1pre +0 -0
  213. data/lib/rdkit_chem/3.3.0/libRDKitPartialCharges.so +1 -0
  214. data/lib/rdkit_chem/3.3.0/libRDKitPartialCharges.so.1 +1 -0
  215. data/lib/rdkit_chem/3.3.0/libRDKitPartialCharges.so.1.2026.03.1pre +0 -0
  216. data/lib/rdkit_chem/3.3.0/libRDKitPubChemShape.so +1 -0
  217. data/lib/rdkit_chem/3.3.0/libRDKitPubChemShape.so.1 +1 -0
  218. data/lib/rdkit_chem/3.3.0/libRDKitPubChemShape.so.1.2026.03.1pre +0 -0
  219. data/lib/rdkit_chem/3.3.0/libRDKitRDChemDrawLib.so +1 -0
  220. data/lib/rdkit_chem/3.3.0/libRDKitRDChemDrawLib.so.1 +1 -0
  221. data/lib/rdkit_chem/3.3.0/libRDKitRDChemDrawLib.so.1.2026.03.1pre +0 -0
  222. data/lib/rdkit_chem/3.3.0/libRDKitRDChemDrawReactionLib.so +1 -0
  223. data/lib/rdkit_chem/3.3.0/libRDKitRDChemDrawReactionLib.so.1 +1 -0
  224. data/lib/rdkit_chem/3.3.0/libRDKitRDChemDrawReactionLib.so.1.2026.03.1pre +0 -0
  225. data/lib/rdkit_chem/3.3.0/libRDKitRDGeneral.so +1 -0
  226. data/lib/rdkit_chem/3.3.0/libRDKitRDGeneral.so.1 +1 -0
  227. data/lib/rdkit_chem/3.3.0/libRDKitRDGeneral.so.1.2026.03.1pre +0 -0
  228. data/lib/rdkit_chem/3.3.0/libRDKitRDGeometryLib.so +1 -0
  229. data/lib/rdkit_chem/3.3.0/libRDKitRDGeometryLib.so.1 +1 -0
  230. data/lib/rdkit_chem/3.3.0/libRDKitRDGeometryLib.so.1.2026.03.1pre +0 -0
  231. data/lib/rdkit_chem/3.3.0/libRDKitRDStreams.so +1 -0
  232. data/lib/rdkit_chem/3.3.0/libRDKitRDStreams.so.1 +1 -0
  233. data/lib/rdkit_chem/3.3.0/libRDKitRDStreams.so.1.2026.03.1pre +0 -0
  234. data/lib/rdkit_chem/3.3.0/libRDKitRGroupDecomposition.so +1 -0
  235. data/lib/rdkit_chem/3.3.0/libRDKitRGroupDecomposition.so.1 +1 -0
  236. data/lib/rdkit_chem/3.3.0/libRDKitRGroupDecomposition.so.1.2026.03.1pre +0 -0
  237. data/lib/rdkit_chem/3.3.0/libRDKitRascalMCES.so +1 -0
  238. data/lib/rdkit_chem/3.3.0/libRDKitRascalMCES.so.1 +1 -0
  239. data/lib/rdkit_chem/3.3.0/libRDKitRascalMCES.so.1.2026.03.1pre +0 -0
  240. data/lib/rdkit_chem/3.3.0/libRDKitReducedGraphs.so +1 -0
  241. data/lib/rdkit_chem/3.3.0/libRDKitReducedGraphs.so.1 +1 -0
  242. data/lib/rdkit_chem/3.3.0/libRDKitReducedGraphs.so.1.2026.03.1pre +0 -0
  243. data/lib/rdkit_chem/3.3.0/libRDKitRingDecomposerLib.so +1 -0
  244. data/lib/rdkit_chem/3.3.0/libRDKitRingDecomposerLib.so.1 +1 -0
  245. data/lib/rdkit_chem/3.3.0/libRDKitRingDecomposerLib.so.1.2026.03.1pre +0 -0
  246. data/lib/rdkit_chem/3.3.0/libRDKitSLNParse.so +1 -0
  247. data/lib/rdkit_chem/3.3.0/libRDKitSLNParse.so.1 +1 -0
  248. data/lib/rdkit_chem/3.3.0/libRDKitSLNParse.so.1.2026.03.1pre +0 -0
  249. data/lib/rdkit_chem/3.3.0/libRDKitScaffoldNetwork.so +1 -0
  250. data/lib/rdkit_chem/3.3.0/libRDKitScaffoldNetwork.so.1 +1 -0
  251. data/lib/rdkit_chem/3.3.0/libRDKitScaffoldNetwork.so.1.2026.03.1pre +0 -0
  252. data/lib/rdkit_chem/3.3.0/libRDKitShapeHelpers.so +1 -0
  253. data/lib/rdkit_chem/3.3.0/libRDKitShapeHelpers.so.1 +1 -0
  254. data/lib/rdkit_chem/3.3.0/libRDKitShapeHelpers.so.1.2026.03.1pre +0 -0
  255. data/lib/rdkit_chem/3.3.0/libRDKitSimDivPickers.so +1 -0
  256. data/lib/rdkit_chem/3.3.0/libRDKitSimDivPickers.so.1 +1 -0
  257. data/lib/rdkit_chem/3.3.0/libRDKitSimDivPickers.so.1.2026.03.1pre +0 -0
  258. data/lib/rdkit_chem/3.3.0/libRDKitSmilesParse.so +1 -0
  259. data/lib/rdkit_chem/3.3.0/libRDKitSmilesParse.so.1 +1 -0
  260. data/lib/rdkit_chem/3.3.0/libRDKitSmilesParse.so.1.2026.03.1pre +0 -0
  261. data/lib/rdkit_chem/3.3.0/libRDKitSubgraphs.so +1 -0
  262. data/lib/rdkit_chem/3.3.0/libRDKitSubgraphs.so.1 +1 -0
  263. data/lib/rdkit_chem/3.3.0/libRDKitSubgraphs.so.1.2026.03.1pre +0 -0
  264. data/lib/rdkit_chem/3.3.0/libRDKitSubstructLibrary.so +1 -0
  265. data/lib/rdkit_chem/3.3.0/libRDKitSubstructLibrary.so.1 +1 -0
  266. data/lib/rdkit_chem/3.3.0/libRDKitSubstructLibrary.so.1.2026.03.1pre +0 -0
  267. data/lib/rdkit_chem/3.3.0/libRDKitSubstructMatch.so +1 -0
  268. data/lib/rdkit_chem/3.3.0/libRDKitSubstructMatch.so.1 +1 -0
  269. data/lib/rdkit_chem/3.3.0/libRDKitSubstructMatch.so.1.2026.03.1pre +0 -0
  270. data/lib/rdkit_chem/3.3.0/libRDKitSynthonSpaceSearch.so +1 -0
  271. data/lib/rdkit_chem/3.3.0/libRDKitSynthonSpaceSearch.so.1 +1 -0
  272. data/lib/rdkit_chem/3.3.0/libRDKitSynthonSpaceSearch.so.1.2026.03.1pre +0 -0
  273. data/lib/rdkit_chem/3.3.0/libRDKitTautomerQuery.so +1 -0
  274. data/lib/rdkit_chem/3.3.0/libRDKitTautomerQuery.so.1 +1 -0
  275. data/lib/rdkit_chem/3.3.0/libRDKitTautomerQuery.so.1.2026.03.1pre +0 -0
  276. data/lib/rdkit_chem/3.3.0/libRDKitTrajectory.so +1 -0
  277. data/lib/rdkit_chem/3.3.0/libRDKitTrajectory.so.1 +1 -0
  278. data/lib/rdkit_chem/3.3.0/libRDKitTrajectory.so.1.2026.03.1pre +0 -0
  279. data/lib/rdkit_chem/3.3.0/libRDKitcoordgen.so +1 -0
  280. data/lib/rdkit_chem/3.3.0/libRDKitcoordgen.so.1 +1 -0
  281. data/lib/rdkit_chem/3.3.0/libRDKitcoordgen.so.1.2026.03.1pre +0 -0
  282. data/lib/rdkit_chem/3.3.0/libRDKitga.so +1 -0
  283. data/lib/rdkit_chem/3.3.0/libRDKitga.so.1 +1 -0
  284. data/lib/rdkit_chem/3.3.0/libRDKitga.so.1.2026.03.1pre +0 -0
  285. data/lib/rdkit_chem/3.3.0/libRDKithc.so +1 -0
  286. data/lib/rdkit_chem/3.3.0/libRDKithc.so.1 +1 -0
  287. data/lib/rdkit_chem/3.3.0/libRDKithc.so.1.2026.03.1pre +0 -0
  288. data/lib/rdkit_chem/3.3.0/libRDKitmaeparser.so +1 -0
  289. data/lib/rdkit_chem/3.3.0/libRDKitmaeparser.so.1 +1 -0
  290. data/lib/rdkit_chem/3.3.0/libRDKitmaeparser.so.1.2026.03.1pre +0 -0
  291. data/lib/rdkit_chem/3.3.0/libRDKitpubchem_align3d.so +1 -0
  292. data/lib/rdkit_chem/3.3.0/libRDKitpubchem_align3d.so.1 +1 -0
  293. data/lib/rdkit_chem/3.3.0/libRDKitpubchem_align3d.so.1.2026.03.1pre +0 -0
  294. data/lib/rdkit_chem/version.rb +4 -0
  295. data/lib/rdkit_chem.rb +32 -0
  296. data/test/test_rdkit_chem.rb +47 -0
  297. metadata +364 -0
@@ -0,0 +1,695 @@
1
+ /*
2
+ *
3
+ * Copyright (c) 2010-2021, Novartis Institutes for BioMedical Research Inc.
4
+ * and other RDKit contributors
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are
9
+ * met:
10
+ *
11
+ * * Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * * Redistributions in binary form must reproduce the above
14
+ * copyright notice, this list of conditions and the following
15
+ * disclaimer in the documentation and/or other materials provided
16
+ * with the distribution.
17
+ * * Neither the name of Novartis Institutes for BioMedical Research Inc.
18
+ * nor the names of its contributors may be used to endorse or promote
19
+ * products derived from this software without specific prior written
20
+ permission.
21
+ *
22
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
+ */
34
+ %include "std_pair.i"
35
+ %include "std_string.i"
36
+ %include "std_vector.i"
37
+
38
+ %{
39
+ #include <RDGeneral/types.h>
40
+ #include <GraphMol/ROMol.h>
41
+ #include <GraphMol/Conformer.h>
42
+ #include <GraphMol/StereoGroup.h>
43
+ #include <GraphMol/Substruct/SubstructMatch.h>
44
+ #include <GraphMol/Substruct/SubstructUtils.h>
45
+ #include <GraphMol/ChemTransforms/ChemTransforms.h>
46
+ #include <GraphMol/SmilesParse/SmilesParse.h>
47
+ #include <GraphMol/SmilesParse/SmilesWrite.h>
48
+ #include <GraphMol/FileParsers/FileParsers.h>
49
+ #include <GraphMol/FileParsers/SequenceWriters.h>
50
+ #include <GraphMol/Bond.h>
51
+ #include <GraphMol/FileParsers/MolFileStereochem.h>
52
+ #include <GraphMol/Descriptors/Crippen.h>
53
+ #include <GraphMol/Depictor/RDDepictor.h>
54
+ #include <GraphMol/Descriptors/MolDescriptors.h>
55
+ #include <GraphMol/Depictor/RDDepictor.h>
56
+ #include <GraphMol/MolOps.h>
57
+ #include <GraphMol/MolTransforms/MolTransforms.h>
58
+ #include <GraphMol/MolPickler.h>
59
+ #include <DistGeom/BoundsMatrix.h>
60
+ #include <GraphMol/DistGeomHelpers/Embedder.h>
61
+ #include <GraphMol/DistGeomHelpers/BoundsMatrixBuilder.h>
62
+ #include <GraphMol/MolAlign/AlignMolecules.h>
63
+ #include <GraphMol/MolAlign/O3AAlignMolecules.h>
64
+ #include <GraphMol/MolDraw2D/MolDraw2DSVG.h>
65
+ #include <GraphMol/PartialCharges/GasteigerCharges.h>
66
+ #include <GraphMol/new_canon.h>
67
+ #include <GraphMol/MolBundle.h>
68
+ #include <GraphMol/Chirality.h>
69
+ #include <sstream>
70
+ %}
71
+
72
+ %template(ROMol_Vect) std::vector< boost::shared_ptr<RDKit::ROMol> >;
73
+ %template(ROMol_Vect_Vect) std::vector< std::vector< boost::shared_ptr<RDKit::ROMol> > >;
74
+ %template(Atom_Vect) std::vector<RDKit::Atom*>;
75
+ %template(StereoGroup_Vect) std::vector<RDKit::StereoGroup>;
76
+ %template(UChar_Vect) std::vector<unsigned char>;
77
+
78
+ // These prevent duplicate definitions in wrapper code
79
+ %ignore RDKit::ROMol::hasProp(std::string const) const ;
80
+ %ignore RDKit::ROMol::clearProp(std::string const) const ;
81
+ %ignore RDKit::ROMol::getAtomWithIdx(unsigned int) const ;
82
+ %ignore RDKit::ROMol::getBondWithIdx(unsigned int) const ;
83
+ %ignore RDKit::ROMol::getBondBetweenAtoms(unsigned int,unsigned int) const ;
84
+ %ignore RDKit::ROMol::getAtomNeighbors(Atom const *at) const;
85
+ %ignore RDKit::ROMol::getAtomBonds(Atom const *at) const;
86
+ %ignore RDKit::ROMol::atomNeighbors(Atom const *at) const;
87
+ %ignore RDKit::ROMol::atomBonds(Atom const *at) const;
88
+ %ignore RDKit::ROMol::atomNeighbors(Atom const *at);
89
+ %ignore RDKit::ROMol::atomBonds(Atom const *at);
90
+ %ignore RDKit::ROMol::atoms();
91
+ %ignore RDKit::ROMol::atoms() const;
92
+ %ignore RDKit::ROMol::bonds();
93
+ %ignore RDKit::ROMol::bonds() const;
94
+
95
+ %ignore RDKit::ROMol::getVertices() ;
96
+ %ignore RDKit::ROMol::getVertices() const ;
97
+ %ignore RDKit::ROMol::getEdges() ;
98
+ %ignore RDKit::ROMol::getEdges() const ;
99
+ %ignore RDKit::ROMol::getTopology() const ;
100
+
101
+
102
+ /*
103
+ * Special handling for Conformer objects which should not be GCed until the molecule is destroyed
104
+ * We want to modify the behavior of the Conformer coming into the addConformer method without
105
+ * impacting Conformer objects that are arguments to other methods. Therefore we define a pattern
106
+ * that will trigger special handling of the Conformer input (the addConf method match this pattern).
107
+ */
108
+ %ignore addConformer(Conformer * conf, bool assignId=false);
109
+ %rename(addConformer) RDKit::ROMol::addConf;
110
+ %include <GraphMol/ROMol.h>
111
+
112
+ %ignore SubstructMatch;
113
+ %include <GraphMol/Substruct/SubstructMatch.h>
114
+
115
+ %ignore RDKit::MolPickler;
116
+ %include <RDGeneral/BetterEnums.h>
117
+ %include <GraphMol/MolPickler.h>
118
+
119
+
120
+
121
+ %newobject removeHs;
122
+ %newobject addHs;
123
+ %newobject mergeQueryHs;
124
+ %newobject replaceCore;
125
+ %newobject replaceSidechains;
126
+ %newobject deleteSubstructs;
127
+ %newobject getAtoms;
128
+ %newobject getBonds;
129
+ %newobject getAtomNeighbors;
130
+ %newobject getAtomBonds;
131
+
132
+ %{
133
+ #ifdef RDK_BUILD_COORDGEN_SUPPORT
134
+ bool getPreferCoordGen() {
135
+ return RDDepict::preferCoordGen;
136
+ }
137
+ void setPreferCoordGen(bool val) {
138
+ RDDepict::preferCoordGen = val;
139
+ }
140
+ #else
141
+ bool getPreferCoordGen() {
142
+ return false;
143
+ }
144
+ void setPreferCoordGen(bool val) {
145
+ }
146
+ #endif
147
+ %}
148
+
149
+ bool getPreferCoordGen();
150
+ void setPreferCoordGen(bool);
151
+
152
+ %{
153
+ bool getUseLegacyStereoPerception() {
154
+ return RDKit::Chirality::getUseLegacyStereoPerception();
155
+ }
156
+ void setUseLegacyStereoPerception(bool val) {
157
+ RDKit::Chirality::setUseLegacyStereoPerception(val);
158
+ }
159
+ bool getAllowNontetrahedralChirality() {
160
+ return RDKit::Chirality::getAllowNontetrahedralChirality();
161
+ }
162
+ void setAllowNontetrahedralChirality(bool val) {
163
+ RDKit::Chirality::setAllowNontetrahedralChirality(val);
164
+ }
165
+ %}
166
+
167
+ bool getUseLegacyStereoPerception();
168
+ void setUseLegacyStereoPerception(bool);
169
+ bool getAllowNontetrahedralChirality();
170
+ void setAllowNontetrahedralChirality(bool);
171
+
172
+ %{
173
+ /* From MolPickler.h */
174
+ void setDefaultPickleProperties(unsigned int propertyFlags) {
175
+ RDKit::MolPickler::setDefaultPickleProperties(propertyFlags);
176
+ }
177
+ unsigned int getDefaultPickleProperties() {
178
+ return RDKit::MolPickler::getDefaultPickleProperties();
179
+ }
180
+ %}
181
+
182
+ void setDefaultPickleProperties(unsigned int propertyFlags);
183
+ unsigned int getDefaultPickleProperties();
184
+
185
+ %extend RDKit::ROMol {
186
+ std::string getProp(const std::string key){
187
+ std::string res;
188
+ self->getProp(key, res);
189
+ return res;
190
+ }
191
+
192
+ /* Used in the addConformer modifications described above */
193
+ unsigned int RDKit::ROMol::addConf(RDKit::Conformer * ownedConf, bool assignId=false) {
194
+ return self->addConformer(ownedConf, assignId);
195
+ }
196
+
197
+ std::string MolToSmiles(bool doIsomericSmiles=true, bool doKekule=false, int rootedAtAtom=-1, bool canonical=true,
198
+ bool allBondsExplicit=false, bool allHsExplicit=false, bool doRandom=false) {
199
+ return RDKit::MolToSmiles(*($self), doIsomericSmiles, doKekule, rootedAtAtom, canonical, allBondsExplicit, allHsExplicit, doRandom);
200
+ }
201
+ std::string MolToSmiles(const RDKit::SmilesWriteParams &params) {
202
+ return RDKit::MolToSmiles(*($self), params);
203
+ }
204
+ std::string MolToMolBlock(bool includeStereo=true, int confId=-1, bool kekulize=true, bool forceV3000=false) {
205
+ return RDKit::MolToMolBlock(*($self), includeStereo, confId, kekulize, forceV3000);
206
+ }
207
+ void MolToMolFile(std::string fName,bool includeStereo=true, int confId=-1, bool kekulize=true, bool forceV3000=false) {
208
+ RDKit::MolToMolFile(*($self), fName, includeStereo, confId, kekulize, forceV3000);
209
+ }
210
+ std::string MolToTPLText(std::string partialChargeProp="_GasteigerCharge", bool writeFirstConfTwice=false) {
211
+ return RDKit::MolToTPLText(*($self), partialChargeProp, writeFirstConfTwice);
212
+ }
213
+ void MolToTPLFile(std::string fName,
214
+ std::string partialChargeProp="_GasteigerCharge",
215
+ bool writeFirstConfTwice=false) {
216
+ RDKit::MolToTPLFile(*($self), fName, partialChargeProp, writeFirstConfTwice);
217
+ }
218
+
219
+ std::string MolToPDBBlock(int confId=-1,unsigned int flavor=0) {
220
+ return RDKit::MolToPDBBlock(*($self),confId,flavor);
221
+ }
222
+ void MolToPDBFile(std::string fName,int confId=-1,unsigned int flavor=0) {
223
+ RDKit::MolToPDBFile(*($self), fName, confId, flavor);
224
+ }
225
+ std::string MolToSequence() {
226
+ return RDKit::MolToSequence(*($self));
227
+ }
228
+ std::string MolToFASTA() {
229
+ return RDKit::MolToFASTA(*($self));
230
+ }
231
+ std::string MolToHELM() {
232
+ return RDKit::MolToHELM(*($self));
233
+ }
234
+
235
+ std::string MolToCMLBlock(int confId=-1, bool kekulize=true) {
236
+ return RDKit::MolToCMLBlock(*($self), confId, kekulize);
237
+ }
238
+ void MolToCMLFile(std::string fName, int confId=-1, bool kekulize=true) {
239
+ RDKit::MolToCMLFile(*($self), fName, confId, kekulize);
240
+ }
241
+
242
+ std::string MolToXYZBlock(int confId=-1) {
243
+ return RDKit::MolToXYZBlock(*($self), confId);
244
+ }
245
+ void MolToXYZFile(std::string fName, int confId=-1) {
246
+ RDKit::MolToXYZFile(*($self), fName, confId);
247
+ }
248
+
249
+ bool hasSubstructMatch(RDKit::ROMol &query,bool useChirality=false){
250
+ RDKit::MatchVectType mv;
251
+ return SubstructMatch(*($self),query,mv,true,useChirality);
252
+ };
253
+
254
+ bool hasSubstructMatch(RDKit::ROMol &query,RDKit::SubstructMatchParameters ps){
255
+ ps.maxMatches = 1;
256
+ std::vector<RDKit::MatchVectType> mv = SubstructMatch(*($self),query,ps);
257
+ return mv.size()>0;
258
+ };
259
+
260
+ std::vector<std::pair<int, int> > getSubstructMatch(RDKit::ROMol &query,RDKit::SubstructMatchParameters ps){
261
+ std::vector<RDKit::MatchVectType> mvs = SubstructMatch(*($self),query,ps);
262
+ RDKit::MatchVectType mv;
263
+ if(mvs.size()) mv = mvs[0];
264
+ return mv;
265
+ };
266
+
267
+ std::vector< std::vector<std::pair<int, int> > > getSubstructMatches(RDKit::ROMol &query,RDKit::SubstructMatchParameters ps){
268
+ std::vector<RDKit::MatchVectType> mvs = SubstructMatch(*($self),query,ps);
269
+ return mvs;
270
+ };
271
+
272
+ bool hasSubstructMatch(RDKit::MolBundle & query,
273
+ RDKit::SubstructMatchParameters ps) {
274
+ ps.maxMatches = 1;
275
+ std::vector<RDKit::MatchVectType> mv = SubstructMatch(*($self), query, ps);
276
+ return mv.size() > 0;
277
+ };
278
+
279
+ std::vector<std::pair<int, int>> getSubstructMatch(
280
+ RDKit::MolBundle & query, RDKit::SubstructMatchParameters ps) {
281
+ std::vector<RDKit::MatchVectType> mvs = SubstructMatch(*($self), query, ps);
282
+ RDKit::MatchVectType mv;
283
+ if (mvs.size()) mv = mvs[0];
284
+ return mv;
285
+ };
286
+
287
+ std::vector<std::vector<std::pair<int, int>>> getSubstructMatches(
288
+ RDKit::MolBundle & query, RDKit::SubstructMatchParameters ps) {
289
+ std::vector<RDKit::MatchVectType> mvs = SubstructMatch(*($self), query, ps);
290
+ return mvs;
291
+ };
292
+
293
+ /* From MolOps, Substruct/SubstructMatch */
294
+ std::vector<std::pair<int, int> > getSubstructMatch(RDKit::ROMol &query,bool useChirality=false){
295
+ RDKit::MatchVectType mv;
296
+ SubstructMatch(*($self),query,mv,true,useChirality);
297
+ return mv;
298
+ };
299
+
300
+ std::vector< std::vector<std::pair<int, int> > > getSubstructMatches(RDKit::ROMol &query,bool uniquify=true, bool useChirality=false){
301
+ std::vector<RDKit::MatchVectType> mv;
302
+ SubstructMatch(*($self),query,mv,uniquify,true,useChirality);
303
+ return mv;
304
+ };
305
+
306
+ RDKit::ROMol *deleteSubstructs(const RDKit::ROMol &query, bool replaceAll) {
307
+ return RDKit::deleteSubstructs(*($self), query, replaceAll);
308
+ };
309
+
310
+ std::vector<RDKit::ROMOL_SPTR> replaceSubstructs(const RDKit::ROMol &query,
311
+ const RDKit::ROMol &replacement,
312
+ bool replaceAll=false) {
313
+ return RDKit::replaceSubstructs(*($self), query, replacement, replaceAll);
314
+ };
315
+
316
+ RDKit::ROMol *replaceSidechains(const RDKit::ROMol &coreQuery) {
317
+ return RDKit::replaceSidechains(*($self), coreQuery);
318
+ };
319
+
320
+ RDKit::ROMol *replaceCore(const RDKit::ROMol &coreQuery, bool replaceDummies=true,bool labelByIndex=false) {
321
+ return RDKit::replaceCore(*($self), coreQuery, replaceDummies, labelByIndex);
322
+ };
323
+
324
+ /* Methods from SubstructUtils.h */
325
+ const RDKit::MatchVectType &getMostSubstitutedCoreMatch(const RDKit::ROMol& core,
326
+ const std::vector<RDKit::MatchVectType>& matches) {
327
+ return RDKit::getMostSubstitutedCoreMatch(*($self), core, matches);
328
+ };
329
+
330
+ std::vector<RDKit::MatchVectType> sortMatchesByDegreeOfCoreSubstitution(
331
+ const RDKit::ROMol& core, const std::vector<RDKit::MatchVectType>& matches) {
332
+ return RDKit::sortMatchesByDegreeOfCoreSubstitution(*($self), core, matches);
333
+ };
334
+
335
+ /* Methods from MolFileStereoChem.h */
336
+ void DetectBondStereoChemistry(const RDKit::Conformer *conf) {
337
+ RDKit::DetectBondStereoChemistry(*($self), conf);
338
+ };
339
+
340
+ void WedgeMolBonds(const RDKit::Conformer *conf) {
341
+ RDKit::WedgeMolBonds(*($self), conf);
342
+ };
343
+
344
+ void pickBondsToWedge() {
345
+ RDKit::Chirality::pickBondsToWedge(*($self));
346
+ };
347
+
348
+ void ClearSingleBondDirFlags(bool onlyWedgeFlags=false) {
349
+ RDKit::MolOps::clearSingleBondDirFlags(*($self), onlyWedgeFlags);
350
+ };
351
+
352
+ void reapplyMolBlockWedging() {
353
+ RDKit::Chirality::reapplyMolBlockWedging(*($self));
354
+ }
355
+
356
+ void clearMolBlockWedgingInfo() {
357
+ RDKit::Chirality::clearMolBlockWedgingInfo(*($self));
358
+ }
359
+
360
+ void invertMolBlockWedgingInfo() {
361
+ RDKit::Chirality::invertMolBlockWedgingInfo(*($self));
362
+ }
363
+
364
+ /* Methods from ConjugHybrid.cpp */
365
+ void setConjugation() {
366
+ RDKit::MolOps::setConjugation(*($self));
367
+ }
368
+
369
+ void setHybridization() {
370
+ RDKit::MolOps::setHybridization(*($self));
371
+ }
372
+
373
+ /* From GraphMol/Depictor/RDDepictor.h */
374
+ unsigned int compute2DCoords(const RDGeom::INT_POINT2D_MAP *coordMap=0,
375
+ bool canonOrient=false,
376
+ bool clearConfs=true,
377
+ unsigned int nFlipsPerSample=0,
378
+ unsigned int nSamples=0,
379
+ int sampleSeed=0,
380
+ bool permuteDeg4Nodes=false,
381
+ bool forceRDKit=false) {
382
+ return RDDepict::compute2DCoords(*($self),
383
+ coordMap,
384
+ canonOrient,
385
+ clearConfs,
386
+ nFlipsPerSample,
387
+ nSamples,
388
+ sampleSeed,
389
+ permuteDeg4Nodes, forceRDKit);
390
+ }
391
+
392
+ unsigned int compute2DCoords(RDKit::ROMol &templ){
393
+ RDKit::MatchVectType matchVect;
394
+ if(templ.getNumConformers() && SubstructMatch(*($self),templ,matchVect)){
395
+ RDGeom::INT_POINT2D_MAP coordMap;
396
+ RDKit::Conformer conf=templ.getConformer();
397
+ for(RDKit::MatchVectType::const_iterator iter=matchVect.begin();
398
+ iter!=matchVect.end();++iter){
399
+ RDGeom::Point2D pt;
400
+ pt.x = conf.getAtomPos(iter->first).x;
401
+ pt.y = conf.getAtomPos(iter->first).y;
402
+ coordMap[iter->second]=pt;
403
+ }
404
+ return RDDepict::compute2DCoords(*($self),&coordMap);
405
+ } else {
406
+ return RDDepict::compute2DCoords(*($self),0);
407
+ }
408
+ }
409
+
410
+
411
+ unsigned int compute2DCoordsMimicDistMat(const RDDepict::DOUBLE_SMART_PTR *dmat=0,
412
+ bool canonOrient=true,
413
+ bool clearConfs=true,
414
+ double weightDistMat=0.5,
415
+ unsigned int nFlipsPerSample=3,
416
+ unsigned int nSamples=100,
417
+ int sampleSeed=25,
418
+ bool permuteDeg4Nodes=true, bool forceRDKit=false) {
419
+ return RDDepict::compute2DCoordsMimicDistMat(*($self),
420
+ dmat,
421
+ canonOrient,
422
+ clearConfs,
423
+ weightDistMat,
424
+ nFlipsPerSample,
425
+ nSamples,
426
+ sampleSeed,
427
+ permuteDeg4Nodes, forceRDKit);
428
+
429
+ }
430
+
431
+ void generateDepictionMatching2DStructure(const RDKit::ROMol &reference,
432
+ const RDKit::MatchVectType &refMatchVect,
433
+ int confId=-1,
434
+ bool forceRDKit=false) {
435
+ RDDepict::generateDepictionMatching2DStructure(*($self),reference,refMatchVect,confId,forceRDKit);
436
+ }
437
+ RDKit::MatchVectType generateDepictionMatching2DStructure(const RDKit::ROMol &reference,
438
+ int confId=-1,
439
+ bool acceptFailure=false, bool forceRDKit=false,
440
+ bool allowOptionalAttachments=false) {
441
+ return RDDepict::generateDepictionMatching2DStructure(*($self),reference,confId,nullptr,
442
+ acceptFailure,forceRDKit,allowOptionalAttachments);
443
+ }
444
+ RDKit::MatchVectType generateDepictionMatching2DStructure(const RDKit::ROMol &reference,
445
+ int confId,
446
+ const RDKit::ROMol &referencePattern,
447
+ bool acceptFailure=false, bool forceRDKit=false,
448
+ bool allowOptionalAttachments=false) {
449
+ return RDDepict::generateDepictionMatching2DStructure(*($self),reference,confId,
450
+ &referencePattern,acceptFailure,forceRDKit,allowOptionalAttachments);
451
+ }
452
+
453
+ double normalizeDepiction(int confId=-1, int canonicalize=1,
454
+ double scaleFactor=-1.0) {
455
+ return RDDepict::normalizeDepiction(*($self), confId, canonicalize, scaleFactor);
456
+ }
457
+
458
+ void straightenDepiction(int confId=-1, bool minimizeRotation=false) {
459
+ RDDepict::straightenDepiction(*($self), confId, minimizeRotation);
460
+ }
461
+
462
+ /* From FindRings.cpp, MolOps.h */
463
+ int findSSSR(RDKit::VECT_INT_VECT &res) {
464
+ return RDKit::MolOps::findSSSR(*($self), res);
465
+ };
466
+ int findSSSR() {
467
+ return RDKit::MolOps::findSSSR(*($self));
468
+ };
469
+ int symmetrizeSSSR(RDKit::VECT_INT_VECT &res) {
470
+ return RDKit::MolOps::symmetrizeSSSR(*($self), res);
471
+ }
472
+ int symmetrizeSSSR() {
473
+ return RDKit::MolOps::symmetrizeSSSR(*($self));
474
+ }
475
+
476
+ /* From Matrices.cpp, MolOps.h */
477
+ double *getDistanceMat(bool useBO=false,
478
+ bool useAtomWts=false,
479
+ bool force=false,
480
+ const char *propNamePrefix=0) {
481
+ return RDKit::MolOps::getDistanceMat(*($self), useBO, useAtomWts, force, propNamePrefix);
482
+ }
483
+
484
+ double *getDistanceMat(const std::vector<int> &activeAtoms,
485
+ const std::vector<const Bond *> &bonds,
486
+ bool useBO=false,
487
+ bool useAtomWts=false) {
488
+ return RDKit::MolOps::getDistanceMat(*($self), activeAtoms, bonds, useBO, useAtomWts);
489
+ }
490
+
491
+ double *getAdjacencyMatrix(bool useBO=false,
492
+ int emptyVal=0,
493
+ bool force=false,
494
+ const char *propNamePrefix=0) {
495
+ return RDKit::MolOps::getAdjacencyMatrix(*($self), useBO, emptyVal, force, propNamePrefix);
496
+ }
497
+
498
+ RDKit::INT_LIST getShortestPath(int aid1, int aid2) {
499
+ return RDKit::MolOps::getShortestPath(*($self), aid1, aid2);
500
+ }
501
+ /* From MolTransforms.h */
502
+ void transformMolsAtoms(RDGeom::Transform3D &tform) {
503
+ MolTransforms::transformMolsAtoms(($self), tform);
504
+ }
505
+ void canonicalizeMol(bool normalizeCovar=false, bool ignoreHs=true) {
506
+ MolTransforms::canonicalizeMol(*($self), normalizeCovar, ignoreHs);
507
+ }
508
+
509
+ /* From Python wrappers -- implied functionality */
510
+ std::vector<RDKit::Atom*> *getAtoms() {
511
+ auto atoms = ($self)->atoms();
512
+ return new std::vector<RDKit::Atom*>(atoms.begin(), atoms.end());
513
+ }
514
+
515
+ std::vector<RDKit::Bond*> *getBonds() {
516
+ auto bonds = ($self)->bonds();
517
+ return new std::vector<RDKit::Bond*>(bonds.begin(), bonds.end());
518
+ }
519
+
520
+ std::vector<RDKit::Atom*> *getAtomNeighbors(RDKit::Atom *at) {
521
+ auto atomNbrs = ($self)->atomNeighbors(at);
522
+ return new std::vector<RDKit::Atom*>(atomNbrs.begin(), atomNbrs.end());
523
+ }
524
+
525
+ std::vector<RDKit::Bond*> *getAtomBonds(RDKit::Atom *at) {
526
+ auto bondNbrs = ($self)->atomBonds(at);
527
+ return new std::vector<RDKit::Bond*>(bondNbrs.begin(), bondNbrs.end());
528
+ }
529
+
530
+ std::vector<int> ToBinary(int propertyFlags=-1){
531
+ std::string sres;
532
+ if(propertyFlags>=0) {
533
+ RDKit::MolPickler::pickleMol(*($self),sres,propertyFlags);
534
+ } else {
535
+ RDKit::MolPickler::pickleMol(*($self),sres);
536
+ }
537
+ std::vector<int> res(sres.length());
538
+ std::copy(sres.begin(),sres.end(),res.begin());
539
+ return res;
540
+ };
541
+ static RDKit::ROMOL_SPTR MolFromBinary(const std::vector<int> &pkl){
542
+ std::string sres;
543
+ sres.resize(pkl.size());
544
+ std::copy(pkl.begin(),pkl.end(),sres.begin());
545
+ RDKit::ROMol *res;
546
+ try {
547
+ res = new RDKit::ROMol(sres);
548
+ } catch (const RDKit::MolPicklerException &e) {
549
+ res = nullptr;
550
+ throw;
551
+ }
552
+ return RDKit::ROMOL_SPTR(res);
553
+ }
554
+ static RDKit::ROMOL_SPTR fromUCharVect(const std::vector<unsigned char> &pkl) {
555
+ std::string sres(pkl.begin(), pkl.end());
556
+ RDKit::ROMol *res;
557
+ try {
558
+ res = new RDKit::ROMol(sres);
559
+ } catch (const RDKit::MolPicklerException &e) {
560
+ res = nullptr;
561
+ throw;
562
+ }
563
+ return RDKit::ROMOL_SPTR(res);
564
+ }
565
+
566
+ /* From AddHs.cpp */
567
+ RDKit::ROMol *addHs(bool explicitOnly,bool addCoords=false){
568
+ return RDKit::MolOps::addHs(*($self), explicitOnly, addCoords);
569
+ }
570
+
571
+ RDKit::ROMol *removeHs(bool implicitOnly,bool updateExplicitCount=false,bool sanitize=false) {
572
+ return RDKit::MolOps::removeHs(*($self), implicitOnly, updateExplicitCount, sanitize);
573
+ }
574
+
575
+ RDKit::ROMol *mergeQueryHs() {
576
+ return RDKit::MolOps::mergeQueryHs(*($self));
577
+ }
578
+
579
+ /* From GraphMol/MolAlign/AlignMolecules */
580
+ double alignMol(const RDKit::ROMol &refMol,
581
+ int prbCid=-1, int refCid=-1,
582
+ const std::vector<std::pair<int,int> > *atomMap=0,
583
+ const RDNumeric::DoubleVector *weights=0,
584
+ bool reflect=false, unsigned int maxIters=50) {
585
+ return RDKit::MolAlign::alignMol(*($self), refMol, prbCid, refCid, atomMap, weights, reflect, maxIters);
586
+ }
587
+
588
+ void alignMolConformers(const std::vector<unsigned int> *atomIds=0,
589
+ const std::vector<unsigned int> *confIds=0,
590
+ const RDNumeric::DoubleVector *weights=0,
591
+ bool reflect=false, unsigned int maxIters=50) {
592
+ RDKit::MolAlign::alignMolConformers(*($self), atomIds, confIds, weights, reflect, maxIters);
593
+ }
594
+
595
+ /* From GraphMol/MolAlign/AlignMolecules */
596
+ double getAlignmentTransform(const RDKit::ROMol &refMol,
597
+ RDGeom::Transform3D &trans, int prbCid = -1,
598
+ int refCid = -1, const std::vector<std::pair<int,int> > *atomMap = 0,
599
+ const RDNumeric::DoubleVector *weights = 0,
600
+ bool reflect = false, unsigned int maxIters = 50){
601
+ return RDKit::MolAlign::getAlignmentTransform(*($self), refMol, trans, prbCid, refCid, atomMap, weights, reflect, maxIters);
602
+ }
603
+
604
+ double getBestAlignmentTransform(
605
+ const RDKit::ROMol &refMol, RDGeom::Transform3D &bestTrans,
606
+ std::vector<std::pair<int,int> > &bestMatch, int prbCid = -1, int refCid = -1,
607
+ const std::vector<std::vector<std::pair<int,int> > > &map = std::vector<std::vector<std::pair<int,int> > >(),
608
+ int maxMatches = 1e6, bool symmetrizeConjugatedTerminalGroups = true,
609
+ const RDNumeric::DoubleVector *weights = nullptr, bool reflect = false,
610
+ unsigned int maxIters = 50) {
611
+ return RDKit::MolAlign::getBestAlignmentTransform(*($self), refMol, bestTrans, bestMatch,
612
+ prbCid, refCid, map, maxMatches, symmetrizeConjugatedTerminalGroups, weights, reflect, maxIters);
613
+ }
614
+
615
+ double calcRMS(
616
+ const ROMol &refMol, int prbCid = -1, int refCid = -1,
617
+ const std::vector<std::vector<std::pair<int,int> > > &map = std::vector<std::vector<std::pair<int,int> > >(),
618
+ int maxMatches = 1e6, bool symmetrizeConjugatedTerminalGroups = true,
619
+ const RDNumeric::DoubleVector *weights = nullptr) {
620
+ return RDKit::MolAlign::CalcRMS(*($self), refMol, prbCid, refCid, map, maxMatches, symmetrizeConjugatedTerminalGroups, weights);
621
+ }
622
+
623
+ double getBestRMS(
624
+ const ROMol &refMol, int prbCid = -1, int refCid = -1,
625
+ const std::vector<std::vector<std::pair<int,int> > > &map = std::vector<std::vector<std::pair<int,int> > >(),
626
+ int maxMatches = 1e6, bool symmetrizeConjugatedTerminalGroups = true,
627
+ const RDNumeric::DoubleVector *weights = nullptr) {
628
+ return RDKit::MolAlign::getBestRMS(*($self), refMol, prbCid, refCid, map, maxMatches, symmetrizeConjugatedTerminalGroups, weights);
629
+ }
630
+
631
+ /* From GraphMol/MolAlign/AlignMolecules */
632
+ std::pair<double,double> O3AAlignMol(RDKit::ROMol &refMol,
633
+ int prbCid=-1, int refCid=-1,
634
+ bool reflect=false, unsigned int maxIters=50,
635
+ unsigned int accuracy=0) {
636
+ RDKit::MMFF::MMFFMolProperties prbMP(*($self));
637
+ RDKit::MMFF::MMFFMolProperties refMP(refMol);
638
+
639
+ RDKit::MolAlign::O3A o3a(*($self), refMol, &prbMP, &refMP, RDKit::MolAlign::O3A::MMFF94,
640
+ prbCid, refCid,
641
+ reflect,maxIters,accuracy);
642
+ double rmsd=o3a.align();
643
+ double score = o3a.score();
644
+ return std::make_pair(rmsd,score);
645
+ }
646
+
647
+ void computeGasteigerCharges(int nIter=12,bool throwOnParamFailure=false){
648
+ RDKit::computeGasteigerCharges(*($self),nIter,throwOnParamFailure);
649
+ }
650
+ void computeGasteigerCharges(std::vector<double> &charges,
651
+ int nIter=12,bool throwOnParamFailure=false){
652
+ RDKit::computeGasteigerCharges(*($self),charges,nIter,throwOnParamFailure);
653
+ }
654
+
655
+ /* From new_canon.h*/
656
+ void rankMolAtoms(UINT_VECT &ranks,
657
+ bool breakTies = true, bool includeChirality = true,
658
+ bool includeIsotopes = true){
659
+ RDKit::Canon::rankMolAtoms(*($self), ranks, breakTies, includeChirality, includeIsotopes);
660
+ }
661
+ }
662
+
663
+
664
+
665
+
666
+ %extend RDKit::ROMol {
667
+ std::string ToSVG(const std::vector<int> &highlightAtoms,
668
+ int lineWidthMult=2,int fontSize=50){
669
+ // FIX: not sure any more what these are for
670
+ if(fontSize<0) fontSize*=2;
671
+ if(lineWidthMult<0) lineWidthMult *=2;
672
+ std::stringstream outs;
673
+ RDKit::MolDraw2DSVG drawer(300,300,outs);
674
+ //drawer.setFontSize(static_cast<float>(fontSize)*drawer.fontSize()/50);
675
+ drawer.drawMolecule(*($self),&highlightAtoms);
676
+ drawer.finishDrawing();
677
+ outs.flush();
678
+
679
+ return outs.str();
680
+ }
681
+ std::string ToSVG(int lineWidthMult=2,int fontSize=50){
682
+ // FIX: not sure any more what these are for
683
+ if(fontSize<0) fontSize*=2;
684
+ if(lineWidthMult<0) lineWidthMult *=2;
685
+ std::stringstream outs;
686
+ RDKit::MolDraw2DSVG drawer(300,300,outs);
687
+ //drawer.setFontSize(static_cast<float>(fontSize)*drawer.fontSize()/50);
688
+ drawer.drawMolecule(*($self));
689
+ drawer.finishDrawing();
690
+ outs.flush();
691
+
692
+ return outs.str();
693
+
694
+ }
695
+ }