Re: iterating through SDF properties

73 views
Skip to first unread message
Message has been deleted

Mikhail Rybalkin

unread,
Feb 6, 2013, 9:49:20 AM2/6/13
to indigo-...@googlegroups.com
Hi Karen,

It seems that you didn't complete your message. At least file is not attached.

Best,
Mikhail

On Wednesday, February 6, 2013 6:45:02 PM UTC+4, Karen Karapetyan wrote:
I have a string of a SDF record and I need to iterate through properties:

string sdfrecord = "attached";
IndigoObject obj = indigo.loadMolecule(sdfrecord);
foreach (IndigoObject prop in obj.iterateProperties())
{
         string prop_name = prop.name();
obj.setProperty(prop.name(), prop.rawData());
}
Message has been deleted

Karen Karapetyan

unread,
Feb 6, 2013, 9:51:02 AM2/6/13
to indigo-...@googlegroups.com
Sorry, accidentally hit the post button. Here is full story.

I have a string of a SDF record and I need to iterate through properties:

string sdfrecord = "attached";
IndigoObject obj = indigo.loadMolecule(sdfrecord);
foreach (IndigoObject prop in obj.iterateProperties())
{
         string prop_name = prop.name();
string data = prop.rawData();
}

However, it is not entering the iterator at all.. Note, that I do not have a file to read the sdf from. I need to feed a SDF record string. What am I doing wrong?
selectedRecords (5).sdf

Mikhail Rybalkin

unread,
Feb 6, 2013, 10:00:46 AM2/6/13
to indigo-...@googlegroups.com
I confirm that I cannot iterate over properties too. I will check the reason tomorrow. Also for tomorrow we plan to release Indigo and we will include bugfix for this issue too (if it is a bug).

Mikhail Rybalkin

unread,
Feb 7, 2013, 9:57:48 AM2/7/13
to indigo-...@googlegroups.com
Hello Ken,

We were reading properties only via SDF file iteration and this is why indigo.loadMolecule() didn't load properties.
I added properties parsing in indigo.loadMolecule method (and loadQueryMolecule).
Due to the technical issue on our build machine I cannot make whole release today, but as I promised here are the binaries for .NET: http://ggasoftware.com/accept?file=indigo-1.1.8%2Findigo-dotnet-1.1.8-win.zip
Let me know if it work for or not. And thank you for suggestion, this is a usefull addition.

Best,
Mikhail

Karen Karapetyan

unread,
Feb 7, 2013, 10:21:28 AM2/7/13
to indigo-...@googlegroups.com
Yep, seems to be working fine. Thanks a lot for a quick fix.

Karen Karapetyan

unread,
Feb 9, 2013, 12:48:50 PM2/9/13
to indigo-...@googlegroups.com
it would be useful to have a method to return string with sdf record ( molfile plus sdf properties). I see that now it is only possible to write into a file.

Valery Tkachenko

unread,
Feb 9, 2013, 5:37:01 PM2/9/13
to indigo-...@googlegroups.com

It’s a slippery road. Indigo is a general type toolkit that provides necessary capabilities to implement a variation in serialization routines (SDF being one of such). If it (serialization into different formats) has to be implemented I’d rather suggest to do it following plugins paradigm that you’ve started with indigo-renderer and indigo-inchi.

 

--
You received this message because you are subscribed to the Google Groups "indigo-general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to indigo-genera...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages