Re: [Rdkit-discuss] SMARTS definition for basic nitrogen
Oh, indeed. I did not think about that, thank you. KR Axel On 06.10.22 13:09, Jonas Bostrom wrote: Hey Axel, The Daylight SMARTS example page can also be a useful source: https://www.daylight.com/dayhtml_tutorials/languages/smarts/smarts_examples.html All the best Jonas *From:*Axel Pahl *Sent:* Thursday, 6 October 2022 12:10 *To:* RDKit Discuss *Subject:* [Rdkit-discuss] SMARTS definition for basic nitrogen *[EXTERNAL MESSAGE]* Dear RDKitters, does someone have a good SMARTS definition for basic nitrogen (aliphatic and aromatic), which they would be able to share? My Google-fu is failing me. Many thanks in advance. Kind regards, Axel CONFIDENTIALITY NOTICE: This electronic transmission, and any documents attached hereto, may contain confidential and/or privileged information. The information is intended only for use by the recipient named above. If you are not the named addressee, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of information received in error is strictly prohibited. ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] SMARTS definition for basic nitrogen
Thank you, Wim, I will check out these, as well. KR Axel On 06.10.22 12:46, Wim Dehaen wrote: Hi, For an even simpler definition that works "well enough" for many cases I have been using "[NX3,NX2,nX2;!$(NC=O);!$(NS=O)]" this excludes amides, nitro,nitroso, sulfonamide and pyrrole nitrogens, but include aliphatic amines, anilines, pyridines, hydroxylamines, imines etc best wishes wim On Thu, Oct 6, 2022 at 12:12 PM Axel Pahl wrote: Dear RDKitters, does someone have a good SMARTS definition for basic nitrogen (aliphatic and aromatic), which they would be able to share? My Google-fu is failing me. Many thanks in advance. Kind regards, Axel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] SMARTS definition for basic nitrogen
Great! Thanks a lot, Jan! Kind regards, Axel On 06.10.22 12:23, Jan Halborg Jensen wrote: Hi Axel Have a look at https://github.com/jensengroup/protonator Best regards, Jan On 6 Oct 2022, at 12.09, Axel Pahl wrote: Dear RDKitters, does someone have a good SMARTS definition for basic nitrogen (aliphatic and aromatic), which they would be able to share? My Google-fu is failing me. Many thanks in advance. Kind regards, Axel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Frdkit-discussdata=05%7C01%7Cjhjensen%40chem.ku.dk%7Cb721ceda94f04d933de708daa7834e8b%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638006479671068146%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=CEX%2BmzqRpDEu6jkEyVHkUn55b9eOdYPjnXdg4T%2FTEmw%3Dreserved=0 ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] SMARTS definition for basic nitrogen
Dear RDKitters, does someone have a good SMARTS definition for basic nitrogen (aliphatic and aromatic), which they would be able to share? My Google-fu is failing me. Many thanks in advance. Kind regards, Axel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] CalcNumAtoms import error
Hi Chris, this might not be a great help, but it works for me on Ubuntu 22.04 with RDKit 2021.09.5: import rdkit print(rdkit.__version__) from rdkit import Chem from rdkit.Chem.rdMolDescriptors import CalcNumAtoms m = Chem.MolFromSmiles("c1c1C(=O)NC") print(CalcNumAtoms(m)) Output: 2021.09.5 19 According to Github, it was only added to the C++ MolDescriptors module in June 2021: https://github.com/rdkit/rdkit/commit/53523a4a1106e4e3b1a69ff26d0510225019e35c KR Axel On 14.07.22 12:46, Chris Swain via Rdkit-discuss wrote: Hi, If I try from rdkit.Chem.rdMolDescriptors import CalcNumAtoms I get cannot import name 'CalcNumAtoms' from 'rdkit.Chem.rdMolDescriptors' I can import a range of other descriptors fine Using Python 3.7.6 and RDKit 2020.09.1 Cheers Chris ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Web-front end for PostgreSQL database with RDKit cartridge
Hi Charmaine, coming from Python, for single page applications I can really recommend Panel: https://panel.holoviz.org/ There is also a very nice OSS chemistry plugin (which I have not yet tried myself): https://github.com/MarcSkovMadsen/panel-chemistry Kind regards, Axel On 05.07.22 11:53, Charmaine Siu Man Chu wrote: Hello, I’ve set up a PostgreSQL chemical database with RDKit cartridge on a Linux desktop as server but for the database to be searchable by chemists, I would need to set up a web-front end with a user-friendly UI for the database which I have no experience in. Can anyone advise on what is the best way in setting this web-front end up? Regards, Charmaine Chu ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] conda spell to install rdkit?
Hi Dimitri, my (tried & tested) "spell" to install RDKit via conda is the following (on Linux): conda create -c conda-forge -n chem python=3.8 rdkit cairo cffi pillow matplotlib After activation of the environment, finalize with a pip install cairocffi The cairo- and ffi-related installs are recommended when you use the old drawing code. Kind regards, Axel On 24.11.20 21:46, dmaziuk via Rdkit-discuss wrote: Hi all, what is the magic spiel to install rdkit in miniconda these days? -- My container that worked a year ago now won't build because "my python =3.8" and rdkit wants "<3.8.0a0". This is miniconda3-lates on linux x64 TIA Dimitri ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] RDKit C wrappers?
On 27.04.20 10:18, Stephan Michels wrote: Am 27.04.2020 um 09:58 schrieb Axel Pahl mailto:axelp...@gmx.de>>: yes, I agree that manual wrapping would be a ton of work (and hard to maintain). My question was not necessarily with a concrete language in mind, but since you are asking (;-)), I am really excited about the Swift programming language lately. Open Source, nice syntax, developed by Apple and endorsed by Google as the next generation platform for machine learning ("Swift for Tensorflow", https://tryolabs.com/blog/2020/04/02/swift-googles-bet-on-differentiable-programming/). Unfortunately Swift doesn’t support C++ yet. I use RDKit in my Swift projects by using an Objective-C Framework, where I wrap all necessary classes, which I need. These wrappers are far from complete. But I get my things done and it is cross compiled for x86 and arm. Regards, Stephan Michels Dear Stephan, thanks a lot, that is really interesting. I am using Swift on Linux, so I guess Objective-C wrappers are not usable for me? Kind regards, Axel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] RDKit C wrappers?
Hi Greg, yes, I agree that manual wrapping would be a ton of work (and hard to maintain). My question was not necessarily with a concrete language in mind, but since you are asking (;-)), I am really excited about the Swift programming language lately. Open Source, nice syntax, developed by Apple and endorsed by Google as the next generation platform for machine learning ("Swift for Tensorflow", https://tryolabs.com/blog/2020/04/02/swift-googles-bet-on-differentiable-programming/). Thanks a lot for the link to the MinimalLib, that looks very interesting, I will definitely have a look. Kind regards, Axel On 27.04.20 09:43, Greg Landrum wrote: Hi Axel, Doing complete C wrappers around the C++ library would be a ton of work - you'd have to simulate the object model on the C side, and that's "not easy". Doing a "full" wrapper for another programming language is almost certainly best handled using SWIG (assuming it has bindings for the language you are interested in). An alternate approach would be to look at the MinimalLib: the library that's used to generate the Javascript wrappers: it's based on the idea of exposing a small number of useful functions instead of supporting the full API: https://github.com/rdkit/rdkit/tree/master/Code/MinimalLib -greg On Sun, Apr 26, 2020 at 9:47 PM Riccardo Vianello mailto:riccardo.viane...@gmail.com>> wrote: Hi Axel, On Sun, Apr 26, 2020 at 6:21 PM Axel Pahl mailto:axelp...@gmx.de>> wrote: is anyone aware of efforts for creating "bridging" C wrappers for the RDKit? This would make it easier to bind the toolkit to other programming languages, in addition to Python and Java. I'm not aware of any active/existing projects, but I've been also thinking about this possibility in a couple of occasions. Could the existing SWIG interface be perused for this? as far as I know, this isn't (or at least wasn't) directly possible. SWIG includes the core functionality required to generate these wrappers, but C is not a supported target language. Last time I checked a mostly functional but not ready to merge GSoC branch existed, that was aimed at providing this feature, but I am not sure it made any progress. Best, Riccardo ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net <mailto:Rdkit-discuss@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] RDKit C wrappers?
Hi Riccardo, thanks for the information. Yes, I think it would be quite useful, but I guess it would have to be mostly auto-generated, otherwise it would be too much work (and hard to maintain). The GSoC SWIG 2012 branch does indeed not seem to have made it into master (https://github.com/swig/swig/tree/gsoc2012-c/). Kind regards, Axel On 26.04.20 21:44, Riccardo Vianello wrote: Hi Axel, On Sun, Apr 26, 2020 at 6:21 PM Axel Pahl mailto:axelp...@gmx.de>> wrote: is anyone aware of efforts for creating "bridging" C wrappers for the RDKit? This would make it easier to bind the toolkit to other programming languages, in addition to Python and Java. I'm not aware of any active/existing projects, but I've been also thinking about this possibility in a couple of occasions. Could the existing SWIG interface be perused for this? as far as I know, this isn't (or at least wasn't) directly possible. SWIG includes the core functionality required to generate these wrappers, but C is not a supported target language. Last time I checked a mostly functional but not ready to merge GSoC branch existed, that was aimed at providing this feature, but I am not sure it made any progress. Best, Riccardo ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] RDKit C wrappers?
Dear all, is anyone aware of efforts for creating "bridging" C wrappers for the RDKit? This would make it easier to bind the toolkit to other programming languages, in addition to Python and Java. Could the existing SWIG interface be perused for this? Kind regards, Axel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Synthetic Accessibility (SA) score
Hi Ganesh, I guess the synthesis of a fragment can be quite different from the synthesis of a whole molecule containing that fragment, so I don't know if it is a valid assumtion that the SA scores of the fragments have to add up to the SA score of the whiole molecule. Kind regards, Axel On 01.04.20 12:34, Ganesh Shahane wrote: Hi Axel, Thank you for your response. Yes, I tried to implement the aforementioned script. It works very well on whole molecules. However, I am trying to implement the script on fragments. For example, if I have fragments: A, B and C that makes up a whole molecule "ABC", then the sum of SA scores of the fragments should be equal to SA score of the whole molecule. Right now, the summation doesn't add up. I was wondering if there is a correction that needs to be made to the sum of SA scores such that it is equal to the SA score of the whole molecule. -- Best, Ganesh On Mon, Mar 30, 2020 at 4:30 PM Axel Pahl mailto:axelp...@gmx.de>> wrote: Hi Ganesh, are you aware that the SA Score IS implemented in RDKit: https://github.com/rdkit/rdkit/tree/master/Contrib/SA_Score Kind regards, Axel On 30.03.20 16:55, Ganesh Shahane wrote: Dear RDKitters, I am trying a to find a way to implement the SA score as a sum of fragments contributions from this paper: Ertl, Peter, and Ansgar Schuffenhauer. 2009. “Estimation of Synthetic Accessibility Score of Drug-like Molecules Based on Molecular Complexity and Fragment Contributions.” /Journal of Cheminformatics/ 1 (1): 8. For example, if I have three different fragments: A, B and C and their respective SA scores, then the SA score of molecule "A+B+C" should be the sum of all three fragment SA scores. In practice though, the fragment SA scores do not add up. I was wondering if anyone across the cheminformatics community has successfully implemented this or a similar strategy? -- Best, Ganesh ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net <mailto:Rdkit-discuss@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net <mailto:Rdkit-discuss@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Synthetic Accessibility (SA) score
Hi Ganesh, are you aware that the SA Score IS implemented in RDKit: https://github.com/rdkit/rdkit/tree/master/Contrib/SA_Score Kind regards, Axel On 30.03.20 16:55, Ganesh Shahane wrote: Dear RDKitters, I am trying a to find a way to implement the SA score as a sum of fragments contributions from this paper: Ertl, Peter, and Ansgar Schuffenhauer. 2009. “Estimation of Synthetic Accessibility Score of Drug-like Molecules Based on Molecular Complexity and Fragment Contributions.” /Journal of Cheminformatics/ 1 (1): 8. For example, if I have three different fragments: A, B and C and their respective SA scores, then the SA score of molecule "A+B+C" should be the sum of all three fragment SA scores. In practice though, the fragment SA scores do not add up. I was wondering if anyone across the cheminformatics community has successfully implemented this or a similar strategy? -- Best, Ganesh ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Interactive plots in Jupyter notebooks
Hi Chris, i too, looked for this functionality in Plotly, but I was not able to find it. This is the reason I switched to bokeh / holoviews. https://github.com/apahl/mol_frame/blob/68801e16af3cfb60f846c40f471d190cbe34748b/mol_frame/mol_frame.py#L949 and https://github.com/apahl/mol_frame/blob/68801e16af3cfb60f846c40f471d190cbe34748b/mol_frame/mol_frame.py#L1214 Kind regards, Axel On 15.01.20 10:30, Chris Swain via Rdkit-discuss wrote: Hi, I've been looking at ways to produce interactive plots within a Jupyter notebook and after trying a couple of options I used Plotly. This seems fairly straight-forward to use and I can produce interactive data frames, in addition to 2D and 3D scatterplots. https://www.macinchem.org/blog/files/a5cc1afff58a411056af7b8d9b0011dd-2577.php Whilst I can get text to appear when hovering over a data point I'd be interested in ideas of how to get the structure displayed when you mouse over a point. Cheers, Chris ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] 答复: Non Round-trippable Molecule
Dear Hongbin, kekulizing the Smiles does indeed work in this case, that's a good tip. Thanks a lot. KR Axel On 03.09.19 11:26, Hongbin Yang wrote: Hi Axel, The format like "c11” is implicitly defining the bonds between atoms and the output of the “canonical” SMILES has redundant ring labels (1 and 2) , which I think confused the parser and caused the problem. I have no idea whether it is a bug or whether it is true reason. But try this to solve your problem. smi = Chem.MolToSmiles(mol, kekuleSmiles=True) You will get the explicit bonds in the SMILES and it can be read by `MolFromSmiles` COC1:C:C:C2:C:C:1OC1:C:C:C(:C:C:1)/C=C\\C1:C:C(:C(OC):C:C:1CCN(C)C)OC1:C(:C(CCN(C)C):C(OC):C(OC):C:1OC)/C=C\\2 Best, Hongbin *发件人: *Axel Pahl <mailto:axelp...@gmx.de> *发送时间: *2019年9月3日16:45 *收件人: *RDKit Discuss <mailto:rdkit-discuss@lists.sourceforge.net> *主题: *[Rdkit-discuss] Non Round-trippable Molecule Hi, I know that the RDKit makes no guarantees abount being able to round-trip (Smiles -> Mol -> Smiles -> Mol) every molecule, but I would like to know if there are any recommendations on how to handle such cases. In my current case the problem seems to lie in different aromatic models for a large ring containing oxygen. This is the code to reproduce the issue and there is also a more illustrative Notebook (https://gist.github.com/apahl/06e55f5965cb82bc43d2aafd8ee0d532): from rdkit.Chem import AllChem as Chem from rdkit.Chem import Draw from rdkit.Chem import Descriptors as Desc from rdkit.Chem.Draw import IPythonConsole # RDKit can parse the original Smiles into a valid molecule. mol = Chem.MolFromSmiles("c12c(\C=C/c(ccc3OC)cc3Oc4ccc(cc4)\C=C/c(cc5O1)c(CCN(C)C)cc5OC)c(CCN(C)C)c(OC)c(OC)c2OC") print(Desc.MolWt(mol)) # And parse it back into a Smiles. smi = Chem.MolToSmiles(mol) print(smi) # -> COc1ccc2cc1-o-c1ccc(cc1)/c=c\c1cc(c(OC)cc1CCN(C)C)-o-c1c(c(CCN(C)C)c(OC)c(OC)c1OC)/c=c\2 # But the Smiles generated by RDKit can not be parsed back into a valid molecule. tmp = Chem.MolFromSmiles(smi) # -> RDKit ERROR: [10:39:41] Can't kekulize mol. Unkekulized atoms: 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 23 24 31 32 33 39 42 45 48 49 BTW, the JS Molecule Editor by Peter is also not able to round-trip this molecule. Many thanks in advance, Axel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Non Round-trippable Molecule
Hi, I know that the RDKit makes no guarantees abount being able to round-trip (Smiles -> Mol -> Smiles -> Mol) every molecule, but I would like to know if there are any recommendations on how to handle such cases. In my current case the problem seems to lie in different aromatic models for a large ring containing oxygen. This is the code to reproduce the issue and there is also a more illustrative Notebook (https://gist.github.com/apahl/06e55f5965cb82bc43d2aafd8ee0d532): from rdkit.Chem import AllChem as Chem from rdkit.Chem import Draw from rdkit.Chem import Descriptors as Desc from rdkit.Chem.Draw import IPythonConsole # RDKit can parse the original Smiles into a valid molecule. mol = Chem.MolFromSmiles("c12c(\C=C/c(ccc3OC)cc3Oc4ccc(cc4)\C=C/c(cc5O1)c(CCN(C)C)cc5OC)c(CCN(C)C)c(OC)c(OC)c2OC") print(Desc.MolWt(mol)) # And parse it back into a Smiles. smi = Chem.MolToSmiles(mol) print(smi) # -> COc1ccc2cc1-o-c1ccc(cc1)/c=c\c1cc(c(OC)cc1CCN(C)C)-o-c1c(c(CCN(C)C)c(OC)c(OC)c1OC)/c=c\2 # But the Smiles generated by RDKit can not be parsed back into a valid molecule. tmp = Chem.MolFromSmiles(smi) # -> RDKit ERROR: [10:39:41] Can't kekulize mol. Unkekulized atoms: 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 23 24 31 32 33 39 42 45 48 49 BTW, the JS Molecule Editor by Peter is also not able to round-trip this molecule. Many thanks in advance, Axel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Understanding Coloring in Similarity Maps
Hi Sereina, thanks a ton for the elaborate and very helpful explanation. Kind regards, Axel On 22.08.19 12:23, Sereina wrote: Hi Axel, What is calculated in the function GetAtomicWeightsForModel() is the difference between the probability value of the complete molecule (“base probability”) and the probability value when the bits of a certain atom are deleted. In the cookbook (and based on a quick glance also in your code), the probability of the active class is used as the measure for the similarity maps (that’s defined in the getProba() helper function). This means that any atom whose missing bits lead to an increase in the probability to be active is colored green. If it leads to a decrease, it gets colored pink. Now if you have an inactive molecule then your base probability for the active class is close to zero. In your cases it looks like nearly all of the atoms in the molecule are necessary to make these molecules be considered inactive. In other words, deleting any of green colored atoms results in a higher probability to be active – although it might still be below 50% (note that the color range is not standardized globally but based on the largest difference observed in the molecule). I hope this helps. Best, Sereina On 22 Aug 2019, at 11:38, Axel Pahl mailto:axelp...@gmx.de>> wrote: Dear fellow RDKitters, I am experimenting with the classification example from the Cookbook [1] using a RandomForestClassifier and Similarity Maps for visualization. I need, however, some help with the interpretation of the coloring in the similarity map. In the attached example, the compounds were correctly predicted ("AC_Pred") as being inactive ("0") with a high probability. But the corresponding similarity maps show mainly green areas, indicating (in my understanding) a positive contribution to the activity class, which should have lead to a different prediction. What would be the correct interpretation of the coloring? Many thanks in advance for any help. Kind regards, Axel P.S.: The code is available in a repo [2], an example notebook can be found in the tutorials folder. [1] http://www.rdkit.org/docs/Cookbook.html#using-scikit-learn-with-rdkit [2] https://github.com/apahl/mol_frame ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net <mailto:Rdkit-discuss@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Spacing of dashes in downward wedge
Thanks a lot for the comprehensive answer, Paolo. This also explains why changing the DrawingOptions.dash parameter does not change anything. Kind regards, Axel On 26.03.19 16:12, Paolo Tosco wrote: Dear Axel, looking at rdkit/Chem/Draw/cairoCanvas.py it appears that the DrawingOptions.dash parameter is ignored and dash is hardcoded to (3, 3). Please apply the following changes if you wish the DrawingOptions.dash to be honoured: --- ./third-party/Python/lib/python3.6/site-packages/rdkit/Chem/Draw/MolDrawing.py.orig 2019-03-26 15:05:54.371731743 + +++ ./third-party/Python/lib/python3.6/site-packages/rdkit/Chem/Draw/MolDrawing.py 2019-03-26 15:06:16.683144329 + @@ -203,7 +203,7 @@ if not dash: self.canvas.addCanvasPolygon(poly, color=color) elif self.drawingOptions.wedgeDashedBonds and self.canvas.addCanvasDashedWedge: - self.canvas.addCanvasDashedWedge(poly[0], poly[1], poly[2], color=color) + self.canvas.addCanvasDashedWedge(poly[0], poly[1], poly[2], color=color, dash=dash) else: self.canvas.addCanvasLine(pos, nbrPos, linewidth=width * 2, color=color, dashes=dash) --- ./third-party/Python/lib/python3.6/site-packages/rdkit/Chem/Draw/cairoCanvas.py.orig 2019-03-26 15:06:25.459913254 + +++ ./third-party/Python/lib/python3.6/site-packages/rdkit/Chem/Draw/cairoCanvas.py 2019-03-26 15:06:30.853771245 + @@ -402,7 +402,7 @@ def addCanvasDashedWedge(self, p1, p2, p3, dash=(2, 2), color=(0, 0, 0), color2=None, **kwargs): self.ctx.set_line_width(kwargs.get('linewidth', 1)) self.ctx.set_source_rgb(*color) - dash = (3, 3) + #dash = (3, 3) pts1 = self._getLinePoints(p1, p2, dash) pts2 = self._getLinePoints(p1, p3, dash) However, you might be disappointed as spacing between dashes may become uneven (which is probably why spacing was hardcoded): Cheers, p. On 03/26/19 11:20, Axel Pahl wrote: Hi, is there an option to set the spacing of the dashes in a downward wedge bond using Draw.MolToImage()? In the depiction I am currently getting (attached), the dashes are very close to each other, I would like to increase the spacing. Changing the values in the tuple `Draw.DrawingOptions.dash` does not change the depiction for me. Many thanks in advance. Kind regards, Axel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Spacing of dashes in downward wedge
Hi, is there an option to set the spacing of the dashes in a downward wedge bond using Draw.MolToImage()? In the depiction I am currently getting (attached), the dashes are very close to each other, I would like to increase the spacing. Changing the values in the tuple `Draw.DrawingOptions.dash` does not change the depiction for me. Many thanks in advance. Kind regards, Axel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] [Announcement] 8th RDKit UGM in Hamburg, Germany
Hi, looking very much forward to the UGM, thanks a lot for organizing it. Are there any recommended hotels? Kind regards, Axel On 15.03.19 15:29, Greg Landrum wrote: Dear all, This year's RDKit User Group Meeting will take place from 25-27 September in Hamburg, Germany and is being hosted by Emanuel Ehmki at the University of Hamburg. Registration for the RDKit UGM is free: https://www.eventbrite.com/e/8th-rdkit-ugm-2019-tickets-58836131453 We will once again mostly stick to what has become a tried and true format: Days 1 and 2: Talks, lightning talks, roundtable(s), discussion, poster sessions, and talktorials. For those who haven’t attended before, talktorials are somewhere between a talk and a tutorial, they cover something interesting done with the RDKit and include the code used to do the work. During the presentation you'll give an overview of what you did and also show the pieces of the code that are central to the work. The idea is to mix the science up with the tutorial aspects. Day 3 will be a hackathon: those who choose to stay will spend an intense day working in small groups to produce useful artifacts: new bits of code, KNIME nodes, KNIME workflows, tutorials, documentation, Jupyter notebooks, etc. We will once again try to structure this a bit by collecting a bunch of ideas for things to work on in advance. In the past we have also done extended tutorials on Day 3; if there are volunteers to do tutorials and people interested in attending them, we'll repeat that this year as well. Like last year there will be an optional training day on Tuesday (the 24th). Daria Goldmann (KNIME) will offer a course on KNIME and the RDKit. We hope to also be able to offer an RDKit and Python course, but we're still finalizing the details on that. Space for both of these is limited, so we'll do separate registrations for them. We will send around registration links once we've got the logistics figured out. There will also be, of course, social activities. We will be announcing more details about these later. A more detailed announcement with additional information about place, hotels and logistics will follow soon. We are looking for people who are willing to do presentations, talktorials or posters on the first two days. If you're interested in contributing, please send Greg and Emanuel an email. Lighting talks don't need to be arranged too far in advance; we will start collecting the list of people interested in doing those shortly before the event. Best Regards, Greg and Emanuel ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] no structure depiction in Jupyter notebook
Hi Andrew, on Linux, using Anaconda, RDKit and Python 3.6, I always need to additionally install cairocffi via pip: pip install cairocffi Kind regards, Axel On 31.08.2018 15:05, Andrew Dalke wrote: On Aug 31, 2018, at 11:58, Andrew Dalke wrote: I am unable to see an inline structure depiction in the Jupyter notebook, nor in the JupyterLab notebook, tested with both the Python 2 and Python 3 kernels, and rdkit.__version__ '2018.03.1'. I've narrowed it down to the Cairo code. I ran Draw._moltoimg manually, and the d2d.GetDrawingText() call returns b"". If I do del Draw.rdMolDraw2D.MolDraw2DCairo then the image generation code will fall back to MolToImage, and give me an inline depiction in the notebook. Andrew da...@dalkescientific.com -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] MPI Dortmund is looking for a Cheminformatics PostDoc
Dear fellow RDKitters, the Max Planck institute of Molecular Physiology (department 4, Chemical Biology, Prof. Waldmann) is looking for a Cheminformatics PostDoc to work on two interesting projects in the highly relevant context of chemical biology. For details, please have a look at the job posting (https://www.mpg.de/12151792/postdoctoral-position-in-cheminformatics). Kind regards, Axel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Make chain atoms not match ring atoms
Hi Greg, yes, I had a look at those flags and also at your blog post describing them, but indeed I thought that I could not achieve what I intended with them. It would be awesome if that option could be added. Kind regards, Axel Am 30. Juni 2018 11:06:20 schrieb Greg Landrum : AdjustQueryParameters might also be worth looking into: http://www.rdkit.org/Python_Docs/rdkit.Chem.rdmolops.AdjustQueryParameters-class.html This may not do exactly what you want, but it’s pretty close. And adding “ring matches ring only” would be pretty easy to add -greg On Sat, 30 Jun 2018 at 10:44, Axel Pahl wrote: Paolo, thanks a lot for this solution, I am going to use that. Also, TIL that ^ is Python's XOR operator. Thanks for that, too ;-) ! Kind regards, Axel On 29.06.2018 10:49, Paolo Tosco wrote: Dear Axel, what about this: https://gist.github.com/ptosco/26af473fc1f3129878ca86cb070afe3a Cheers, p. On 06/29/18 08:04, Axel Pahl wrote: Dear all, my google-fu is failing is me. Is it possible in substructure searches to have chain atoms NOT match ring atoms? In essence, I would like the following example query for n-propane in cyclo-hexane to return False (currently it is returning True): mol = Chem.MolFromSmiles("C1C1") q = Chem.MolFromSmiles("CCC") print(mol.HasSubstructMatch(q)) # ==> True Many thanks in advance for your help. Kind regards, Axel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Make chain atoms not match ring atoms
Paolo, thanks a lot for this solution, I am going to use that. Also, TIL that ^ is Python's XOR operator. Thanks for that, too ;-) ! Kind regards, Axel On 29.06.2018 10:49, Paolo Tosco wrote: Dear Axel, what about this: https://gist.github.com/ptosco/26af473fc1f3129878ca86cb070afe3a Cheers, p. On 06/29/18 08:04, Axel Pahl wrote: Dear all, my google-fu is failing is me. Is it possible in substructure searches to have chain atoms NOT match ring atoms? In essence, I would like the following example query for n-propane in cyclo-hexane to return False (currently it is returning True): mol = Chem.MolFromSmiles("C1C1") q = Chem.MolFromSmiles("CCC") print(mol.HasSubstructMatch(q)) # ==> True Many thanks in advance for your help. Kind regards, Axel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org!http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Make chain atoms not match ring atoms
Hi, Steve, thanks. Is there no other possibiliy? Like setting a search option that non-ring should not match ring atoms? The reason I am asking is that my query molecules come from an SD file, so converting them into Smarts would be difficult. Kind regards, Axel On 29.06.2018 10:06, Stephen Roughley wrote: Axel, You need to use a SMARTS query: q = Chem.MolFromSmarts("[CR0][CR0][CR0]") Have a look at http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html Steve On 29 June 2018 at 08:04, Axel Pahl <mailto:axelp...@gmx.de>> wrote: Dear all, my google-fu is failing is me. Is it possible in substructure searches to have chain atoms NOT match ring atoms? In essence, I would like the following example query for n-propane in cyclo-hexane to return False (currently it is returning True): mol = Chem.MolFromSmiles("C1C1") q = Chem.MolFromSmiles("CCC") print(mol.HasSubstructMatch(q)) # ==> True Many thanks in advance for your help. Kind regards, Axel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net <mailto:Rdkit-discuss@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss <https://lists.sourceforge.net/lists/listinfo/rdkit-discuss> -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Make chain atoms not match ring atoms
Dear all, my google-fu is failing is me. Is it possible in substructure searches to have chain atoms NOT match ring atoms? In essence, I would like the following example query for n-propane in cyclo-hexane to return False (currently it is returning True): mol = Chem.MolFromSmiles("C1C1") q = Chem.MolFromSmiles("CCC") print(mol.HasSubstructMatch(q)) # ==> True Many thanks in advance for your help. Kind regards, Axel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Errors with RDKit
Hi Carlos, insert this in your loop: if not mol: continue Kind regards, Axel On 23.01.2018 03:59, Carlos Faerman wrote: Hello, My code is very simple: suppl4 = Chem.SDMolSupplier("/Volumes/MyPassportForMac/chembl_23.sdf") i = 0 for mol in suppl4: smile = Chem.MolToSmiles(mol,isomericSmiles=True) fingerpri = get_fp_rdkit(mol) namenmol = mol.GetProp("_Name") patron[namenmol]=fingerpri print (i,namenmol,smile) outfile.write('{} {} {}\n'.format(namenmol,smile,fingerpri)) i = i+1 I know that a few molecules in Chembl_23.sdf have wrong valences. Is there a way to skip these molecules when these errors are found? 671231 CHEMBL1254908 O=C(NCCN1CCC2(CC1)C(=O)NCN2c1(Cl)c1)c1cc2cc(F)ccc2[nH]1 [21:18:16] Explicit valence for atom # 35 N, 5, is greater than permitted [21:18:16] ERROR: Could not sanitize molecule ending on line 48940986 [21:18:16] ERROR: Explicit valence for atom # 35 N, 5, is greater than permitted Traceback (most recent call last): File "calculate-fingerprints.py", line 23, in smile = Chem.MolToSmiles(mol,isomericSmiles=True) Boost.Python.ArgumentError: Python argument types in rdkit.Chem.rdmolfiles.MolToSmiles(NoneType) did not match C++ signature: MolToSmiles(RDKit::ROMol mol, bool isomericSmiles=False, bool kekuleSmiles=False, int rootedAtAtom=-1, bool canonical=True, bool allBondsExplicit=False, bool allHsExplicit=False) The "culprit" molecule seems to be CHEMBL450200 -My question to this forum: Please suggest a way to modify the code to skip the wrong molecule(s) instead of abruptly ending the run Thank you, Carlos Faerman -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] RDKit and Google Summer of Code 2018
Dear RDKitters, here is a project idea for GSoC 2018 (actually brought up by Greg during the Hackathon of RDKitUGM2016): Project: RDKit lite Brief explanation: Create a minimal version of the RDKit that only contains basic functionality (like MolFrom/ToSmiles and substructure search capabilities, (...)) in order to make it easier to create bindings to the RDKit from other languages or to port the RDKit to other languages. Expected results: A minimal version of the RDKit that could be bound to from other languages like Go, Rust or Nim, would immensely enhance its reach by introducing cheminformatics capabilities to languages where this functionality is currently still missing or lacking. Prerequisites: C, C++ Mentor: t.b.d. Kind regards, Axel On 15.01.2018 08:09, Greg Landrum wrote: Dear all, We've been invited again to participate in the OpenChemistry application for Google Summer of Code. In order to participate we need ideas for projects and mentors to go along with them. The current list of RDKit ideas is being maintained here: http://wiki.openchemistry.org/GSoC_Ideas_2018#RDKit_Project_Ideas (Note: at the point that I'm pressing "send", that's still a copy of last year's project ideas). If you're willing to be a mentor (please ask me about the ~5 hours/week required here) or have ideas, please reply to this thread. Best, -greg -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] rdkit
Hi Paul, when using pillow and Python 2 I recommend to also install pycairo (avail. via conda install). For Python 3 you would need cairo from conda and cairocffi from pip. (http://rdkit.org/docs/Install.html#recommended-extras) Kind regards, Axel On 05.07.2017 08:09, Paul Czodrowski wrote: Dear Greg (and RDKitters), good news is: I just re-ran “conda install -c rdkit rdkit”, and at least rdkit is working properly. “import pillow” still does not work. This is the output of “conda list”: backports-abc 0.5 backports.shutil-get-terminal-size 1.0.0 bleach 2.0.0 boost 1.56.0 py27_3rdkit bzip2 1.0.6 vc9_3 [vc9] certifi 2017.4.17 colorama 0.3.9 configparser 3.5.0 decorator 4.0.11 entrypoints 0.2.3 enum34 1.1.6 freetype 2.5.5 vc9_2 [vc9] functools32 3.2.3.post2 html5lib 0.9 idisplay 0.1.2 ipykernel 4.6.1 ipython 5.4.1 ipython-genutils 0.2.0 ipywidgets6.0.0 Jinja2 2.9.6 jpeg 9bvc9_0 [vc9] jsonschema 2.6.0 jupyter 1.0.0 jupyter-client 5.0.1 jupyter-console 5.1.0 jupyter-core 4.3.0 libpng 1.6.27vc9_0 [vc9] libtiff 4.0.6 vc9_3 [vc9] MarkupSafe 1.0 mistune 0.7.4 mkl 2017.0.1 0 nbconvert 5.2.1 nbformat 4.3.0 notebook 5.0.0 numpy 1.11.3 py27_0 olefile 0.44 py27_0 pandas0.20.1 np111py27_0 pandocfilters 1.4.1 pathlib2 2.2.1 pickleshare 0.7.4 pillow 4.2.0py27_0 pip 9.0.1py27_1 prompt-toolkit 1.0.14 py3Dmol 0.6.3 Pygments 2.2.0 python 2.7.131 python-dateutil 2.6.0 python-dateutil 2.6.0py27_0 pytz 2017.2py27_0 pyzmq 16.0.2 qtconsole 4.3.0 scandir 1.5 setuptools 27.2.0 py27_1 setuptools 36.0.1 simplegeneric 0.8.1 singledispatch 3.4.0.3 six 1.10.0 py27_0 six 1.10.0 testpath 0.3.1 tornado 4.5.1 traitlets 4.3.2 vs2008_runtime 9.00.30729.5054 0 wcwidth 0.1.7 webencodings 0.5.1 wheel 0.29.0 py27_0 widgetsnbextension 2.0.0 win-unicode-console 0.5 zlib 1.2.8 vc9_3 [vc9] Best regards, Paul *Von:*Greg Landrum [mailto:greg.land...@gmail.com] *Gesendet:* Mittwoch, 5. Juli 2017 06:33 *An:* Paul Czodrowski*Cc:* rdkit *Betreff:* Re: [Rdkit-discuss] rdkit The fact that "import pillow" doesn't work is very suspicious. Can you please be sure that pillow and the rdkit are both installed in the active environment by executing: "conda list" On Wed, Jul 5, 2017 at 5:50 AM, Paul Czodrowski > wrote: Dear Greg (and RDKitters), before it came to this error message, the conda installation of rdkit was running properly. I then did a “conda install pillow” in this conda installation, which now results in this error. BTW, “import pillow” shows: ImportErrorTraceback (most recent call last) in () > 1importpillow ImportError: No module named pillow “import rdkit” gives: --- ImportErrorTraceback (most recent call last) in () > 1importrdkit c:\users\m163729\appdata\local\continuum\anaconda2\envs\rdkit_env\lib\site-packages\rdkit\__init__.pyin () 1try: > 2from.rdBase importrdkitVersion as__version__ 3exceptImportError: 4 __version__ ='Unknown' 5raise ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden. BZW, “import PIL” works without any problems. It does not make sense to me that a simple “conda install pillow” screws up the
Re: [Rdkit-discuss] ipywidgets & py3Dmol
Hi Paul, I just tried the example Notebook that you provided and it runs just as in Greg's blog post, i.e. with the interactive slider (see attached screenshot). This is the configuration I used (in Anaconda): python 3.5.3 rdkit 2017.03.2 notebook 5.0.0 ipywidgets6.0.0 py3Dmol 0.6.3 Kind regards, Axel On 20.06.2017 07:48, Paul Czodrowski wrote: Dear RDKitters, When trying to re-run Greg’s wonderful blog entry about the py3Dmol integration (https://rdkit.blogspot.de/2016/07/using-ipywidgets-and-py3dmol-to-browse.html ), I’m getting a different behavior (check the attachment with a screenshot and the jupyter notebook). Any help would be appreciated. Cheers, Paul This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. If you have received this transmission in error, please notify the sender immediately and delete the message and any attachment from your system. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept liability for any omissions or errors in this message which may arise as a result of E-Mail-transmission or for damages resulting from any unauthorized changes of the content of this message and any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not guarantee that this message is free of viruses and does not accept liability for any damages caused by any virus transmitted therewith. Click http://www.merckgroup.com/disclaimerto access the German, French, Spanish and Portuguese versions of this disclaimer. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] generating scaffold trees
Hi Markus, to my knowledge, there is no implementation in RDKit available yet. Kind regards, Axel On 31.03.2017 16:55, Markus Metz wrote: Dear Axel and all: I have come across an older discussion about Ansgar Schuffenhauer's work on scaffolds: -- Axel Pahl <http://www.mail-archive.com/search?l=rdkit-discuss@lists.sourceforge.net=from:%22Axel+Pahl%22> Fri, 22 May 2015 04:39:33 -0700 <http://www.mail-archive.com/search?l=rdkit-discuss@lists.sourceforge.net=date:20150522> Dear RDKitters, has someone used the RDKit to generate scaffold trees from molecules as described in this paper: Schuffenhauer, A., Ertl, P., Roggo, S., Wetzel, S., Koch, M. A., Waldmann, H., J. Chem. Inf. Model. 2007, 47, 47-58 I know that this is possible with ScaffoldHunter and that there is a Pipeline Pilot component for it, but being able to do it in RDKit would fit especially well in my workflow... Kind regards and have a nice weekend, Axel -- Has there been any update regarding this matter? Thank you very much and cheers, Markus -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] scaffold distance algorithm
Well, I guess this means no. That leaves more fun for me... :-P -Axel On 23.03.2017 09:38, Axel Pahl wrote: > Dear fellow RDKitters, > > has someone by any chance tried to implement in RDKit the scaffold > distance algorithm by Jürgen Bajorath et al. (and would be willing to > share some code)? > > Li, R.; Stumpfe, D.; Vogt, M.; Geppert, H.; Bajorath, J. > Development of a Method to Consistently Quantify the Structural Distance > Between Scaffolds and to Assess Scaffold Hopping Potential > J. Chem. Inf. Model. 2011, 51, 2507 > DOI: 10.1021/ci2003945 > > Best regards, > Axel > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] scaffold distance algorithm
Dear fellow RDKitters, has someone by any chance tried to implement in RDKit the scaffold distance algorithm by Jürgen Bajorath et al. (and would be willing to share some code)? Li, R.; Stumpfe, D.; Vogt, M.; Geppert, H.; Bajorath, J. Development of a Method to Consistently Quantify the Structural Distance Between Scaffolds and to Assess Scaffold Hopping Potential J. Chem. Inf. Model. 2011, 51, 2507 DOI: 10.1021/ci2003945 Best regards, Axel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Find out if a molecuole object was generated from smiles or smarts
Thanks, Greg. This is exactly what I was looking for. KR Axel On 07.11.2016 15:18, Greg Landrum wrote: Brian is exactly right: atoms (or bonds) constructed from SMARTS will have queries, and so HasQuery() will return True. This is not true of atoms (or bonds) that are constructed from SMILES. -greg On Mon, Nov 7, 2016 at 2:23 PM, Brian Kelley <fustiga...@gmail.com <mailto:fustiga...@gmail.com>> wrote: I would try checking: atom.HasQuery() I expect the smarts molecules have this property by default and smiles don't. Greg can confirm, and I can double check later today. Brian Kelley > On Nov 7, 2016, at 7:57 AM, Paul Emsley <pems...@mrc-lmb.cam.ac.uk <mailto:pems...@mrc-lmb.cam.ac.uk>> wrote: > >> On 07/11/2016 12:37, Axel Pahl wrote: >> >> amongst other options, I can generate an RDKit mol object by one of >> these two ways: >> >> mol1 = Chem.MolFromSmiles() >> mol2 = Chem.MolFromSmarts() >> >> Is there a possibility to detect for a given mol object whether it was >> generated from Smiles or Smarts? > > Not obviously to me. > > Perhaps you can do something like this at creation time: > > mol2.SetProp('origin', 'SMARTS') > > then use mol.GetProp('origin') when you need to do the test (inside a try/except KeyError). > > Paul. > > > -- > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net <mailto:Rdkit-discuss@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss <https://lists.sourceforge.net/lists/listinfo/rdkit-discuss> -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net <mailto:Rdkit-discuss@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss <https://lists.sourceforge.net/lists/listinfo/rdkit-discuss> -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Find out if a molecuole object was generated from smiles or smarts
Dear all, amongst other options, I can generate an RDKit mol object by one of these two ways: mol1 = Chem.MolFromSmiles() mol2 = Chem.MolFromSmarts() Is there a possibility to detect for a given mol object whether it was generated from Smiles or Smarts? Many thanks in advance. Kind regards, Axel -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] OCEAN: Our Target Prediction Paper (including Source Code)
Hi Paul, very interesting, thanks a lot for sharing! Looking forward to the presentation at the UGM! Kind regards, Axel On 27.09.2016 06:13, Paul Czodrowski wrote: Dear RDKitters, Our target prediction method – fully based on RDKit – has become online: OCEAN: *O*ptimized *C*ross r*EA*ctivity estimatio*N* http://pubs.acs.org/doi/abs/10.1021/acs.jcim.6b00067 The source code can be found here: https://github.com/rdkit/OCEAN We will give a talk as well an hands-on workshop at the upcoming RDKit UGM end of October. Cheers, Guido & Paul This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. If you have received this transmission in error, please notify the sender immediately and delete the message and any attachment from your system. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept liability for any omissions or errors in this message which may arise as a result of E-Mail-transmission or for damages resulting from any unauthorized changes of the content of this message and any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not guarantee that this message is free of viruses and does not accept liability for any damages caused by any virus transmitted therewith. Click http://www.merckgroup.com/disclaimerto access the German, French, Spanish and Portuguese versions of this disclaimer. -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] bond length in 2D structure drawing
Hi Greg, thanks a lot. That is exactly what I was looking for! RDKit rules! Kind regards, Axel On 19.09.2016 09:35, Greg Landrum wrote: Hi Axel, It's probably most straightforward to use the function AllChem.TransformMol() to scale the coordinates. Here's an example of applying the function to scale all the coordinates by a factor of 2: In [1]: from rdkit import Chem In [2]: from rdkit.Chem import rdMolTransforms In [5]: from rdkit.Chem import AllChem In [6]: import numpy In [7]: tm = numpy.zeros((4,4),numpy.double) In [8]: for i in range(3): tm[i,i] = 2. In [9]: tm[3,3] = 1. In [10]: m = Chem.MolFromSmiles('C1CCC1') In [11]: AllChem.Compute2DCoords(m) Out[11]: 0 In [12]: print(Chem.MolToMolBlock(m)) RDKit 2D 4 4 0 0 0 0 0 0 0 0999 V2000 1.0607 -0.0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0. -1.06070. C 0 0 0 0 0 0 0 0 0 0 0 0 -1.06070.0. C 0 0 0 0 0 0 0 0 0 0 0 0 0.1.06070. C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 2 3 1 0 3 4 1 0 4 1 1 0 M END In [13]: AllChem.TransformMol(m,tm) In [14]: print(Chem.MolToMolBlock(m)) RDKit 2D 4 4 0 0 0 0 0 0 0 0999 V2000 2.1213 -0.0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0. -2.12130. C 0 0 0 0 0 0 0 0 0 0 0 0 -2.12130.0. C 0 0 0 0 0 0 0 0 0 0 0 0 0.2.12130. C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 2 3 1 0 3 4 1 0 4 1 1 0 M END In your case, assuming that the bond length in the drawings is 1.0A, you would use a scale factor of 1.5 (that's on line [8] above). Best, -greg On Mon, Sep 19, 2016 at 8:41 AM, Axel Pahl <axelp...@gmx.de <mailto:axelp...@gmx.de>> wrote: Dear fellow RDKitters, I have an SD file with 2D molecules generated by another Cheminformatics toolkit (yes, there are others! ;-) ). When I depict them with RDKit (with Draw.MolToImage()) they look very condensed with too short bonds and just appear not right. When I re-generate the coordinates by using Compute2DCoord(), the structure drawings do look great, but RDkit re-calculates all coordinates and the orientation of the whole molecule is completely changed. Can I avoid this, keep the original orientation of the molecules and just do something like "apply drawing settings" or "use standard bond lengths" to a molecule? Many thanks in advance. Kind regards, Axel -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net <mailto:Rdkit-discuss@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss <https://lists.sourceforge.net/lists/listinfo/rdkit-discuss> -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] bond length in 2D structure drawing
Dear fellow RDKitters, I have an SD file with 2D molecules generated by another Cheminformatics toolkit (yes, there are others! ;-) ). When I depict them with RDKit (with Draw.MolToImage()) they look very condensed with too short bonds and just appear not right. When I re-generate the coordinates by using Compute2DCoord(), the structure drawings do look great, but RDkit re-calculates all coordinates and the orientation of the whole molecule is completely changed. Can I avoid this, keep the original orientation of the molecules and just do something like "apply drawing settings" or "use standard bond lengths" to a molecule? Many thanks in advance. Kind regards, Axel -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Some feedback from the Sheffield Cheminformatics Conference
Hi Greg, that is great news, honest congratulations and thanks for sharing. And just wait for the big event coming up end of october! Then 100% of the talks will cover the RDKit! Kind regards, Axel On 07.07.2016 09:20, Greg Landrum wrote: Dear all, I was at the Sheffield Cheminformatics conference earlier this week (along with several people from this list) and I was really struck by the number of talks and posters that are using the RDKit. By my rough count the RDKit was used for about 1/3 of the talks and a similar fraction of the posters. This of course, makes me smile rather broadly (Christian, Nadine, and Sereina had to suffer through this while we were waiting at the airport ;-) ) but a big part of the reason for this success is the engagement and activity of the RDKit community. So I figured I'd share so that those of you who weren't in Sheffield also get the chance to grin about it. We're having an impact... that's really cool. Thanks! and congrats! :-) -greg -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] conda build of Release_2016_03_2 failed on Ubuntu 16.04.
Hi Riccardo, thanks, I found the problem. As suspected it was related to conda and had nothing to do with RDKit (https://github.com/conda/conda/issues/2212#issuecomment-228277548). Many thanks for your help. Kind regards, Axel On 27.06.2016 22:44, Riccardo Vianello wrote: Hi Axel, thanks a lot for your help, using the development branch and the Release_2016_03_2 git tag in rdkit/meta.yaml worked. I now get a strange error in anaconda when actually trying to install the package (Error: Invalid version spec: ==), but that seems to be unrelated to RDKit (there is already an issue on anaconda github). My understanding was that the preferred way to install the RDKit was via anaconda (RDKit was the reason I started using anaconda), is that still correct? I'm not exactly sure about the commands you used, but I'm afraid I wasn't able to reproduce the described problem using conda 4.1.4 and conda-build 1.21.2 on my fedora box. In case the error persisted, could you please provide some additional context? Best regards, Riccardo -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Generation of stereo-isomers
Hi Soren, maybe this function which enumerates racemates with one stereocenter into the corresponding enantiomers might help: def enum_racemates(sdf_list_or_file, find_only=True, mol_id="molid"): """returns: result_sdf::list, racemic_molids::list find_only==True: return new sdf as list which contains all the racemates of the input sdf. find_only==False: return new sdf as list with ALL input structures, where the racemates are replaced by their two enantiomers. The returned sdf is always equal in size or larger as the input sdf. Multiple stereo centers are not yet handled. In the new sdf the molids are no longer unique and should be reassigned (remove molid and run calc_props(sdf)).""" result_sdf = Mol_List() racemic_molids = [] if not isinstance(sdf_list_or_file, list) and sdf_list_or_file.atEnd(): # sdf is file print(" * file object is at end, please reload.") return None for mol in sdf_list_or_file: first_undefined = False chiral_centers = Chem.FindMolChiralCenters(mol, includeUnassigned=True) if chiral_centers: first_center= chiral_centers[0][0] first_undefined = chiral_centers[0][1] == "?" if first_undefined: racemic_molids.append(int(mol.GetProp(mol_id))) if find_only: result_sdf.append(mol) continue else: mol1 = Chem.Mol(mol) mol2 = Chem.Mol(mol) mol1.GetAtomWithIdx(first_center).SetChiralTag(Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CW) mol2.GetAtomWithIdx(first_center).SetChiralTag(Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CCW) result_sdf.append(mol1) result_sdf.append(mol2) else: if not find_only: # return ALL mols result_sdf.append(mol) return result_sdf, racemic_molids Please also have a look at this post http://sourceforge.net/p/rdkit/mailman/message/32390126/ and Toby's answer which pointed me in the right direction. Kind regards, Axel On 24.09.2015 23:17, Soren Wacker wrote: Hi, is it possible with RDKit to generate all stereoisomers of a given compound? If not, is anyone working on it? If not, how difficult would it be / what would be the best way to implement such a function. best regards Soren -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] generating scaffold trees
Hi Nick, are there any news on this? It would still be very interesting. Kind regards, Axel (and a great UGM to all attendees!) On 22.05.2015 17:31, Nicholas Firth wrote: > We have an as yet unpublished method which is similar (but performs better) > implemented in RDKit. However we use MOE for the scaffold tree. It would be > quite easy to implement in RDKit , but I have a thesis to write! > > My suggestion would be to ask Nathan to write up the paper and then give you > guys the code. > > Best, > Nick > > Nicholas C. Firth | PhD Student | Cancer Therapeutics > The Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton | > Surrey | SM2 5NG > T 020 8722 4033 | E nicholas.fi...@icr.ac.uk | W www.icr.ac.uk | Twitter > @ICRnews > > > From: George Papadatos [gpapada...@gmail.com] > Sent: 22 May 2015 16:27 > To: Axel Pahl > Cc: RDKit Discuss > Subject: Re: [Rdkit-discuss] generating scaffold trees > > Hi all, > > Coincidentally, we had a chat about this with James the other day. > Maybe the good colleagues at the ICR have implemented this already with > RDKit? Nick? > > Cheers, > > g > > > On 22 May 2015 at 13:38, Axel Pahl <axelp...@gmx.de<mailto:axelp...@gmx.de>> > wrote: > Dear RDKitters, > > has someone used the RDKit to generate scaffold trees from molecules as > described in this paper: > Schuffenhauer, A., Ertl, P., Roggo, S., Wetzel, S., Koch, M. A., > Waldmann, H., J. Chem. Inf. Model. 2007, 47, 47-58 > > I know that this is possible with ScaffoldHunter and that there is a > Pipeline Pilot component for it, but being able to do it in RDKit would > fit especially well in my workflow... > > Kind regards and have a nice weekend, > Axel > > > -- > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net<mailto:Rdkit-discuss@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company > Limited by Guarantee, Registered in England under Company No. 534147 with its > Registered Office at 123 Old Brompton Road, London SW7 3RP. > > This e-mail message is confidential and for use by the addressee only. If > the message is received by anyone other than the addressee, please return the > message to the sender by replying to it and then delete the message from your > computer and network. > -- Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140 ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] create a mol from core and mol fragments
Nicholas, thanks a lot for the code, I will definitely look into it. Kind regards, Axel On 03.07.2015 09:19, Nicholas Firth wrote: Hi Axel, I was sure there was something in the core that did this but I can't seem to find it now! I have a function that uses isotope labelled dummy atoms to attach fragments if it's of any use? As with most the code I write, it doesn't have the greatest error handling, or rational use of deepcopy. def connectAllFragsIsomeric(molList): numFrags = len(molList) isotopeList = [] allIsos = [] # This loop is to make a list of molecules along with which isotopes they contain # so I can keep track of where which R-Groups are later for i in range(numFrags): molList[i] = processToIsomericMol(molList[i]) for atom in molList[i].GetAtoms(): isotope = atom.GetIsotope() if(isotope): isotopeList.append(isotope) allIsos.append(isotope) molList[i] = [molList[i], deepcopy(isotopeList)] del isotopeList[:] allIsos.sort() allIsos = list(set(allIsos)) for i in allIsos: reactantIdx = [] # Find two fragments with the labeled R-group for j in range(len(molList)): if(i in molList[j][1]): reactantIdx.append(j) # Sanity check that there are only two frags with the same R-group if(len(reactantIdx) != 2): print 'Too many fragments with a R-groups numbered with %i' % i exit() rxn = AllChem.ReactionFromSmarts('[a,A:1]-[%i*:2].[a,A:3]-[%i*:4][a,A:1]-[a,A:3].[%i*:2][%i*:4]' % (i, i, i, i)) ps = rxn.RunReactants((molList[reactantIdx[0]][0], molList[reactantIdx[1]][0])) newMol = ps[0][0] newIsos = list(set(molList[reactantIdx[0]][1]) | set(molList[reactantIdx[1]][1])) newIsos.remove(i) molList.append([newMol, newIsos]) del molList[reactantIdx[1]] del molList[reactantIdx[0]] return molList Best, Nick Nicholas C. Firth | PhD Student | Cancer Therapeutics The Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton | Surrey | SM2 5NG T 020 8722 4033 | E nicholas.fi...@icr.ac.uk | W www.icr.ac.uk | Twitter @ICRnews From: Axel Pahl [axelp...@gmx.de] Sent: 03 July 2015 07:27 To: RDKit Discuss Subject: [Rdkit-discuss] create a mol from core and mol fragments Dear fellow RDKitters, I use ReplaceCore and GetMolFrags to create a 2D SAR table: tmp = Chem.ReplaceCore(mol, core_mol, labelByIndex=True) frag_mols = list(Chem.GetMolFrags(tmp, asMols=True)) Is it also possible to do the reverse? Create a new molecule from the core and two fragments? I would like to fill the gaps in the SAR table and calculate some properties for these molecules. Kind regards, Axel The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] create a mol from core and mol fragments
Dear fellow RDKitters, I use ReplaceCore and GetMolFrags to create a 2D SAR table: tmp = Chem.ReplaceCore(mol, core_mol, labelByIndex=True) frag_mols = list(Chem.GetMolFrags(tmp, asMols=True)) Is it also possible to do the reverse? Create a new molecule from the core and two fragments? I would like to fill the gaps in the SAR table and calculate some properties for these molecules. Kind regards, Axel -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] RDKit Tools for the IPython Notebook
Dear fellow RDKitters, the RDKit community is always so helpful that I wanted share back two functions that I use in the IPython Notebook from which I thought that they could be of use to others, as well. - show_table: Display a list of molecules in a table with molecule properties as columns. When an ID property is given, the table becomes interactive and compounds can be selected. I know that this can be also done with PandasTools but that might be overkill in some situations. Also the table from Pandas is not interactive to my knowledge. - jsme: Display Peter Ertl's Javascript Melecule Editor to enter a molecule directly in the IPython notebook (how cool is that??) If you are interested, please have a look at the GitHub https://github.com/apahl/rdkit_ipynb_tools repo and the example http://nbviewer.ipython.org/github/apahl/rdkit_ipynb_tools/blob/master/rdkit_ipynb_tools.ipynb notebook. Kind regards, Axel -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] generating scaffold trees
That would be awesome. Kind regards, Axel On 22.05.2015 17:31, Nicholas Firth wrote: We have an as yet unpublished method which is similar (but performs better) implemented in RDKit. However we use MOE for the scaffold tree. It would be quite easy to implement in RDKit , but I have a thesis to write! My suggestion would be to ask Nathan to write up the paper and then give you guys the code. Best, Nick Nicholas C. Firth | PhD Student | Cancer Therapeutics The Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton | Surrey | SM2 5NG T 020 8722 4033 | E nicholas.fi...@icr.ac.uk | W www.icr.ac.uk | Twitter @ICRnews From: George Papadatos [gpapada...@gmail.com] Sent: 22 May 2015 16:27 To: Axel Pahl Cc: RDKit Discuss Subject: Re: [Rdkit-discuss] generating scaffold trees Hi all, Coincidentally, we had a chat about this with James the other day. Maybe the good colleagues at the ICR have implemented this already with RDKit? Nick? Cheers, g On 22 May 2015 at 13:38, Axel Pahl axelp...@gmx.demailto:axelp...@gmx.de wrote: Dear RDKitters, has someone used the RDKit to generate scaffold trees from molecules as described in this paper: Schuffenhauer, A., Ertl, P., Roggo, S., Wetzel, S., Koch, M. A., Waldmann, H., J. Chem. Inf. Model. 2007, 47, 47-58 I know that this is possible with ScaffoldHunter and that there is a Pipeline Pilot component for it, but being able to do it in RDKit would fit especially well in my workflow... Kind regards and have a nice weekend, Axel -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.netmailto:Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] generating scaffold trees
Dear RDKitters, has someone used the RDKit to generate scaffold trees from molecules as described in this paper: Schuffenhauer, A., Ertl, P., Roggo, S., Wetzel, S., Koch, M. A., Waldmann, H., J. Chem. Inf. Model. 2007, 47, 47-58 I know that this is possible with ScaffoldHunter and that there is a Pipeline Pilot component for it, but being able to do it in RDKit would fit especially well in my workflow... Kind regards and have a nice weekend, Axel -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] install rdkit cartridge
Dear Tim, please take a look at this README in your installation: your RDKit folder/Code/PgSQL/rdkit/README It essentially boils down to this: cd $RDBASE/Code/PgSQL/rdkit $ make $ sudo make install $ make installcheck (only the second step has to be performed as root) Kind regards, Axel On 04/24/2015 01:33 PM, Tim Dudgeon wrote: How to install RDKit cartridge? The instructions here show how to use it, but not how to install it. http://www.rdkit.org/docs/Cartridge.html I have RDKit and PostgreSQL installed from the corresponding Debian packages, but alas no cartridge :-( Tim -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] install rdkit cartridge
The instructions below appliy to the RDKit installation from source and are probably not applicable to the Debian package, sorry for generating confusion. Kind regards, Axel On 04/24/2015 02:24 PM, Axel Pahl wrote: Dear Tim, please take a look at this README in your installation: your RDKit folder/Code/PgSQL/rdkit/README It essentially boils down to this: cd $RDBASE/Code/PgSQL/rdkit $ make $ sudo make install $ make installcheck (only the second step has to be performed as root) Kind regards, Axel On 04/24/2015 01:33 PM, Tim Dudgeon wrote: How to install RDKit cartridge? The instructions here show how to use it, but not how to install it. http://www.rdkit.org/docs/Cartridge.html I have RDKit and PostgreSQL installed from the corresponding Debian packages, but alas no cartridge :-( Tim -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] getting stereo info from bonds
Dear Micha, have you considered using the commandline tool molconvert that is part of MarvinSketch, which can do just that (and many other things): molconvert mol mol.mrv -o mol.mol It should be under bin/ in the Marvin installation for batch processing you can e.g. use a small shell script: for f in *.mrv; do echo converting f... BN=(basename f .mrv) molconvert mol f -o BN.mol done Hope, this helps. Kind regards, Axel A question I have is why you want to access the bond wedging. This is very good question so I will begin with answering this. Im writing a module, which converts *mrv files to molfiles, both ways. In my case, the original mrv file looks like this: cmlMDocumentMChemicalStructmolecule molID=m1atomArrayatom id=a1 elementType=C x2=-3.1249866416667733 y2=-0.5015733293207466/atom id=a2 elementType=C x2=-4.458533297665067 y2=-1.2715733231607467/atom id=a3 elementType=C x2=-4.458533297665067 y2=-2.81175997750592/atom id=a4 elementType=C x2=-3.1249866416667733 y2=-3.58175997134592/atom id=a5 elementType=C x2=-1.7912533190033066 y2=-2.81175997750592/atom id=a6 elementType=C x2=-1.7912533190033066 y2=-1.2715733231607467/atom id=a7 elementType=C x2=-0.45751999633984003 y2=-0.5013866626555733/atom id=a8 elementType=O x2=-0.45751999633984003 y2=1.0384266583592534/atom id=a9 elementType=C x2=0.87583999299328 y2=-1.2713866564955734/atom id=a10 elementType=C x2=0.87583999299328 y2=-2.8113866441755735//atomArraybondArraybond atomRefs2=a1 a2 order=2/bond atomRefs2=a2 a3 order=1/bond atomRefs2=a3 a4 order=2/bond atomRefs2=a4 a5 order=1/bond atomRefs2=a5 a6 order=2/bond atomRefs2=a6 a1 order=1/bond atomRefs2=a6 a7 order=1/bond atomRefs2=a7 a9 order=1/bond atomRefs2=a9 a10 order=1/bond atomRefs2=a7 a8 order=1bondStereoW/bondStereo/bond/bondArray/molecule/MChemicalStruct/MDocument/cml Its easy to spot, that the last bond have additional tag - bondStereo with value W. Looking at this specification http://download.accelrys.com/freeware/ctfile-formats/ctfile-formats.zip, page 50 I can see that this can be translated into 1 in 4th field in bond block and the field is called bond stereo, the same as mrvs bond tag - this is the actual reason why Ive used term stereo in my email. So the resulting molfile looks like this: 10 10 0 0 0 0 0 0 0 0999 V2000 -1.6741 -0.2687 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -2.3885 -0.6812 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -2.3885 -1.5063 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -1.6741 -1.9188 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0.9596 -1.5063 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0.9596 -0.6812 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0.2451 -0.2686 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0.2451 0.5563 0. O 0 0 0 0 0 0 0 0 0 0 0 0 0.4692 -0.6811 0. C 0 0 0 0 0 0 0 0 0 0 0 0 0.4692 -1.5061 0. C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 2 0 0 0 0 2 3 1 0 0 0 0 3 4 2 0 0 0 0 4 5 1 0 0 0 0 5 6 2 0 0 0 0 6 1 1 0 0 0 0 6 7 1 0 0 0 0 7 9 1 0 0 0 0 9 10 1 0 0 0 0 7 8 1 1 0 0 0 M END Now imagine I only have this molfile and I want to convert it back to *mrv. I dont want to write my own parser for molfiles when I know that RDKit can already parse it. But I need to extract this bond stereo information from within RDKit somehow. Now when you say that this 1 or W value corresponds to bond direction, Im guessing that direction can store only two values: up and down so 1 and 6 (W and H in marvin terms). So what about other values which this field can have, If for example I have this molfile: 10 10 0 0 0 0 0 0 0 0999 V2000 -1.6741 -0.2687 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -2.3885 -0.6812 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -2.3885 -1.5063 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -1.6741 -1.9188 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0.9596 -1.5063 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0.9596 -0.6812 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0.2451 -0.2686 0. C 0 0 0 0 0 0 0 0 0 0 0 0 -0.2451 0.5563 0. O 0 0 0 0 0 0 0 0 0 0 0 0 0.4692 -0.6811 0. C 0 0 0 0 0 0 0 0 0 0 0 0 0.4692 -1.5061 0. C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 2 0 0 0 0 2 3 1 0 0 0 0 3 4 2 0 0 0 0 4 5 1 0 0 0 0 5 6 2 0 0 0 0 6 1 1 0 0 0 0 6 7 1 0 0 0 0 7 9 1 0 0 0 0 9 10 1 0 0 0 0 7 8 1 4 0 0 0 M END So 4 instead of 1, how I will get this information from RDKit? -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss