|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectchemaxon.struc.Sgroup
chemaxon.struc.sgroup.SuperatomSgroup
Superatom S-group.
| Field Summary |
| Fields inherited from class chemaxon.struc.Sgroup |
SCN_EITHER_UNKNOWN, SCN_HEAD_TO_HEAD, SCN_HEAD_TO_TAIL, sgroupGraph, sgroupType, SORT_CHILD_PARENT, SORT_PARENT_CHILD, SST_ALTERNATING, SST_BLOCK, SST_RANDOM, ST_ANY, ST_COPOLYMER, ST_CROSSLINK, ST_DATA, ST_FORMULATION, ST_GENERIC, ST_MER, ST_MIXTURE, ST_MODIFICATION, ST_MONOMER, ST_MULTIPLE, ST_SRU, ST_SUPERATOM, XSTATE_C, XSTATE_NONE, XSTATE_X, XSTATE_XC |
| Fields inherited from interface chemaxon.struc.sgroup.Expandable |
DEFAULT_OPTIONS, MDL_EXPAND, NONRECURSIVE_EXPAND, REVERSIBLE_EXPAND |
| Constructor Summary | |
|
SuperatomSgroup(Molecule parent)
Constructs a superatom S-group in expanded state. |
|
SuperatomSgroup(Molecule parent,
boolean expanded)
Constructs a superatom S-group. |
protected |
SuperatomSgroup(SuperatomSgroup sg,
Molecule m,
Sgroup psg)
Copy constructor. |
| Method Summary | |
protected void |
addAttachAtom(MolAtom a)
Adds an atom to the list of attachments. |
boolean |
areChildSgroupsVisible()
Checks whether the child S-groups are visible. |
Sgroup |
cloneSgroup(Molecule m,
Sgroup psg)
Gets a new Sgroup instance. |
boolean |
contract(int opts)
Contracts this S-group. |
Molecule |
createMolecule()
Creates a molecule object that contains only this group. |
boolean |
expand(int opts)
Expands this S-group. |
MolBond[] |
findCrossingBonds()
Finds the crossing bonds. |
MolAtom |
getAttachAtom(int i)
Gets an attachment point. |
MolAtom[] |
getCrossingAtoms(MolBond[] xbonds)
Gets the atoms that have crossing bonds. |
MolAtom[] |
getFreeLegalAttachAtoms()
Gets the unused legal attachment points. |
MolAtom[] |
getLegalAttachAtoms()
Gets the legal attachment points. |
SelectionMolecule |
getSgroupGraph()
Gets the molecule graph as a selection. |
SgroupAtom |
getSuperAtom()
Gets the superatom. |
boolean |
hasAtom(MolAtom a)
Is the specified atom an element of this group? |
boolean |
hasBrackets()
Checks if brackets should be painted or not. |
boolean |
isBracketVisible()
Tests whether the bracket is visible. |
boolean |
isContracted()
Is this S-group contracted? |
boolean |
isExpanded()
Is this S-group expanded? |
boolean |
isLegalAttachment(MolAtom a)
Checks if the specified atom is attached to a legal attachment point. |
void |
removeAtom(MolAtom a)
Removes an atom from the S-group. |
void |
removeBond(MolBond b)
Removes a bond from the S-group. |
void |
replaceAtom(MolAtom olda,
MolAtom newa)
Replace an existing atom by a new one. |
void |
setAtom(int i,
MolAtom a)
Sets the specified atom in the S-group graph. |
void |
setSgroupGraph(SelectionMolecule smol)
Sets the molecule graph. |
MolBond[] |
updateSgroupCrossings()
Deprecated. as of Marvin 3.3, replaced by Sgroup.findCrossingBonds() |
| Methods inherited from class chemaxon.struc.Sgroup |
add, addChildSgroup, cloneStructure, containsAllAtomsOf, countAllAtoms, findSmallestSgroupContaining, findSmallestSgroupOf, getAtom, getAtomArray, getAtomCount, getChildSgroup, getChildSgroupCount, getConnectivity, getParentMolecule, getParentSgroup, getSubscript, getSubType, getSuperscript, getType, getXState, indexOf, isEmpty, isVisible, removeEdges, removeGroupedAtom, setConnectivity, setGUIStateRecursively, setParentMolecule, setSubscript, setSubType, setXState, sort, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SuperatomSgroup(Molecule parent)
parent - the parent molecule
public SuperatomSgroup(Molecule parent,
boolean expanded)
parent - the parent moleculeexpanded - whether the S-group is created in expanded state or not
protected SuperatomSgroup(SuperatomSgroup sg,
Molecule m,
Sgroup psg)
sg - the S-group to copym - the new parent moleculepsg - the new parent S-group or null| Method Detail |
public final SgroupAtom getSuperAtom()
public final MolAtom getAttachAtom(int i)
i - the attachment point index
public SelectionMolecule getSgroupGraph()
getSgroupGraph in class Sgrouppublic void setSgroupGraph(SelectionMolecule smol)
setSgroupGraph in class Sgroupsmol - the molecule graph
public Sgroup cloneSgroup(Molecule m,
Sgroup psg)
cloneSgroup in class Sgroupm - the new parent moleculepsg - the new parent S-group
public final void setAtom(int i,
MolAtom a)
setAtom in class Sgroupi - the indexa - the atompublic final void removeAtom(MolAtom a)
removeAtom in class Sgroupa - the atompublic final void removeBond(MolBond b)
removeBond in class Sgroupb - the bondpublic MolBond[] findCrossingBonds()
findCrossingBonds in class Sgrouppublic MolAtom[] getCrossingAtoms(MolBond[] xbonds)
getCrossingAtoms in class Sgroupxbonds - the crossing bonds
findCrossingBonds()public boolean hasBrackets()
hasBrackets in class Sgrouppublic boolean hasAtom(MolAtom a)
hasAtom in class Sgroupa - the atom
public final boolean expand(int opts)
throws java.lang.IllegalArgumentException
expand in interface Expandableexpand in class Sgroupopts - expansion options
java.lang.IllegalArgumentException - if the group is invisible
(it has a non-expanded parent)Sgroup.setXState(int)public final boolean isExpanded()
isExpanded in interface Expandable
public final boolean contract(int opts)
throws java.lang.IllegalArgumentException
contract in interface Expandablecontract in class Sgroupopts - contraction options
java.lang.IllegalArgumentException - if the group is invisible
(it has a non-expanded parent)Sgroup.setXState(int)public final boolean isContracted()
public boolean isBracketVisible()
isBracketVisible in class Sgroupfalse, superatom S-group brackets are not visiblepublic boolean areChildSgroupsVisible()
areChildSgroupsVisible in class Sgrouppublic final MolAtom[] getLegalAttachAtoms()
public final boolean isLegalAttachment(MolAtom a)
true if it is attached to a legal attachment point,
false otherwisepublic final MolAtom[] getFreeLegalAttachAtoms()
public Molecule createMolecule()
createMolecule in class Sgroupprotected void addAttachAtom(MolAtom a)
a - the atom
public final void replaceAtom(MolAtom olda,
MolAtom newa)
replaceAtom in class Sgroupolda - the original atomnewa - the new atompublic final MolBond[] updateSgroupCrossings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||