Re: [Rdkit-discuss] Generating 3D Coordinates in already existing coordinate frame...

2011-12-12 Thread Greg Landrum
On Wed, Dec 7, 2011 at 5:06 AM, Greg Landrum greg.land...@gmail.com wrote:
 Dear JP,

 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.

 You need two things here:
 1) the coordinates of the input molecule should be copied to the result 
 molecule
 2) some way to generate sensible coordinates for the new atoms.

 The first is already supposed to be happening; the fact that it's not
 is a bug which I will fix
 (https://sourceforge.net/tracker/?func=detailaid=3453144group_id=160139atid=814650).

This bug is now fixed in svn.

-greg

--
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Generating 3D Coordinates in already existing coordinate frame...

2011-12-05 Thread JP
Just bumping this up ...

On 29 November 2011 16:47, JP jeanpaul.ebe...@inhibox.com 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 greg.land...@gmail.com wrote:
 Dear JP,

 On Tue, Nov 29, 2011 at 3:36 PM, JP jeanpaul.ebe...@inhibox.com wrote:
 Sorry for the repeated posting -- I had asked a similar question for
 2D some time ago
 (http://www.mail-archive.com/rdkit-discuss@lists.sourceforge.net/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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Generating 3D Coordinates in already existing coordinate frame...

2011-11-29 Thread Greg Landrum
Dear JP,

On Tue, Nov 29, 2011 at 3:36 PM, JP jeanpaul.ebe...@inhibox.com wrote:
 Sorry for the repeated posting -- I had asked a similar question for
 2D some time ago
 (http://www.mail-archive.com/rdkit-discuss@lists.sourceforge.net/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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Generating 3D Coordinates in already existing coordinate frame...

2011-11-29 Thread JP
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 greg.land...@gmail.com wrote:
 Dear JP,

 On Tue, Nov 29, 2011 at 3:36 PM, JP jeanpaul.ebe...@inhibox.com wrote:
 Sorry for the repeated posting -- I had asked a similar question for
 2D some time ago
 (http://www.mail-archive.com/rdkit-discuss@lists.sourceforge.net/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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Generating 3D coordinates

2010-09-11 Thread Paul Emsley

 It's kind of interesting (and encouraging) that the optimizer doesn't
 completely freak out when you hand it a 2D conformer. :-)



Ah... :)

 What makes 3D coordinates?  (I'm guessing it's a one-liner somewhere...)
  
 It is indeed a one-liner (two lines with a bit of error checking). To
 get a 3D conformer, you need to include
 GraphMol/DistGeomHelpers/Embedder.h  and do the following:

 int cid = DGeomHelpers::EmbedMolecule(*m);
 if(cid0) // embedding failed, do something

 There are a bunch of optional arguments to EmbedMolecule, but the
 defaults normally work reasonably well.



So it seems!

Fantastic, that did it.

It's pretty jaw dropping that so much power can be added with so little 
code (on my part :)

More later.

Cheers,

Paul.




--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss