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_AMBIGUOUSFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an atom to the molecule.voidAdds an atom to the molecule.voidAdds a bond to the graph.voidAdd a bond to the molecule.protected voidAdds an atom.protected voidaddAtomWithBonds(MolAtom atom) Adds an atom to the molecule.protected final intAdds an atom without setting its parentGraph and index fields.protected voidAdds a bond.protected voidEmpty implementation, bond consistency is not checked in case of selections.clone()Create a clone of this SelectionMolecule.voidclonecopy(MoleculeGraph graph) Copies the clones of atoms and bonds of this graph to another one.protected booleanclonecopyMoleculeGraphWithoutSgroups(int[] iatoms, MolBond[] cbonds, int nb, MoleculeGraph g) Copies the specified atoms and bonds of this graph to another one.protected chemaxon.struc.gearch.MoleculeGraphGearchprotected voidfuse0(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 booleanTests whether the graph invariant change count is valid.protected booleanSelection molecules are not real atom parents.protected voidRegenerates the bond table.protected voidRegenerates the connection table.voidremoveAtom(int i) Removes an atom and its bonds from the graph.voidremoveAtom(MolAtom atom) Removes an atom and its bonds.voidremoveBond(int i) Removes a bond from the graph.voidremoveBond(MolBond bond) Removes a bond by reference.protected voidSets the atom at the specified index.voidDeprecated.as of Marvin 6.2.voidswapAtoms(int i, int j) Swap two atoms.voidApply 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, getAbbreviationAsMolecule, 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:
isRealAtomParentin 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:
setBondin 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:
addin 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:
addin 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:
addin 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:
removeAtomin classMoleculeGraph- Parameters:
atom- the atom
-
removeAtom
public void removeAtom(int i) Removes an atom and its bonds from the graph.- Overrides:
removeAtomin classMoleculeGraph- Parameters:
i- the atom index
-
removeBond
Removes a bond by reference.- Overrides:
removeBondin classMoleculeGraph- Parameters:
bond- the bond
-
removeBond
public void removeBond(int i) Removes a bond from the graph.- Overrides:
removeBondin classMoleculeGraph- Parameters:
i- the bond index
-
addAtom0
Adds an atom.- Overrides:
addAtom0in classMoleculeGraph- Parameters:
atom- the atom reference
-
setAtom0
Sets the atom at the specified index.- Overrides:
setAtom0in classMoleculeGraph- Parameters:
i- atom indexatom- new atom reference
-
addBond0
Adds a bond.- Overrides:
addBond0in classMoleculeGraph- Parameters:
bond- the bond reference
-
regenCtab
protected void regenCtab()Regenerates the connection table.- Overrides:
regenCtabin classMoleculeGraph- Since:
- Marvin 3.5.2, 12/16/2004
-
regenBtab
protected void regenBtab()Regenerates the bond table.- Overrides:
regenBtabin classMoleculeGraph- Since:
- Marvin 16.06.06.
-
fuse0
Adds those atoms and bonds of a graph to this one that are not already elements.- Overrides:
fuse0in classMoleculeGraph- Parameters:
g- the graphcheck-trueif a containment check should be performed to ensure that only those atoms and bonds are added that are not already elements -falseif 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:
transformin interfaceMTransformable- Overrides:
transformin classMoleculeGraph- Parameters:
t- the transformation matrix
-
clonecopy
Copies the clones of atoms and bonds of this graph to another one.- Overrides:
clonecopyin 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:
clonecopyMoleculeGraphWithoutSgroupsin classMoleculeGraph- Parameters:
iatoms- array of atoms indices to copycbonds- array of bonds to copy ornullto copy bonds in cbonds onlynb- number of bondsg- the target graph- Returns:
falseif the bonds array contains all bond end points,trueif there is at least one external bond- Since:
- Marvin 5.0.2, 03/07/2008
-
clone
Create a clone of this SelectionMolecule.- Overrides:
clonein classMoleculeGraph- Returns:
- the cloned SelectionMolecule
-
isGrinvCCValid
protected boolean isGrinvCCValid()Tests whether the graph invariant change count is valid.- Overrides:
isGrinvCCValidin 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:
checkBondConsistencyin classMoleculeGraph- Since:
- Marvin 5.0, 11/06/2007
-
createGearch
protected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()- Overrides:
createGearchin classMoleculeGraph
-
getLigands
-
addAtomWithoutChangingIt
Adds an atom without setting its parentGraph and index fields.- Overrides:
addAtomWithoutChangingItin classMoleculeGraph- Parameters:
atom- the atom reference- Returns:
- the new atom index
-