Re: [Rdkit-discuss] Generating all stereochem possibilities from smile

2016-12-09 Thread Pavel Polishchuk
I just want to share my script, which I use for enumeration of 
stereoisomers. Enumeration of double bonds was added quite recently and 
thus I didn't test it extensively.

I put it on github: https://github.com/DrrDom/rdk
It seems to work well on quite complex queries like 
CC1CCC(CC1)C1CC=C(C\C(=C/I)C(=CF)C1C1C[C@@H](C)CC=C1)C1CC[C@H](O)C(Br)C1


to generate all possible stereoisomers:
gen_stereo_rdkit3.py -i input.smi -o output.smi -t -d

to discard compounds with more than 4 undefined centers/double bonds:
gen_stereo_rdkit3.py -i input.smi -o output.smi -t -d -u 4

Try it on your own risk :)
If you will find mistakes let me know.

Pavel.


On 12/10/2016 03:44 AM, Brian Cole wrote:
So I may need a little guidance on this one from someone with a little 
more historical knowledge of RDKit.


I found the findPotentialStereoBonds function inside Chirality.cpp 
that appears to do what we want, detect double bonds with unspecified 
E/Z stereo chemistry. That's at least what the comment in the file 
leads me to believe:


// Find bonds than can be cis/trans in a molecule and mark them as "any"
...
void findPotentialStereoBonds(ROMol , bool cleanIt) {


But when you look at the code, it's not setting bonds to 
Bond::STEREOANY, it's setting them to Bond::STEREONONE here:


...
// proceed only if we either want to clean the stereocode on 
this bond

// or if none is set on it yet
if (cleanIt || dblBond->getStereo() == Bond::STEREONONE) {
  dblBond->setStereo(Bond::STEREONONE);
...

Seems odd to me check that the stereo is Bond::STEREONONE, and then 
set it to that value.


While findPotentialStereoBonds isn't exposed in Python, there is some 
Java docs written for it in the Java wrappers:
%javamethodmodifiers RDKit::MolOps::findPotentialStereoBonds( 
  ROMol & mol,boolcleanIt = false   ) 
  "

/**

finds bonds that could be cis/trans in a molecule and mark them as 
Bond::STEREONONE




So that documentation is actually correct. It does find bonds that 
could be cis/trans and mark them as Bond::STEREONONE. That just isn't 
very useful since all bonds are marked Bond::STEREONONE by default.


The only direct test case of findPotentialStereoBonds I can find is 
the following:


MolOps::findPotentialStereoBonds(*m, false);
TEST_ASSERT(m->getNumAtoms() == 15);
TEST_ASSERT(m->getBondWithIdx(1)->getBondType() == Bond::DOUBLE);
TEST_ASSERT(m->getBondWithIdx(1)->getStereoAtoms().size() == 2);
TEST_ASSERT(m->getBondWithIdx(3)->getBondType() == Bond::DOUBLE);
TEST_ASSERT(m->getBondWithIdx(3)->getStereoAtoms().size() == 2);

That doesn't even test the getStereo() return value. Though it does 
test getStereoAtoms() return value. So it looks like the proper thing 
to do to detect unspecified bond stereo is to check for a non-empty 
getStereoAtoms() vector?


So ideally, I would like to write an bond stereo enumerator that tests 
if a double bond has unspecified stereo (testing the size of 
getStereoAtoms() would work) and then sets the stereo, that is:


bond.SetStereo(Bond::STEREOE);
or
bond.SetStereo(Bond::STEREOZ);

And then hopefully the Chem.MolToSmiles will "do the right thing". 
However, this commented out code in the wrapper has given me pause:


// this is no longer exposed because it requires that stereo atoms
// be set. This is a task that is tricky and "dangerous".
//.def("SetStereo",::setStereo,
// "Set the CIP-classification of the bond as a 
BondStereo\n")


So apparently I shouldn't expose an "easy" way to do this. What is the 
trickiness and dangerousness of this API? And could we make an easy 
way to enumerate bond stereo?


Thanks!



On Fri, Dec 9, 2016 at 5:44 PM, Brian Cole > wrote:


This has me quite curious now, how do we detect unspecified bond
stereo chemistry in RDKit?

m = Chem.MolFromSmiles("FC=CF")
assert m.HasProp("_StereochemDone")
for bond in m.GetBonds():
print(bond.GetBondDir(), bond.GetStereo())

Yields:

(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)

Trying to force the issue:

Chem.AssignStereochemistry(m, cleanIt=True, force=True,
flagPossibleStereoCenters=True)

assert m.HasProp("_StereochemDone") for bond in m.GetBonds():
print(bond.GetBondDir(), bond.GetStereo())

Still yields:

(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)

I can see the setStereo(Bond::STEREOANY) in the code here:

if ((*bondIt)->getBondDir() == Bond::EITHERDOUBLE) {

Re: [Rdkit-discuss] Generating all stereochem possibilities from smile

2016-12-09 Thread Brian Cole
So I may need a little guidance on this one from someone with a little more
historical knowledge of RDKit.

I found the findPotentialStereoBonds function inside Chirality.cpp that
appears to do what we want, detect double bonds with unspecified E/Z stereo
chemistry. That's at least what the comment in the file leads me to
believe:

// Find bonds than can be cis/trans in a molecule and mark them as "any"
...
void findPotentialStereoBonds(ROMol , bool cleanIt) {


But when you look at the code, it's not setting bonds to Bond::STEREOANY,
it's setting them to Bond::STEREONONE here:

...
// proceed only if we either want to clean the stereocode on this
bond
// or if none is set on it yet

if (cleanIt || dblBond->getStereo() == Bond::STEREONONE) {
  dblBond->setStereo(Bond::STEREONONE);
...

Seems odd to me check that the stereo is Bond::STEREONONE, and then set it
to that value.

While findPotentialStereoBonds isn't exposed in Python, there is some Java
docs written for it in the Java wrappers:
%javamethodmodifiers RDKit::MolOps::findPotentialStereoBonds(
ROMol & mol,boolcleanIt = false )
"
/**

finds bonds that could be cis/trans in a molecule and mark them as
Bond::STEREONONE



So that documentation is actually correct. It does find bonds that could be
cis/trans and mark them as Bond::STEREONONE. That just isn't very useful
since all bonds are marked Bond::STEREONONE by default.

The only direct test case of findPotentialStereoBonds I can find is the
following:

MolOps::findPotentialStereoBonds(*m, false);
TEST_ASSERT(m->getNumAtoms() == 15);
TEST_ASSERT(m->getBondWithIdx(1)->getBondType() == Bond::DOUBLE);
TEST_ASSERT(m->getBondWithIdx(1)->getStereoAtoms().size() == 2);
TEST_ASSERT(m->getBondWithIdx(3)->getBondType() == Bond::DOUBLE);
TEST_ASSERT(m->getBondWithIdx(3)->getStereoAtoms().size() == 2);

That doesn't even test the getStereo() return value. Though it does test
getStereoAtoms() return value. So it looks like the proper thing to do to
detect unspecified bond stereo is to check for a non-empty getStereoAtoms()
vector?

So ideally, I would like to write an bond stereo enumerator that tests if a
double bond has unspecified stereo (testing the size of getStereoAtoms()
would work) and then sets the stereo, that is:

bond.SetStereo(Bond::STEREOE);
or
bond.SetStereo(Bond::STEREOZ);

And then hopefully the Chem.MolToSmiles will "do the right thing". However,
this commented out code in the wrapper has given me pause:

// this is no longer exposed because it requires that stereo atoms
// be set. This is a task that is tricky and "dangerous".
//.def("SetStereo",::setStereo,
// "Set the CIP-classification of the bond as a
BondStereo\n")

So apparently I shouldn't expose an "easy" way to do this. What is the
trickiness and dangerousness of this API? And could we make an easy way to
enumerate bond stereo?

Thanks!



On Fri, Dec 9, 2016 at 5:44 PM, Brian Cole  wrote:

> This has me quite curious now, how do we detect unspecified bond stereo
> chemistry in RDKit?
>
> m = Chem.MolFromSmiles("FC=CF")
> assert m.HasProp("_StereochemDone")
> for bond in m.GetBonds():
> print(bond.GetBondDir(), bond.GetStereo())
>
> Yields:
>
> (rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
> (rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
> (rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
>
>
> Trying to force the issue:
>
>
> Chem.AssignStereochemistry(m, cleanIt=True, force=True, 
> flagPossibleStereoCenters=True)
>
>
> assert m.HasProp("_StereochemDone")
> for bond in m.GetBonds():
> print(bond.GetBondDir(), bond.GetStereo())
>
>
> Still yields:
>
>
> (rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
> (rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
> (rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
>
>
> I can see the setStereo(Bond::STEREOANY) in the code here:
>
>
> if ((*bondIt)->getBondDir() == Bond::EITHERDOUBLE) {
>   (*bondIt)->setStereo(Bond::STEREOANY);
>
>
>
> Guess I have to figure out how to detect EITHERDOUBLE?
>
>
> -Brian
>
>
>
> On Fri, Dec 9, 2016 at 5:03 PM, Andrew Dalke 
> wrote:
>
>> On Dec 9, 2016, at 9:50 PM, Brian Kelley wrote:
>> > >>> from rdkit import Chem
>> > >>> m = Chem.MolFromSmiles("F/C=C/F")
>> > >>> for bond in m.GetBonds():
>> > ...print bond.GetStereo()
>> > ...
>> > STEREONONE
>> > STEREOE
>> > STEREONONE
>> >
>> > However, setting bond stereo doesn't appear to be exposed.
>>
>> I thought I knew a way to change it, via GetBondDir()/SetBondDir() on the
>> directional bonds. It doesn't seem to work.
>>
>> First, get the existing bond directions:
>>
>> >>> from rdkit import Chem
>> >>> mol = Chem.MolFromSmiles("F/C=C/F")
>> 

Re: [Rdkit-discuss] Generating all stereochem possibilities from smile

2016-12-09 Thread Andrew Dalke
On Dec 9, 2016, at 9:50 PM, Brian Kelley wrote:
> >>> from rdkit import Chem
> >>> m = Chem.MolFromSmiles("F/C=C/F")
> >>> for bond in m.GetBonds():
> ...print bond.GetStereo()
> ... 
> STEREONONE
> STEREOE
> STEREONONE
> 
> However, setting bond stereo doesn't appear to be exposed.

I thought I knew a way to change it, via GetBondDir()/SetBondDir() on the 
directional bonds. It doesn't seem to work.

First, get the existing bond directions:

>>> from rdkit import Chem
>>> mol = Chem.MolFromSmiles("F/C=C/F")
>>> for bond in mol.GetBonds():
...   print(bond.GetBondDir())
... 
ENDUPRIGHT
NONE
ENDUPRIGHT


I'll change the first "/" to a "\" (That's "\\" when escaped for a normal 
Python string.)

>>> mol.GetBondWithIdx(0)

>>> mol.GetBondWithIdx(0).GetBondDir()
rdkit.Chem.rdchem.BondDir.ENDUPRIGHT
>>> mol.GetBondWithIdx(0).SetBondDir(Chem.BondDir.ENDDOWNRIGHT)

If I generate the SMILES I see the old "F/C=C/F" instead of the new direction. 
I need to clear internal computed properties when I make structure edits:

>>> Chem.MolToSmiles(mol, isomericSmiles=True)
'F/C=C/F'
>>> mol.ClearComputedProps()
>>> Chem.MolToSmiles(mol, isomericSmiles=True)
'F/C=C\\F'

I'll set the directions to "NONE" and clear computed properties. The SMILES is 
correct:

>>> mol.GetBondWithIdx(0).SetBondDir(Chem.BondDir.NONE)
>>> mol.GetBondWithIdx(2).SetBondDir(Chem.BondDir.NONE)
>>> mol.ClearComputedProps()
>>> Chem.MolToSmiles(mol, isomericSmiles=True)
'FC=CF'

although the stereo setting is unchanged:

>>> for bond in mol.GetBonds():
...   print(bond.GetStereo())
... 
STEREONONE
STEREOE
STEREONONE

I expected it to give me all STEREONONEs, as if it were the same as the 
following:

>>> mol2 = Chem.MolFromSmiles("FC=CF")
>>> for bond in mol2.GetBonds():
...   print(bond.GetStereo())
... 
STEREONONE
STEREONONE
STEREONONE




Andrew
da...@dalkescientific.com



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Generating all stereochem possibilities from smile

2016-12-09 Thread Brian Cole
This has me quite curious now, how do we detect unspecified bond stereo
chemistry in RDKit?

m = Chem.MolFromSmiles("FC=CF")
assert m.HasProp("_StereochemDone")
for bond in m.GetBonds():
print(bond.GetBondDir(), bond.GetStereo())

Yields:

(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)


Trying to force the issue:


Chem.AssignStereochemistry(m, cleanIt=True, force=True,
flagPossibleStereoCenters=True)


assert m.HasProp("_StereochemDone")
for bond in m.GetBonds():
print(bond.GetBondDir(), bond.GetStereo())


Still yields:


(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)
(rdkit.Chem.rdchem.BondDir.NONE, rdkit.Chem.rdchem.BondStereo.STEREONONE)


I can see the setStereo(Bond::STEREOANY) in the code here:


if ((*bondIt)->getBondDir() == Bond::EITHERDOUBLE) {
  (*bondIt)->setStereo(Bond::STEREOANY);



Guess I have to figure out how to detect EITHERDOUBLE?


-Brian



On Fri, Dec 9, 2016 at 5:03 PM, Andrew Dalke 
wrote:

> On Dec 9, 2016, at 9:50 PM, Brian Kelley wrote:
> > >>> from rdkit import Chem
> > >>> m = Chem.MolFromSmiles("F/C=C/F")
> > >>> for bond in m.GetBonds():
> > ...print bond.GetStereo()
> > ...
> > STEREONONE
> > STEREOE
> > STEREONONE
> >
> > However, setting bond stereo doesn't appear to be exposed.
>
> I thought I knew a way to change it, via GetBondDir()/SetBondDir() on the
> directional bonds. It doesn't seem to work.
>
> First, get the existing bond directions:
>
> >>> from rdkit import Chem
> >>> mol = Chem.MolFromSmiles("F/C=C/F")
> >>> for bond in mol.GetBonds():
> ...   print(bond.GetBondDir())
> ...
> ENDUPRIGHT
> NONE
> ENDUPRIGHT
>
>
> I'll change the first "/" to a "\" (That's "\\" when escaped for a normal
> Python string.)
>
> >>> mol.GetBondWithIdx(0)
> 
> >>> mol.GetBondWithIdx(0).GetBondDir()
> rdkit.Chem.rdchem.BondDir.ENDUPRIGHT
> >>> mol.GetBondWithIdx(0).SetBondDir(Chem.BondDir.ENDDOWNRIGHT)
>
> If I generate the SMILES I see the old "F/C=C/F" instead of the new
> direction. I need to clear internal computed properties when I make
> structure edits:
>
> >>> Chem.MolToSmiles(mol, isomericSmiles=True)
> 'F/C=C/F'
> >>> mol.ClearComputedProps()
> >>> Chem.MolToSmiles(mol, isomericSmiles=True)
> 'F/C=C\\F'
>
> I'll set the directions to "NONE" and clear computed properties. The
> SMILES is correct:
>
> >>> mol.GetBondWithIdx(0).SetBondDir(Chem.BondDir.NONE)
> >>> mol.GetBondWithIdx(2).SetBondDir(Chem.BondDir.NONE)
> >>> mol.ClearComputedProps()
> >>> Chem.MolToSmiles(mol, isomericSmiles=True)
> 'FC=CF'
>
> although the stereo setting is unchanged:
>
> >>> for bond in mol.GetBonds():
> ...   print(bond.GetStereo())
> ...
> STEREONONE
> STEREOE
> STEREONONE
>
> I expected it to give me all STEREONONEs, as if it were the same as the
> following:
>
> >>> mol2 = Chem.MolFromSmiles("FC=CF")
> >>> for bond in mol2.GetBonds():
> ...   print(bond.GetStereo())
> ...
> STEREONONE
> STEREONONE
> STEREONONE
>
>
>
>
> Andrew
> da...@dalkescientific.com
>
>
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] conda / Windows update to 2016.09 release gives error

2016-12-09 Thread Curt Fischer
I'm not sure of the source of the problem with the conda 2016.09 release on
my Windows box, but I was able to revert to a 2016.03 release with a *conda
install -c rmg rdkit=2016.03**

conda couldn't seem to solve the specifications automagically, but after I
uninstalled boost and did the above command, it identified the proper boost
to install along with the 2016.03 rdkit.

I now have a functioning rdkit again, but would still be interested in
hearing from anyone that experiences a similar problem.

On Thu, Dec 8, 2016 at 9:27 AM, Curt Fischer 
wrote:

> To update rdkit to the September release, I recently did a
>
> *conda install -f --channel https://conda.anaconda.org/rdkit
>  rdkit*
>
> on my Windows box, and everything seemed to update fine.
>
> However now, when I try from rdkit import Chem, I get the disturbing
> error message below.
>
> Is this a sign that my particular installation got borked somehow, and I
> maybe I should reinstall everything again?  Or is this perchance a known
> issue with the 2016.09 release?  If the latter, how do I roll back to the
> old release using conda?  I tried a *conda install --channel
> https://conda.anaconda.org/rdkit 
> rdkit=2016.03.4 *but that didn't seem to do it.
>
> Thanks all for any help!
>
> Curt
>
> ---AttributeError
> Traceback (most recent call 
> last) in ()> 1 from rdkit import 
> Chem
> C:\Anaconda2\lib\site-packages\rdkit\Chem\__init__.py in () 17 
> """ 18 from rdkit import rdBase---> 19 from rdkit import RDConfig 20  
> 21 from rdkit import DataStructs
> C:\Anaconda2\lib\site-packages\rdkit\RDConfig.py in () 31 
> condaDir[0] = os.path.sep 32   condaDir += ['share', 'RDKit', 
> 'RDKit']---> 33   _share = os.path.join(condaDir) 34   RDDataDir = 
> os.path.join(_share, 'Data') 35   RDDocsDir = os.path.join(_share, 'Docs')
> C:\Anaconda2\lib\ntpath.pyc in join(path, *paths) 63 def join(path, 
> *paths): 64 """Join two or more pathname components, inserting "\\" 
> as needed."""---> 65 result_drive, result_path = splitdrive(path) 66  
>for p in paths: 67 p_drive, p_path = splitdrive(p)
> C:\Anaconda2\lib\ntpath.pyc in splitdrive(p)114 """115 if 
> len(p) > 1:--> 116 normp = p.replace(altsep, sep)117 if 
> (normp[0:2] == sep*2) and (normp[2:3] != sep):118 # is a UNC 
> path:
> AttributeError: 'list' object has no attribute 'replace'
>
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Generating all stereochem possibilities from smile

2016-12-09 Thread Rafal Roszak
On Thu, 8 Dec 2016 23:21:24 -0800
James Johnson  wrote:

> Hello all, I am trying to generate R and S from: CCC(C)(Cl)Br
> 
> Below is the code for making the smi to mol file. Can someone give me some
> guidance to generate all sterochem possibilities?

There are two ways to address this problem:
1. generate all possible SMILESs and for each of them generate 3D
structure using molecular modeling (or just embedMolecule) which is in
my opinion better

2. generate many 3D structures and extract interesting stereoisomers

Links below describe the 1st option:
https://github.com/rdkit/rdkit/issues/626
https://sourceforge.net/p/rdkit/mailman/message/34488969/


Regards,
RR

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Generating all stereochem possibilities from smile

2016-12-09 Thread James Johnson
Thank you all for your responses. I got R/S combos to work (awesome!), but
now I am working on E/Z. I am considering a similar approach (0 would be
interpreted as E, 1 as Z).

However to do this I would need two functions which I couldn't find
1.) Find double bonds that could be E/Z.
2.) Set the double bonds to have property E or Z

I actually only need #2 (just make any double bond E/Z as see what
happens), but #1 would make it more efficient.

How does RDKit handle E/Z stereochem in mol?

Thanks again for the help!

- James

On Fri, Dec 9, 2016 at 8:23 AM, Rafal Roszak  wrote:

> On Thu, 8 Dec 2016 23:21:24 -0800
> James Johnson  wrote:
>
> > Hello all, I am trying to generate R and S from: CCC(C)(Cl)Br
> >
> > Below is the code for making the smi to mol file. Can someone give me
> some
> > guidance to generate all sterochem possibilities?
>
> There are two ways to address this problem:
> 1. generate all possible SMILESs and for each of them generate 3D
> structure using molecular modeling (or just embedMolecule) which is in
> my opinion better
>
> 2. generate many 3D structures and extract interesting stereoisomers
>
> Links below describe the 1st option:
> https://github.com/rdkit/rdkit/issues/626
> https://sourceforge.net/p/rdkit/mailman/message/34488969/
>
>
> Regards,
> RR
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Generating all stereochem possibilities from smile

2016-12-09 Thread Brian Kelley
bond.GetStereo

>>> from rdkit import Chem

>>> m = Chem.MolFromSmiles("F/C=C/F")

>>> for bond in m.GetBonds():

...print bond.GetStereo()

...

STEREONONE

STEREOE

STEREONONE

However, setting bond stereo doesn't appear to be exposed.

I suppose you could permute the smiles strings \ => / but that seems to not
be the right solution.

Cheers,
 Brian

On Fri, Dec 9, 2016 at 3:20 PM, James Johnson 
wrote:

> Thank you all for your responses. I got R/S combos to work (awesome!), but
> now I am working on E/Z. I am considering a similar approach (0 would be
> interpreted as E, 1 as Z).
>
> However to do this I would need two functions which I couldn't find
> 1.) Find double bonds that could be E/Z.
> 2.) Set the double bonds to have property E or Z
>
> I actually only need #2 (just make any double bond E/Z as see what
> happens), but #1 would make it more efficient.
>
> How does RDKit handle E/Z stereochem in mol?
>
> Thanks again for the help!
>
> - James
>
> On Fri, Dec 9, 2016 at 8:23 AM, Rafal Roszak  wrote:
>
>> On Thu, 8 Dec 2016 23:21:24 -0800
>> James Johnson  wrote:
>>
>> > Hello all, I am trying to generate R and S from: CCC(C)(Cl)Br
>> >
>> > Below is the code for making the smi to mol file. Can someone give me
>> some
>> > guidance to generate all sterochem possibilities?
>>
>> There are two ways to address this problem:
>> 1. generate all possible SMILESs and for each of them generate 3D
>> structure using molecular modeling (or just embedMolecule) which is in
>> my opinion better
>>
>> 2. generate many 3D structures and extract interesting stereoisomers
>>
>> Links below describe the 1st option:
>> https://github.com/rdkit/rdkit/issues/626
>> https://sourceforge.net/p/rdkit/mailman/message/34488969/
>>
>>
>> Regards,
>> RR
>>
>
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss