accessing S-groups in mol file and expanding API dealing with S-groups

31 views
Skip to first unread message

Karen Karapetyan

unread,
Jun 3, 2013, 12:01:36 PM6/3/13
to indigo-...@googlegroups.com, Yulia.B...@fda.hhs.gov
Hi, Folks,

We have a need in accessing S-group data in mol file and by looking at Indigo API documentation seems like the current S-group API is limited (the only available API are group iteration and accessing group index and description).
It would be very useful to us to have few more APIs. Particularly:

a) in addition to iterating data S-groups and getting description and index of data S-group there is a need to access data under "SED" field in data S-group
"M  SED   3 testdata"

b) there is a need to access data under "SPL" field as our data S-groups have parent-child relations with regular S-groups:

//defining parent-child relations for S-groups - data S-group with index 3 has parent S-group with index 2
M  SPL  3   3   2   4   2   6   5

//data S-group (child)
M  SDT   3 MYREG_SGROUP                                         
M  SDD   3    17.7077   -8.6065    DA    ALL  1       5
M  SED   3 B


//parent
M  SAL   2  1   3
M  SDI   2  4   14.9977   -8.4465   14.9977   -6.7165
M  SDI   2  4   17.3377   -6.7165   17.3377   -8.4465


c) there is need to get atom list in "SAL" field
"M  SAL   2  1   3"

d) getting encountered S-groups and their types:
"M  STY  6   1 MUL   2 GEN   3 DAT   4 DAT   5 GEN   6 DAT"

e) getting generic group by group id


Is the above API exists but not covered in documentation or is it something that you could/would implement?

Thanks,
Ken
non-stoichio_test1.mol

Mikhail Rybalkin

unread,
Jun 19, 2013, 11:21:23 AM6/19/13
to indigo-...@googlegroups.com, Yulia.B...@fda.hhs.gov
Hello Karen,

I agree that some API is missing and I added most of the require API method in the development version. I will try to release it on this week.

You can iterate over sgroup atom with iterateAtoms method. Like:
for group in mol.iterateDataSGroups():
   for atom in group.iterateAtoms():
      print atom.index()

Best regards,
Mikhail
Reply all
Reply to author
Forward
0 new messages