public class RgMolecule extends Molecule implements chemaxon.struc.RgMoleculeGraphIface, chemaxon.struc.MObjectContainer, chemaxon.core.structure.MarkushStructureForBuilder
hasSelfReferringProperty
MoleculeGraph.ValenceCheckState
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_RLOGIC_RANGE
Default R-logic range.
|
static int |
RG_ID_MASK
R-group id mask in R-logic.
|
static int |
RG_ID2_FLAG
Other R-group ID's presence flag in R-logic.
|
static int |
RG_ID2_MASK
Mask of the other R-group's id in R-logic.
|
static int |
RG_ID2_OFF
Offset of the other R-group's id in R-logic.
|
static int |
RG_RESTH
The RestH flag in R-logic.
|
DEFAULT_UNGROUP, RECURSIVE_UNGROUP, RM_KEEP_LEAVINGGROUPS, RMCLEANUP_FROMSGROUPS, RMCLEANUP_SGROUPATOMS, RMSG_DEFAULT, RMSG_KEEP_CHILDREN, RMSG_KEEP_MULTICENTER, RMSG_KEEP_PARENT
AROM_AMBIGUOUS, AROM_BASIC, 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
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 and Description |
---|
RgMolecule()
Creates a 2 dimensional RgMolecule.
|
Modifier and Type | Method and Description |
---|---|
void |
add(MolAtom node)
Adds an atom to the root structure.
|
void |
add(MolBond bond)
Adds a bond to the root structure.
|
protected void |
addAtomToFragment(MolAtom atom)
Adds an atom to a fragment.
|
int |
addRgroup(int rl,
Molecule m)
Adds an R-group member.
|
void |
addRgroupBridge(int rgroupId1,
int rgroupId2,
Molecule m)
Adds an R-group bridge member.
|
RgMolecule |
addRgroupsTo(Molecule m)
Creates a read only RgMolecule from a simple molecule object.
|
void |
addSgroup(Sgroup sg,
boolean setparent)
Adds an S-group to this object.
|
void |
aromatize(int method)
Aromatizes molecule.
|
void |
aromatize(int method,
boolean checkAmbiguity)
Aromatizes molecule.
|
boolean |
canBeCT(int i2,
int i3,
boolean grcheck)
Determines whether the bond between the specified atoms can be a
CIS/TRANS or not.
|
boolean |
canBeReactionComponent()
Tests whether an object of this class can be a reaction component.
|
void |
checkConsistency()
Deprecated.
As of Marvin 5.7, no replacement.
Not intended for public use, it was intended only for internal debugging. |
String |
checkRlogicRange(int index,
String range)
Checks an R-logic occurrence range string for syntax errors
and returns a "normalized" string.
|
protected void |
checkSgroupConsistency()
Checks the consistency of S-groups.
|
void |
cleanupRemovedRgroupMember(MoleculeGraph m,
int f)
Clean-up after R-group removal.
|
void |
clearForImport(String fmt)
Clear the edges vector and the properties.
|
void |
clearObjects() |
RgMolecule |
clone()
Clone the markush structure.
|
void |
clonecopy(int[] iatoms,
MoleculeGraph g)
Copies the specified atoms of this graph to another one.
|
void |
clonecopy(MoleculeGraph g)
Make another molecule identical to this one.
|
void |
clonelesscopy(MoleculeGraph g)
Deprecated.
as of Marvin 6.3.
Not supported feature. |
RgMolecule |
cloneMoleculeWithDocument()
Makes an identical copy of the molecule and its document.
|
boolean |
contains(MolAtom node)
Checks if the root structure or an R-group contains the specified node.
|
boolean |
contains(MolBond edge)
Checks if the root structure or an R-group contains the specified edge.
|
protected chemaxon.struc.gearch.MoleculeGraphGearch |
createGearch() |
void |
endReuse(int n)
End reusing atoms.
|
protected void |
fillSelectionMolecule(SelectionMolecule s)
Adds all atoms and bonds of the root structure and the R-groups
to the specified molecule.
|
int |
findRgroupIndex(int rgid)
Finds R-group R#.
|
protected boolean |
fixSelfReferringProperty(MProp prop)
Fix a property containing reference to the molecule.
|
void |
fuse(MoleculeGraph g,
boolean check)
Add the atoms and bonds of another molecule.
|
protected void |
fuse0(MoleculeGraph graph,
boolean check)
Add those nodes and edges of a graph that are not already elements.
|
List<MObject> |
getAllObjects() |
MolAtom |
getAtom(int i)
Gets a node in the graph union.
|
int |
getAtomCount()
Gets the number of nodes in the root structure.
|
int |
getAtomCount(int atomicNumber)
Gets the number of atoms with the given atomic number in the root
structure.
|
IteratorFactory.AtomIterator |
getAtomIterator()
Returns an iterator over the atoms in this molecule in proper sequence.
|
MolBond |
getBond(int i)
Gets an edge in the graph union.
|
int |
getBondCount()
Gets the number of edges in the root structure.
|
IteratorFactory.BondIterator |
getBondIterator()
Returns an iterator over the bonds in this molecule in proper sequence.
|
chemaxon.core.util.BondTable |
getBondTable()
Gets the bond table of the root structre.
|
String |
getComment()
Gets the comment of the root molecule.
|
int[][] |
getCtab()
Gets the connection table of the root structure.
|
int |
getDependentRgroupDefinition(int rGroupIndex)
Gets the R-group definition's index which depends on the referenced
R-group definition.
|
int |
getFlags()
Gets the dimension and chiral flags.
|
String |
getFormula()
Gets the molecular formula in Hill order.
|
MoleculeGraph |
getGraphUnion()
Gets a graph containing all the atoms and bonds.
|
int |
getLocalParity(int i)
Computes the local parity of an atom of the RgMolecule instance
based on both the coordinates of the neighboring atoms
and the stereo information of the bonds to those.
|
int |
getLonePairCount(int i)
Gets the number of lone pairs.
|
double |
getMass()
Calculates the molecular weight of the molecule.
|
int |
getMaxAttachmentPointOrder(int rgroupID)
Gets the maximal attachment point order of R-group definition molecules specified by an R-group ID.
|
protected Molecule |
getMostSimplifiedMolecule()
Gets the simplified molecule object even if there is a parent document
with other objects.
|
String |
getName()
Gets the name of the root molecule.
|
int |
getObjectCount() |
int |
getParity(int i)
Computes the parity of an atom of the RgMolecule instance based on both
the coordinates of the neighboring atoms and the stereo information
of the bonds to those.
|
Set<chemaxon.common.util.CommutativePair<Integer>> |
getRgroupBridgeIds()
Returns the r-group bridge id pairs.
|
List<Molecule> |
getRgroupBridgeMembers(int rgroupId1,
int rgroupId2)
Returns the corresponding r-group bridge members for the given r-group
bridge id pair.
|
Map<chemaxon.common.util.CommutativePair<Integer>,List<Molecule>> |
getRgroupBridges()
Returns the r-group bridges, the id pairs and the corresponding r-group
bridge members.
|
int |
getRgroupCount()
Gets the number of R-groups.
|
int |
getRgroupId(int i)
Gets the ID of an R-group.
|
int |
getRgroupIndex(long id)
Gets the R-group index from the R-group member ID.
|
Molecule |
getRgroupMember(int i,
int j)
Gets an R-group member.
|
int |
getRgroupMemberCount(int i)
Gets the number of R-group members.
|
MoleculeGraph |
getRgroupMemberG(int i,
int j)
Gets an R-group member.
|
long |
getRgroupMemberID(MolAtom node)
Gets the unique indentifier of the R-group member that contains the
specified atom.
|
int |
getRgroupMemberIndex(long id)
Gets the R-group member index from the R-group member ID.
|
int |
getRlogic(int i)
Gets R-logic flags.
|
String |
getRlogicRange(int i)
Gets R-logic occurrence range.
|
Molecule |
getRoot()
Gets the root structure.
|
MoleculeGraph |
getRootG()
Gets the root structure.
|
int |
getStereo2(MolBond bond,
MolAtom leftAtom,
MolAtom rightAtom,
boolean performGrinvCheck)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.
|
protected int |
getSubGraphCount()
Gets the number of all "submolecules".
|
protected void |
getSubGraphs(MoleculeGraph[] arr,
int off)
Gets all "submolecules".
|
ValenceCheckOptions |
getValenceCheckOptions()
Returns the options for valence checking.
|
boolean |
hasAtomSet()
Tests whether the molecule graph has atom sets.
|
boolean |
hasBondSet()
Tests whether the molecule graph has atom sets.
|
boolean |
hasRgroupContainedBy(Set<?> set)
Tests whether the molecule has an R-group that is a subset of the
specified set of atoms.
|
int |
indexOf(MolAtom node)
Gets the index of the specified node in the graph union.
|
int |
indexOf(MolBond edge)
Gets the index of the specified edge in the graph union.
|
protected void |
insertNullAtoms(int i,
int count)
Insert nulls into the atom array.
|
protected void |
insertNullBonds(int i,
int count)
Insert nulls into the bond array.
|
boolean |
isAtom()
Deprecated.
As of Marvin 14.7.7, no replacement.
Not supported feature. |
boolean |
isBond()
Deprecated.
As of Marvin 14.7.7, no replacement.
Not supported feature. |
boolean |
isEmpty()
Ask if the molecule is empty or not.
|
boolean |
isIncompleteReaction()
Check whether the reaction is incomplete or not.
|
boolean |
isQuery()
Indicates if the molecule has query features.
|
boolean |
isReaction()
Checks if the structure represents a reaction or not.
|
protected boolean |
isRealAtomParent()
R-group molecule objects cannot be real node parents.
|
boolean |
isRestH(int rGroupIndex)
Informs whether the restH condition is set to the referenced R-group
definition.
|
boolean |
isSelfReference(MProp p)
Tests whether the specified property is a self reference to the molecule.
|
protected void |
makeItSimilar(MoleculeGraph g)
Copies some properties of this molecule to the other one specified as
argument.
|
void |
mergeAtoms(MolAtom that,
MolAtom a)
Deprecated.
As of Marvin 6.2, use
MergeUtil.mergeAtoms(MolAtom, MolAtom, boolean) instead. |
MoleculeGraph |
newInstance()
Creates a new RgMolecule object.
|
SelectionMolecule |
newSelectionMolecule()
Creates a new SelectionMolecule object appropriate for storing
selection from this molecule.
|
MPropertyContainer |
properties()
Gets the property container.
|
void |
regenBonds()
Regenerate the edge vectors: remove their elements, then put the edge
objects from the nodes into it.
|
void |
removeAll()
Remove all the atoms and bonds from the root structure, and from all
the R-groups.
|
void |
removeAllBonds()
Remove all bonds from the root structure, and from all
the R-groups.
|
void |
removeAtom(int i,
int cleanupFlags)
Removes an atom and its bonds from the root structure.
|
void |
removeAtom(MolAtom node,
int cleanupFlags)
Removes an atom and its bonds from the root structure and from all the
R-groups.
|
protected void |
removeBond(int i,
int cleanupFlags)
Remove a bond from the root structure.
|
protected void |
removeBond(MolBond edge,
int cleanupFlags)
Remove a bond from the root structure, and from all the R-groups.
|
void |
removeDependentRgroupDefinition(int rGroupIndex)
Removes the dependent R-group definition of the referenced R-group
definition.
|
void |
removeObject(MObject mo) |
void |
removeRestH(int rGroupIndex)
Removes the restH condition from an R-group definition.
|
void |
removeRgroup(int definition)
Removes an R-group.
|
void |
removeRgroupBridge(int rgroupId1,
int rgroupId2)
Removes an r-group bridge.
|
void |
removeRgroupBridgeMember(int rgroupId1,
int rgroupId2,
int memberIndex)
Removes an r-group bridge.
|
void |
removeRgroupBridgeMembers(int rgroupId1,
int rgroupId2,
int[] memberIndexes)
Removes r-group members.
|
void |
removeRgroupMember(int definition,
int member)
Removes an R-group member.
|
void |
removeRgroupMembers(int definition,
int[] members)
Removes R-group members.
|
void |
replaceAtomsWithNewRgroup(SelectionMolecule sel,
int rgid)
Replaces selected atoms with a new R-group.
|
void |
replaceBond(MolBond olde,
MolBond newe)
Deprecated.
as of Marvin 6.2, may constructs inconsistent
MoleculeGraph . Use MoleculeGraph.removeBond(MolBond) for
bond removal and add(MolBond) for adding a new bond
to the molecule. |
MolAtom |
reuseAtom(int z,
int i)
Reuse an atom or create a new one.
|
void |
revalidateCoordDependentProps()
Revalidate coordinate dependent properties.
|
int |
rgroupIdOf(MolAtom node)
Finds the ID of the R-group (the number in R#) that contains the
specified atom.
|
int |
rgroupIndexOf(MolAtom node)
Finds the index of the R-group (the number in R#) that contains the
specified atom.
|
void |
selectAllObjects(boolean s) |
void |
setAbsStereo(boolean c)
Sets the absolute stereoconfiguration flag for the root structure and
the R-groups.
|
void |
setAtom(int iu,
MolAtom node)
Deprecated.
as of Marvin 6.2, may constructs inconsistent
MoleculeGraph . Use MoleculeGraph.removeAtom(MolAtom) and
add(MolAtom) to modify the structure. |
void |
setBond(int iu,
MolBond edge)
Deprecated.
as of Marvin 6.2, may constructs inconsistent
MoleculeGraph . Use MoleculeGraph.removeBond(MolBond) for
bond removal and add(MolBond) for adding a new bond
to the molecule. |
void |
setComment(String s)
Sets the comment of the root molecule.
|
void |
setDependentRgroupDefinition(int rGroupIndexIf,
int rGroupIndexThen)
Sets the dependent R-group definition (
rGroupIndexThen ) for
the referenced R-group definition (rGroupIndexIf ). |
void |
setDim(int d)
Sets the dimension of the root structure and the R-groups.
|
protected void |
setFlags(int f)
Sets the dimension and chiral flags.
|
protected void |
setFlags(int f,
int mask)
Sets specified bits in the flags.
|
void |
setInputFormat(String format)
Sets the input file format.
|
void |
setLocation(DPoint3 p)
Set the origin of the molecule.
|
void |
setName(String s)
Sets the name of the root molecule.
|
void |
setRestH(int rGroupIndex)
Sets the restH condition on an R-group definition.
|
void |
setRlogic(int i,
int f)
Sets R-logic flags.
|
void |
setRlogicRange(int index,
String range)
Sets R-logic occurrence range.
|
void |
setRoot(Molecule mol)
Sets the root structure.
|
void |
setSgroupParent(MolAtom a,
Sgroup sg,
boolean set)
Sets or unsets an S-group as a parent of an atom in the root structure
or an R-group.
|
void |
setValenceCheckOptions(ValenceCheckOptions options)
Sets the options for valence checking.
|
void |
sortBondsAccordingTo(MolBond[] order)
Sort edges in the same order as they appear in the specified array.
|
boolean |
stereoClean()
Reset the wedges of the molecule, based on the actual
parity information in 2D remove wedges in 3D.
|
protected void |
sumConservedQuantities(MolAtom a,
int[] atoms,
int sign)
For internal use only.
|
String |
toString()
Overrides Object.toString() to ease debugging.
|
void |
transform(CTransform3D t,
boolean incg)
Apply a transformation matrix to the atomic coordinates.
|
int |
unRgroupAtoms(Set<?> set)
Ungroup R-groups consisting of the specified atoms and make the be
part of root.
|
addAtom0, addBond0, addSgroupClones, addSgroupsOf, bondlength, clear, clearExtraLabels, clearProperties, cloneAtoms, clonecopyWithoutSgroups, cloneMolecule, connectOriginalBondsToNewAtom, contractSgroups, contractSgroups, convertToFrags, countExpandableContractableSgroups, countOrderedComponentSgroups, dearomatize, expandSgroups, expandSgroups, exportToBinFormat, exportToFormat, exportToObject, findAllSgroupContaining, findContainingMulticenterSgroup, findContractableSgroup, findExpandableSgroup, findFrags, findFrags, findSgroupContaining, findSgroupOf, findSmallestSgroupContaining, getBonds, getEndPosition, getGraphUnionAsSelection, getInputFormat, getProperty, getPropertyCount, getPropertyKey, getPropertyKeys, getPropertyObject, getRootSgroups, getSgroup, getSgroupArray, getSgroupCount, getSgroupIterator, getSgroupLigands, getSimplifiedMolecule, getSortedSgroups, getStartPosition, getVisibleCoords, hasContractedSgroup, implicitizeHydrogens0, indexOf, isExpandable, isGUIContracted, isSgroup, rearrangeSgroups, removeAllSgroups, removeAtomFromChildren, removeSgroupFromList, removeSgroupsOf, removeSgroupsOf, reparentSgroups, replaceAtom, replaceSgroup, residueSymbolOf, residueTypeOf, setAtom0, setEndPosition, setGUIContracted, setGUIContracted, setProperty, setPropertyObject, setStartPosition, sortSgroupXBonds, toBinFormat, toFormat, toObject, ungroupSgroup, ungroupSgroup, ungroupSgroup, ungroupSgroup, ungroupSgroups, ungroupSgroups, ungroupSgroups
add, addAtomsAndBondsTo, addAtomWithoutChangingIt, addBondWithoutChangingIt, addExplicitHydrogens, addExplicitHydrogens, addExplicitLonePairs, addSimpleAtomWithoutChangingIt, adjustMultiChiralFlag, aromatize, aromatize, arrangeComponents, calcCenter, calcCenter, calcDehydrogenizedGrinv, calcHeight, calcHybridization, calcOutRect, calcOutRect, calcOutRectCenter, calcOutRectCenter, calcWidth, canBeCT, canBeCT, checkBondConsistency, clean, clean, clearCachedInfo, clonecopyMoleculeGraphWithoutSgroups, contains, createBHtab, createCHtab, createDehydrogenizedReadOnlyGraph, createSmolecule, dearomatize, findAtom, findAtomClone, findBasicFrags, findBond, findComponentIds, findComponentIds, findFrag, findFrag, findFragById, findFrags, findInArray, fuse, getAromaticAndAliphaticRings, getAtomArray, getAtomicNumber, getAtomReferenceList, getBondArray, getBtab, getCharge, getChirality, getCSSR, getDesiredLength, getDesiredLength, getDim, getDocument, getDocumentForChild, getEnclosingCube, getExactMass, getExplicitHcount, getExplicitLonePairCount, getEZStereo, getForefather, getFormalCharge, getFragCount, getFragCount, getFragIds, getFreeAttachmentPoints, getGrinv, getGrinv, getGrinv, getGrinv, getGrinvCC, getGrinvOptions, getImplicitHcount, getImplicitHCount, getLigand, getLigandAtno, getLigandBondType, getLigandCount, getLocation, getLock, getMaxRgroupAttachmentPointOrder, getParent, getParentDocument, getParityType, getPoints, getPossibleAttachmentPoints, getRadicalCount, getSmallestRingSizeForIdx, getSSSR, getSSSRBonds, getSSSRBondsAsBitSet, getSSSRBondSet, getSSSRBondSetInLong, getSSSRIdxesForAtoms, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getSubGraphs, getTotalCharge, getValenceCheckState, getValenceProperty, hasExplicitLonePairs, hasExtraLabelSet, hasImplicitH, hasSelfReferringProperty, hasValenceError, hydrogenize, implicitizeHydrogens, implicitizeHydrogens, implicitizeHydrogens, incGrinvCC, incGrinvCC, incGrinvCCOnly, insertAtom, insertBond, insertBondInOrder, isAbsStereo, isAcceptedSpecialLigand, isAtomInRing, isBondParallelWith, isGrinvCCValid, isLargeMolecule, isMolecule, isMultiChiral, isolate, isolate, isOnlyFirstAtomInStereoCalculation, isRing, isRingBond, isSimilarTo, isSymmetric, isValenceCheckEnabled, isValidLinkNode, mergeFrags, moveTo, pack, partialClean, partialClean, partialClean, qpropCheck, regenCtabs, regenGearch, removeAtom, removeAtom, removeBond, removeBond, removeExplicitLonePairs, removeIsolatedAtoms, removeIsolatedBonds, resetCtab, resetGrinvInParents, restoreCache, saveCache, setAtomSetSeqs, setBondSetSeqs, setChirality, setChirality, setGrinvCC, setGrinvOptions, setLinkNodeDefaultOuters, setLocalParity, setLocalParity, setParity, setParity, setParity, setSupergraph, setValenceCheckEnabled, setValenceCheckState, smol, transform, updateDim, useOnlyFirstAtomInStereoCalculation, valenceCheck, valenceCheck
public static final int RG_ID_MASK
public static final int RG_ID2_FLAG
public static final int RG_ID2_OFF
public static final int RG_ID2_MASK
public static final int RG_RESTH
public static final String DEFAULT_RLOGIC_RANGE
public void setRoot(Molecule mol)
mol
- the root structurepublic int getStereo2(MolBond bond, MolAtom leftAtom, MolAtom rightAtom, boolean performGrinvCheck)
MoleculeGraph.MIN_RING_SIZE_FOR_TRANS_DB
(so chemically the double bond with its ring ligand can be cis only),
but due to the perspective depiction in two dimension the double bond
ligand arrangement looks trans.
In this case the chemically incorrect trans returned.getStereo2
in class MoleculeGraph
bond
- the bondleftAtom
- atom A1rightAtom
- atom A4performGrinvCheck
- true if check atom equivalences using graph invariantsStereoConstants.CTUMASK
,
MolBond.calcStereo2()
,
for detailed examples.
public Molecule getRoot()
public final MoleculeGraph getRootG()
getRootG
in interface chemaxon.struc.RgMoleculeGraphIface
public int getRgroupCount()
getRgroupCount
in interface chemaxon.struc.RgMoleculeGraphIface
public int getRgroupMemberCount(int i)
getRgroupMemberCount
in interface chemaxon.struc.RgMoleculeGraphIface
i
- R-group indexpublic Molecule getRgroupMember(int i, int j)
i
- R-group indexj
- member indexpublic final MoleculeGraph getRgroupMemberG(int i, int j)
getRgroupMemberG
in interface chemaxon.struc.RgMoleculeGraphIface
i
- R-group indexj
- member indexpublic int getRgroupId(int i)
getRgroupId
in interface chemaxon.struc.RgMoleculeGraphIface
i
- R-group indexMolAtom.RGROUP_MAX
public int findRgroupIndex(int rgid)
findRgroupIndex
in interface chemaxon.struc.RgMoleculeGraphIface
rgid
- number between 0 and MolAtom.RGROUP_MAX
public void addSgroup(Sgroup sg, boolean setparent)
public int addRgroup(int rl, Molecule m)
rl
- R-logic flags or an R-group ID number between 0 and
MolAtom.RGROUP_MAX
m
- the R-group@Beta public void addRgroupBridge(int rgroupId1, int rgroupId2, Molecule m)
rgroupId1
- the first R-group ID number between 0 and
MolAtom.RGROUP_MAX
for the bridgergroupId2
- the second R-group ID number between 0 and
MolAtom.RGROUP_MAX
for the bridgem
- the R-group@Beta public Set<chemaxon.common.util.CommutativePair<Integer>> getRgroupBridgeIds()
@Beta public List<Molecule> getRgroupBridgeMembers(int rgroupId1, int rgroupId2)
rgroupId1
- the first id of the pairrgroupId2
- the second id of the pair@Beta public Map<chemaxon.common.util.CommutativePair<Integer>,List<Molecule>> getRgroupBridges()
public void removeRgroupMember(int definition, int member) throws chemaxon.struc.IllegalRgroupDefinitionException, chemaxon.struc.IllegalRgroupMemberException
definition
- the iteration number of the R-group definitionmember
- the iteration number of the memberIllegalRgroupDefinitionException
- If the definition index is not validIllegalRgroupMemberException
- If the member index is not valid@Beta public void removeRgroupBridgeMember(int rgroupId1, int rgroupId2, int memberIndex) throws chemaxon.struc.IllegalRgroupDefinitionException, chemaxon.struc.IllegalRgroupMemberException
rgroupId1
- the first R-group ID number between 0 and
MolAtom.RGROUP_MAX
for the bridgergroupId2
- the first R-group ID number between 0 and
MolAtom.RGROUP_MAX
for the bridgememberIndex
- the index of the memberIllegalRgroupDefinitionException
- if the r-group id pair is not validIllegalRgroupMemberException
- If the member index is not validpublic void removeRgroupMembers(int definition, int[] members) throws chemaxon.struc.IllegalRgroupDefinitionException, chemaxon.struc.IllegalRgroupMemberException
definition
- the iteration number of the R-group definitionmembers
- the array of the iteration numbers of the membersIllegalRgroupDefinitionException
- If the definition index is not validIllegalRgroupMemberException
- If a member index is not valid@Beta public void removeRgroupBridgeMembers(int rgroupId1, int rgroupId2, int[] memberIndexes) throws chemaxon.struc.IllegalRgroupDefinitionException, chemaxon.struc.IllegalRgroupMemberException
rgroupId1
- the first R-group ID number between 0 and
MolAtom.RGROUP_MAX
for the bridgergroupId2
- the first R-group ID number between 0 and
MolAtom.RGROUP_MAX
for the bridgememberIndexes
- the array of the indexes of the membersIllegalRgroupDefinitionException
- If the definition index is not validIllegalRgroupMemberException
- If a member index is not validpublic void removeRgroup(int definition) throws chemaxon.struc.IllegalRgroupDefinitionException
definition
- the iteration number of the R-group definitionIllegalRgroupDefinitionException
- If the definition index is not valid@Beta public void removeRgroupBridge(int rgroupId1, int rgroupId2) throws chemaxon.struc.IllegalRgroupDefinitionException
rgroupId1
- the first R-group ID number between 0 and
MolAtom.RGROUP_MAX
for the bridgergroupId2
- the first R-group ID number between 0 and
MolAtom.RGROUP_MAX
for the bridgeIllegalRgroupDefinitionException
- if the r-group id pair is not validpublic boolean hasRgroupContainedBy(Set<?> set)
set
- set of atomspublic int unRgroupAtoms(Set<?> set)
set
- selected atomspublic void replaceAtomsWithNewRgroup(SelectionMolecule sel, int rgid)
sel
- selected atomsrgid
- R-group IDpublic int getRlogic(int i)
getRlogic
in interface chemaxon.struc.RgMoleculeGraphIface
i
- R-group indexRG_ID_MASK
,
RG_ID2_FLAG
,
RG_ID2_OFF
,
RG_ID2_MASK
,
RG_RESTH
public void setRlogic(int i, int f)
i
- R-group indexf
- R-logic flagsRG_ID_MASK
,
RG_ID2_FLAG
,
RG_ID2_OFF
,
RG_ID2_MASK
,
RG_RESTH
public String getRlogicRange(int i)
getRlogicRange
in interface chemaxon.struc.RgMoleculeGraphIface
i
- R-group indexpublic void setRlogicRange(int index, String range) throws IllegalArgumentException
index
- R-group indexrange
- range of occurrance.IllegalArgumentException
- bad occurrence rangepublic String checkRlogicRange(int index, String range) throws IllegalArgumentException
index
- R-group indexrange
- range of occurrenceIllegalArgumentException
- bad occurrence rangepublic void clearForImport(String fmt)
clearForImport
in class Molecule
fmt
- input file format.
See the text formats on the
File Formats in Marvin page.MoleculeGraph.theBonds
,
MoleculeGraph.orix
,
MoleculeGraph.oriy
,
MoleculeGraph.oriz
,
MoleculeGraph.setFlags(int)
public void setName(String s)
public String getName()
getName
in interface Incomplecule
getName
in class Molecule
public void setComment(String s)
setComment
in class Molecule
s
- the comment, empty string or null
(null is equivalent to empty string)public String getComment()
getComment
in class Molecule
public MPropertyContainer properties()
properties
in interface Incomplecule
properties
in class MoleculeGraph
public void revalidateCoordDependentProps()
revalidateCoordDependentProps
in class MoleculeGraph
public void setInputFormat(String format)
setInputFormat
in class Molecule
format
- the input formatMolecule.getInputFormat()
public MolAtom reuseAtom(int z, int i)
public void endReuse(int n)
public int[][] getCtab()
getCtab
in class MoleculeGraph
public chemaxon.core.util.BondTable getBondTable()
getBondTable
in class MoleculeGraph
public int rgroupIdOf(MolAtom node)
rgroupIdOf
in interface chemaxon.struc.RgMoleculeGraphIface
node
- the atompublic int rgroupIndexOf(MolAtom node)
rgroupIndexOf
in interface chemaxon.struc.RgMoleculeGraphIface
node
- the atompublic long getRgroupMemberID(MolAtom node)
getRgroupMemberID
in interface chemaxon.struc.RgMoleculeGraphIface
node
- the atompublic int getRgroupIndex(long id)
getRgroupIndex
in interface chemaxon.struc.RgMoleculeGraphIface
id
- the R-group member ID or -1public int getRgroupMemberIndex(long id)
getRgroupMemberIndex
in interface chemaxon.struc.RgMoleculeGraphIface
id
- the R-group member ID or -1public void setDim(int d)
setDim
in class Molecule
d
- 0, 2 or 3MoleculeGraph.getFlags()
public int getFlags()
getFlags
in class MoleculeGraph
protected void setFlags(int f)
setFlags
in class MoleculeGraph
f
- the flagsMoleculeGraph.flags
protected void setFlags(int f, int mask)
setFlags
in class MoleculeGraph
f
- new value of the specified bitsmask
- bits to setpublic void setAbsStereo(boolean c)
setAbsStereo
in class MoleculeGraph
c
- the absolute stereoconfiguration flagMoleculeGraph.setFlags(int)
public int getAtomCount()
getAtomCount
in interface chemaxon.core.structure.StructureForBuilder
getAtomCount
in interface Incomplecule
getAtomCount
in class MoleculeGraph
public int getAtomCount(int atomicNumber)
getAtomCount
in class MoleculeGraph
atomicNumber
- atomic number of atoms looked forpublic MolAtom getAtom(int i)
getAtom
in class MoleculeGraph
i
- node index@Deprecated public void setAtom(int iu, MolAtom node)
MoleculeGraph
. Use MoleculeGraph.removeAtom(MolAtom)
and
add(MolAtom)
to modify the structure.setAtom
in class MoleculeGraph
iu
- the atom indexnode
- the atompublic RgMolecule clone()
public RgMolecule cloneMoleculeWithDocument()
Molecule
cloneMoleculeWithDocument
in class Molecule
public void add(MolAtom node)
add
in class MoleculeGraph
node
- the atomprotected void addAtomToFragment(MolAtom atom)
addAtomToFragment
in class Molecule
atom
- the atom referenceprotected void insertNullAtoms(int i, int count)
insertNullAtoms
in class MoleculeGraph
i
- starting indexcount
- number of new entriesprotected void insertNullBonds(int i, int count)
insertNullBonds
in class MoleculeGraph
i
- starting indexcount
- number of new entriespublic int getBondCount()
getBondCount
in interface Incomplecule
getBondCount
in class MoleculeGraph
public MolBond getBond(int i)
getBond
in class MoleculeGraph
i
- edge index@Deprecated public void setBond(int iu, MolBond edge)
MoleculeGraph
. Use MoleculeGraph.removeBond(MolBond)
for
bond removal and add(MolBond)
for adding a new bond
to the molecule.setBond
in class MoleculeGraph
iu
- the bond indexedge
- the bond@Deprecated public void replaceBond(MolBond olde, MolBond newe)
MoleculeGraph
. Use MoleculeGraph.removeBond(MolBond)
for
bond removal and add(MolBond)
for adding a new bond
to the molecule.replaceBond
in class MoleculeGraph
olde
- the old edgenewe
- the new edgepublic void add(MolBond bond)
public int indexOf(MolAtom node)
indexOf
in class MoleculeGraph
node
- the nodepublic int indexOf(MolBond edge)
indexOf
in class MoleculeGraph
edge
- the edgeObject.equals(Object)
public boolean contains(MolAtom node)
public boolean contains(MolBond edge)
contains
in class MoleculeGraph
edge
- the edge objectObject.equals(Object)
public boolean isEmpty()
public boolean isQuery()
isQuery
in class MoleculeGraph
true
if there are R-definitions for this molecule
or the root has query features.MolAtom.isQuery()
,
MolBond.isQuery()
@Deprecated public boolean isAtom()
isAtom
in class MoleculeGraph
true
the root structure represents an atom and there
are no R-groups, false
otherwise@Deprecated public boolean isBond()
isBond
in class MoleculeGraph
true
if the root structure represents a bond and
there are no R-groups, false
otherwisepublic boolean isReaction()
isReaction
in class Molecule
true
if the root structure is a reactionpublic boolean canBeReactionComponent()
false
, an RgMolecule cannot
be a reaction component.canBeReactionComponent
in class Molecule
true
if it can be a reactant, product or agent,
false
if adding it to an RxnMolecule
is not
supportedpublic boolean hasAtomSet()
hasAtomSet
in class Molecule
true
if there are atom sets,
false
otherwisepublic boolean hasBondSet()
hasBondSet
in class MoleculeGraph
true
if there are atom sets,
false
otherwiseprotected Molecule getMostSimplifiedMolecule()
getMostSimplifiedMolecule
in class Molecule
this
otherwisepublic RgMolecule addRgroupsTo(Molecule m)
m
- the simple molecule objectpublic void removeAtom(MolAtom node, int cleanupFlags)
MoleculeGraph.removeAtom(MolAtom)
instead unless you are sure what you are doing.removeAtom
in class Molecule
node
- the atomcleanupFlags
- extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE
,
MoleculeGraph.RMCLEANUP_ALL
,
MoleculeGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
,
Molecule.RMCLEANUP_SGROUPATOMS
,
Molecule.RMCLEANUP_FROMSGROUPS
public void removeAtom(int i, int cleanupFlags)
MoleculeGraph.removeAtom(MolAtom)
instead unless you are sure what you are doing.removeAtom
in class Molecule
i
- the atom indexcleanupFlags
- extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE
,
MoleculeGraph.RMCLEANUP_ALL
,
MoleculeGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
,
Molecule.RMCLEANUP_SGROUPATOMS
,
Molecule.RMCLEANUP_FROMSGROUPS
public void cleanupRemovedRgroupMember(MoleculeGraph m, int f)
cleanupRemovedRgroupMember
in interface chemaxon.struc.RgMoleculeGraphIface
m
- the removed R-group memberf
- clean-up flagsprotected void removeBond(MolBond edge, int cleanupFlags)
removeBond
in class Molecule
edge
- the bondcleanupFlags
- extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE
,
MoleculeGraph.RMCLEANUP_ALL
,
MoleculeGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
,
Molecule.RMCLEANUP_SGROUPATOMS
,
Molecule.RMCLEANUP_FROMSGROUPS
protected void removeBond(int i, int cleanupFlags)
removeBond
in class Molecule
i
- the bond indexcleanupFlags
- extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE
,
MoleculeGraph.RMCLEANUP_ALL
,
MoleculeGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
,
Molecule.RMCLEANUP_SGROUPATOMS
,
Molecule.RMCLEANUP_FROMSGROUPS
public void removeAllBonds()
removeAllBonds
in class Molecule
public void removeAll()
protected boolean isRealAtomParent()
isRealAtomParent
in class MoleculeGraph
public void regenBonds()
regenBonds
in class MoleculeGraph
public void sortBondsAccordingTo(MolBond[] order)
sortBondsAccordingTo
in class MoleculeGraph
order
- the arraypublic void setLocation(DPoint3 p)
setLocation
in class MoleculeGraph
p
- the locationMoleculeGraph.orix
public void fuse(MoleculeGraph g, boolean check)
fuse
in class MoleculeGraph
g
- the other moleculecheck
- true
if a containment check should be performed to ensure that
only those nodes and edges 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@Deprecated public void checkConsistency()
checkConsistency
in class Molecule
RuntimeException
- if inconsistency foundprotected void fuse0(MoleculeGraph graph, boolean check)
fuse0
in class MoleculeGraph
graph
- the graph that will be fused into this moleculecheck
- true
if a containment check should be performed to ensure that
only those nodes and edges 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@Deprecated public void mergeAtoms(MolAtom that, MolAtom a)
MergeUtil.mergeAtoms(MolAtom, MolAtom, boolean)
instead.mergeAtoms
in class Molecule
that
- the atoma
- the other atompublic void setSgroupParent(MolAtom a, Sgroup sg, boolean set)
setSgroupParent
in class Molecule
a
- the atomsg
- the S-groupset
- set (true) or unset (false)IllegalArgumentException
- if neither root, nor any R-group
contains the atompublic void clonecopy(MoleculeGraph g)
public void clonecopy(int[] iatoms, MoleculeGraph g)
public boolean isSelfReference(MProp p)
isSelfReference
in class MoleculeGraph
p
- the propertyprotected boolean fixSelfReferringProperty(MProp prop)
fixSelfReferringProperty
in class Molecule
prop
- the propertyMoleculeGraph.clonecopy(MoleculeGraph)
@Deprecated public void clonelesscopy(MoleculeGraph g)
clonelesscopy
in class Molecule
g
- the target moleculepublic String getFormula()
getFormula
in class MoleculeGraph
public double getMass()
getMass
in class MoleculeGraph
public MoleculeGraph newInstance()
newInstance
in class Molecule
public SelectionMolecule newSelectionMolecule()
newSelectionMolecule
in class Molecule
protected void makeItSimilar(MoleculeGraph g)
makeItSimilar
in class Molecule
g
- the molecule to changepublic boolean isIncompleteReaction()
public void transform(CTransform3D t, boolean incg)
public MoleculeGraph getGraphUnion()
getGraphUnion
in class MoleculeGraph
Molecule.getGraphUnionAsSelection()
protected final int getSubGraphCount()
getSubGraphCount
in class MoleculeGraph
MoleculeGraph.getSubGraphs(MoleculeGraph[], int)
protected final void getSubGraphs(MoleculeGraph[] arr, int off)
getSubGraphs
in class MoleculeGraph
arr
- the output arrayoff
- offsetMoleculeGraph.getSubGraphs()
,
MoleculeGraph.getSubGraphCount()
protected void fillSelectionMolecule(SelectionMolecule s)
fillSelectionMolecule
in class Molecule
s
- the selection moleculepublic int getLonePairCount(int i)
getLonePairCount
in class MoleculeGraph
i
- atom indexpublic void aromatize(int method)
aromatize
in class Molecule
method
- Specifies the algorithm for aromatization. Possible
values:
SecurityException
- cannot load module because of a security
problem (firewall)MoleculeGraph.AROM_BASIC
,
MoleculeGraph.AROM_GENERAL
,
Document about aromatizationpublic void aromatize(int method, boolean checkAmbiguity)
aromatize
in class Molecule
method
- Specifies the algorithm for aromatization. Possible
values:
checkAmbiguity
- Specifies whether ANY bonds should be considered
during aromatization.SecurityException
- cannot load module because of a security
problem (firewall)MoleculeGraph.AROM_BASIC
,
MoleculeGraph.AROM_GENERAL
,
Document about aromatizationprotected void checkSgroupConsistency()
checkSgroupConsistency
in class Molecule
RuntimeException
- if inconsistency foundpublic String toString()
toString
in class MoleculeGraph
protected void sumConservedQuantities(MolAtom a, int[] atoms, int sign)
sumConservedQuantities
in class MoleculeGraph
RxnMolecule.isIncompleteReaction()
protected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
createGearch
in class Molecule
public int getMaxAttachmentPointOrder(int rgroupID)
rgroupID
- the rgroup identifier to specify the R-group definition molecules.public void clearObjects()
clearObjects
in interface chemaxon.struc.MObjectContainer
clearObjects
in class Molecule
public int getObjectCount()
getObjectCount
in interface chemaxon.struc.MObjectContainer
getObjectCount
in class Molecule
public void removeObject(MObject mo)
removeObject
in interface chemaxon.struc.MObjectContainer
removeObject
in class Molecule
public void selectAllObjects(boolean s)
selectAllObjects
in interface chemaxon.struc.MObjectContainer
selectAllObjects
in class Molecule
public List<MObject> getAllObjects()
getAllObjects
in interface chemaxon.struc.MObjectContainer
getAllObjects
in class Molecule
public int getParity(int i)
getParity
in class MoleculeGraph
i
- the index of the atom whose parity is to be determinedSecurityException
- the Parity module cannot be
loaded because of security reasons (firewall)StereoConstants.PARITY_ODD
,
StereoConstants.PARITY_EVEN
,
MoleculeGraph.isAbsStereo()
,
setAbsStereo(boolean)
,
MoleculeGraph.getParity(int)
public int getLocalParity(int i)
getLocalParity
in class MoleculeGraph
i
- the index of the atom whose parity is to be determinedSecurityException
- the Parity module cannot be
loaded because of security reasons (firewall)StereoConstants.PARITY_ODD
,
StereoConstants.PARITY_EVEN
,
StereoConstants.PARITY_EITHER
,
MoleculeGraph.isAbsStereo()
,
setAbsStereo(boolean)
,
MoleculeGraph.getLocalParity(int)
public boolean stereoClean()
stereoClean
in class MoleculeGraph
MoleculeGraph.stereoClean()
public void setValenceCheckOptions(ValenceCheckOptions options)
MoleculeGraph.setValenceCheckEnabled(boolean)
.
Calling this function with a not null parameter automatically enables the valence check.setValenceCheckOptions
in class MoleculeGraph
options
- the new valence check optionsValenceCheckOptions
public ValenceCheckOptions getValenceCheckOptions()
MoleculeGraph.isValenceCheckEnabled()
getValenceCheckOptions
in class MoleculeGraph
ValenceCheckOptions
public boolean canBeCT(int i2, int i3, boolean grcheck)
canBeCT
in class MoleculeGraph
i2
- index of the first atomi3
- index of the second atomgrcheck
- true if check atom equivalences using graph invariantspublic IteratorFactory.AtomIterator getAtomIterator()
getAtomIterator
in class MoleculeGraph
public IteratorFactory.BondIterator getBondIterator()
getBondIterator
in class MoleculeGraph
public void setRestH(int rGroupIndex)
rGroupIndex
- the index of the R-group definitionpublic void removeRestH(int rGroupIndex)
rGroupIndex
- the index of the R-group definitionpublic boolean isRestH(int rGroupIndex)
rGroupIndex
- the index of the R-group definitionpublic void setDependentRgroupDefinition(int rGroupIndexIf, int rGroupIndexThen)
rGroupIndexThen
) for
the referenced R-group definition (rGroupIndexIf
).rGroupIndexIf
- the R-group definition on which the other one dependsrGroupIndexThen
- the R-group definition which depends on the other onepublic int getDependentRgroupDefinition(int rGroupIndex)
rGroupIndex
- the R-group definition indexpublic void removeDependentRgroupDefinition(int rGroupIndex)
rGroupIndex
- the R-group definition ID