chemaxon.struc.sgroup
Class SgroupAtom

java.lang.Object
  extended bychemaxon.struc.CNode
      extended bychemaxon.struc.MolAtom
          extended bychemaxon.struc.sgroup.SgroupAtom
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, StereoConstants

public class SgroupAtom
extends MolAtom

S-group.

Since:
Marvin 3.0, 11/05/2002
Version:
4.1, 08/01/2006
Author:
Peter Csizmadia
See Also:
Serialized Form

Field Summary
static int LABEL_AUTO
           
static int LABEL_DEFAULT
           
 
Fields inherited from class chemaxon.struc.MolAtom
AAMAP_MASK, AAMAP_MAX, AAMAP_OFF, ALIPHATIC, ANY, AROMATIC, AROMATIC_OR_ALIPHATIC, ATOM_TYPE_COUNT, ATOM_TYPE_MAX, ATTACH_BOTH, ATTACH1, ATTACH2, CHARGED_H, ELEMENT_COUNT, EMPTY, FIX_CHARGE, HCONNECTED_H, HETERO, HS_S, HS_SP, HS_SP2, HS_SP3, HS_UNKNOWN, ISOTOPE_H, LDIR_ABOVE, LDIR_BELOW, LDIR_LEFT, LDIR_RIGHT, LIST, LONELY_H, LP, MAPPED_H, NOTLIST, PSEUDO, RAD_COUNT_MASK, RAD_MASK, RAD_OFF, RAD1, RAD2, RAD2_SINGLET, RAD2_TRIPLET, RAD3, RAD3_DOUBLET, RAD3_QUARTET, RADICAL_CHAR, RADICAL_H, RESSEQ_MAX, RESTYPE_MAX, RGROUP, RGROUP_MAX, RXNSTEREO_INVERSION, RXNSTEREO_NONE, RXNSTEREO_RETENTION, SETSEQ_MAX, SGROUP, SMARTS_H_DAYLIGHT_COMP_MODE, SMARTS_H_MARVIN_COMP_MODE, SYM_EXPLH, SYM_IMPLH, SYM_MOLEX, SYM_NEUTRAL, SYM_SMARTS, SYM_SQBRACKETS, VALCHK_ATTACH, VALENCE_CHECKED, WEDGED_H, xCoordinate, yCoordinate, zCoordinate
 
Fields inherited from class chemaxon.struc.CNode
edges, nedges
 
Fields inherited from interface chemaxon.struc.StereoConstants
ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_MASK, CHIRALITY_R, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, TRANS
 
Constructor Summary
SgroupAtom(SuperatomSgroup sg)
          Constructs a superatom for a superatom type S-group.
 
Method Summary
protected  void add(CEdge edge)
          Add an edge if it had not been already added.
 java.lang.Object clone()
          Clones the S-group superatom.
 SgroupAtom cloneFromSgroupCopy()
          Clones the S-group superatom partially.
protected  int countAllAtoms()
          Counts all atoms represented by this atom.
 java.lang.String getAtomSymbol(int style, int flags, int[] lcenter, CTransform3D preTransform)
          Gets the string representation of the atom symbol.
 int getLabelCenter()
          Gets the index of the character in the label the bonds should point to.
 java.lang.String getLeftName()
          Gets the string that will be shown at the left side of the molecule.
 java.lang.String getRightName()
          Set the string that will be shown at the right side of the molecule.
 SuperatomSgroup getSgroup()
          Gets the S-group corresponding to this superatom.
 java.lang.String getSymbol()
          Gets the abbreviated group symbol.
 boolean hasAlternativeName()
          Checks whether there is an alternative name at all.
protected  void removeAllEdges()
          Remove all edges.
protected  void removeEdge(int i)
          Removes a bond.
 void set(MolAtom atom)
          Set properties of this S-group superatom.
protected  void setFromSgroupCopy(SgroupAtom sa)
          Make a copy of this S-group superatom.
 void setLabelCenter(int k)
          Sets the index of the character in the label the bonds should point to.
 void setLeftName(java.lang.String s)
          Set the string that will be shown at the left side of the molecule.
protected static void setNode1(CEdge edge, CNode newnode)
          Sets the first node of an edge.
protected static void setNode2(CEdge edge, CNode newnode)
          Sets the second node of an edge.
 void setRightName(java.lang.String s)
          Set the string that will be shown at the right side of the molecule.
 void transform(CTransform3D t, boolean incg)
          Apply a transformation matrix to the coordinates.
 
Methods inherited from class chemaxon.struc.MolAtom
bondweights, clear, clearExtraLabel, clearQProps, covalentRadiusOf, decQProp, decValenceProp, electronegOf, getAliasstr, getAtno, getAtomMap, getAttach, getBond, getBondCount, getCharge, getColumn, getExplicitHcount, getExtraLabel, getExtraLabelColor, getExtraLabelColor, getExtraLabelSetSeq, getFlags, getHybridizationState, getImplicitHcount, getLinkNodeOuterAtom, getList, getLocation, getLocation, getMass, getMassno, getMaxRepetitions, getMinRepetitions, getNonQueryImplicitHcount, getPreferredLabelDir, getQProp, getQPropAsInt, getQPropMinMax, getQPropNames, getQPropNameSet, getQueryAromaticity, getQueryLabel, getQuerystr, getRadical, getRadicalCount, getReactionStereo, getRealBondCount, getRelativeNegativity, getResidueAtomId, getResidueSeq, getResidueType, getRgroup, getRow, getSetSeq, getStereoCare, getStereoGroupNumber, getStereoGroupType, getValence, getValenceProp, getValencePropMinMax, getX, getY, getZ, hasAromaticBond, hasQProps, hasQueryBonds, hasSMARTSProps, hasSMARTSPropsExcluding, hasValenceError, hasWedgedBond, haveEqualProperties, incQProp, incQueryAromaticity, incValenceProp, insideLabel, ionChargeOf, isAmbigousStereo, isArrowEnd, isImplicitizableH, isLinkNode, isMappable, isNobleGas, isotopeType, isPseudo, isQProp, isQuery, isSameParityClass, isSelected, isSpecIsotopeSymbolPreferred, isSpecIsotopeSymbolUsed, isTerminalAtom, maxAbsOxStateOf, nameOf, naturalWeightOf, negOxOf, numOf, numoxstatesOf, oxstateOf, paritySign, posOxOf, qpropCheck, residueSymbolOf, residueTypeOf, setAliasstr, setAtno, setAtomMap, setAttach, setAttach, setCharge, setCorners, setExtraLabel, setExtraLabelColor, setExtraLabelSetSeq, setFlags, setFlags, setForSpecIsotopeSymbol, setHybridizationState, setImplicitHcount, setLinkNodeDefaultOuters, setLinkNodeOuterAtom, setList, setList, setLocation, setMassno, setMassnoIfKnown, setMaxRepetitions, setMinRepetitions, setNonQueryImplicitHcount, setQProp, setQProp, setQueryAromaticity, setQuerystr, setQuerystr, setRadical, setReactionStereo, setResidueAtomId, setResidueSeq, setResidueType, setRgroup, setSelected, setSetSeq, setSMARTS, setSpecIsotopeSymbolPreferred, setStereoGroupNumber, setStereoGroupType, setValenceError, setValenceProp, setX, setXY, setXYZ, setY, setZ, symbolOf, toString, twicesumbonds, valenceCheck, valenceCheck
 
Methods inherited from class chemaxon.struc.CNode
getEdge, getEdgeCount, getEdgeTo, getLigand, getLigandIndex, getLock, getParent, haveSimilarEdges, indexOf, isBoundTo, pack, removeEdge, sringsize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LABEL_DEFAULT

public static final int LABEL_DEFAULT
See Also:
Constant Field Values

LABEL_AUTO

public static final int LABEL_AUTO
See Also:
Constant Field Values
Constructor Detail

SgroupAtom

public SgroupAtom(SuperatomSgroup sg)
Constructs a superatom for a superatom type S-group.

Parameters:
sg - the S-group
Method Detail

getSgroup

public SuperatomSgroup getSgroup()
Gets the S-group corresponding to this superatom.

Returns:
the S-group

getAtomSymbol

public java.lang.String getAtomSymbol(int style,
                                      int flags,
                                      int[] lcenter,
                                      CTransform3D preTransform)
Gets the string representation of the atom symbol.

Overrides:
getAtomSymbol in class MolAtom
Parameters:
style - neglected
flags - neglected
preTransform - neglected
lcenter - neglected
Returns:
the S-group name with the numbers subscripted
See Also:
MolAtom.SYM_SQBRACKETS, MolAtom.SYM_IMPLH, MolAtom.SYM_EXPLH, MolAtom.SYM_NEUTRAL, MolAtom.SYM_SMARTS, MolAtom.SYM_MOLEX

clone

public java.lang.Object clone()
Clones the S-group superatom.

Overrides:
clone in class MolAtom
Returns:
the clone

set

public void set(MolAtom atom)
Set properties of this S-group superatom.

Overrides:
set in class MolAtom
Parameters:
atom - the target atom
Since:
Marvin 4.1, 01/01/2006

cloneFromSgroupCopy

public SgroupAtom cloneFromSgroupCopy()
Clones the S-group superatom partially. This method is needed to prevent infinite recursion when cloning from SuperatomSgroup.copy.

Returns:
the clone

transform

public void transform(CTransform3D t,
                      boolean incg)
Apply a transformation matrix to the coordinates.

Overrides:
transform in class MolAtom
Parameters:
t - the transformation matrix
incg - graph invariants are changed (true) or not (false)
Since:
Marvin 4.0.2, 10/26/2005

getSymbol

public java.lang.String getSymbol()
Gets the abbreviated group symbol.

Overrides:
getSymbol in class MolAtom
Returns:
the symbol

getLeftName

public java.lang.String getLeftName()
Gets the string that will be shown at the left side of the molecule.

Since:
Marvin 4.1

setLeftName

public void setLeftName(java.lang.String s)
Set the string that will be shown at the left side of the molecule.

Parameters:
s -
Since:
Marvin 4.1

getRightName

public java.lang.String getRightName()
Set the string that will be shown at the right side of the molecule.

Since:
Marvin 4.1

setRightName

public void setRightName(java.lang.String s)
Set the string that will be shown at the right side of the molecule.

Parameters:
s -
Since:
Marvin 4.1

hasAlternativeName

public boolean hasAlternativeName()
Checks whether there is an alternative name at all.

Returns:
true if an alternative name is available for the (s)group
Since:
Marvin 4.1

getLabelCenter

public int getLabelCenter()
Gets the index of the character in the label the bonds should point to.

Returns:
character index + 1, or LABEL_DEFAULT for default behavior (geometrical center unless alternative name is specified), or LABEL_AUTO for automatic calculation
Since:
Marvin 4.1

setLabelCenter

public void setLabelCenter(int k)
Sets the index of the character in the label the bonds should point to.

Parameters:
k - character index + 1, or LABEL_DEFAULT for default behavior (geometrical center unless alternative name is specified), or LABEL_AUTO for automatic calculation
Since:
Marvin 4.1

setFromSgroupCopy

protected void setFromSgroupCopy(SgroupAtom sa)
Make a copy of this S-group superatom. Clones the S-group superatom partially. This method is needed to prevent infinite recursion when cloning from SuperatomSgroup.copy.

Parameters:
sa - the target atom
Since:
Marvin 4.1, 01/01/2006

add

protected void add(CEdge edge)
Add an edge if it had not been already added. Overridden to enable access from other classes of this package.

Overrides:
add in class MolAtom
Parameters:
edge - the edge to add

removeEdge

protected void removeEdge(int i)
Removes a bond.

Overrides:
removeEdge in class MolAtom
Parameters:
i - bond index

setNode1

protected static void setNode1(CEdge edge,
                               CNode newnode)
Sets the first node of an edge. Overridden to enable access from other classes of this package.

Parameters:
edge - the edge
newnode - the new node value

setNode2

protected static void setNode2(CEdge edge,
                               CNode newnode)
Sets the second node of an edge. Overridden to enable access from other classes of this package.

Parameters:
edge - the edge
newnode - the new node value

removeAllEdges

protected void removeAllEdges()
Remove all edges.

Overrides:
removeAllEdges in class CNode

countAllAtoms

protected int countAllAtoms()
Counts all atoms represented by this atom.

Overrides:
countAllAtoms in class MolAtom
Returns:
the number of atoms in the S-group