Re: [Rdkit-discuss] property of name in smilesMolSupplier

2016-10-13 Thread Greg Landrum
On Thu, Oct 13, 2016 at 2:30 PM, Brian Kelley wrote: > I agree. I tend to think molecules should have GetName/SetName since this > is a common operation. > > I used to argue about this point, but at this point I've either been convinced or just gotten tired of the

Re: [Rdkit-discuss] property of name in smilesMolSupplier

2016-10-13 Thread 杨弘宾
ot find this property_name untill he read the source code, or define the property_name through adding headers. Hongbin Yang 杨弘宾 ?From:?Paolo ToscoDate:?2016-10-13?18:56To:?杨弘宾; rdkit-discussSubject:?Re: [Rdkit-discuss] property of name in smilesMolSupplier Hi Hongbi

Re: [Rdkit-discuss] property of name in smilesMolSupplier

2016-10-13 Thread Brian Kelley
Paolo, _Name might be considered a private property, you might need to use GetPropNames(True,True) or something like that. Brian Kelley > On Oct 13, 2016, at 6:56 AM, Paolo Tosco wrote: > > Hi Hongbin, > > suppl[0].GetPropNames() is an interable object, so you can

Re: [Rdkit-discuss] property of name in smilesMolSupplier

2016-10-13 Thread Brian Kelley
I agree. I tend to think molecules should have GetName/SetName since this is a common operation. One note though: mol.GetPropsAsDict() Might help with introspection. There are optionally arguments that allow looking at private and computed properties, I.e. mol.GetPropsAsDict(True,True) I

Re: [Rdkit-discuss] property of name in smilesMolSupplier

2016-10-13 Thread Paolo Tosco
Hi Hongbin, suppl[0].GetPropNames() is an interable object, so you can use it in for loops such as: for i in suppl[0].GetPropNames(): print (i) or you may convert it to a list: l = list(suppl[0].GetPropNames()) print (l) Cheers, p. On 10/13/16 11:31, 杨弘宾 wrote: Hi, I spent a lot of

[Rdkit-discuss] property of name in smilesMolSupplier

2016-10-13 Thread 杨弘宾
Hi,? ? I spent a lot of time to explorer "How to get the property of name when using SmilesMolSupplier" I had a smiles file like this:===c1c1\t1\n...===where 1 means that it is positve So I wanted to read this smiles file via SMilesMolSupplier and I knew that the second column is the