public class RxnMolecule extends Molecule implements chemaxon.struc.MObjectContainer, chemaxon.core.structure.ReactionForBuilder
hasSelfReferringProperty
MoleculeGraph.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_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 |
---|
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, 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, 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, valenceCheck
public 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 MoleculeGraph
public boolean isReaction()
isReaction
in class Molecule
public boolean canBeReactionComponent()
false
, RxnMolecules cannot be
embedded in each other.canBeReactionComponent
in class Molecule
true
if it can be a reactant, product or agent,
false
if adding it to an RxnMolecule
is not
supportedpublic String getFormula()
getFormula
in class MoleculeGraph
public double getMass()
getMass
in class MoleculeGraph
public 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 MoleculeGraph
public void setReactionArrow0()
public int getReactionArrowType()
REGULAR_SINGLE
,
RESONANCE
,
RETROSYNTHETIC
,
EQUILIBRIUM
,
REGULAR_DOUBLE
,
TWO_HEADED_SINGLE
,
TWO_HEADED_DOUBLE
public 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 AGENTS
IllegalArgumentException
- 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 AGENTS
beNew
- 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 intentionnalyIllegalArgumentException
splitComponentParts(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)IllegalArgumentException
public 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 setDim(int d)
setDim
in class Molecule
d
- 0, 2 or 3MoleculeGraph.getFlags()
public 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
- node index in the graph unionnode
- new node referencepublic int[][] getCtab()
getCtab
in class MoleculeGraph
public chemaxon.core.util.BondTable getBondTable()
getBondTable
in class MoleculeGraph
public int[][] createCHtab()
createCHtab
in class MoleculeGraph
public int[][] createBHtab()
createBHtab
in class MoleculeGraph
public boolean contains(MolAtom node)
public boolean contains(MolBond edge)
contains
in class MoleculeGraph
edge
- the edge objectObject.equals(Object)
public 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
otherwisepublic 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 void add(MolAtom a)
add
in class MoleculeGraph
a
- the new atomprotected void addAtomToFragment(MolAtom a)
addAtomToFragment
in class Molecule
a
- the atom referencepublic int getBondCount()
getBondCount
in interface Incomplecule
getBondCount
in class MoleculeGraph
public MolBond getBond(int i)
getBond
in class MoleculeGraph
i
- 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 MoleculeGraph
iu
- 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 MoleculeGraph
olde
- the old edgenewe
- the new edgepublic void add(MolBond e)
public Molecule simplifyIncompleteReactionToMolecule()
this
is returned.this
Molecule.getSimplifiedMolecule()
public 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 iu, int cleanupFlags)
MoleculeGraph.removeAtom(MolAtom)
instead unless you are sure what you are doing.removeAtom
in class Molecule
iu
- 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_FROMSGROUPS
protected void removeBond(MolBond edge, int cleanupFlags)
removeBond
in class Molecule
edge
- the edgecleanupFlags
- 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 iu, int cleanupFlags)
removeBond
in class Molecule
iu
- 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_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 originMoleculeGraph.orix
@Deprecated public void mergeAtoms(MolAtom that, MolAtom node)
MergeUtil.mergeAtoms(MolAtom, MolAtom, boolean)
instead.mergeAtoms
in class Molecule
that
- the atomnode
- the other atompublic void fuse(MoleculeGraph graph, boolean check)
fuse
in class MoleculeGraph
graph
- 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 MoleculeGraph
graph
- 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 Molecule
a
- 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 Molecule
g
- the target structurepublic RxnMolecule clone()
public RxnMolecule cloneMoleculeWithDocument()
Molecule
cloneMoleculeWithDocument
in class Molecule
public MoleculeGraph newInstance()
newInstance
in class Molecule
protected void makeItSimilar(MoleculeGraph g)
makeItSimilar
in class Molecule
g
- 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 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 String toString()
toString
in class MoleculeGraph
public 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 Molecule
RuntimeException
- if inconsistency foundprotected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
createGearch
in class Molecule
public 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()
MRArrow
public Molecule simplifyToMolecule()
public void clearObjects()
clearObjects
in interface chemaxon.struc.MObjectContainer
clearObjects
in class Molecule
public void removeObject(MObject o)
removeObject
in interface chemaxon.struc.MObjectContainer
removeObject
in class Molecule
o
- the graphical objectpublic int getObjectCount()
getObjectCount
in interface chemaxon.struc.MObjectContainer
getObjectCount
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 boolean isQuery()
isQuery
in class MoleculeGraph
true
if any of the components has query featuresMolAtom.isQuery()
,
MolBond.isQuery()
public IteratorFactory.AtomIterator getAtomIterator()
getAtomIterator
in class MoleculeGraph
public IteratorFactory.BondIterator getBondIterator()
getBondIterator
in class MoleculeGraph
protected void setSupergraph(MoleculeGraph molecule)
setSupergraph
in class MoleculeGraph
molecule
- the molecule