There are two states of the molecule:
All represented atoms are present in the parent molecule in all expandable
S-group independently from their expansion state.
Here we can see a special S-group state called Sgroup.XSTATE_XC where the S-group remembers its previous contracted
state but the represented atoms were moved to the molecule graph and the abbreviation (SgroupAtom) was removed from the molecule
graph. Set this state on all Sgroups by calling Molecule.setGUIContracted(false) or by calling
Sgroup.setGUIStateRecursively(false) individually on Sgroup-s. Example for a typical usage is a non-GUI related API
based calculation where we need the represented atoms in the molecule graph instead of the abbreviation.
Either the abbreviation (SuperAtom) or the represented atom set is exclusively present depending on the state of the S-group.
In the case of expanded S-groups (called Sgroup.XSTATE_X) the represented atoms are present in the parent molecule.
In the case of contracted S-groups (called Sgroup.XSTATE_C) the abbreviation ( SgroupAtom) is present in the parent
molecule. Set this state on all Sgroups by calling Molecule.setGUIContracted(true) or by calling
Sgroup.setGUIStateRecursively(true) individually on Sgroup-s.
Note:
When Molecule.isGUIContracted() returns true and afterwards you call:
Molecule.setGUIContracted(false);
Molecule.setGUIContracted(true);
the second setGUIContracted
call will restore the state before the first setGUIContracted
call!