|
|||||||||
| 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
public class SuperatomSgroup
Superatom S-group.
| Field Summary |
|---|
| Fields inherited from class chemaxon.struc.Sgroup |
|---|
brackets, CHARGE_ON_ATOMS, CHARGE_ON_GROUP, parentSgroup, PR_ATSYMS, RA_IN_EXPAND, RA_REMOVE_EXCEPT_RU, SCN_EITHER_UNKNOWN, SCN_HEAD_TO_HEAD, SCN_HEAD_TO_TAIL, SGROUP_TYPE_COUNT, sgroupGraph, sgroupType, SORT_CHILD_PARENT, SORT_PARENT_CHILD, SST_ALTERNATING, SST_BLOCK, SST_RANDOM, ST_ANY, ST_COMPONENT, ST_COPOLYMER, ST_CROSSLINK, ST_DATA, ST_FORMULATION, ST_GENERIC, ST_GRAFT, ST_MER, ST_MIXTURE, ST_MODIFICATION, ST_MONOMER, ST_MULTICENTER, ST_MULTIPLE, ST_SRU, ST_SUPERATOM, XSTATE_C, XSTATE_NONE, XSTATE_X, XSTATE_XC |
| Fields inherited from interface chemaxon.struc.sgroup.Expandable |
|---|
COORDS_UPDATE, DEFAULT_OPTIONS, FAST_COORDS, 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,
int[] atomIndexMap)
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. |
protected Sgroup |
cloneSgroup(Molecule m,
Sgroup psg,
int[] atomIndexMap)
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. |
boolean |
expandOther(int opts,
Molecule moltoexpand)
Expands sgtoexpand S-group the same way as it would be this. |
MolAtom |
findAttachAtom()
Gets the most likely attachment point. |
MolBond[] |
findCrossingBonds()
Finds the crossing bonds. |
MolAtom[] |
getAttachAtoms()
Gets the attachment points. |
MolAtom[] |
getCrossingAtoms(MolBond[] xbonds)
Gets the atoms that have crossing bonds. |
int |
getExternalConnections(MolAtom a)
Gets the number of bonds of a specified atom where the neighbor doesn't belong to the S-group. |
MolAtom[] |
getFreeLegalAttachAtoms()
Gets the unused legal attachment points. |
MolAtom[] |
getLegalAttachAtoms()
Gets the legal attachment points. |
SelectionMolecule |
getParentSgroupGraph()
Gets the parent exact sgroupgraph. |
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()
Decides whether this S-group is contracted or not. |
boolean |
isExpanded()
Is this S-group expanded? |
boolean |
isFreeLegalAttachAtom(MolAtom a)
Tests whether the specified atom is a legal attachment point with a free valence. |
boolean |
isLegalAttachment(MolAtom a)
Tests whether the specified atom is attached to a legal attachment point. |
boolean |
isTotalSelected(MoleculeGraph sel)
Decides if the whole superatom sgroup is selected or not. |
protected void |
removeAtom(MolAtom a,
int opts)
Removes an atom from the S-group. |
void |
removeBond(MolBond b)
Removes a bond from the S-group. |
void |
replaceAtom(MolAtom olda,
MolAtom newa,
int opts)
Replace an existing atom by a new one. |
void |
setAtom(int i,
MolAtom a)
Sets the specified atom in the S-group graph. |
boolean |
setGUIStateRecursively(boolean v)
Sets the expanded/contracted state recursively. |
void |
setSgroupGraph(SelectionMolecule smol)
Sets the molecule graph. |
void |
sortXBonds()
Sorts the crossing bonds in the parent molecule in attachment point number order. |
java.lang.String |
toString(int opts)
Returns a string representation of the group. |
protected void |
transformByParent(CTransform3D t,
boolean incg)
Applies a transformation matrix to the Sgroup coordinates. |
void |
updateAttachmentPoints()
Adjusts attachment point information to current bonding. |
MolBond[] |
updateSgroupCrossings()
Deprecated. as of Marvin 3.3, replaced by Sgroup.findCrossingBonds() |
| 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 moleculeSgroup.ST_SUPERATOM,
MolAtom.SGROUP,
getSuperAtom()
public SuperatomSgroup(Molecule parent,
boolean expanded)
parent - the parent moleculeexpanded - whether the S-group is created in expanded state or notSgroup.ST_SUPERATOM,
MolAtom.SGROUP,
getSuperAtom()
protected SuperatomSgroup(SuperatomSgroup sg,
Molecule m,
Sgroup psg,
int[] atomIndexMap)
sg - the S-group to copym - the new parent moleculepsg - the new parent S-group or nullatomIndexMap - indices of cloned atoms in the original molecule
or null| Method Detail |
|---|
public final SgroupAtom getSuperAtom()
public final MolAtom[] getAttachAtoms()
public void updateAttachmentPoints()
public SelectionMolecule getSgroupGraph()
getSgroupGraph in class Sgrouppublic SelectionMolecule getParentSgroupGraph()
public void setSgroupGraph(SelectionMolecule smol)
setSgroupGraph in class Sgroupsmol - the molecule graph
protected Sgroup cloneSgroup(Molecule m,
Sgroup psg,
int[] atomIndexMap)
cloneSgroup in class Sgroupm - the new parent moleculepsg - the new parent S-groupatomIndexMap - indices of cloned atoms in the original molecule
or null
public final void setAtom(int i,
MolAtom a)
setAtom in class Sgroupi - the indexa - the atom
protected final void removeAtom(MolAtom a,
int opts)
removeAtom in class Sgroupa - the atomopts - unused argumentpublic 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 MolAtom findAttachAtom()
protected void transformByParent(CTransform3D t,
boolean incg)
Molecule.transform(CTransform3D, boolean) method,
thus only those atom coordinates are transformed here that are not
handled in MoleculeGraph.transform(CTransform3D, boolean).
transformByParent in class Sgroupt - the transformation matrixincg - graph invariants are changed (true) or not (false)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 expandOther(int opts,
Molecule moltoexpand)
throws java.lang.IllegalArgumentException
opts - expansion optionsmoltoexpand - molecule containing an Sgroup that has to be expanded
java.lang.IllegalArgumentException - if the group is invisible
(it has a non-expanded parent)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 isTotalSelected(MoleculeGraph sel)
isTotalSelected in class Sgroupsel - molecule graph that contains the selection
public boolean areChildSgroupsVisible()
areChildSgroupsVisible in class Sgrouppublic final MolAtom[] getLegalAttachAtoms()
public void sortXBonds()
public final boolean isLegalAttachment(MolAtom a)
a - the atom
true if it is attached to a legal attachment point,
false otherwisepublic final boolean isFreeLegalAttachAtom(MolAtom a)
a - the atom
true if there is a free valence,
false otherwisepublic int getExternalConnections(MolAtom a)
a - the atom whose connections to be checked
public 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,
int opts)
replaceAtom in class Sgroupolda - the original atomnewa - the new atomopts - optionsSgroup.RA_REMOVE_EXCEPT_RUpublic final MolBond[] updateSgroupCrossings()
public java.lang.String toString(int opts)
toString in class Sgroupopts - options or 0
Sgroup.PR_ATSYMS
public final boolean setGUIStateRecursively(boolean v)
throws java.lang.IllegalArgumentException
setGUIStateRecursively in class Sgroupv - true sets Sgroup.XSTATE_C if previous state was
Sgroup.XSTATE_XC, false sets Sgroup.XSTATE_XC if previous
state was Sgroup.XSTATE_C, no operation in other cases
java.lang.IllegalArgumentException - if the group is invisible
(it has a non-expanded parent)Sgroup.setXState(int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||