Re: [Rdkit-discuss] RDKit Cookbook

2017-01-18 Thread Chris Swain
Hi, I just copied the first 4 rows of the warning, it is actually repeated many, many times. The change Greg suggests fixes things, thanks. Chris > On 19 Jan 2017, at 03:32, Greg Landrum wrote: > > Peter is correct, those are just warnings. But they are irritating

Re: [Rdkit-discuss] UpdatePropertyCache() after RunReactants

2017-01-18 Thread Greg Landrum
Coming back to an old one that was mostly answered already: On Thu, Jan 12, 2017 at 3:11 AM, Curt Fischer wrote: > > I recently wanted to use RDKit to model the famous copper-catalyzed > cycloaddition of alkynes and azides. > > I eventually got things working, kind of,

Re: [Rdkit-discuss] invisible methanol / water

2017-01-18 Thread Greg Landrum
That's a bug in the new drawing code with molecules that have no extent in either the X or Y directions. Here's the github item: https://github.com/rdkit/rdkit/issues/1271 I'm surprised that the non-SVG version is working for you. On Wed, Jan 18, 2017 at 11:19 PM, Curt Fischer

Re: [Rdkit-discuss] RDKit Cookbook

2017-01-18 Thread Greg Landrum
Peter is correct, those are just warnings. But they are irritating warnings. You should be able to get rid of them by changing the call to: fig, maxweight = SimilarityMaps.GetSimilarityMapForModel(m5, SimilarityMaps.GetMorganFingerprint, lambda x: getProba((x,), rf.predict_proba)) This passes

Re: [Rdkit-discuss] RDKit "cannot create mol from SMILE" error

2017-01-18 Thread Peter S. Shenkin
In addition to Brian's observation, there is also a "C1" early in the SMILES, but no corresponding X1 to make a ring bond before or after it. It appears that you might be reading the second half of a SMILES for some reason. My guess is that the (C=C1) is associated with a preceding atom that was

Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Milinda Samaraweera
Yes, most common should be the correct term. Thanks, Milinda On Wed, Jan 18, 2017 at 5:49 PM, Peter S. Shenkin wrote: > You say "most stable", but I think you mean "most common." 2H is as stable > as 1H, but less common. > > -P. > > On Wed, Jan 18, 2017 at 5:01 PM, Milinda

Re: [Rdkit-discuss] RDKit "cannot create mol from SMILE" error

2017-01-18 Thread Brian Kelley
That doesn't look like a valid SMILES to me, I don't think a think a smiles string can start with a parenthesis ( branch ). Brian Kelley > On Jan 18, 2017, at 6:18 PM, Larson Danes wrote: > > Hi all, > > I'm using the following query in postgresql (with the rdkit

[Rdkit-discuss] RDKit "cannot create mol from SMILE" error

2017-01-18 Thread Larson Danes
Hi all, I'm using the following query in postgresql (with the rdkit extension installed): "select casrn from mols where m @> CAST(? AS mol)" This returns "ERROR: could not create molecule from SMILES '...' " on occasion. One such SMILE that causes this error regularly is '(C=C1)[N+]([O-])=O'.

Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Peter S. Shenkin
You say "most stable", but I think you mean "most common." 2H is as stable as 1H, but less common. -P. On Wed, Jan 18, 2017 at 5:01 PM, Milinda Samaraweera < milindaatw...@gmail.com> wrote: > Hi Bob, > > I am trying to filter out any compound that does not have the most stable > isotopic form;

Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Milinda Samaraweera
Hi Bob, I am trying to filter out any compound that does not have the most stable isotopic form; (anything other than: 12C,1H,14N,16O, 31P, 32S) or to contain only MonoIsotopic compounds. Thanks, Milinda ​ -- Check out

Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Bob Funchess
Hi Milinda, As an aside, most of the isotopes you listed are stable. The only nuclides in the list that are actually unstable are 14C, 3H, 24P and 46P. If your goal is to exclude isotopically enriched structures rather than radioactive ones, it might be better to just look for ANY isotopic

Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Stiefl, Nikolaus
Hi Maybe this is much less efficient but I guess if you need it for specific isotopes then you could try using a smarts pattern and check for that? In [20]: q = Chem.MolFromSmarts("[13C,14C,2H,3H,15N,24P,46P,33S,34S,36S]") In [21]: m = Chem.MolFromSmiles('CC[15NH2]') In [22]:

Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Milinda Samaraweera
Nik, That works too... Thanks Milinda On Wed, Jan 18, 2017 at 3:08 PM, Stiefl, Nikolaus < nikolaus.sti...@novartis.com> wrote: > Hi > > Maybe this is much less efficient but I guess if you need it for specific > isotopes then you could try using a smarts pattern and check for that? > > > > In

Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Milinda Samaraweera
Greg, I am looking to remove entries that contain un-stable isotopes of elements CHNOPS (e.g. heavy_isotopes =['13C', '14C', '2H', '3H', '15N', '24P', '46P', '33S', '34S', '36S'] ). Is there a way to modify the above code to achieve that? Thanks, Milinda On Wed, Jan 18, 2017 at 11:16 AM, Greg

[Rdkit-discuss] RDKit Cookbook

2017-01-18 Thread Chris Swain
Hi, I’ve been trying a few o the examples in http://www.rdkit.org/docs/Cookbook.html and I’d like to use the Similarity Maps as shown below from rdkit.Chem.Draw import SimilarityMaps # helper function def getProba(fp, predictionFunction): return

Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Greg Landrum
Hi Milinda, Here's an approach that finds all the atoms that have an isotope specified: In [1]: from rdkit import Chem In [2]: from rdkit.Chem import rdqueries In [3]: q = rdqueries.IsotopeGreaterQueryAtom(1) In [7]: list(x.GetIdx() for x in

Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Peter S. Shenkin
How about a regex filter on the all-atom SMILES? -P. On Wed, Jan 18, 2017 at 9:56 AM, Milinda Samaraweera < milindaatw...@gmail.com> wrote: > Dear Experts, > > I am trying to figure out a way to exclude entries which contain heavy > atoms (13C, 2H, 3H, etc), from a SD file (which has close to

[Rdkit-discuss] Check for Heavy Isotopes using RdKit

2017-01-18 Thread Milinda Samaraweera
Dear Experts, I am trying to figure out a way to exclude entries which contain heavy atoms (13C, 2H, 3H, etc), from a SD file (which has close to two thousand entries) and write an updated file with the remaining entries. I do understand how to read/write SD files using rdkit. What I do

Re: [Rdkit-discuss] Kekulizing thiazoles

2017-01-18 Thread Rafal Roszak
On Tue, 17 Jan 2017 16:52:36 + Chris Arthur wrote: > ValueError: Sanitization error: Can't kekulize mol In most case I have 'Can't kekulize mol' error for hetorocycle with hydrogen on nitrogen and smiles which have not explicite hydrogen on N. Exempli gratia: