Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Greg Landrum
On Fri, Mar 11, 2016 at 5:41 AM, Peter S. Shenkin wrote: > Seems that somewhere in the guts of RDKit there might well be code that > divides atoms into equivalence classes. > > In the most common (tetravalent, tetrahedral) chiral situation, if the > tetrahedral center's four

Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Peter S. Shenkin
Seems that somewhere in the guts of RDKit there might well be code that divides atoms into equivalence classes. In the most common (tetravalent, tetrahedral) chiral situation, if the tetrahedral center's four connected atoms fell into 3 equivalence classes, the center would be prochiral. Then

[Rdkit-discuss] Stereochemistry question

2016-03-10 Thread Greg Landrum
Dear all, Here's a question for the chemists in the group: do we need to be concerned about representing the stereochemistry of the P=C bond in substructures like O=P(/O)=C/C under normal circumstances? Here's a pubchem compound example that has the double bond crossed (possibly leading one to

Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Greg Landrum
This isn't an area I've thought much about, so this may be a bit naive. It seems like the interesting atom from the perspective of perception is the carbon that the Hs are attached to, not the Hs themselves; it's the carbon that will become a chiral center. If we neglect dependent

Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Brian Kelley
No, prochiral atoms have the same rank. Your question got me thinking to how we could detect prochiral atoms, here is the stupidest/simplest solution I could come up with, it changes isotopes on every atom until a new chiral center is added, this atom is considered prochiral: def

Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Peter S. Shenkin
Is the canonical rank of prochiral H's different or the same? (For example the rank of the H's on C-1 of ethyl chloride.) Thanks, -P. -- Transform Data into Opportunity. Accelerate data analysis in your applications with

Re: [Rdkit-discuss] Merge two fragments at connection point

2016-03-10 Thread Steven Combs
Thanks! I ended up doing this: 1) convert Rosetta restypes to RDKit ROMols 2) use combineMols(), to get a merged ROMol 3) static cast to RWMol and add bond between connecting atoms 4) Convert back to Rosetta 5) Use Rosetta transformations on the atoms that needed to be moved (I didnt find the

Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Greg Landrum
On Thu, Mar 10, 2016 at 2:04 PM, Brian Kelley wrote: > Yes, I actually exposed that function to Python in Rdkit :) > > Be aware that the canonical rank and the output order aren't the same > thing. The rank is what is used during graph traversal, when making the > smiles

Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Brian Kelley
Yes, I actually exposed that function to Python in Rdkit :) Be aware that the canonical rank and the output order aren't the same thing. The rank is what is used during graph traversal, when making the smiles string, to choose what atom to go to next. The output order is what atoms where

Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Maciek Wójcikowski
Hi, Few months back Greg has added CanonicalRankAtoms to rdkit.Chem after my similar question. http://www.rdkit.org/Python_Docs/rdkit.Chem.rdmolfiles-module.html#CanonicalRankAtoms Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl 2016-03-10 13:18 GMT+01:00 Michal

Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Michal Krompiec
Thanks a lot, this is exactly what I wanted. Best regards, Michal On 10 March 2016 at 12:13, Brian Kelley wrote: > The canonicalizer doesn't treat hydrogens any differently than any other > atom, but they have to be in the graph. If you are starting from smiles, > simply

Re: [Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Brian Kelley
The canonicalizer doesn't treat hydrogens any differently than any other atom, but they have to be in the graph. If you are starting from smiles, simply add explicit hydrogens, python example below: >>> from rdkit import Chem >>> m = Chem.MolFromSmiles("CC") >>> mh = Chem.AddHs(m) >>>

[Rdkit-discuss] canonical atom indexing

2016-03-10 Thread Michal Krompiec
Hello, I need a "canonical" method for generating atom indices for a given molecule (with 3D coordinates, so the input is e.g. a mol file), for a molecular descriptor which should be invariant with respect to atom indexing. As I understand, canonical SMILES will give the same atom indices for