|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object chemaxon.struc.CGraph chemaxon.struc.MoleculeGraph chemaxon.struc.Molecule chemaxon.struc.RxnMolecule
Reaction.
Field Summary | |
static int |
AGENTS
"Agent" structure type. |
static int |
PRODUCTS
"Product" structure type. |
static int |
REACTANTS
"Reactant" structure type. |
static int |
RGROUPED
Add R-groups to component structure. |
static int |
TYPE_MASK
Structure type mask. |
Fields inherited from class chemaxon.struc.MoleculeGraph |
DIM_MASK, flags, isMultiChiral, orix, oriy, oriz, RMCLEANUP_STEREO |
Fields inherited from class chemaxon.struc.CGraph |
btab, ctab, edgeCount, edges, fragIds, grinv, grinvCC, INITIAL_CAPACITY, nFrags, nGrinv, nodeCount, nodes, parentGraph, RMCLEANUP_ALL, RMCLEANUP_EDGES, RMCLEANUP_NONE, sssr, superGraph |
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 |
addStructure(Molecule m,
int type)
Adds a reactant, product or agent. |
void |
addStructure(Molecule m,
int type,
boolean beNew)
Adds a reactant, product or agent. |
void |
clearForImport(java.lang.String format)
Clear the edges vector and the properties. |
java.lang.Object |
clone()
Make an identical copy of the molecule. |
void |
clonecopy(CGraph g)
Make another molecule identical to this one. |
void |
clonelesscopy(CGraph g)
Copy to selection. |
boolean |
contains(java.lang.Object o)
Checks if a reactant, agent or product structure contains the specified node or 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. |
static RxnMolecule |
createReaction(Molecule 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. |
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)
Add the atoms and bonds of another molecule. |
protected void |
fuse0(CGraph graph)
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. |
int[][] |
getBtab()
Gets the bond table for the graph union. |
DPoint3 |
getCenter(int type,
int i)
Gets the geometrical center of a reaction component. |
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.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. |
double |
getMass()
Calculates the molecular weight of the molecule. |
CNode |
getNode(int i)
Gets a node. |
int |
getNodeCount()
Returns the number of nodes in the graph union. |
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. |
Molecule |
getStructure(int flags,
int i)
Gets a reactant, product or agent. |
int |
getStructureCount(int type)
Gets the number of reactants, products or agents. |
void |
implicitizeHydrogens(int f)
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. |
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 |
isReaction()
Checks if the structure represents a reaction or not. |
protected boolean |
isRealNodeParent()
Reaction molecules cannot be real node parents. |
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. |
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)
Sets the reaction arrow. |
void |
recalcReactionArrow()
Recalculates the reaction arrow, 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. |
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. |
protected void |
removeNode(CNode node,
int cleanupFlags)
Removes an atom from the reactants, products or agents. |
protected void |
removeNode(int iu,
int cleanupFlags)
Removes an atom from the reactants, products or agents. |
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 |
setNode(int iu,
CNode node)
Sets the node at the specified index. |
void |
setReactionArrow()
Sets the stored reaction arrow. |
void |
setReactionArrow(DPoint3[] arw)
Sets the reaction arrow. |
void |
setReactionArrow0()
Sets the stored reaction arrow 'arrowPoints' to its calculated value. |
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 |
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. |
Methods inherited from class chemaxon.struc.CGraph |
addEdge0, addEdgeWithoutChangingIt, addNodeWithoutChangingIt, findFrag, findFrags, getEdgeVector, getForefather, getFragCount, getFragIds, getGrinvCC, getLock, getNodeVector, getParent, getSSSR, pack, removeEdge, removeEdge, removeNode, removeNode, resetCtab, resetGrinvInParents, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int REACTANTS
getStructure(int, int)
,
Constant Field Valuespublic static final int PRODUCTS
getStructure(int, int)
,
Constant Field Valuespublic static final int AGENTS
getStructure(int, int)
,
Constant Field Valuespublic static final int RGROUPED
public static final int TYPE_MASK
REACTANTS
,
PRODUCTS
,
AGENTS
,
Constant Field ValuesConstructor Detail |
public RxnMolecule()
Method Detail |
public boolean isEmpty()
isEmpty
in class CGraph
public boolean isAtom()
isAtom
in class MoleculeGraph
public boolean isBond()
isBond
in class MoleculeGraph
public boolean isReaction()
isReaction
in class Molecule
public java.lang.String getFormula()
getFormula
in class MoleculeGraph
public double getMass()
getMass
in class MoleculeGraph
public static RxnMolecule getReaction(CGraph g)
g
- the molecule graph
public int getReactantCount()
public int getProductCount()
public int getAgentCount()
public int getStructureCount(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 Molecule getStructure(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 RGROUPED
i
- reactant, product or agent index
public DPoint3 getCenter(int type, int i)
type
- REACTANTS
, PRODUCTS
or AGENTS
i
- reactant, product or agent index
public void setReactionArrow0()
public DPoint3[] getReactionArrow()
public void setReactionArrow(DPoint3[] arw)
arw
- is the new reaction arrowpublic void setReactionArrow()
public void recalcReactionArrow()
public void rebuildStructures()
public void rebuildStructures(DPoint3[] arw)
arw
- is the new reaction arrowpublic 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 arrow
public int determineType(double x, double y, double z)
x
- point x coordinatey
- point y coordinatez
- point z coordinate
REACTANTS
, PRODUCTS
or AGENTS
public void addStructure(Molecule m, int type)
m
- the reactant, product or agenttype
- REACTANTS
, PRODUCTS
or AGENTS
public void addStructure(Molecule m, int type, boolean beNew)
m
- the reactant, product or agenttype
- REACTANTS
, PRODUCTS
or AGENTS
beNew
- m should be a new structure if truepublic void clearForImport(java.lang.String format)
clearForImport
in class Molecule
format
- input file formatpublic void setDim(int d)
setDim
in class Molecule
d
- 0, 2 or 3MoleculeGraph.flags
public void setAbsStereo(boolean c)
setAbsStereo
in class MoleculeGraph
c
- the absolute stereoconfiguration flagMoleculeGraph.flags
public int getNodeCount()
getNodeCount
in class CGraph
public CNode getNode(int i)
getNode
in class CGraph
i
- node index
public void setNode(int iu, CNode node)
setNode
in class CGraph
iu
- node index in the graph unionnode
- new node referencepublic int[][] getCtab()
getCtab
in class CGraph
public int[][] getBtab()
getBtab
in class CGraph
public int[][] createCHtab()
createCHtab
in class MoleculeGraph
public int[][] createBHtab()
createBHtab
in class MoleculeGraph
public int getGrinv(int[] gi)
getGrinv
in class MoleculeGraph
gi
- output array
java.lang.SecurityException
- the GraphInvariants module cannot be
loaded because of security reasons (firewall)protected int[] getGrinv()
getGrinv
in class CGraph
public boolean contains(java.lang.Object o)
contains
in class CGraph
o
- the node or edge object
public int indexOf(CNode node)
indexOf
in class CGraph
node
- the node
public int indexOf(CEdge edge)
indexOf
in class CGraph
edge
- the edge
public void add(CNode node)
add
in class CGraph
node
- the new nodepublic int getEdgeCount()
getEdgeCount
in class CGraph
public CEdge getEdge(int i)
getEdge
in class CGraph
i
- edge index in the graph union
public void setEdge(int iu, CEdge edge)
setEdge
in class CGraph
iu
- edge index in the graph unionedge
- new node referencepublic void add(CEdge e)
add
in class CGraph
e
- the new edgeprotected void removeNode(CNode node, int cleanupFlags)
removeNode
in class Molecule
node
- the atomcleanupFlags
- extra clean-up methodsCGraph.RMCLEANUP_NONE
,
CGraph.RMCLEANUP_ALL
,
CGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
protected void removeNode(int iu, int cleanupFlags)
removeNode
in class Molecule
iu
- atom index in the graph unioncleanupFlags
- extra clean-up methodsCGraph.RMCLEANUP_NONE
,
CGraph.RMCLEANUP_ALL
,
CGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
protected void removeEdge(CEdge edge, int cleanupFlags)
removeEdge
in class Molecule
edge
- the edgecleanupFlags
- extra clean-up methodsCGraph.RMCLEANUP_NONE
,
CGraph.RMCLEANUP_ALL
,
CGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
protected void removeEdge(int iu, int cleanupFlags)
removeEdge
in class Molecule
iu
- edge index in the graph unioncleanupFlags
- extra clean-up methodsCGraph.RMCLEANUP_NONE
,
CGraph.RMCLEANUP_ALL
,
CGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
public void removeAllEdges()
removeAllEdges
in class Molecule
public void removeAll()
removeAll
in class Molecule
protected boolean isRealNodeParent()
isRealNodeParent
in class CGraph
public void regenEdges()
regenEdges
in class CGraph
public void setLocation(DPoint3 p)
setLocation
in class MoleculeGraph
p
- the originMoleculeGraph.orix
public void mergeNodes(CNode that, CNode node)
mergeNodes
in class Molecule
that
- the atomnode
- the other atompublic void fuse(CGraph graph)
fuse
in class CGraph
graph
- the other moleculeprotected void fuse0(CGraph graph)
fuse0
in class CGraph
graph
- the structure to fuse into this onepublic void setSgroupParent(MolAtom a, Sgroup sg, boolean set)
setSgroupParent
in class Molecule
a
- the atomsg
- the S-groupset
- set (true) or unset (false)
java.lang.IllegalArgumentException
- neither reactants, nor products or
agents contain the atompublic void clonecopy(CGraph g)
clonecopy
in class Molecule
g
- the target structurepublic void clonelesscopy(CGraph g)
clonelesscopy
in class Molecule
g
- the target structurepublic java.lang.Object clone()
clone
in class Molecule
public CGraph newInstance()
newInstance
in class Molecule
protected void transform(CTransform3D t, boolean incg)
transform
in class MoleculeGraph
t
- the transformation matrixincg
- increase grinvCC or notprotected void transformReactionArrow(CTransform3D t)
t
- the transformation matrixpublic static RxnMolecule createReaction(Molecule mol, DPoint3[] arw)
mol
- contains the atoms of reactants and productsarw
- two-element array containing the endpoints of the reaction
arrow
public MoleculeGraph getGraphUnion()
getGraphUnion
in class MoleculeGraph
Molecule.getGraphUnionAsSelection()
protected void fillSelectionMolecule(SelectionMolecule s)
fillSelectionMolecule
in class Molecule
s
- the selection moleculepublic void implicitizeHydrogens(int f)
MolAtom.isImplicitizableH(int)
returns true.
implicitizeHydrogens
in class MoleculeGraph
f
- flags specifying special H atom types to includeMolAtom.LONELY_H
,
MolAtom.ISOTOPE_H
,
MolAtom.CHARGED_H
,
MolAtom.RADICAL_H
,
MolAtom.MAPPED_H
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |