Package chemaxon.struc
Class SelectionMolecule
java.lang.Object
chemaxon.struc.MoleculeGraph
chemaxon.struc.SelectionMolecule
- All Implemented Interfaces:
MoleculeWithValence<MolAtom>
,chemaxon.core.structure.MoleculeForBuilder
,MTransformable
,StereoConstants
,Serializable
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
- See Also:
-
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_CHUCKEL, 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_ALL_POSSIBLE, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CIS_TRANS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_NONE, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an atom to the molecule.void
Adds an atom to the molecule.void
Adds a bond to the graph.void
Add a bond to the molecule.protected void
Adds an atom.protected void
addAtomWithBonds
(MolAtom atom) Adds an atom to the molecule.protected final int
Adds an atom without setting its parentGraph and index fields.protected void
Adds a bond.protected void
Empty implementation, bond consistency is not checked in case of selections.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
protected void
fuse0
(MoleculeGraph g, boolean check) Adds those atoms and bonds of a graph to this one that are not already elements.Integer[]
getLigands
(Integer atom) protected boolean
Tests whether the graph invariant change count is valid.protected boolean
Selection molecules are not real atom parents.protected void
Regenerates the bond table.protected void
Regenerates the connection 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
Sets the atom at the specified index.void
Deprecated.as of Marvin 6.2.void
swapAtoms
(int i, int j) Swap two atoms.void
Apply a transformation matrix to the atomic coordinates.Methods inherited from class chemaxon.struc.MoleculeGraph
addAtomsAndBondsTo, addAtomToFragment, addBondWithoutChangingIt, addExplicitHydrogens, addExplicitHydrogens, addExplicitLonePairs, addSimpleAtomWithoutChangingIt, adjustMultiChiralFlag, aromatize, aromatize, aromatize, aromatize, arrangeComponents, atoms, bondlength, bonds, calcCenter, calcCenter, calcDehydrogenizedGrinv, calcHeight, calcHybridization, calcOutRect, calcOutRect, calcOutRectCenter, calcOutRectCenter, calcWidth, canBeCT, canBeCT, canBeCT, checkConsistency, clean, clean, clear, clearCachedInfo, clearForImport, cloneAtoms, clonecopy, clonelesscopy, connectOriginalBondsToNewAtom, contains, contains, contains, createDehydrogenizedReadOnlyGraph, createSmolecule, dearomatize, dearomatize, findAtom, findAtomClone, findBasicFrags, findBond, findComponentIds, findComponentIds, findFrag, findFrag, findFragById, findFrags, findFrags, findInArray, fixProperties, fixSelfReferringProperty, fuse, fuse, getAromaticAndAliphaticRings, getAtom, getAtomArray, getAtomCount, getAtomCount, getAtomicNumber, getAtomIterator, getAtomReferenceList, getBond, getBondArray, getBondCount, getBondIterator, getBonds, getBondTable, getCharge, getChirality, getCSSR, getCSSRIdxesForAtoms, getCtab, getDesiredLength, getDesiredLength, getDim, getDocument, getDocumentForChild, getEnclosingCube, getExactMass, getExplicitHcount, getExplicitLonePairCount, getEZStereo, getFlags, getForefather, getFormalCharge, getFormula, getFragCount, getFragCount, getFragIds, getFreeAttachmentPoints, getGraphUnion, getGrinv, getGrinv, getGrinv, getGrinv, getGrinvCC, getGrinvOptions, getImplicitHcount, getImplicitHCount, getLigand, getLigandAtno, getLigandBondType, getLigandCount, getLocalParity, getLocation, getLock, getLonePairCount, getMass, getMaxRgroupAttachmentPointOrder, getName, getParent, getParentDocument, getParity, getParityType, getPoints, getPossibleAttachmentPoints, getRadicalCount, getSmallestRingSizeForIdx, getSSSR, getSSSRBonds, getSSSRBondsAsBitSet, getSSSRBondSet, getSSSRBondSetInLong, getSSSRIdxesForAtoms, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getSubGraphCount, getSubGraphs, getSubGraphs, getTotalCharge, getValenceCheckOptions, getValenceCheckState, getValenceProperty, getVisibleCoords, hasAtomSet, hasBondSet, hasExplicitLonePairs, hasExtraLabelSet, hasImplicitH, hasSelfReferringProperty, hasValenceError, hydrogenize, implicitizeHydrogens, implicitizeHydrogens, implicitizeHydrogens, implicitizeHydrogens0, incGrinvCC, incGrinvCC, incGrinvCCOnly, indexOf, indexOf, insertAtom, insertBond, insertBondInOrder, insertNullAtoms, insertNullBonds, isAbsStereo, isAcceptedSpecialLigand, isAtom, isAtomInRing, isBond, isBondParallelWith, isEmpty, isLargeMolecule, isMolecule, isMultiChiral, isolate, isolate, isOnlyFirstAtomInStereoCalculation, isQuery, isRing, isRingBond, isSelfReference, isSimilarTo, isSymmetric, isValenceCheckEnabled, isValidLinkNode, makeItSimilar, mergeAtoms, mergeFrags, moveTo, newInstance, pack, partialClean, partialClean, partialClean, properties, qpropCheck, regenBonds, regenGearch, removeAll, removeAllBonds, removeAtom, removeAtom, removeBond, removeBond, removeExplicitLonePairs, removeIsolatedAtoms, removeIsolatedBonds, replaceAtom, replaceBond, resetCtab, resetGrinvInParents, restoreCache, revalidateCoordDependentProps, saveCache, setAbsStereo, setAtom, setAtomSetSeqs, setBondSetSeqs, setChirality, setChirality, setDim, setFlags, setFlags, setGrinvCC, setGrinvOptions, setLinkNodeDefaultOuters, setLocalParity, setLocalParity, setLocation, setParity, setParity, setParity, setSupergraph, setValenceCheckEnabled, setValenceCheckOptions, setValenceCheckState, smol, sortBondsAccordingTo, stereoClean, sumConservedQuantities, toString, transform, updateDim, useOnlyFirstAtomInStereoCalculation, valenceCheck, valenceCheck
-
Constructor Details
-
SelectionMolecule
public SelectionMolecule()
-
-
Method Details
-
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 classMoleculeGraph
- Returns:
- false
- Since:
- Marvin 3.0
-
setBond
Deprecated.as of Marvin 6.2. UseremoveBond(MolBond)
for bond removal andadd(MolBond)
for adding a new bond to the molecule.Sets the bond at the specified index.- Overrides:
setBond
in classMoleculeGraph
- Parameters:
i
- bond indexbond
- the bond reference
-
add
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 classMoleculeGraph
- Parameters:
bond
- the bond object
-
add
Add a bond to the molecule. If the second parameter is true, there an exception thrown when there is already a bond between the given MolAtoms. There is no checking if either is SgroupAtom. If the molecule graph is a superGraph, the bond is also added to its endpoints (two MolAtom objects).- Overrides:
add
in classMoleculeGraph
- Parameters:
bond
- the bond object
-
add
Adds an atom to the molecule. It doesn't add the bonds of the atom to the molecule.- Overrides:
add
in classMoleculeGraph
- Parameters:
atom
- the atom object
-
add
Adds an atom to the molecule. It the second parameter is true, then adds the bonds of the atom to the molecule, if the bond's other atom is already added.- Since:
- Marvin 6.1, 04/30/2013
-
addAtomWithBonds
Adds an atom to the molecule. Adds the bonds of the atom to the molecule, if the bond's other atom is already added.- Since:
- Marvin 6.1, 04/30/2013
-
swapAtoms
public void swapAtoms(int i, int j) Swap two atoms.- Parameters:
i
- index of the first atomj
- index of the second atom- Since:
- Marvin 3.3, 11/04/2003
-
removeAtom
Removes an atom and its bonds.- Overrides:
removeAtom
in classMoleculeGraph
- Parameters:
atom
- the atom
-
removeAtom
public void removeAtom(int i) Removes an atom and its bonds from the graph.- Overrides:
removeAtom
in classMoleculeGraph
- Parameters:
i
- the atom index
-
removeBond
Removes a bond by reference.- Overrides:
removeBond
in classMoleculeGraph
- Parameters:
bond
- the bond
-
removeBond
public void removeBond(int i) Removes a bond from the graph.- Overrides:
removeBond
in classMoleculeGraph
- Parameters:
i
- the bond index
-
addAtom0
Adds an atom.- Overrides:
addAtom0
in classMoleculeGraph
- Parameters:
atom
- the atom reference
-
setAtom0
Sets the atom at the specified index.- Overrides:
setAtom0
in classMoleculeGraph
- Parameters:
i
- atom indexatom
- new atom reference
-
addBond0
Adds a bond.- Overrides:
addBond0
in classMoleculeGraph
- Parameters:
bond
- the bond reference
-
regenCtab
protected void regenCtab()Regenerates the connection table.- Overrides:
regenCtab
in classMoleculeGraph
- Since:
- Marvin 3.5.2, 12/16/2004
-
regenBtab
protected void regenBtab()Regenerates the bond table.- Overrides:
regenBtab
in classMoleculeGraph
- Since:
- Marvin 16.06.06.
-
fuse0
Adds those atoms and bonds of a graph to this one that are not already elements.- Overrides:
fuse0
in classMoleculeGraph
- Parameters:
g
- the graphcheck
-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
Apply a transformation matrix to the atomic coordinates.- Specified by:
transform
in interfaceMTransformable
- Overrides:
transform
in classMoleculeGraph
- Parameters:
t
- the transformation matrix
-
clonecopy
Copies the clones of atoms and bonds of this graph to another one.- Overrides:
clonecopy
in classMoleculeGraph
- 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 classMoleculeGraph
- Parameters:
iatoms
- array of atoms indices to copycbonds
- array of bonds to copy ornull
to copy bonds in cbonds onlynb
- number of bondsg
- 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
Create a clone of this SelectionMolecule.- Overrides:
clone
in classMoleculeGraph
- Returns:
- the cloned SelectionMolecule
-
isGrinvCCValid
protected boolean isGrinvCCValid()Tests whether the graph invariant change count is valid.- Overrides:
isGrinvCCValid
in classMoleculeGraph
- 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 classMoleculeGraph
- Since:
- Marvin 5.0, 11/06/2007
-
createGearch
protected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()- Overrides:
createGearch
in classMoleculeGraph
-
getLigands
-
addAtomWithoutChangingIt
Adds an atom without setting its parentGraph and index fields.- Overrides:
addAtomWithoutChangingIt
in classMoleculeGraph
- Parameters:
atom
- the atom reference- Returns:
- the new atom index
-