Re: [Rdkit-discuss] FindAtomEnvironmentOfRadiusN

2017-03-27 Thread Greg Landrum
Yes, the radius is a number of bonds. I'm not going to argue that this is particularly intuitive (since I can fall either way on the question), but I would say that it's consistent: the environment is provided as a list of bond ids and the function is documented to "find bond subgraphs of a

Re: [Rdkit-discuss] FindAtomEnvironmentOfRadiusN

2017-03-27 Thread Pavel Polishchuk
I guessed why it occurred. I'm interested is it expected behavior? So, if a radius is greater than the number of available bonds in all directions from the rooted atom the function will return empty list as it considers that such environment does not exist. Is this a correct expectation?

Re: [Rdkit-discuss] FindAtomEnvironmentOfRadiusN

2017-03-27 Thread Peter Gedeck
Hello, The atom numbers start with 0. From the middle atom, there are no environments with radius 2. You will get a result if you use the first (=0) or the last (=2) atom. Try this: m = Chem.MolFromSmiles("NCO") i = Chem.FindAtomEnvironmentOfRadiusN(m, 1, 0) Chem.MolToSmiles(Chem.PathToSubmol(m,

[Rdkit-discuss] FindAtomEnvironmentOfRadiusN

2017-03-27 Thread Pavel Polishchuk
Dear RDKitters, I found the issue with FindAtomEnvironmentOfRadiusN but this can be a feature. However, I did not findthis information in help and did not expect such behavior. If I apply FindAtomEnvironmentOfRadiusN function to a small molecule and specify the radius greater than the