chemaxon.struc.SgroupType

User 870ab5b546

20-06-2014 17:26:56

Hello,


You have deprecated the methods Molecule.ungroupSgroups(int type) in favor of a new method, ungroupSgroups(EnumSet<chemaxon.struc.SgroupType> types). But the new class chemaxon.struc.SgroupType does not appear in the API, so it's not clear to me how I am supposed to create these objects or an EnumSet of them. Any advice?


-- Bob

ChemAxon d26931946c

23-06-2014 12:37:22

Hi Bob,


 


Thanks for the notification, we have forgotten to add this class into our public documentation. You may find it under chemaxon.struc package, the following values are possible:


SUPERATOM("sup"), MULTIPLE("mul"), SRU("n"), MONOMER("mon"), MER("mer"), COPOLYMER(
        "co"), CROSSLINK("xl"), MODIFICATION("mod"), MIXTURE("mix"), FORMULATION(
        "f"), DATA("dat"), ANY("any"), GENERIC("gen"), COMPONENT("c"), MULTICENTER(
        "mc"), GRAFT("grf"), AMINOACID("aa"), COPOLYMER_ALT("alt"), COPOLYMER_RAN("ran"), COPOLYMER_BLK(
        "blk");

We'll fix this in the next upcoming release.


Regards,


Peter

User 870ab5b546

23-06-2014 13:34:55

Thanks. So, for the record, if instead of defining SHORTCUT_GROUPS this way:


public static final int SHORTCUT_GROUPS = Sgroup.ST_SUPERATOM;

I define it this way:


public static final EnumSet<SgroupType> SHORTCUT_GROUPS = EnumSet.of(SgroupType.SUPERATOM);

then Molecule.ungroupsSgroups(SHORTCUT_GROUPS) behaves as previously, but no longer elicits a deprecation warning from the compiler. Right?

ChemAxon d26931946c

23-06-2014 14:47:06

Yes, that should work.

User 870ab5b546

14-08-2014 16:31:41

Using the API, if I have identified that an Sgroup is of the MULTICENTER type, is there a way for me to get the MolAtom that represents the multicenter attachment point without iterating through all the MolAtoms of the Molecule? The SuperatomSgroup class has a method findAttachAtom(), but there doesn't appear to be a corresponding method in Sgroup itself.


Also, if sgroup is of the MULTICENTER type, would sgroup.getConnectivity() return the number of bonds that the multicenter attachment point makes? The API documentation is unhelpful.

ChemAxon 2cd598e7ad

18-08-2014 13:41:45

Hi Bob,


From 2014.08.25.0 MulticenterSgroup class is public. Therefore you can get the multicenter attachment atom by the getCentralAtom() method. If the central atom doesn't exist then the addCentralAtom() method creates it (and adds it to the molecule).
After this you can get the bond count of the central atom by the usual way (calling the getBondCount() method on the atom). S-group connectivity refers to some other kind of information used in polymer S-groups.


BR,
Domi

User 870ab5b546

26-08-2014 15:26:36

Thanks. JChem 2014.8.25.0 has been released, and the MulticenterSgroup class is indeed public. It's much faster to find any central atoms of any MulticenterSgroups by iterating through a Molecule's Sgroups than by iterating through its MolAtoms.


You may want to add documentation for JChem 2014.8.25.0 to the history page.

ChemAxon 2cd598e7ad

01-09-2014 13:37:48

Hi,


It is added to the history of 14.08.25.0 (https://docs.chemaxon.com/display/products/MarvinSketch)


Regards,
Domi

User 870ab5b546

01-09-2014 17:21:59

Yes, but now the history says "No changes," but in fact there is at least one change, that the MulticenterSgroup class is now public.

ChemAxon 2cd598e7ad

02-09-2014 08:41:16

Hi,


Though JChem API uses Marvin API, the publicity of MulticenterSgroup primarily belongs to the Marvin API therefore it is listed only in the Marvin API changes. I hope it is not confusing.


Regards,
Domi