chemaxon.struc
Class SelectionMolecule

java.lang.Object
  extended by chemaxon.struc.MoleculeGraph
      extended by chemaxon.struc.SelectionMolecule
All Implemented Interfaces:
chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>, Incomplecule, chemaxon.struc.MoleculeForBuilder, MTransformable, StereoConstants, java.io.Serializable

public class SelectionMolecule
extends MoleculeGraph

A selection object which can contain atoms and bonds without real parent relationship (the real parent of atoms and bonds is another MoleculeGraph ancestor).

Since:
Marvin 3.0
Version:
5.3, 05/26/2009
Author:
Peter Csizmadia
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class chemaxon.struc.MoleculeGraph
MoleculeGraph.ValenceCheckState
 
Field Summary
 
Fields inherited from class chemaxon.struc.MoleculeGraph
AROM_AMBIGUOUS, AROM_BASIC, AROM_CHEMAXON, AROM_DAYLIGHT, AROM_GENERAL, AROM_LOOSE, AROM_SUBSTRUCTURE, atomCount, AUTO_UNGROUP, bondCount, btab, CACHE_REMOVE_ALL, CACHE_REMOVE_AROMATAMODULE, CACHE_REMOVE_CACHEMEMORY, CACHE_REMOVE_GRINVMODULE, CACHE_REMOVE_PARITYMODULE, CACHE_REMOVE_SSSRMODULE, CACHE_REMOVE_TABS, cacheMemory, ctab, DEAROM_GENERAL, DEAROM_HUCKELCHECK, DEAROM_HUCKELCHECK_EX, DIM_MASK, FRAG_BASIC, FRAG_KEEPING_MULTICENTERS, FRAG_KEEPING_SGROUPS, FRAG_TYPE_COUNT, gearch, GRINV_DONT_STORE, GRINV_NOHYDROGEN, GRINV_OLDSTEREO, GRINV_STEREO, GRINV_USEMAPS, GRINV_VALUE_OPTIONS, grinvCC, INITIAL_CAPACITY, INVALID_LINKNODE_MESSAGE, MIN_RING_SIZE_FOR_TRANS_DB, OMIT_POSTCLEAN, orix, oriy, oriz, parentGraph, propertyContainer, RMCLEANUP_ALL, RMCLEANUP_EDGES, RMCLEANUP_FIXCOMPONENT, RMCLEANUP_MOBJECT, RMCLEANUP_NONE, RMCLEANUP_PARENTDOC, RMCLEANUP_STEREO, superGraph, theAtoms, theBonds, useOnlyFirstAtomInStereoCalculation, VALENCE_CHECK, VALENCE_CHECK_AMBIGUOUS
 
Fields inherited from interface chemaxon.struc.StereoConstants
ANTI, ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_M, CHIRALITY_MASK, CHIRALITY_P, CHIRALITY_r, CHIRALITY_R, CHIRALITY_s, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS
 
Constructor Summary
SelectionMolecule()
           
 
Method Summary
 void add(MolBond bond)
          Adds a bond to the graph.
protected  void addAtom0(MolAtom atom)
          Adds an atom.
protected  void addBond0(MolBond bond)
          Adds a bond.
protected  void checkBondConsistency()
          Empty implementation, bond consistency is not checked in case of selections.
 java.lang.Object clone()
          Create a clone of this SelectionMolecule.
 void clonecopy(MoleculeGraph graph)
          Copies the clones of atoms and bonds of this graph to another one.
protected  boolean clonecopyMoleculeGraphWithoutSgroups(int[] iatoms, MolBond[] cbonds, int nb, MoleculeGraph g)
          Copies the specified atoms and bonds of this graph to another one.
protected  chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
           
protected  void fuse0(MoleculeGraph g, boolean check)
          Adds those atoms and bonds of a graph to this one that are not already elements.
 java.lang.Integer[] getLigands(java.lang.Integer atom)
           
protected  boolean isGrinvCCValid()
          Tests whether the graph invariant change count is valid.
protected  boolean isRealAtomParent()
          Selection molecules are not real atom parents.
protected  void regenCtabs()
          Regenerates connection table and bond table.
 void removeAtom(int i)
          Removes an atom and its bonds from the graph.
 void removeAtom(MolAtom atom)
          Removes an atom and its bonds.
 void removeBond(int i)
          Removes a bond from the graph.
 void removeBond(MolBond bond)
          Removes a bond by reference.
protected  void setAtom0(int i, MolAtom atom)
          Sets the atom at the specified index.
 void setBond(int i, MolBond bond)
          Sets the bond at the specified index.
 void swapAtoms(int i, int j)
          Swap two atoms.
 void transform(CTransform3D t)
          Apply a transformation matrix to the atomic coordinates.
 
Methods inherited from class chemaxon.struc.MoleculeGraph
add, addAtomsAndBondsTo, addAtomToFragment, addAtomWithoutChangingIt, addBondWithoutChangingIt, addExplicitHydrogens, addExplicitHydrogens, addExplicitLonePairs, adjustMultiChiralFlag, aromatize, aromatize, aromatize, aromatize, arrangeComponents, bondlength, calcCenter, calcCenter, calcDehydrogenizedGrinv, calcHeight, calcHybridization, calcOutRect, calcOutRect, calcOutRectCenter, calcOutRectCenter, calcWidth, canBeCT, canBeCT, canBeCT, checkConsistency, clean, clean, clear, clearCachedInfo, clearForImport, clonecopy, clonelesscopy, contains, contains, contains, createBHtab, createCHtab, createDehydrogenizedReadOnlyGraph, createSmolecule, dearomatize, dearomatize, findAtom, findAtomClone, findBasicFrags, findBond, findComponentIds, findComponentIds, findFrag, findFrag, findFragById, findFragById, findFrags, findFrags, findInArray, fixSelfReferringProperty, fuse, fuse, getAromaticAndAliphaticRings, getAromrings, getAromrings, getAtom, getAtomArray, getAtomCount, getAtomCount, getAtomicNumber, getAtomReferenceList, getBond, getBondArray, getBondCount, getBonds, getBondTable, getBtab, getCharge, getChirality, getCSSR, getCtab, getDesiredLength, getDesiredLength, getDim, getDocument, getDocumentForChild, getEdge, getEdgeArray, getEdgeCount, getEdgeVector, getEnclosingCube, getExactMass, getExplicitHcount, getExplicitLonePairCount, getFlags, getForefather, getFormalCharge, getFormula, getFragCount, getFragCount, getFragIds, getFragIds, getFreeAttachmentPoints, getGraphUnion, getGrinv, getGrinv, getGrinv, getGrinv, getGrinvCC, getGrinvOptions, getImplicitHcount, getImplicitHCount, getLigand, getLigandAtno, getLigandBondType, getLigandCount, getLocalParity, getLocation, getLock, getLonePairCount, getMass, getMaxRgroupAttachmentPointOrder, getName, getNode, getNodeCount, getNodeVector, getNonAromrings, getNonAromrings, getParent, getParentDocument, getParity, getParityType, getPoints, getPossibleAttachmentPoints, getRadicalCount, getSmallestRingSizeForIdx, getSSSR, getSSSRBonds, getSSSRBondSet, getSSSRBondSetInLong, getSSSRIdxesForAtoms, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getSubGraphCount, getSubGraphs, getSubGraphs, getTotalCharge, getValenceCheckState, getValenceProperty, getVisibleCoords, hasAtomSet, hasBondSet, hasExplicitLonePairs, hasExtraLabelSet, hasImplicitH, hasSelfReferringProperty, hasValenceError, hydrogenize, implicitizeHydrogens, implicitizeHydrogens, implicitizeHydrogens, implicitizeHydrogens0, incGrinvCC, incGrinvCCOnly, indexOf, indexOf, insertAtom, insertBond, insertBondInOrder, insertEdge, insertEdgeInOrder, insertNode, insertNullAtoms, insertNullBonds, isAbsStereo, isAcceptedSpecialLigand, isAtom, isAtomInRing, isBond, isEmpty, isLargeMolecule, isMolecule, isMultiChiral, isolate, isolate, isOnlyFirstAtomInStereoCalculation, isQuery, isRing, isRingBond, isSelfReference, isSimilarTo, isSymmetric, isValenceCheckEnabled, isValidLinkNode, makeItSimilar, mergeAtoms, mergeFrags, mergeFrags, mergeFrags, mergeNodes, moveTo, newInstance, pack, partialClean, partialClean, partialClean, properties, qpropCheck, regenBonds, regenEdges, regenGearch, removeAll, removeAllBonds, removeAllEdges, removeAtom, removeAtom, removeBond, removeBond, removeEdge, removeEdge, removeExplicitLonePairs, removeIsolatedAtoms, removeIsolatedBonds, removeNode, removeNode, removeNode, removeNode, replaceBond, replaceEdge, resetCtab, resetGrinvInParents, restoreCache, revalidateCoordDependentProps, saveCache, setAbsStereo, setAtom, setAtomSetSeqs, setBondSetSeqs, setChirality, setDim, setEdge, setFlags, setFlags, setGrinvCC, setGrinvOptions, setLinkNodeDefaultOuters, setLocalParity, setLocalParity, setLocation, setNode, setParity, setParity, setParity, setSetSeqs, setValenceCheckEnabled, setValenceCheckState, smol, sortBondsAccordingTo, sortEdgesAccordingTo, stereoClean, sumConservedQuantities, toString, transform, updateDim, useOnlyFirstAtomInStereoCalculation, valenceCheck, valenceCheck
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelectionMolecule

public SelectionMolecule()
Method Detail

isRealAtomParent

protected boolean isRealAtomParent()
Selection molecules are not real atom parents. However, in some special cases a selection molecule can be an atom parent.

Overrides:
isRealAtomParent in class MoleculeGraph
Returns:
false
Since:
Marvin 3.0

setBond

public void setBond(int i,
                    MolBond bond)
Sets the bond at the specified index.

Overrides:
setBond in class MoleculeGraph
Parameters:
i - bond index
bond - the bond reference

add

public void add(MolBond bond)
Adds a bond to the graph. If the bond doesn't have parent molecule then the bond is also added to its end-points.

Overrides:
add in class MoleculeGraph
Parameters:
bond - the bond object

swapAtoms

public void swapAtoms(int i,
                      int j)
Swap two atoms.

Parameters:
i - index of the first atom
j - index of the second atom
Since:
Marvin 3.3, 11/04/2003

removeAtom

public void removeAtom(MolAtom atom)
Removes an atom and its bonds.

Overrides:
removeAtom in class MoleculeGraph
Parameters:
atom - the atom

removeAtom

public void removeAtom(int i)
Removes an atom and its bonds from the graph.

Overrides:
removeAtom in class MoleculeGraph
Parameters:
i - the atom index

removeBond

public void removeBond(MolBond bond)
Removes a bond by reference.

Overrides:
removeBond in class MoleculeGraph
Parameters:
bond - the bond

removeBond

public void removeBond(int i)
Removes a bond from the graph.

Overrides:
removeBond in class MoleculeGraph
Parameters:
i - the bond index

addAtom0

protected void addAtom0(MolAtom atom)
Adds an atom.

Overrides:
addAtom0 in class MoleculeGraph
Parameters:
atom - the atom reference

setAtom0

protected void setAtom0(int i,
                        MolAtom atom)
Sets the atom at the specified index.

Overrides:
setAtom0 in class MoleculeGraph
Parameters:
i - atom index
atom - new atom reference

addBond0

protected void addBond0(MolBond bond)
Adds a bond.

Overrides:
addBond0 in class MoleculeGraph
Parameters:
bond - the bond reference

regenCtabs

protected void regenCtabs()
Regenerates connection table and bond table.

Overrides:
regenCtabs in class MoleculeGraph
Since:
Marvin 3.5.2, 12/16/2004

fuse0

protected void fuse0(MoleculeGraph g,
                     boolean check)
Adds those atoms and bonds of a graph to this one that are not already elements.

Overrides:
fuse0 in class MoleculeGraph
Parameters:
g - the graph
check - true if a containment check should be performed to ensure that only those atoms and bonds are added that are not already elements - false if the graph is known to be disjoint from this graph and this check can be safely skipped
Since:
Marvin 5.0

transform

public void transform(CTransform3D t)
Apply a transformation matrix to the atomic coordinates.

Specified by:
transform in interface MTransformable
Overrides:
transform in class MoleculeGraph
Parameters:
t - the transformation matrix

clonecopy

public void clonecopy(MoleculeGraph graph)
Copies the clones of atoms and bonds of this graph to another one.

Overrides:
clonecopy in class MoleculeGraph
Parameters:
graph - the target graph

clonecopyMoleculeGraphWithoutSgroups

protected boolean clonecopyMoleculeGraphWithoutSgroups(int[] iatoms,
                                                       MolBond[] cbonds,
                                                       int nb,
                                                       MoleculeGraph g)
Copies the specified atoms and bonds of this graph to another one.

Overrides:
clonecopyMoleculeGraphWithoutSgroups in class MoleculeGraph
Parameters:
iatoms - array of atoms indices to copy
cbonds - array of bonds to copy or null to copy bonds in cbonds only
nb - number of bonds
g - the target graph
Returns:
false if the bonds array contains all bond end points, true if there is at least one external bond
Since:
Marvin 5.0.2, 03/07/2008

clone

public java.lang.Object clone()
Create a clone of this SelectionMolecule.

Overrides:
clone in class MoleculeGraph
Returns:
the cloned SelectionMolecule

isGrinvCCValid

protected boolean isGrinvCCValid()
Tests whether the graph invariant change count is valid.

Overrides:
isGrinvCCValid in class MoleculeGraph
Returns:
false
Since:
Marvin 5.0, 11/30/2007

checkBondConsistency

protected void checkBondConsistency()
Empty implementation, bond consistency is not checked in case of selections.

Overrides:
checkBondConsistency in class MoleculeGraph
Since:
Marvin 5.0, 11/06/2007

createGearch

protected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
Overrides:
createGearch in class MoleculeGraph

getLigands

public java.lang.Integer[] getLigands(java.lang.Integer atom)