Re: [Rdkit-discuss] Rdkit-discuss Digest, Vol 119, Issue 6

2017-09-07 Thread James T. Metz via Rdkit-discuss
TJ,


Your suggestion solved my problem.  Thanks!  I need to pay closer attention
to the SMARTS documentation!


Regards,
Jim Metz




-Original Message-
From: rdkit-discuss-request 
To: rdkit-discuss 
Sent: Wed, Sep 6, 2017 9:17 pm
Subject: Rdkit-discuss Digest, Vol 119, Issue 6

Send Rdkit-discuss mailing list submissions to
rdkit-discuss@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
or, via email, send a message with subject or body 'help' to
rdkit-discuss-requ...@lists.sourceforge.net

You can reach the person managing the list at
rdkit-discuss-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Rdkit-discuss digest..."


Today's Topics:

   1. Fwd: Need SMARTS to distinguish 6-ring vs macrocyclic ether
  oxygens (James T. Metz)
   2. Re: Fwd: Need SMARTS to distinguish 6-ring vs macrocyclic
  ether oxygens (TJ O'Donnell)
   3. Re: Fwd: Need SMARTS to distinguish 6-ring vs macrocyclic
  ether oxygens (TJ O'Donnell)


--

Message: 1
Date: Wed, 6 Sep 2017 19:34:02 -0400
From: "James T. Metz" 
To: RDkit-discuss@lists.sourceforge.net, jamestm...@aol.com
Subject: [Rdkit-discuss] Fwd: Need SMARTS to distinguish 6-ring vs
macrocyclic ether oxygens
Message-ID: <15e598b1b33-c09-48...@webjas-vab043.srv.aolmail.net>
Content-Type: text/plain; charset="utf-8"



Hello,




Given the following SMILES for a macrocyclic hexaose




OCC1OC2OC3C(CO)OC(OC4C(CO)OC(OC5C(CO)OC(OC6C(CO)OC(OC7C(CO)OC(OC1C(O)C2O)C(O)C7O)C(O)C6O)C(O)C5O)C(O)C4O)C(O)C3O



 can anyone suggest a SMARTS pattern that will distinguish ether oxygens

in the smaller 6-membered rings versus the ethers in the larger macrocyclic
structure?


For example, using RDkit, I have tried (e.g., pattern = 
Chem.MolFromSmarts('[O;H0;D2]') )



[O;H0;D2]  ===>  gives 12 matches (all ether oxygens)



[O;H0;D2;R]  ===>  gives 12 matches (all ether oxygens)



[O;H0;D2;!R]  ===>  gives 0 matches



[O;H0;D2;R6]  ===>  gives 0 matches





I am stumped.  Any ideas?



If it is necessary to write more complicated PYTHON/RDkit/SMARTS code, I am 
certainly willing to try that.



Thanks!



Regards,

Jim Metz

Northwestern University




-- next part --
An HTML attachment was scrubbed...

--

Message: 2
Date: Wed, 6 Sep 2017 18:04:01 -0700
From: "TJ O'Donnell" 
To: "James T. Metz" 
Cc: RDKit Discuss 
Subject: Re: [Rdkit-discuss] Fwd: Need SMARTS to distinguish 6-ring vs
macrocyclic ether oxygens
Message-ID:

Content-Type: text/plain; charset="utf-8"

Try using [O;H0;D2;r6] lower-case r.  Sorry I'm not at a computer to check
this.
R6 means in 6 rings.
r6 means in ring of size 6.

http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html

TJ O'Donnell

On Wed, Sep 6, 2017 at 4:34 PM, James T. Metz via Rdkit-discuss <
rdkit-discuss@lists.sourceforge.net> wrote:

> Hello,
>
> Given the following SMILES for a macrocyclic hexaose
>
>OCC1OC2OC3C(CO)OC(OC4C(CO)OC(OC5C(CO)OC(OC6C(CO)OC(OC7C(CO)
> OC(OC1C(O)C2O)C(O)C7O)C(O)C6O)C(O)C5O)C(O)C4O)C(O)C3O
>
> can anyone suggest a SMARTS pattern that will distinguish ether oxygens
> in the smaller 6-membered rings versus the ethers in the larger macrocyclic
> structure?
>
> For example, using RDkit, I have tried (e.g., pattern =
> Chem.MolFromSmarts('[O;H0;D2]') )
>
> [O;H0;D2]  ===>  gives 12 matches (all ether oxygens)
>
> [O;H0;D2;R]  ===>  gives 12 matches (all ether oxygens)
>
> [O;H0;D2;!R]  ===>  gives 0 matches
>
> [O;H0;D2;R6]  ===>  gives 0 matches
>
>
> I am stumped.  Any ideas?
>
> If it is necessary to write more complicated PYTHON/RDkit/SMARTS code,
> I am certainly willing to try that.
>
> Thanks!
>
> Regards,
> Jim Metz
> Northwestern University
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
-- next part --
An HTML attachment was scrubbed...

--

Message: 3
Date: Wed, 6 Sep 2017 19:16:45 -0700
From: "TJ O'Donnell" 
To: "James T. Metz" 
Cc: RDKit Discuss 

Re: [Rdkit-discuss] ETKDG conformation generation algorithm and fullerene-like structures.

2017-09-07 Thread Markus Sitzmann
Mhh, your choices of test molecules sounds like going from poster child to 
archenemy of conformation generation algorithms :-)

-
|  Markus Sitzmann
|  markus.sitzm...@gmail.com

> On 7. Sep 2017, at 18:59, Jason Biggs  wrote:
> 
> I've never had success using the ETKDG or KDG methods for fullerenes, when 
> trying on C60 it goes for a long time and returns -1.  The ETDG method works 
> on C60, but fails on your C60H60.
> 
> One thing you could try is to embed the hydrogen-suppressed structure, then 
> add the hydrogens
> 
> RDKit::DGeomHelpers::EmbedParameters params(RDKit::DGeomHelpers::ETDG);
> 
> RDKit::DGeomHelpers::EmbedMolecule(*mol, params);
> 
> bool explicitOnly = false;
> 
> bool addCoords = true;
> 
> RDKit::MolOps::addHs(*mol, explicitOnly, addCoords);
> 
> seems to work.
> 
> 
> 
> 
> Jason Biggs
> 
> 
>> On Thu, Sep 7, 2017 at 10:49 AM, Dmitry Redkin  wrote:
>> Hello all!
>> I've just started to use RDKit, and now I'm trying to generate some 3D
>> conformation for a molecule. ETKDG successfully optimized cyclohexane, so
>> I've tried some more complex example.
>> It was this fullerene-like structure (with all the single bonds and every C
>> atom having H atom attached). I'm attaching it to this email.
>> 
>> But whatever I've tried to do with embedding parameters, RDKit whether
>> stalls for several minutes trying to complete operation or just exits with
>> all zero coordinates.
>> 
>> Is there any way to generate conformations for this structure? Maybe I did
>> something wrong or there is some flag that can be set to get some result
>> (any result, not necessarily the best one) in a reasonable time?
>> 
>> My code is pretty simple, you can see it below.
>> 
>> 
>> RWMol *mol = MolFileToMol("d:\\temp\\exe32\\full.mol", true, false, false);
>> 
>> MolOps::addHs(*mol);
>> DGeomHelpers::EmbedParameters p(DGeomHelpers::ETKDG);
>> p.maxIterations = 100; // if I left it -1, I could not wait long enough for
>> EmbedMolecule to exit.
>> p.useRandomCoords = true;
>> int confid = DGeomHelpers::EmbedMolecule(*((ROMol*)mol), p);
>> MolToMolFile(*((ROMol*)mol), "d:\\temp\\exe32\\full1.mol", true, confid);
>> free(mol);
>> 
>> 
>> 
>> Dmitry Redkin, ACD Inc.
>> red...@acdlabs.ru 
>> -- 
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>> 
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ETKDG conformation generation algorithm and fullerene-like structures.

2017-09-07 Thread Peter S. Shenkin
Too much symmetry for conformational comparison?

Many or most conformation generators will test new conformations for a
match with previously generated conformations, and will bail out if they
can't exhaust all possibilities.

(I don't know if this is the case RDKit facilities.)

-P.

On Thu, Sep 7, 2017 at 12:59 PM, Jason Biggs  wrote:

> I've never had success using the ETKDG or KDG methods for fullerenes,
> when trying on C60 it goes for a long time and returns -1.  The ETDG method
> works on C60, but fails on your C60H60.
>
> One thing you could try is to embed the hydrogen-suppressed structure,
> then add the hydrogens
>
> RDKit::DGeomHelpers::EmbedParameters params(RDKit::DGeomHelpers::ETDG);
>
> RDKit::DGeomHelpers::EmbedMolecule(*mol, params);
>
> bool explicitOnly = false;
>
> bool addCoords = true;
>
> RDKit::MolOps::addHs(*mol, explicitOnly, addCoords);
>
> seems to work.
>
>
>
> Jason Biggs
>
>
> On Thu, Sep 7, 2017 at 10:49 AM, Dmitry Redkin  wrote:
>
>> Hello all!
>> I've just started to use RDKit, and now I'm trying to generate some 3D
>> conformation for a molecule. ETKDG successfully optimized cyclohexane, so
>> I've tried some more complex example.
>> It was this fullerene-like structure (with all the single bonds and every
>> C
>> atom having H atom attached). I'm attaching it to this email.
>>
>> But whatever I've tried to do with embedding parameters, RDKit whether
>> stalls for several minutes trying to complete operation or just exits with
>> all zero coordinates.
>>
>> Is there any way to generate conformations for this structure? Maybe I did
>> something wrong or there is some flag that can be set to get some result
>> (any result, not necessarily the best one) in a reasonable time?
>>
>> My code is pretty simple, you can see it below.
>>
>>
>> RWMol *mol = MolFileToMol("d:\\temp\\exe32\\full.mol", true, false,
>> false);
>>
>> MolOps::addHs(*mol);
>> DGeomHelpers::EmbedParameters p(DGeomHelpers::ETKDG);
>> p.maxIterations = 100; // if I left it -1, I could not wait long enough
>> for
>> EmbedMolecule to exit.
>> p.useRandomCoords = true;
>> int confid = DGeomHelpers::EmbedMolecule(*((ROMol*)mol), p);
>> MolToMolFile(*((ROMol*)mol), "d:\\temp\\exe32\\full1.mol", true, confid);
>> free(mol);
>>
>>
>> 
>> Dmitry Redkin, ACD Inc.
>> red...@acdlabs.ru
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ETKDG conformation generation algorithm and fullerene-like structures.

2017-09-07 Thread Jason Biggs
I've never had success using the ETKDG or KDG methods for fullerenes, when
trying on C60 it goes for a long time and returns -1.  The ETDG method
works on C60, but fails on your C60H60.

One thing you could try is to embed the hydrogen-suppressed structure, then
add the hydrogens

RDKit::DGeomHelpers::EmbedParameters params(RDKit::DGeomHelpers::ETDG);

RDKit::DGeomHelpers::EmbedMolecule(*mol, params);

bool explicitOnly = false;

bool addCoords = true;

RDKit::MolOps::addHs(*mol, explicitOnly, addCoords);

seems to work.



Jason Biggs


On Thu, Sep 7, 2017 at 10:49 AM, Dmitry Redkin  wrote:

> Hello all!
> I've just started to use RDKit, and now I'm trying to generate some 3D
> conformation for a molecule. ETKDG successfully optimized cyclohexane, so
> I've tried some more complex example.
> It was this fullerene-like structure (with all the single bonds and every C
> atom having H atom attached). I'm attaching it to this email.
>
> But whatever I've tried to do with embedding parameters, RDKit whether
> stalls for several minutes trying to complete operation or just exits with
> all zero coordinates.
>
> Is there any way to generate conformations for this structure? Maybe I did
> something wrong or there is some flag that can be set to get some result
> (any result, not necessarily the best one) in a reasonable time?
>
> My code is pretty simple, you can see it below.
>
>
> RWMol *mol = MolFileToMol("d:\\temp\\exe32\\full.mol", true, false,
> false);
>
> MolOps::addHs(*mol);
> DGeomHelpers::EmbedParameters p(DGeomHelpers::ETKDG);
> p.maxIterations = 100; // if I left it -1, I could not wait long enough for
> EmbedMolecule to exit.
> p.useRandomCoords = true;
> int confid = DGeomHelpers::EmbedMolecule(*((ROMol*)mol), p);
> MolToMolFile(*((ROMol*)mol), "d:\\temp\\exe32\\full1.mol", true, confid);
> free(mol);
>
>
> 
> Dmitry Redkin, ACD Inc.
> red...@acdlabs.ru
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] ETKDG conformation generation algorithm and fullerene-like structures.

2017-09-07 Thread Dmitry Redkin

Hello all!
I've just started to use RDKit, and now I'm trying to generate some 3D
conformation for a molecule. ETKDG successfully optimized cyclohexane, so
I've tried some more complex example.
It was this fullerene-like structure (with all the single bonds and every C
atom having H atom attached). I'm attaching it to this email.

But whatever I've tried to do with embedding parameters, RDKit whether
stalls for several minutes trying to complete operation or just exits with
all zero coordinates.

Is there any way to generate conformations for this structure? Maybe I did
something wrong or there is some flag that can be set to get some result
(any result, not necessarily the best one) in a reasonable time?

My code is pretty simple, you can see it below.


RWMol *mol = MolFileToMol("d:\\temp\\exe32\\full.mol", true, false, false);

MolOps::addHs(*mol);
DGeomHelpers::EmbedParameters p(DGeomHelpers::ETKDG);
p.maxIterations = 100; // if I left it -1, I could not wait long enough for
EmbedMolecule to exit.
p.useRandomCoords = true;
int confid = DGeomHelpers::EmbedMolecule(*((ROMol*)mol), p);
MolToMolFile(*((ROMol*)mol), "d:\\temp\\exe32\\full1.mol", true, confid);
free(mol);



Dmitry Redkin, ACD Inc.
red...@acdlabs.ru 


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



full.mol
Description: Binary data
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss