Re: [Rdkit-discuss] How to number the outputs of a reaction?

2017-10-03 Thread Greg Landrum
Hi Jennifer,

On Mon, Oct 2, 2017 at 12:59 AM, Jennifer Wei 
wrote:

>
> I have one more question: I am a bit stuck as to how to rebuild my rdkit.
> Ideally I would like to create a separate conda environment with the
> modified rdkit. I have mostly followed the instructions from here:
> https://github.com/rdkit/conda-rdkit
>
> How do I modify the instructions to make a package from my customized
> rdkit source code? The instructions seem to be for getting the general
> conda build rather than making your own conda environment from customized
> source code in rdkit/rdkit.
>

Are you looking to build a copy just for you to run or do you want to
distribute it to others?

-greg
--
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] How to number the outputs of a reaction?

2017-10-01 Thread Jennifer Wei
Hi Kovas and Connor,

Thank you for the helpful pointers to the modifications in the rdkit code
to help me number reactions.

I have one more question: I am a bit stuck as to how to rebuild my rdkit.
Ideally I would like to create a separate conda environment with the
modified rdkit. I have mostly followed the instructions from here:
https://github.com/rdkit/conda-rdkit

How do I modify the instructions to make a package from my customized rdkit
source code? The instructions seem to be for getting the general conda
build rather than making your own conda environment from customized source
code in rdkit/rdkit.

Thank you again!
Jennifer

On Fri, Sep 29, 2017 at 3:50 PM Connor Coley  wrote:

> Hi Jennifer,
>
> I have a fork of RDKit that is slightly out of date, but preserves atom
> mapping using RunReactions (which was needed for the prediction paper).
> You'll need to build from source, but then the atom map number is kept as a
> new attribute of the product atoms. You can iterate through the product
> atoms and re-set the molAtomMapNumber from this new attribute.
>
> https://github.com/connorcoley/Rdkit
> 
>
>
> An example of recovering the map number is here:
>
>
>
> https://github.com/connorcoley/ochem_predict_nn/blob/master/data/generate_candidates_edits_fullgrants.py
> 
>
>
> Best of luck!
> Connor Coley
>
> On Fri, Sep 29, 2017 at 10:51 AM Jennifer Wei 
> wrote:
>
>> Hi Kovas,
>>
>> Thank you so much for pointing me to this github issues page and for
>> sharing your code! It is very helpful.
>>
>> I'm having a bit of trouble with the 'react_atom_idx' property. Where did
>> this get set initially? If I try to run your code as written on the github
>> page, it does not recognize this key.
>>
>> Thank you!
>>
>> Best,
>> Jennifer
>>
>> On Thu, Sep 28, 2017 at 5:06 PM Kovas Palunas 
>> wrote:
>>
>>> Hi Jennifer,
>>>
>>> I had this same issue a while back.  Here is an issue I posted about it
>>> on the github: https://github.com/rdkit/rdkit/issues/1269
>>> 
>>>
>>> I never did make the pull request mentioned in the issue, but all the
>>> code that does what you want should be in there.  Let me know if you have
>>> any other questions, I've spent a good amount of time on this problem.
>>>
>>>  - Kovas
>>>
>>> --
>>> *From:* Jennifer Wei 
>>> *Sent:* Thursday, September 28, 2017 11:47:53 AM
>>> *To:* rdkit-discuss@lists.sourceforge.net
>>> *Subject:* [Rdkit-discuss] How to number the outputs of a reaction?
>>>
>>>
>> Hi All,
>>>
>>> I am working with atom mapping for reactions. How do I get the correct
>>> atom mapping for my products?
>>>
>>> I have tried the following:
>>> >> rxn =
>>> rdChemReactions.ReactionFromSmarts('[C:1](=[O:2])O.[N:3]>>[C:1](=[O:2])[N:3]')
>>> >> rcts_lab = (Chem.MolFromSmiles('[C:1](=[O:2])[O:3]'),
>>> Chem.MolFromSmiles('[C:4][N:5][C:6]'))
>>> >> pcts_lab = rxn.RunReactants(rcts_lab)
>>> >> Chem.MolToSmiles(pcts_lab[0][0])
>>>   *'O=CN([C:4])[C:6]'*
>>>
>>> I would like the product to be fully labeled, so I get this on the last
>>> line instead.
>>>   *'[O:2]=[C:1][N:5]([C:4])[C:6]'*
>>>
>>> Thank you in advance for any help you can provide me.
>>>
>>> Best,
>>> Jennifer
>>>
>>>
>> --
>> 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] How to number the outputs of a reaction?

2017-09-29 Thread Kovas Palunas
There should be a post in there about changing the RDKit C++ code to make that 
property available.  It's a very small change!


 - Kovas



From: Jennifer Wei 
Sent: Friday, September 29, 2017 10:51:02 AM
To: Kovas Palunas; rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] How to number the outputs of a reaction?

Hi Kovas,

Thank you so much for pointing me to this github issues page and for sharing 
your code! It is very helpful.

I'm having a bit of trouble with the 'react_atom_idx' property. Where did this 
get set initially? If I try to run your code as written on the github page, it 
does not recognize this key.

Thank you!

Best,
Jennifer

On Thu, Sep 28, 2017 at 5:06 PM Kovas Palunas 
> wrote:
Hi Jennifer,

I had this same issue a while back.  Here is an issue I posted about it on the 
github: 
https://github.com/rdkit/rdkit/issues/1269

I never did make the pull request mentioned in the issue, but all the code that 
does what you want should be in there.  Let me know if you have any other 
questions, I've spent a good amount of time on this problem.

 - Kovas


From: Jennifer Wei 
>
Sent: Thursday, September 28, 2017 11:47:53 AM
To: 
rdkit-discuss@lists.sourceforge.net
Subject: [Rdkit-discuss] How to number the outputs of a reaction?

Hi All,

I am working with atom mapping for reactions. How do I get the correct atom 
mapping for my products?

I have tried the following:
>> rxn = 
>> rdChemReactions.ReactionFromSmarts('[C:1](=[O:2])O.[N:3]>>[C:1](=[O:2])[N:3]')
>> rcts_lab = (Chem.MolFromSmiles('[C:1](=[O:2])[O:3]'), 
>> Chem.MolFromSmiles('[C:4][N:5][C:6]'))
>> pcts_lab = rxn.RunReactants(rcts_lab)
>> Chem.MolToSmiles(pcts_lab[0][0])
  'O=CN([C:4])[C:6]'

I would like the product to be fully labeled, so I get this on the last line 
instead.
  '[O:2]=[C:1][N:5]([C:4])[C:6]'

Thank you in advance for any help you can provide me.

Best,
Jennifer

--
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] How to number the outputs of a reaction?

2017-09-29 Thread Jennifer Wei
Hi Kovas,

Thank you so much for pointing me to this github issues page and for
sharing your code! It is very helpful.

I'm having a bit of trouble with the 'react_atom_idx' property. Where did
this get set initially? If I try to run your code as written on the github
page, it does not recognize this key.

Thank you!

Best,
Jennifer

On Thu, Sep 28, 2017 at 5:06 PM Kovas Palunas 
wrote:

> Hi Jennifer,
>
> I had this same issue a while back.  Here is an issue I posted about it on
> the github: https://github.com/rdkit/rdkit/issues/1269
> 
>
> I never did make the pull request mentioned in the issue, but all the code
> that does what you want should be in there.  Let me know if you have any
> other questions, I've spent a good amount of time on this problem.
>
>  - Kovas
>
> --
> *From:* Jennifer Wei 
> *Sent:* Thursday, September 28, 2017 11:47:53 AM
> *To:* rdkit-discuss@lists.sourceforge.net
> *Subject:* [Rdkit-discuss] How to number the outputs of a reaction?
>
> Hi All,
>
> I am working with atom mapping for reactions. How do I get the correct
> atom mapping for my products?
>
> I have tried the following:
> >> rxn =
> rdChemReactions.ReactionFromSmarts('[C:1](=[O:2])O.[N:3]>>[C:1](=[O:2])[N:3]')
> >> rcts_lab = (Chem.MolFromSmiles('[C:1](=[O:2])[O:3]'),
> Chem.MolFromSmiles('[C:4][N:5][C:6]'))
> >> pcts_lab = rxn.RunReactants(rcts_lab)
> >> Chem.MolToSmiles(pcts_lab[0][0])
>   *'O=CN([C:4])[C:6]'*
>
> I would like the product to be fully labeled, so I get this on the last
> line instead.
>   *'[O:2]=[C:1][N:5]([C:4])[C:6]'*
>
> Thank you in advance for any help you can provide me.
>
> Best,
> Jennifer
>
>
--
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] How to number the outputs of a reaction?

2017-09-28 Thread Kovas Palunas
Hi Jennifer,

I had this same issue a while back.  Here is an issue I posted about it on the 
github: https://github.com/rdkit/rdkit/issues/1269

I never did make the pull request mentioned in the issue, but all the code that 
does what you want should be in there.  Let me know if you have any other 
questions, I've spent a good amount of time on this problem.

 - Kovas


From: Jennifer Wei 
Sent: Thursday, September 28, 2017 11:47:53 AM
To: rdkit-discuss@lists.sourceforge.net
Subject: [Rdkit-discuss] How to number the outputs of a reaction?

Hi All,

I am working with atom mapping for reactions. How do I get the correct atom 
mapping for my products?

I have tried the following:
>> rxn = 
>> rdChemReactions.ReactionFromSmarts('[C:1](=[O:2])O.[N:3]>>[C:1](=[O:2])[N:3]')
>> rcts_lab = (Chem.MolFromSmiles('[C:1](=[O:2])[O:3]'), 
>> Chem.MolFromSmiles('[C:4][N:5][C:6]'))
>> pcts_lab = rxn.RunReactants(rcts_lab)
>> Chem.MolToSmiles(pcts_lab[0][0])
  'O=CN([C:4])[C:6]'

I would like the product to be fully labeled, so I get this on the last line 
instead.
  '[O:2]=[C:1][N:5]([C:4])[C:6]'

Thank you in advance for any help you can provide me.

Best,
Jennifer

--
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] How to number the outputs of a reaction?

2017-09-28 Thread Jennifer Wei
Hi All,

I am working with atom mapping for reactions. How do I get the correct atom
mapping for my products?

I have tried the following:
>> rxn =
rdChemReactions.ReactionFromSmarts('[C:1](=[O:2])O.[N:3]>>[C:1](=[O:2])[N:3]')
>> rcts_lab = (Chem.MolFromSmiles('[C:1](=[O:2])[O:3]'),
Chem.MolFromSmiles('[C:4][N:5][C:6]'))
>> pcts_lab = rxn.RunReactants(rcts_lab)
>> Chem.MolToSmiles(pcts_lab[0][0])
  *'O=CN([C:4])[C:6]'*

I would like the product to be fully labeled, so I get this on the last
line instead.
  *'[O:2]=[C:1][N:5]([C:4])[C:6]'*

Thank you in advance for any help you can provide me.

Best,
Jennifer
--
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