Re: [Rdkit-discuss] compute canonical transform of a conformer fails

2021-04-21 Thread Rafael L via Rdkit-discuss
I tested your code on several structures and noticed that it failed on molecules with only one element (NH3, OH2...). Then I checked https://www.rdkit.org/docs/source/rdkit.Chem.rdMolTransforms.html and saw that the default ignores hydrogens. So try

Re: [Rdkit-discuss] MFP question about similar substructures and feature reduction

2021-09-29 Thread Rafael L via Rdkit-discuss
Hello, your question prompted me to write a small notebook, which I hope you may find useful: https://github.com/rflameiro/projects/blob/main/comparing_fingerprint_bits.ipynb In summary, bits that are active in both fingerprints usually correspond to the same substructure, unless bit collision

[Rdkit-discuss] Find structures with "non-organic" atoms

2022-03-05 Thread Rafael L via Rdkit-discuss
Dear all, I remember having used some SMARTS-based function to flag structures containing "non-organic" atoms. It seems that there is a knime node for that (

Re: [Rdkit-discuss] Find structures with "non-organic" atoms

2022-03-07 Thread Rafael L via Rdkit-discuss
Thank you, all! Here is my Python implementation for anyone interested: # Check for compounds with "non-organic" atoms not_organic_pat = Chem.MolFromSmarts("[!#5;!#6;!#7;!#8;!#16;!#15;!F;!Cl;!Br;!I;!#1]") # not_organic_pat =

Re: [Rdkit-discuss] Tautomers in drug like molecules

2022-03-31 Thread Rafael L via Rdkit-discuss
I have never used it, but RDKit has functionality to standardize the representation, as described here: https://bitsilla.com/blog/2021/06/standardizing-a-molecule-using-rdkit/. I couldn't say if either approach is better/worse than the other. With tautomers, my guess is that you have to either be

Re: [Rdkit-discuss] Problem generating reduced graphs

2023-08-31 Thread Rafael L via Rdkit-discuss
However, now that I have visualized the graphs generated, I believe this was not an optimal solution, since the graphs do not look reduced at all. Also, the Ac/Ar/D/Hf nomenclature presented on the original ErG paper does not seem to be implemented in RDKit. For now, I believe it's best to stick

[Rdkit-discuss] Problem generating reduced graphs

2023-09-01 Thread Rafael L via Rdkit-discuss
Using rdReducedGraphs.GenerateMolExtendedReducedGraph() on RDKit mols obtained from certain SMILES (e.g. "O=C(OC3c1nccnc1C(=O)N3c2ncc(Cl)cc2)N4CCN(C)CC4") throws the following error: getNumImplicitHs() called without preceding call to calcImplicitValence() I tried removing sanitization/keeping

Re: [Rdkit-discuss] Cannot get the desired result from AllChem.ReplaceSubstructs

2022-05-16 Thread Rafael L via Rdkit-discuss
To find all compounds that match the ester substructure, you can use GetSubstructMatches. I would do the following (I'm supposing you have all your structures in a Pandas dataframe, and that you converted SMILES to RDKit Mol): ester_pattern = Chem.MolFromSmarts("COC(C)=O") # in a pandas

Re: [Rdkit-discuss] Library enumeration in multiple positions with no cross permutation

2022-07-04 Thread Rafael L via Rdkit-discuss
Hi Carsten Your code has two problems: 1. [#4] doesn't mean the number of substitutions, [#0] is an indication for the "non=atom" in SMILES (shown as *) 2. You didn't set the keyword replaceAll to True. Doing this will replace all matches found. Therefore, for your code to work properly, replace:

Re: [Rdkit-discuss] fragment 3D molecules with BRICS

2022-07-14 Thread Rafael L via Rdkit-discuss
Renato, it seems that FragmentOnBRICSBonds and BRICS.BRICSDecompose work differently. The first returns a mol object from which you can get the fragments using GetMolFrags (as you did), while the second returns a list of strings containing the fragments. I'm not sure if you can recover 3D info

[Rdkit-discuss] Error reading SDF dataset from BindingDB

2023-07-25 Thread Rafael L via Rdkit-discuss
Hi, I'm just creating this thread to get the problem and the solution indexed by Google I downloaded several SDF datasets from BindingDB and got errors like this one when using Chem.SDMolSupplier: ERROR: Cannot convert 1. to unsigned int After some digging I found [