|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.struc.CGraph
chemaxon.struc.MoleculeGraph
chemaxon.struc.Molecule
chemaxon.struc.RxnMolecule
public class RxnMolecule
Reaction.
| Field Summary | |
|---|---|
static int |
AGENTS
"Agent" structure type. |
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 |
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. |
| Fields inherited from class chemaxon.struc.Molecule |
|---|
DEFAULT_UNGROUP, RECURSIVE_UNGROUP, RMCLEANUP_FROMSGROUPS, RMCLEANUP_SGROUPATOMS, RMSG_DEFAULT, RMSG_KEEP_CHILDREN, RMSG_KEEP_MULTICENTER, RMSG_KEEP_PARENT |
| Fields inherited from class chemaxon.struc.CGraph |
|---|
btab, CACHE_REMOVE_ALL, CACHE_REMOVE_CACHEMEMORY, cacheMemory, cssr, ctab, edgeCount, edges, fragIds, grinv, grinvCC, grinvOptions, INITIAL_CAPACITY, nFrags, nGrinv, nodeCount, nodes, parentGraph, RMCLEANUP_ALL, RMCLEANUP_EDGES, RMCLEANUP_FIXCOMPONENT, RMCLEANUP_NONE, sssr, sssr2idx, sssrl2idx, superGraph |
| Fields inherited from interface chemaxon.struc.ReadableMolecule |
|---|
HS_S, HS_SP, HS_SP2, HS_SP3, HS_UNKNOWN |
| Fields inherited from interface chemaxon.struc.StereoConstants |
|---|
ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_MASK, CHIRALITY_R, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, TRANS |
| Constructor Summary | |
|---|---|
RxnMolecule()
Create a reaction. |
|
| Method Summary | |
|---|---|
void |
add(CEdge e)
Adds a bond to a reactant, product, agent. |
void |
add(CNode node)
Adds an atom to a reactant, product or agent structure. |
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(java.util.ArrayList reactants,
java.util.ArrayList products,
java.util.ArrayList agents,
chemaxon.struc.graphics.MRArrow arrow,
int arrowType)
|
void |
addStructure(Molecule m,
int type)
Deprecated. as of Marvin 4.1, replaced by addComponent(Molecule, int) |
void |
addStructure(Molecule m,
int type,
boolean beNew)
Deprecated. as of Marvin 4.1, replaced by addComponent(Molecule, int, boolean) |
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(java.lang.String fmt)
Clear the edges vector and the properties. |
void |
clearObjects()
Deletes the graphical objects from this. |
void |
clonecopy(CGraph g)
Make another molecule identical to this one. |
void |
clonecopy(int[] iatoms,
MoleculeGraph g)
Copies the specified nodes and edges of this graph to another one. |
void |
clonelesscopy(CGraph g)
Copy to selection. |
Molecule |
cloneMolecule()
Make an identical copy of the molecule. |
boolean |
contains(CEdge edge)
Checks if a reactant, agent or product structure contains the specified edge. |
boolean |
contains(CNode node)
Checks if a reactant, agent or product structure contains the specified node. |
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. |
static RxnMolecule |
createReaction(Molecule mol,
DPoint3[] arw,
int art)
Creates a reaction. |
static RxnMolecule |
createReaction(MoleculeGraph mol,
DPoint3[] pos)
|
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(CGraph graph,
boolean check)
Add the atoms and bonds of another molecule. |
protected void |
fuse0(CGraph 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. |
java.util.ArrayList |
getAllFragments()
Gets the list of reaction fragments (product, reactant, agent components) that build up this reaction. |
MPropertyContainer |
getArrowAsProperty()
Gets the properties (type, endpoint coordinates) of the reaction arrow in this reaction. |
int[][] |
getBtab()
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 flags,
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. |
CEdge |
getEdge(int i)
Gets an edge. |
int |
getEdgeCount()
Gets the number of edges in the graph union. |
java.util.Vector |
getEdgeVector()
Gets the edges. |
java.lang.String |
getFormula()
Gets the molecular formula in Hill order. |
MoleculeGraph |
getGraphUnion()
Gets a graph containing all the atoms and bonds. |
protected int[] |
getGrinv()
Gets the graph invariants for the graph union. |
int |
getGrinv(int[] gi)
Gets the graph invariants for the graph union. |
MObject |
getItsArrow()
Gets the reaction arrow of this reaction. |
double |
getMass()
Calculates the molecular weight of the molecule. |
java.util.Hashtable |
getMSLogic()
Gets the hash that stores arrow - reaction mapping. |
CNode |
getNode(int i)
Gets a node. |
int |
getNodeCount()
Returns the number of nodes in the graph union. |
java.util.Vector |
getNodeVector()
Gets the nodes. |
MObject |
getObject(int index)
Returns the graphical object that belongs to a chemical structure. |
int |
getObjectCount()
Returns the count of the graphical objects that belong to a chemical structure. |
Molecule |
getProduct(int i)
Gets a product. |
int |
getProductCount()
Gets the number of products. |
Molecule |
getReactant(int i)
Gets a reactant. |
int |
getReactantCount()
Gets the number of reactants. |
static RxnMolecule |
getReaction(CGraph 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. |
MObject |
getReactionArrow(boolean generate)
Gets the reaction arrow of this reaction with the possibility to generate an arrow if the arrow is not yet set. |
java.util.ArrayList |
getReactionArrowList()
Gets the list of the reaction arrows of this reaction. |
int |
getReactionArrowType()
Gets the reaction arrow type. |
java.lang.String |
getReactionArrowTypeName()
Gets the reaction arrow type name. |
java.util.ArrayList |
getReactionSteps()
Divides this reaction into simple step reactions if this is a multistep reaction. |
Molecule |
getStructure(int flags,
int i)
Deprecated. as of Marvin 4.1, replaced by getComponent(int, int) |
int |
getStructureCount(int type)
Deprecated. as of Marvin 4.1, replaced by getComponentCount(int) |
protected int |
getSubGraphCount()
Gets the number of all "submolecules". |
protected void |
getSubGraphs(MoleculeGraph[] arr,
int off)
Gets all "submolecules". |
boolean |
hasAtomSet()
Tests whether the molecule graph has atom sets. |
boolean |
hasBondSet()
Tests whether the molecule graph has atom sets. |
void |
implicitizeHydrogens(int f,
MolAtom[] atoms)
Removes explicit bound Hydrogens from the graph and converts them to implicit. |
int |
indexOf(CEdge edge)
Gets the index of the specified edge in the graph union. |
int |
indexOf(CNode node)
Gets the index of the specified node in the graph union. |
int |
indexOf(MObject mo)
Searches for an object that belongs to a chemical structure. |
boolean |
isAtom()
A reaction molecule cannot represent an atom. |
boolean |
isBond()
A reaction molecule cannot represent a bond. |
boolean |
isEmpty()
Ask if the reaction is empty or not. |
boolean |
isIncompleteReaction()
Check whether the reaction is incomplete or not. |
boolean |
isReaction()
Checks if the structure represents a reaction or not. |
protected boolean |
isRealNodeParent()
Reaction molecules cannot be real node parents. |
boolean |
isSingleStepReaction()
Decides wheter this reaction is a singlestep or multistep reaction. |
protected void |
makeItSimilar(CGraph g)
Copies some properties of this molecule to the other one specified as argument. |
void |
mergeNodes(CNode that,
CNode node)
Merges bonds of an atom with another atom, then add the atom to the molecule. |
CGraph |
newInstance()
Creates a new RxnMolecule object. |
protected void |
postClean()
Operations performed after cleaning. |
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 |
regenEdges()
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 |
removeAllEdges()
Removes all bonds from the reactants, products and agents. |
Molecule |
removeComponent(int flags,
int i)
Removes a reactant, product or agent. |
protected void |
removeEdge(CEdge edge,
int cleanupFlags)
Removes a bond from the reactants, products or agents. |
protected void |
removeEdge(int iu,
int cleanupFlags)
Removes an edge from a reactant, agent or product. |
void |
removeEmptyComponents()
Checks all the componentes and removes those that are empty (node count is zero). |
void |
removeNode(CNode node,
int cleanupFlags)
Removes an atom from the reactants, products or agents. |
void |
removeNode(int iu,
int cleanupFlags)
Removes an atom from the reactants, products or agents. |
void |
removeObject(MObject o)
Removes a graphical object from this. |
void |
removeReactionArrow()
Removes the reaction arrow of this reacion. |
Molecule |
removeStructure(int flags,
int i)
Deprecated. as of Marvin 4.1, replaced by removeComponent(int, int) |
void |
replaceEdge(CEdge olde,
CEdge newe)
Replaces an edge by another one. |
void |
revalidateCoordDependentProps()
Revalidate coordinate dependent properties. |
void |
selectAllObjects(boolean s)
Selects or deselects all objects that belong to a chemical structure. |
void |
setAbsStereo(boolean c)
Sets the absolute stereoconfiguration flag for all the structures. |
void |
setDim(int d)
Sets the dimension for all the structures. |
void |
setEdge(int iu,
CEdge edge)
Sets the edge at the specified index. |
void |
setLocation(DPoint3 p)
Set the origin of the molecule. |
void |
setMSLogic(java.util.Hashtable ms)
Sets the hash that stores arrow - reaction mapping. |
void |
setNode(int iu,
CNode node)
Sets the node at the specified index. |
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(java.lang.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. |
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 |
sortEdgesAccordingTo(CEdge[] order)
Sort edges in the same order as they appear in the specified array. |
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. |
java.lang.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. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_COUNT
REACTANTS, PRODUCTS, AGENTS.
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
| Constructor Detail |
|---|
public RxnMolecule()
| Method Detail |
|---|
public boolean isEmpty()
isEmpty in class Moleculepublic boolean isAtom()
isAtom in class MoleculeGraphpublic 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 java.lang.String getFormula()
getFormula in class MoleculeGraphpublic double getMass()
getMass in class MoleculeGraphpublic static RxnMolecule getReaction(CGraph g)
g - the molecule graph
public int getReactantCount()
public int getProductCount()
public int getAgentCount()
public int getComponentCount(int type)
type - REACTANTS, PRODUCTS or AGENTS
public Molecule getReactant(int i)
i - reactant index
public Molecule getProduct(int i)
i - product index
public Molecule getAgent(int i)
i - agent index
public long getComponentID(Molecule m)
m - the reaction component
public long getComponentID(MolAtom a)
a - the atom
public long getComponentID(MolBond b)
b - the bond
public int getComponentType(long id)
id - the reaction component ID or -1
public int getComponentFlags(long id)
id - the reaction component ID or -1
public int getComponentIndex(long id)
id - the reaction component ID or -1
public 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 ID
getComponent(int, int)
public Molecule getComponent(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).
flags - REACTANTS, PRODUCTS or AGENTS,
can be combined with RGROUPEDi - reactant, product or agent index
public DPoint3 getCenter(int type,
int i)
type - REACTANTS, PRODUCTS or AGENTSi - reactant, product or agent index
public void revalidateCoordDependentProps()
revalidateCoordDependentProps in class MoleculeGraphpublic void setReactionArrow0()
public int getReactionArrowType()
REGULAR_SINGLE,
REGULAR_DOUBLE,
TWO_HEADED_SINGLE,
TWO_HEADED_DOUBLEpublic java.lang.String getReactionArrowTypeName()
public void setReactionArrowType(int type)
type - the reaction arrow typepublic void setReactionArrowType(java.lang.String name)
name - the reaction arrow type name
java.lang.IllegalArgumentException - for invalid type namepublic DPoint3[] getReactionArrow()
public MObject 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(java.util.Hashtable ms)
ms - the hash that stores the mapping.public java.util.Hashtable getMSLogic()