|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.struc.MoleculeGraph
chemaxon.struc.Molecule
chemaxon.struc.RxnMolecule
public class RxnMolecule
Reaction.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class chemaxon.struc.MoleculeGraph |
---|
MoleculeGraph.ValenceCheckState |
Field Summary | |
---|---|
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. |
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 interface chemaxon.struc.StereoConstants |
---|
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 Summary | |
---|---|
RxnMolecule()
Create a reaction. |
Method Summary | |
---|---|
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(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(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)
Copy to selection. |
Molecule |
cloneMolecule()
Make an identical copy of the molecule. |
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. |
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. |
java.util.List<Molecule> |
getAllFragments()
Gets the list of reaction fragments (product, reactant, agent components) that build up this reaction. |
java.util.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. |
MolBond |
getBond(int i)
Gets an edge. |
int |
getBondCount()
Gets the number of edges in the graph union. |
chemaxon.core.util.BondTable |
getBondTable()
Gets the bond table for the graph union. |
int[][] |
getBtab()
Deprecated. as of Marvin 5.4, please use getBondTable() instead |
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. |
java.lang.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. |
java.util.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. |
java.util.List<chemaxon.struc.graphics.MRArrow> |
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<RxnMolecule> |
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". |
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()
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 |
isMergedComponent(MoleculeGraph m)
Check whether given molecule is reaction component with a set of intentionally merged fragments or not. |
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)
Merges bonds of an atom with another atom, then add the atom to the molecule. |
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. |
Molecule |
removeStructure(int flags,
int i)
Deprecated. as of Marvin 4.1, replaced by removeComponent(int, int) |
void |
replaceBond(MolBond olde,
MolBond newe)
Replaces an edge by another one. |
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)
Sets the node at the specified index. |
void |
setBond(int iu,
MolBond edge)
Sets the edge at the specified index. |
void |
setDim(int d)
Sets the dimension for all the structures. |
void |
setLocation(DPoint3 p)
Set the origin of the molecule. |
void |
setMSLogic(java.util.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(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 |
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. |
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
public static final int RESONANCE
public static final int RETROSYNTHETIC
public static final int EQUILIBRIUM
Constructor Detail |
---|
public RxnMolecule()
Method Detail |
---|
public boolean isEmpty()
isEmpty
in class Molecule
public boolean isAtom()
isAtom
in class MoleculeGraph
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 java.lang.String getFormula()
getFormula
in class MoleculeGraph
public double getMass()
getMass
in class MoleculeGraph
public static RxnMolecule getReaction(MoleculeGraph 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[] getReactants()
public Molecule getProduct(int i)
i
- product index
public Molecule[] getProducts()
public Molecule getAgent(int i)
i
- agent index
public Molecule[] getAgents()
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 RGROUPED
i
- reactant, product or agent index
public boolean isMergedComponent(MoleculeGraph m)
m
- the molecule to check
public DPoint3 getCenter(int type, int i)
type
- REACTANTS
, PRODUCTS
or AGENTS
i
- reactant, product or agent index
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 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 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(java.util.Map<chemaxon.struc.graphics.MRArrow,RxnMolecule> ms)
ms
- the hash that stores the mapping.public java.util.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 arrow
public static int determineType(double x, double y, double z, DPoint3[] ar)
x
- point x coordinatey
- point y coordinatez
- point z coordinatear
- reaction arrow
REACTANTS
, PRODUCTS
or AGENTS
public int determineType(double x, double y, double z)
x
- point x coordinatey
- point y coordinatez
- point z coordinate
REACTANTS
, PRODUCTS
or AGENTS
public int getType(MoleculeGraph selection)
selection
- the molecule graph containing the selection
REACTANTS
, PRODUCTS
or AGENTS
or -1 if not of the same type or there is an atom which is not contained in any componentpublic void addComponent(Molecule m, int type) throws java.lang.IllegalArgumentException
m
- the reactant, product or agenttype
- REACTANTS
, PRODUCTS
or AGENTS
java.lang.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 java.lang.IllegalArgumentException
m
- the reactant, product or agenttype
- REACTANTS
, PRODUCTS
or AGENTS
beNew
- m should be a new structure if true
java.lang.IllegalArgumentException
- 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).
flags
- REACTANTS
, PRODUCTS
or AGENTS
,
can be combined with RGROUPED
i
- reactant, product or agent index
public void mergeComponentParts(MoleculeGraph m, int type, boolean isMergeStored) throws java.lang.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 intentionnaly
java.lang.IllegalArgumentException
splitComponentParts(chemaxon.struc.MoleculeGraph, int)
public void splitComponentParts(MoleculeGraph m, int type) throws java.lang.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)
java.lang.IllegalArgumentException
public void clearForImport(java.lang.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 Incomplecule
getAtomCount
in class MoleculeGraph
public int getAtomCount(int atomicNumber)
getAtomCount
in class MoleculeGraph
atomicNumber
- atomic number of atoms looked for
public MolAtom getAtom(int i)
getAtom
in class MoleculeGraph
i
- node index
public void setAtom(int iu, MolAtom node)
setAtom
in class MoleculeGraph
iu
- node index in the graph unionnode
- new node referencepublic int[][] getCtab()
getCtab
in class MoleculeGraph
public int[][] getBtab()
getBondTable()
instead
getBtab
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)
contains
in class Molecule
node
- the node object
public boolean contains(MolBond edge)
contains
in class MoleculeGraph
edge
- the edge object
public boolean hasAtomSet()
hasAtomSet
in class MoleculeGraph
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 node
public int indexOf(MolBond edge)
indexOf
in class MoleculeGraph
edge
- the edge
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
public void setBond(int iu, MolBond edge)
setBond
in class MoleculeGraph
iu
- edge index in the graph unionedge
- new node referencepublic void replaceBond(MolBond olde, MolBond newe)
replaceBond
in class MoleculeGraph
olde
- the old edgenewe
- the new edgepublic void add(MolBond e)
add
in class MoleculeGraph
e
- the new edgepublic 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()
removeAll
in class Molecule
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
public void mergeAtoms(MolAtom that, MolAtom node)
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 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(MoleculeGraph g)
clonecopy
in class Molecule
g
- the target structurepublic void clonecopy(int[] iatoms, MoleculeGraph g)
clonecopy
in class Molecule
iatoms
- array of atom indices to copyg
- the target graphpublic java.util.List<Molecule> getAllFragments()
Molecule
public void clonelesscopy(MoleculeGraph g)
clonelesscopy
in class Molecule
g
- the target structurepublic Molecule cloneMolecule()
cloneMolecule
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)
type
- is the structure type:
REACTANTS
, PRODUCTS
or AGENTS
index
- is the structure indexpublic void transform(CTransform3D t, boolean incg)
transform
in class Molecule
t
- the transformation matrixincg
- increase grinvCC or notprotected 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 type
public static RxnMolecule createReaction(MoleculeGraph 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 final int getSubGraphCount()
getSubGraphCount
in class MoleculeGraph
MoleculeGraph.getSubGraphs(MoleculeGraph[], int)
protected final void getSubGraphs(MoleculeGraph[] arr, int off)
getSubGraphs
in class MoleculeGraph
arr
- the output arrayoff
- offsetMoleculeGraph.getSubGraphs()
,
MoleculeGraph.getSubGraphCount()
protected void fillSelectionMolecule(SelectionMolecule s)
fillSelectionMolecule
in class Molecule
s
- the selection moleculepublic int getStructureCount(int type)
getComponentCount(int)
type
- reaction component type
public Molecule getStructure(int flags, int i)
getComponent(int, int)
flags
- component type and other flagsi
- reactant, product or agent index
public void addStructure(Molecule m, int type)
addComponent(Molecule, int)
m
- the reactant, product or agenttype
- reaction component typepublic void addStructure(Molecule m, int type, boolean beNew)
addComponent(Molecule, int, boolean)
m
- the reactant, product or agenttype
- reaction component typebeNew
- m should be a new structure if truepublic Molecule removeStructure(int flags, int i)
removeComponent(int, int)
flags
- reaction component type and other flagsi
- reactant, product or agent index
public java.lang.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
java.lang.RuntimeException
- if inconsistency foundprotected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
createGearch
in class Molecule
public void addReactionStep(java.util.ArrayList reactants, java.util.ArrayList products, java.util.ArrayList agents, chemaxon.struc.graphics.MRArrow arrow, int arrowType)
public boolean isSingleStepReaction()
public void updateComponentRoles()
public java.util.ArrayList<RxnMolecule> getReactionSteps()
public java.util.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 java.util.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 determined
java.lang.SecurityException
- 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 determined
java.lang.SecurityException
- 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |