public class RxnMolecule extends Molecule implements chemaxon.struc.MObjectContainer, chemaxon.core.structure.ReactionForBuilder
hasSelfReferringPropertyMoleculeGraph.ValenceCheckState| Modifier and Type | Field and Description |
|---|---|
static int |
AGENTS
"Agent" structure type.
|
static int |
EQUILIBRIUM
Resonance arrow, the same as the two-headed double reaction arrow.
|
static int |
PRODUCTS
"Product" structure type.
|
static int |
REACTANTS
"Reactant" structure type.
|
static int |
REGULAR_DOUBLE
Regular double reaction arrow type.
|
static int |
REGULAR_SINGLE
Regular single reaction arrow type.
|
static int |
RESONANCE
Resonance arrow, the same as the two-headed single reaction arrow.
|
static int |
RETROSYNTHETIC
Retrosynthetic arrow, the same as the regular double reaction arrow.
|
static int |
RGROUPED
Add R-groups to component structure.
|
static int |
TWO_HEADED_DOUBLE
Two headed double reaction arrow type.
|
static int |
TWO_HEADED_SINGLE
Two headed single reaction arrow type.
|
static int |
TYPE_COUNT
Number of structure types.
|
static int |
TYPE_MASK
Component type mask.
|
DEFAULT_UNGROUP, RECURSIVE_UNGROUP, RM_KEEP_LEAVINGGROUPS, RMCLEANUP_FROMSGROUPS, RMCLEANUP_SGROUPATOMS, RMSG_DEFAULT, RMSG_KEEP_CHILDREN, RMSG_KEEP_MULTICENTER, RMSG_KEEP_PARENTAROM_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_AMBIGUOUSANTI, 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, 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 |
|---|
RxnMolecule()
Create a reaction.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(MolAtom a)
Adds an atom to a reactant, product or agent structure.
|
void |
add(MolBond e)
Adds a bond to a reactant, product, agent.
|
protected void |
addAtomToFragment(MolAtom a)
Adds an atom to a fragment.
|
void |
addComponent(Molecule m,
int type)
Adds a reactant, product or agent.
|
void |
addComponent(Molecule m,
int type,
boolean beNew)
Adds a reactant, product or agent.
|
void |
addReactionStep(List<Molecule> reactants,
List<Molecule> products,
List<Molecule> agents,
chemaxon.struc.graphics.MRArrow arrow,
int arrowType) |
void |
addSgroup(Sgroup sg,
boolean setparent)
Adds an S-group to this object.
|
boolean |
canBeReactionComponent()
Tests whether an object of this class can be a reaction component.
|
protected void |
checkSgroupConsistency()
Checks the consistency of S-groups.
|
void |
clearForImport(String fmt)
Clear the edges vector and the properties.
|
void |
clearObjects()
Deletes the graphical objects from this.
|
RxnMolecule |
clone()
Make an identical copy of the reaction structure.
|
void |
clonecopy(int[] iatoms,
MoleculeGraph g)
Copies the specified nodes and edges 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. |
RxnMolecule |
cloneMoleculeWithDocument()
Makes an identical copy of the molecule and its document.
|
boolean |
contains(MolAtom node)
Checks if a reactant, agent or product structure contains the specified
node.
|
boolean |
contains(MolBond edge)
Checks if a reactant, agent or product structure contains the specified
edge.
|
int[][] |
createBHtab()
Creates the graph union's bond table extended with implicit hydrogen
atoms.
|
int[][] |
createCHtab()
Creates the graph union's connection table extended with implicit
hydrogen atoms.
|
protected chemaxon.struc.gearch.MoleculeGraphGearch |
createGearch() |
static RxnMolecule |
createReaction(Molecule mol,
DPoint3[] arw,
int art)
Creates a reaction.
|
static RxnMolecule |
createReaction(MoleculeGraph mol,
DPoint3[] arw)
Creates a reaction.
|
static double |
determineArrowDistance(double x,
double y,
double z,
DPoint3[] ar)
Project the point (x,y,z) to the line of the reaction arrow 'ar'.
|
int |
determineType(double x,
double y,
double z)
Determines whether a point should be in a reactant, in a product or in an agent.
|
static int |
determineType(double x,
double y,
double z,
DPoint3[] ar)
Determines whether a point should be in a reactant, in a product or in an agent.
|
protected void |
fillSelectionMolecule(SelectionMolecule s)
Adds all atoms and bonds of the root structure and the R-groups
to the specified molecule.
|
void |
fuse(MoleculeGraph graph,
boolean check)
Add the atoms and bonds of another molecule.
|
void |
fuse(RxnMolecule rxnMol)
Fuse and RxnMolecule to this RxnMolecule.
|
protected void |
fuse0(MoleculeGraph graph,
boolean check)
Add those nodes and edges of a graph that are not already elements.
|
Molecule |
getAgent(int i)
Gets an agent.
|
int |
getAgentCount()
Gets the number of agents.
|
Molecule[] |
getAgents()
Gets all agents in an array.
|
List<Molecule> |
getAllFragments()
Gets the list of reaction fragments (product, reactant, agent components)
that build up this reaction.
|
List<MObject> |
getAllObjects() |
MPropertyContainer |
getArrowAsProperty()
Gets the properties (type, endpoint coordinates) of the reaction arrow in
this reaction.
|
MolAtom |
getAtom(int i)
Gets a node.
|
int |
getAtomCount()
Returns the number of nodes in the graph union.
|
int |
getAtomCount(int atomicNumber)
Gets the number of atoms with the given atomic number in the unified
molecule graph of the reaction.
|
IteratorFactory.AtomIterator |
getAtomIterator()
Returns an iterator over the atoms in this molecule in proper sequence.
|
MolBond |
getBond(int i)
Gets an edge.
|
int |
getBondCount()
Gets the number of edges in the graph union.
|
IteratorFactory.BondIterator |
getBondIterator()
Returns an iterator over the bonds in this molecule in proper sequence.
|
chemaxon.core.util.BondTable |
getBondTable()
Gets the bond table for the graph union.
|
DPoint3 |
getCenter(int type,
int i)
Gets the geometrical center of a reaction component.
|
Molecule |
getComponent(int typeFlag,
int i)
Gets a reactant, product or agent.
|
Molecule |
getComponent(long id)
Gets a reactant, product or agent.
|
int |
getComponentCount(int type)
Gets the number of reactants, products or agents.
|
int |
getComponentFlags(long id)
Gets the reaction component type flags from the ID.
|
long |
getComponentID(MolAtom a)
Gets the reaction component ID of an atom.
|
long |
getComponentID(MolBond b)
Gets the reaction component ID of a bond.
|
long |
getComponentID(Molecule m)
Gets the ID of a reaction component.
|
int |
getComponentIndex(long id)
Gets the reactant, product or agent index from the ID.
|
int |
getComponentType(long id)
Gets the reaction component type from the ID.
|
int[][] |
getCtab()
Gets the connection table for the graph union.
|
String |
getFormula()
Gets the molecular formula in Hill order.
|
MoleculeGraph |
getGraphUnion()
Gets a graph containing all the atoms and bonds.
|
chemaxon.struc.graphics.MRArrow |
getItsArrow()
Gets the reaction arrow of this reaction.
|
int |
getLocalParity(int i)
Computes the local parity of an atom of the RxnMolecule instance
based on both the coordinates of the neighboring atoms
and the stereo information of the bonds to those.
|
double |
getMass()
Calculates the molecular weight of the molecule.
|
Map<chemaxon.struc.graphics.MRArrow,RxnMolecule> |
getMSLogic()
Gets the hash that stores arrow - reaction mapping.
|
int |
getObjectCount() |
int |
getParity(int i)
Computes the parity of an atom of the RxnMolecule instance based on both
the coordinates of the neighboring atoms and the stereo information
of the bonds to those.
|
Molecule |
getProduct(int i)
Gets a product.
|
int |
getProductCount()
Gets the number of products.
|
Molecule[] |
getProducts()
Gets all products in an array.
|
Molecule |
getReactant(int i)
Gets a reactant.
|
int |
getReactantCount()
Gets the number of reactants.
|
Molecule[] |
getReactants()
Gets all reactants in an array.
|
static RxnMolecule |
getReaction(MoleculeGraph g)
Returns the reaction represented by the given molecule if exists,
otherwise null.
|
DPoint3[] |
getReactionArrow()
Gets a two-element array containing the endpoints of the reaction arrow.
|
chemaxon.struc.graphics.MRArrow |
getReactionArrow(boolean generate)
Gets the reaction arrow of this reaction with the possibility to
generate an arrow if the arrow is not yet set.
|
List<chemaxon.struc.graphics.MRArrow> |
getReactionArrowList()
Gets the list of the reaction arrows of this reaction.
|
int |
getReactionArrowType()
Gets the reaction arrow type.
|
String |
getReactionArrowTypeName()
Gets the reaction arrow type name.
|
ArrayList<RxnMolecule> |
getReactionSteps()
Divides this reaction into simple step reactions if this is a multistep
reaction.
|
protected int |
getSubGraphCount()
Gets the number of all "submolecules".
|
protected void |
getSubGraphs(MoleculeGraph[] arr,
int off)
Gets all "submolecules".
|
int |
getType(MoleculeGraph selection)
Checks whether the atoms in the selection are all in reactants, products or agents.
|
boolean |
hasAtomSet()
Tests whether the molecule graph has atom sets.
|
boolean |
hasBondSet()
Tests whether the molecule graph has atom sets.
|
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.
|
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 reaction is empty or not.
|
boolean |
isIncompleteReaction()
Check whether the reaction is incomplete or not.
|
boolean |
isMergedComponent(MoleculeGraph m)
Check whether given molecule is reaction component with a set of intentionally merged fragments or not.
|
boolean |
isQuery()
Indicates if the molecule has query features: query atoms or query bonds.
|
boolean |
isReaction()
Checks if the structure represents a reaction or not.
|
protected boolean |
isRealAtomParent()
Reaction molecules cannot be real node parents.
|
boolean |
isSingleStepReaction()
Decides wheter this reaction is a singlestep or multistep reaction.
|
protected void |
makeItSimilar(MoleculeGraph g)
Copies some properties of this molecule to the other one specified as
argument.
|
void |
mergeAtoms(MolAtom that,
MolAtom node)
Deprecated.
As of Marvin 6.2, use
MergeUtil.mergeAtoms(MolAtom, MolAtom, boolean) instead. |
void |
mergeComponentParts(MoleculeGraph m,
int type,
boolean isMergeStored)
Finds those component parts that are contained in the molecule graph m and
creates a new component containing all atoms of m, splitting them from the previous merges.
|
MoleculeGraph |
newInstance()
Creates a new RxnMolecule object.
|
void |
rebuildStructures()
For each structure (reactant or product) determines
whether it should be a reactant or a product depending
on its the relative position to the reaction arrow.
|
void |
rebuildStructures(DPoint3[] arw,
int art)
Sets the reaction arrow.
|
void |
recalcReactionArrow()
Recalculates the coordinates of the reaction arrow from the reactants and products,
forced recalculation.
|
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()
Removes all bonds from the reactants, products and agents.
|
void |
removeAtom(int iu,
int cleanupFlags)
Removes an atom from the reactants, products or agents.
|
void |
removeAtom(MolAtom node,
int cleanupFlags)
Removes an atom from the reactants, products or agents.
|
protected void |
removeBond(int iu,
int cleanupFlags)
Removes an edge from a reactant, agent or product.
|
protected void |
removeBond(MolBond edge,
int cleanupFlags)
Removes a bond from the reactants, products or agents.
|
Molecule |
removeComponent(int flags,
int i)
Removes a reactant, product or agent.
|
void |
removeEmptyComponents()
Checks all the componentes and removes those that are empty
(node count is zero).
|
void |
removeObject(MObject o)
Removes a graphical object from this.
|
void |
removeReactionArrow()
Removes the reaction arrow of this reacion.
|
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. |
void |
revalidateCoordDependentProps()
Revalidate coordinate dependent properties.
|
void |
selectAllObjects(boolean s) |
void |
setAbsStereo(boolean c)
Sets the absolute stereoconfiguration flag for all the structures.
|
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 |
setDim(int d)
Sets the dimension for all the structures.
|
void |
setLocation(DPoint3 p)
Set the origin of the molecule.
|
void |
setMSLogic(Map<chemaxon.struc.graphics.MRArrow,RxnMolecule> ms)
Sets the hash that stores arrow - reaction mapping.
|
void |
setReactionArrow()
Sets the stored reaction arrow to its calculated value.
|
void |
setReactionArrow(DPoint3[] arw)
Sets the endpoint coordinates of the reaction arrow.
|
void |
setReactionArrow(chemaxon.struc.graphics.MRArrow arrow)
Sets the reaction arrow.
|
void |
setReactionArrow0()
Sets the stored reaction arrow 'arrowPoints' to its calculated value.
|
void |
setReactionArrowEndPoints(DPoint3[] points)
Sets the endpoints of the reaction arrow in this reaction.
|
void |
setReactionArrowType(int type)
Sets the reaction arrow type.
|
void |
setReactionArrowType(String name)
Sets the reaction arrow type from type name.
|
void |
setSgroupParent(MolAtom a,
Sgroup sg,
boolean set)
Sets or unsets an S-group as a parent of an atom in reactants, products
or agents.
|
protected void |
setSupergraph(MoleculeGraph molecule)
Sets the given molecule as the supergraph of this graph and its
components.
|
Molecule |
simplifyIncompleteReactionToMolecule()
Simplify a reaction to a molecule if possible.
|
Molecule |
simplifyToMolecule()
Simplifies this RxnMolecule by moving the atoms and bonds from the
reactants, products, and agents to a Molecule.
|
void |
sortBondsAccordingTo(MolBond[] order)
Sort edges in the same order as they appear in the specified array.
|
void |
splitAllDisconnectedComponents()
Replaces all disconnected reaction components by its connected fragments
in the structure array.
|
void |
splitComponentParts(MoleculeGraph m,
int type)
Finds those component parts that are contained in the molecule graph m and
creates separate components from the fragments contained in m, splitting them from the previous merges.
|
void |
splitDisconnectedComponent(int type,
int index)
Replaces a disconnected reaction component by its connected fragments
in the structure array.
|
void |
splitDisconnectedComponent(long id)
Replaces a disconnected reaction component by its connected fragments
in the structure array.
|
boolean |
stereoClean()
Reset the wedges of the molecule, based on the actual
parity information in 2D remove wedges in 3D.
|
String |
toString()
Overrides Object.toString() to ease debugging.
|
void |
transform(CTransform3D t,
boolean incg)
Apply a transformation matrix to the atomic coordinates
and the reaction arrow.
|
protected void |
transformReactionArrow(CTransform3D t)
Apply a transformation matrix to the reaction arrow.
|
void |
updateComponentRoles()
Updates fragment roles in the molecule.
|
addAtom0, addBond0, addSgroupClones, addSgroupsOf, aromatize, aromatize, bondlength, checkConsistency, clear, clearExtraLabels, clearProperties, cloneAtoms, clonecopyWithoutSgroups, cloneMolecule, connectOriginalBondsToNewAtom, contractSgroups, contractSgroups, convertToFrags, countExpandableContractableSgroups, countOrderedComponentSgroups, dearomatize, endReuse, expandSgroups, expandSgroups, exportToBinFormat, exportToFormat, exportToObject, findAllSgroupContaining, findContainingMulticenterSgroup, findContractableSgroup, findExpandableSgroup, findFrags, findFrags, findSgroupContaining, findSgroupOf, findSmallestSgroupContaining, fixSelfReferringProperty, getBonds, getComment, getEndPosition, getGraphUnionAsSelection, getInputFormat, getMostSimplifiedMolecule, getName, getProperty, getPropertyCount, getPropertyKey, getPropertyKeys, getPropertyObject, getRootSgroups, getSgroup, getSgroupArray, getSgroupCount, getSgroupIterator, getSgroupLigands, getSimplifiedMolecule, getSortedSgroups, getStartPosition, getVisibleCoords, hasContractedSgroup, implicitizeHydrogens0, indexOf, isExpandable, isGUIContracted, isSgroup, newSelectionMolecule, rearrangeSgroups, removeAllSgroups, removeAtomFromChildren, removeSgroupFromList, removeSgroupsOf, removeSgroupsOf, reparentSgroups, replaceAtom, replaceSgroup, residueSymbolOf, residueTypeOf, reuseAtom, setAtom0, setComment, setEndPosition, setGUIContracted, setGUIContracted, setInputFormat, setName, setProperty, setPropertyObject, setStartPosition, sortSgroupXBonds, toBinFormat, toFormat, toObject, ungroupSgroup, ungroupSgroup, ungroupSgroup, ungroupSgroup, ungroupSgroups, ungroupSgroups, ungroupSgroupsadd, addAtomsAndBondsTo, addAtomWithoutChangingIt, addBondWithoutChangingIt, addExplicitHydrogens, addExplicitHydrogens, addExplicitLonePairs, addSimpleAtomWithoutChangingIt, adjustMultiChiralFlag, aromatize, aromatize, arrangeComponents, calcCenter, calcCenter, calcDehydrogenizedGrinv, calcHeight, calcHybridization, calcOutRect, calcOutRect, calcOutRectCenter, calcOutRectCenter, calcWidth, canBeCT, canBeCT, canBeCT, checkBondConsistency, clean, clean, clearCachedInfo, clonecopyMoleculeGraphWithoutSgroups, contains, 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, getFlags, getForefather, getFormalCharge, getFragCount, getFragCount, getFragIds, getFreeAttachmentPoints, getGrinv, getGrinv, getGrinv, getGrinv, getGrinvCC, getGrinvOptions, getImplicitHcount, getImplicitHCount, getLigand, getLigandAtno, getLigandBondType, getLigandCount, getLocation, getLock, getLonePairCount, getMaxRgroupAttachmentPointOrder, getParent, getParentDocument, getParityType, getPoints, getPossibleAttachmentPoints, getRadicalCount, getSmallestRingSizeForIdx, getSSSR, getSSSRBonds, getSSSRBondsAsBitSet, getSSSRBondSet, getSSSRBondSetInLong, getSSSRIdxesForAtoms, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getStereo2, getSubGraphs, getTotalCharge, getValenceCheckOptions, getValenceCheckState, getValenceProperty, hasExplicitLonePairs, hasExtraLabelSet, hasImplicitH, hasSelfReferringProperty, hasValenceError, hydrogenize, implicitizeHydrogens, implicitizeHydrogens, implicitizeHydrogens, incGrinvCC, incGrinvCC, incGrinvCCOnly, insertAtom, insertBond, insertBondInOrder, insertNullAtoms, insertNullBonds, isAbsStereo, isAcceptedSpecialLigand, isAtomInRing, isBondParallelWith, isGrinvCCValid, isLargeMolecule, isMolecule, isMultiChiral, isolate, isolate, isOnlyFirstAtomInStereoCalculation, isRing, isRingBond, isSelfReference, isSimilarTo, isSymmetric, isValenceCheckEnabled, isValidLinkNode, mergeFrags, moveTo, pack, partialClean, partialClean, partialClean, properties, qpropCheck, regenCtabs, regenGearch, removeAtom, removeAtom, removeBond, removeBond, removeExplicitLonePairs, removeIsolatedAtoms, removeIsolatedBonds, resetCtab, resetGrinvInParents, restoreCache, saveCache, setAtomSetSeqs, setBondSetSeqs, setChirality, setChirality, setFlags, setFlags, setGrinvCC, setGrinvOptions, setLinkNodeDefaultOuters, setLocalParity, setLocalParity, setParity, setParity, setParity, setValenceCheckEnabled, setValenceCheckOptions, setValenceCheckState, smol, sumConservedQuantities, transform, updateDim, useOnlyFirstAtomInStereoCalculation, valenceCheck, valenceCheckpublic static final int TYPE_COUNT
public static final int REACTANTS
getComponent(int, int),
Constant Field Valuespublic static final int PRODUCTS
getComponent(int, int),
Constant Field Valuespublic static final int AGENTS
getComponent(int, int),
Constant Field Valuespublic static final int RGROUPED
public static final int TYPE_MASK
REACTANTS,
PRODUCTS,
AGENTS,
Constant Field Valuespublic static final int REGULAR_SINGLE
public static final int TWO_HEADED_SINGLE
public static final int REGULAR_DOUBLE
public static final int TWO_HEADED_DOUBLE
public static final int RESONANCE
public static final int RETROSYNTHETIC
public static final int EQUILIBRIUM
public boolean isEmpty()
@Deprecated public boolean isAtom()
isAtom in class MoleculeGraph@Deprecated public boolean isBond()
isBond in class MoleculeGraphpublic boolean isReaction()
isReaction in class Moleculepublic boolean canBeReactionComponent()
false, RxnMolecules cannot be
embedded in each other.canBeReactionComponent in class Moleculetrue if it can be a reactant, product or agent,
false if adding it to an RxnMolecule is not
supportedpublic String getFormula()
getFormula in class MoleculeGraphpublic double getMass()
getMass in class MoleculeGraphpublic static RxnMolecule getReaction(MoleculeGraph g)
g - the molecule graphpublic int getReactantCount()
public int getProductCount()
public int getAgentCount()
public int getComponentCount(int type)
public Molecule getReactant(int i)
i - reactant indexpublic Molecule[] getReactants()
public Molecule getProduct(int i)
i - product indexpublic Molecule[] getProducts()
public Molecule getAgent(int i)
i - agent indexpublic Molecule[] getAgents()
public long getComponentID(Molecule m)
m - the reaction componentpublic long getComponentID(MolAtom a)
a - the atompublic long getComponentID(MolBond b)
b - the bondpublic int getComponentType(long id)
id - the reaction component ID or -1public int getComponentFlags(long id)
id - the reaction component ID or -1public int getComponentIndex(long id)
id - the reaction component ID or -1public Molecule getComponent(long id)
Warning! The RGROUPED flag returns an RgMolecule
object having the same atom objects as the original
reactant/product/agent. The parent of the atom objects is unchanged (it
is the original reactant/product/agent).
id - the reaction component IDgetComponent(int, int)public Molecule getComponent(int typeFlag, int i)
Warning! The RGROUPED flag returns an RgMolecule
object having the same atom objects as the original reactant/product/agent.
The parent of the atom objects is unchanged (it is the original reactant/product/agent).
public boolean isMergedComponent(MoleculeGraph m)
m - the molecule to checkpublic DPoint3 getCenter(int type, int i)
public void revalidateCoordDependentProps()
revalidateCoordDependentProps in class MoleculeGraphpublic void setReactionArrow0()
public int getReactionArrowType()
REGULAR_SINGLE,
RESONANCE,
RETROSYNTHETIC,
EQUILIBRIUM,
REGULAR_DOUBLE,
TWO_HEADED_SINGLE,
TWO_HEADED_DOUBLEpublic String getReactionArrowTypeName()
public void setReactionArrowType(int type)
type - the reaction arrow typepublic void setReactionArrowType(String name)
name - the reaction arrow type nameIllegalArgumentException - for invalid type namepublic DPoint3[] getReactionArrow()
public chemaxon.struc.graphics.MRArrow getReactionArrow(boolean generate)
generate - if true then arrow is generated in case when the arrow is not yet set.generate parameter was false.public void setReactionArrow(DPoint3[] arw)
arw - endpoint coordinates of the reaction arrowpublic void setReactionArrow()
public void setReactionArrow(chemaxon.struc.graphics.MRArrow arrow)
arrow - public void removeReactionArrow()
public void setMSLogic(Map<chemaxon.struc.graphics.MRArrow,RxnMolecule> ms)
ms - the hash that stores the mapping.public Map<chemaxon.struc.graphics.MRArrow,RxnMolecule> getMSLogic()
public void recalcReactionArrow()
public void rebuildStructures()
public void rebuildStructures(DPoint3[] arw, int art)
arw - is the new reaction arrowart - is the new reaction arrow typepublic static double determineArrowDistance(double x,
double y,
double z,
DPoint3[] ar)
x - is the x coordinate of the pointy - is the y coordinate of the pointz - is the z coordinate of the pointar - is the reaction arrowpublic static int determineType(double x,
double y,
double z,
DPoint3[] ar)
public int determineType(double x,
double y,
double z)
public int getType(MoleculeGraph selection)
public void addSgroup(Sgroup sg, boolean setparent)
public void addComponent(Molecule m, int type) throws IllegalArgumentException
m - the reactant, product or agenttype - REACTANTS, PRODUCTS or AGENTSIllegalArgumentException - if m is of a subclass of
Molecule for which the embedding in an RxnMolecule is not
supportedpublic void addComponent(Molecule m, int type, boolean beNew) throws IllegalArgumentException
m - the reactant, product or agenttype - REACTANTS, PRODUCTS or AGENTSbeNew - m should be a new structure if trueIllegalArgumentException - if m is of a subclass of
Molecule for which the embedding in an RxnMolecule is not
supportedpublic Molecule removeComponent(int flags, int i)
Warning! The RGROUPED flag returns an RgMolecule
object having the same atom objects as the original reactant/product/agent.
The parent of the atom objects is unchanged (it is the original reactant/product/agent).
public void mergeComponentParts(MoleculeGraph m, int type, boolean isMergeStored) throws IllegalArgumentException
m - molecule graph that contains atoms of the fragments to mergetype - type of component parts to merge (only parts of components of the same type can be merged)isMergeStored - if true then merged component remains merged until not splitted intentionnalyIllegalArgumentExceptionsplitComponentParts(chemaxon.struc.MoleculeGraph, int)public void splitComponentParts(MoleculeGraph m, int type) throws IllegalArgumentException
m - molecule graph that contains atoms of the fragments to splittype - type of component parts to merge (only parts of components of the same type can be merged)IllegalArgumentExceptionpublic void clearForImport(String fmt)
clearForImport in class Moleculefmt - 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 setDim(int d)
setDim in class Moleculed - 0, 2 or 3MoleculeGraph.getFlags()public void setAbsStereo(boolean c)
setAbsStereo in class MoleculeGraphc - the absolute stereoconfiguration flagMoleculeGraph.setFlags(int)public int getAtomCount()
getAtomCount in interface chemaxon.core.structure.StructureForBuildergetAtomCount in interface IncompleculegetAtomCount in class MoleculeGraphpublic int getAtomCount(int atomicNumber)
getAtomCount in class MoleculeGraphatomicNumber - atomic number of atoms looked forpublic MolAtom getAtom(int i)
getAtom in class MoleculeGraphi - 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 MoleculeGraphiu - node index in the graph unionnode - new node referencepublic int[][] getCtab()
getCtab in class MoleculeGraphpublic chemaxon.core.util.BondTable getBondTable()
getBondTable in class MoleculeGraphpublic int[][] createCHtab()
createCHtab in class MoleculeGraphpublic int[][] createBHtab()
createBHtab in class MoleculeGraphpublic boolean contains(MolAtom node)
public boolean contains(MolBond edge)
contains in class MoleculeGraphedge - the edge objectObject.equals(Object)public boolean hasAtomSet()
hasAtomSet in class Moleculetrue if there are atom sets,
false otherwisepublic boolean hasBondSet()
hasBondSet in class MoleculeGraphtrue if there are atom sets,
false otherwisepublic int indexOf(MolAtom node)
indexOf in class MoleculeGraphnode - the nodepublic int indexOf(MolBond edge)
indexOf in class MoleculeGraphedge - the edgeObject.equals(Object)public void add(MolAtom a)
add in class MoleculeGrapha - the new atomprotected void addAtomToFragment(MolAtom a)
addAtomToFragment in class Moleculea - the atom referencepublic int getBondCount()
getBondCount in interface IncompleculegetBondCount in class MoleculeGraphpublic MolBond getBond(int i)
getBond in class MoleculeGraphi - edge index in the graph union@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 MoleculeGraphiu - edge index in the graph unionedge - new node reference@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 MoleculeGrapholde - the old edgenewe - the new edgepublic void add(MolBond e)
public Molecule simplifyIncompleteReactionToMolecule()
this is returned.thisMolecule.getSimplifiedMolecule()public void removeAtom(MolAtom node, int cleanupFlags)
MoleculeGraph.removeAtom(MolAtom)
instead unless you are sure what you are doing.removeAtom in class Moleculenode - the atomcleanupFlags - extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE,
MoleculeGraph.RMCLEANUP_ALL,
MoleculeGraph.RMCLEANUP_EDGES,
MoleculeGraph.RMCLEANUP_STEREO,
Molecule.RMCLEANUP_SGROUPATOMS,
Molecule.RMCLEANUP_FROMSGROUPSpublic void removeAtom(int iu,
int cleanupFlags)
MoleculeGraph.removeAtom(MolAtom)
instead unless you are sure what you are doing.removeAtom in class Moleculeiu - atom index in the graph unioncleanupFlags - extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE,
MoleculeGraph.RMCLEANUP_ALL,
MoleculeGraph.RMCLEANUP_EDGES,
MoleculeGraph.RMCLEANUP_STEREO,
Molecule.RMCLEANUP_SGROUPATOMS,
Molecule.RMCLEANUP_FROMSGROUPSprotected void removeBond(MolBond edge, int cleanupFlags)
removeBond in class Moleculeedge - the edgecleanupFlags - extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE,
MoleculeGraph.RMCLEANUP_ALL,
MoleculeGraph.RMCLEANUP_EDGES,
MoleculeGraph.RMCLEANUP_STEREO,
Molecule.RMCLEANUP_SGROUPATOMS,
Molecule.RMCLEANUP_FROMSGROUPSprotected void removeBond(int iu,
int cleanupFlags)
removeBond in class Moleculeiu - edge index in the graph unioncleanupFlags - extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE,
MoleculeGraph.RMCLEANUP_ALL,
MoleculeGraph.RMCLEANUP_EDGES,
MoleculeGraph.RMCLEANUP_STEREO,
Molecule.RMCLEANUP_SGROUPATOMS,
Molecule.RMCLEANUP_FROMSGROUPSpublic void removeAllBonds()
removeAllBonds in class Moleculepublic void removeAll()
protected boolean isRealAtomParent()
isRealAtomParent in class MoleculeGraphpublic void regenBonds()
regenBonds in class MoleculeGraphpublic void sortBondsAccordingTo(MolBond[] order)
sortBondsAccordingTo in class MoleculeGraphorder - the arraypublic void setLocation(DPoint3 p)
setLocation in class MoleculeGraphp - the originMoleculeGraph.orix@Deprecated public void mergeAtoms(MolAtom that, MolAtom node)
MergeUtil.mergeAtoms(MolAtom, MolAtom, boolean) instead.mergeAtoms in class Moleculethat - the atomnode - the other atompublic void fuse(MoleculeGraph graph, boolean check)
fuse in class MoleculeGraphgraph - 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 skippedprotected void fuse0(MoleculeGraph graph, boolean check)
fuse0 in class MoleculeGraphgraph - the structure to fuse into this onecheck - 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 skippedpublic void fuse(RxnMolecule rxnMol)
rxnMol - public void setSgroupParent(MolAtom a, Sgroup sg, boolean set)
setSgroupParent in class Moleculea - the atomsg - the S-groupset - set (true) or unset (false)IllegalArgumentException - neither reactants, nor products or
agents contain the atompublic void clonecopy(MoleculeGraph g)
public void clonecopy(int[] iatoms,
MoleculeGraph g)
public List<Molecule> getAllFragments()
Molecule@Deprecated public void clonelesscopy(MoleculeGraph g)
clonelesscopy in class Moleculeg - the target structurepublic RxnMolecule clone()
public RxnMolecule cloneMoleculeWithDocument()
MoleculecloneMoleculeWithDocument in class Moleculepublic MoleculeGraph newInstance()
newInstance in class Moleculeprotected void makeItSimilar(MoleculeGraph g)
makeItSimilar in class Moleculeg - the molecule to changepublic void splitAllDisconnectedComponents()
splitDisconnectedComponent(int, int)public void splitDisconnectedComponent(long id)
id - the reaction component IDsplitDisconnectedComponent(int, int)public void splitDisconnectedComponent(int type,
int index)
public void transform(CTransform3D t, boolean incg)
protected void transformReactionArrow(CTransform3D t)
t - the transformation matrixpublic static RxnMolecule createReaction(Molecule mol, DPoint3[] arw, int art)
mol - contains the atoms of reactants and productsarw - two-element array containing the endpoints of the reaction arrowart - the arrow typepublic static RxnMolecule createReaction(MoleculeGraph mol, DPoint3[] arw)
mol - contains the atoms of reactants and productsarw - two-element array containing the endpoints of the reaction arrowpublic MoleculeGraph getGraphUnion()
getGraphUnion in class MoleculeGraphMolecule.getGraphUnionAsSelection()protected final int getSubGraphCount()
getSubGraphCount in class MoleculeGraphMoleculeGraph.getSubGraphs(MoleculeGraph[], int)protected final void getSubGraphs(MoleculeGraph[] arr, int off)
getSubGraphs in class MoleculeGrapharr - the output arrayoff - offsetMoleculeGraph.getSubGraphs(),
MoleculeGraph.getSubGraphCount()protected void fillSelectionMolecule(SelectionMolecule s)
fillSelectionMolecule in class Molecules - the selection moleculepublic String toString()
toString in class MoleculeGraphpublic boolean isIncompleteReaction()
public chemaxon.struc.graphics.MRArrow getItsArrow()
public MPropertyContainer getArrowAsProperty()
public void setReactionArrowEndPoints(DPoint3[] points)
points - the endpoint coordinates of the arrowpublic void removeEmptyComponents()
protected void checkSgroupConsistency()
checkSgroupConsistency in class MoleculeRuntimeException - if inconsistency foundprotected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
createGearch in class Moleculepublic void addReactionStep(List<Molecule> reactants, List<Molecule> products, List<Molecule> agents, chemaxon.struc.graphics.MRArrow arrow, int arrowType)
public boolean isSingleStepReaction()
public void updateComponentRoles()
public ArrayList<RxnMolecule> getReactionSteps()
public List<chemaxon.struc.graphics.MRArrow> getReactionArrowList()
MRArrowpublic Molecule simplifyToMolecule()
public void clearObjects()
clearObjects in interface chemaxon.struc.MObjectContainerclearObjects in class Moleculepublic void removeObject(MObject o)
removeObject in interface chemaxon.struc.MObjectContainerremoveObject in class Moleculeo - the graphical objectpublic int getObjectCount()
getObjectCount in interface chemaxon.struc.MObjectContainergetObjectCount in class Moleculepublic void selectAllObjects(boolean s)
selectAllObjects in interface chemaxon.struc.MObjectContainerselectAllObjects in class Moleculepublic List<MObject> getAllObjects()
getAllObjects in interface chemaxon.struc.MObjectContainergetAllObjects in class Moleculepublic int getParity(int i)
getParity in class MoleculeGraphi - 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 MoleculeGraphi - 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 MoleculeGraphMoleculeGraph.stereoClean()public boolean isQuery()
isQuery in class MoleculeGraphtrue if any of the components has query featuresMolAtom.isQuery(),
MolBond.isQuery()public IteratorFactory.AtomIterator getAtomIterator()
getAtomIterator in class MoleculeGraphpublic IteratorFactory.BondIterator getBondIterator()
getBondIterator in class MoleculeGraphprotected void setSupergraph(MoleculeGraph molecule)
setSupergraph in class MoleculeGraphmolecule - the molecule