Just bumping this up ... On 29 November 2011 16:47, JP <[email protected]> wrote: > Dear Greg, > > I am not sure that is what I need/I explained myself well. > > My question is: If you have a 3D molecule, and you replace a part of > it with a new group based on some SMARTS expression (with no 3D > coorinates) - what is the best way to keep all the 3D info for the > atoms in the molecule which have not changed while creating some > "sensible" co-cordinates (in the current frame) for the newly appended > atoms to the molecule. > > I do not see how AddHs will help me when replacing [OH] with [O-], but > that might just be me being thick. > My problem is that ps = AllChem.ReplaceSubstructs(mol, patt, repl, > replaceAll=True) in my original attached code throws away the 3D > coordinates (ps[0] atoms are all on 0,0,0) - and I don't know of a way > to regain the original co-ordinates back. > > Is this still a rumble? > > Many thanks > > - > Jean-Paul Ebejer > Early Stage Researcher > > > > On 29 November 2011 16:10, Greg Landrum <[email protected]> wrote: >> Dear JP, >> >> On Tue, Nov 29, 2011 at 3:36 PM, JP <[email protected]> wrote: >>> Sorry for the repeated posting -- I had asked a similar question for >>> 2D some time ago >>> (http://www.mail-archive.com/[email protected]/msg01916.html), >>> but now I need the 3D case and I am stuck. >>> >>> Using RDKit 2011_09_01. >>> >>> I am simply protonating a molecule via some simple SMART replacements. >>> I would like the final output molecule to have the same 3D co >>> ordinates as the input one. I have code which works for the 2D case, >>> (basically the below but using >>> GenerateDepictionMatching2DStructure(...) instead. >> >> I think you're overcomplicating things. Once you have the molecule >> ready to be protonated, try doing: >> >> Chem.AddHs(mol,addCoords=True) >> >> That is *supposed* to do the right thing (assuming I've understood the >> request correctly). If it doesn't let me know and I will propose a >> more complicated solution. >> >> -greg
------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

