Hi Chris,
Can you please show an example where it doesn't work? It certainly should
and, at least for this simple example, does for me:
In [14]: m = Chem.MolFromSmiles('CC')
In [15]: m.SetProp('prop1','4')
In [16]: m.SetIntProp('prop2',12)
In [17]: list(m.GetPropNames())
Out[17]: ['prop1', 'prop2']
In [19]: from io import StringIO
In [20]: sio = StringIO()
In [21]: w = Chem.SDWriter(sio)
In [22]: w.write(m)
In [23]: w.flush()
In [24]: print(sio.getvalue())
RDKit
2 1 0 0 0 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0
M END
> <prop1> (1)
4
> <prop2> (1)
12
$$$$
Best,
-greg
On Mon, Mar 14, 2016 at 1:19 PM, chris dalton <[email protected]> wrote:
> I want to create some new properties for an RDKit molecule and add
> calculated values for them. I have tried using SetProp() to create the
> properties but this only appears to modify values of already-present
> properties. Is there something else I should be using to create them?
>
> thanks,
> Chris
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss