|
||||||||||
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.RgMolecule
A molecule or reaction containing R-groups.
Field Summary | |
static int |
RG_ID_MASK
R-group id mask in R-logic. |
static int |
RG_ID2_MASK
Mask of the other R-group's id in R-logic. |
static int |
RG_ID2_OFF
Offset of the other R-group's id in R-logic. |
static int |
RG_RESTH
The RestH flag in R-logic. |
Fields inherited from class chemaxon.struc.MoleculeGraph |
AROM_CHEMAXON, AROM_DAYLIGHT, DIM_MASK, flags, isMultiChiral, orix, oriy, oriz, RMCLEANUP_STEREO |
Fields inherited from class chemaxon.struc.CGraph |
btab, cacheMemory, 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 | |
RgMolecule()
Creates an RgMolecule. |
Method Summary | |
void |
add(CEdge edge)
Adds a bond to the root structure. |
void |
add(CNode node)
Adds an atom to the root structure. |
int |
addRgroup(int rl,
Molecule m)
Adds an R-group member. |
RgMolecule |
addRgroupsTo(Molecule m)
Creates a read only RgMolecule from a simple molecule object. |
java.lang.String |
checkRlogicRange(int index,
java.lang.String range)
Checks an R-logic occurence range string for syntax errors and returns a "normalized" string. |
void |
clearForImport(java.lang.String fmt)
Clear the edges vector and the properties. |
void |
clearProperties()
Clears RDfile/SDfile properties in the root structure. |
void |
clonecopy(CGraph g)
Make another molecule identical to this one. |
void |
clonelesscopy(CGraph g)
Copy to selection. |
Molecule |
cloneMolecule()
Make an identical copy of the molecule. |
boolean |
contains(java.lang.Object o)
Checks if the root structure or an R-group contains the specified node or edge. |
static Molecule |
createMol(java.lang.String fmt)
Deprecated. As of Marvin 3.4, MolImportIface.createMol() must be used. |
void |
endReuse(int n)
End reusing atoms. |
protected void |
fillSelectionMolecule(SelectionMolecule s)
Adds all atoms and bonds of the root structure and the R-groups to the specified molecule. |
int |
findRgroupIndex(int rgid)
Finds R-group R#. |
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. |
int[][] |
getBtab()
Gets the bond table of the root structre. |
int[][] |
getCtab()
Gets the connection table of the root structure. |
CEdge |
getEdge(int i)
Gets an edge of the root structure. |
int |
getEdgeCount()
Gets the number of 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 of the root structure. |
int |
getGrinv(int[] gi)
Gets the graph invariants of the root structure. |
double |
getMass()
Calculates the molecular weight of the molecule. |
java.lang.String |
getName()
Gets the name of the root molecule. |
CNode |
getNode(int i)
Gets a node of the root structure. |
int |
getNodeCount()
Gets the number of nodes in the root structure. |
java.lang.String |
getProperty(java.lang.String key)
Gets an RDfile/SDfile property in the root structure. |
int |
getPropertyCount()
Gets the total number of RDfile/SDfile properties. |
java.lang.String |
getPropertyKey(int n)
Gets an RDfile/SDfile property key. |
java.util.Enumeration |
getPropertyKeys()
Gets the keys for the RDfile/SDfile properties. |
java.lang.Object |
getPropertyObject(java.lang.String key)
Gets an RDfile/SDfile property in the root structure. |
int |
getRgroupCount()
Gets the number of R-groups. |
int |
getRgroupId(int i)
Gets the id of an R-group. |
Molecule |
getRgroupMember(int i,
int j)
Gets an R-group member. |
int |
getRgroupMemberCount(int i)
Gets the number of R-group members. |
int |
getRlogic(int i)
Gets R-logic flags. |
java.lang.String |
getRlogicRange(int i)
Gets R-logic occurence range. |
Molecule |
getRoot()
Gets the root structure. |
Molecule |
getSimplifiedMolecule()
Gets the simplified molecule object. |
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. |
int |
indexOf(CNode node)
Gets the index of the specified node. |
protected void |
insertNullEdges(int i,
int count)
Insert nulls into the bond array. |
protected void |
insertNullNodes(int i,
int count)
Insert nulls into the atom array. |
boolean |
isAtom()
Determines whether the structure represents only one atom and an arbitrary number of bonds. |
boolean |
isBond()
Determines whether the structure represents only one bond and zero or two atoms. |
boolean |
isEmpty()
Ask if the molecule 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()
R-group molecule objects cannot be real node parents. |
void |
mergeNodes(CNode that,
CNode a)
Merges bonds of an atom with another atom, then add the atom to the molecule. |
CGraph |
newInstance()
Creates a new RgMolecule object. |
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()
Remove all bonds from the root structure, and from all the R-groups. |
protected void |
removeEdge(CEdge edge,
int cleanupFlags)
Remove a bond from the root structure, and from all the R-groups. |
protected void |
removeEdge(int i,
int cleanupFlags)
Remove a bond from the root structure. |
void |
removeNode(CNode node,
int cleanupFlags)
Removes an atom and its bonds from the root structure and from all the R-groups. |
void |
removeNode(int i,
int cleanupFlags)
Removes an atom and its bonds from the root structure. |
MolAtom |
reuseAtom(int z,
int i)
Reuse an atom or create a new one. |
int |
rgroupIdOf(CNode node)
Finds the ID of the R-group (the number in R#) that contains the specified atom. |
int |
rgroupIndexOf(CNode node)
Finds the index of the R-group (the number in R#) that contains the specified atom. |
void |
setAbsStereo(boolean c)
Sets the absolute stereoconfiguration flag for the root structure and the R-groups. |
void |
setDim(int d)
Sets the dimension of the root structure and the R-groups. |
void |
setEdge(int i,
CEdge edge)
Sets the edge at the specified index. |
void |
setInputFormat(java.lang.String format)
Sets the input file format. |
void |
setLocation(DPoint3 p)
Set the origin of the molecule. |
void |
setName(java.lang.String s)
Sets the name of the root molecule. |
void |
setNode(int i,
CNode node)
Sets the node at the specified index. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets an RDfile/SDfile property in the root structure. |
void |
setPropertyObject(java.lang.String key,
java.lang.Object value)
Sets an RDfile/SDfile property in the root structure. |
void |
setRlogic(int i,
int f)
Sets R-logic flags. |
void |
setRlogicRange(int index,
java.lang.String range)
Sets R-logic occurence range. |
void |
setRoot(Molecule mol)
Sets the root structure. |
void |
setSgroupParent(MolAtom a,
Sgroup sg,
boolean set)
Sets or unsets an S-group as a parent of an atom in the root structure or an R-group. |
void |
sortEdgesAccordingTo(CEdge[] order)
Sort edges in the same order as they appear in the specified array. |
protected void |
transform(CTransform3D t,
boolean incg)
Apply a transformation matrix to the atomic coordinates. |
Methods inherited from class chemaxon.struc.CGraph |
addEdge0, addEdgeWithoutChangingIt, addNodeWithoutChangingIt, findEdge, findFrag, findFrags, findNode, getEdgeVector, getForefather, getFragCount, getFragIds, getGrinvCC, getLock, getNodeVector, getParent, getSSSR, incGrinvCC, insertEdge, insertNode, pack, regenCtabs, removeEdge, removeEdge, removeNode, removeNode, resetCtab, resetGrinvInParents, setGrinvCC, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int RG_ID_MASK
getRlogic(int)
,
setRlogic(int, int)
,
Constant Field Valuespublic static final int RG_ID2_OFF
getRlogic(int)
,
setRlogic(int, int)
,
Constant Field Valuespublic static final int RG_ID2_MASK
getRlogic(int)
,
setRlogic(int, int)
,
Constant Field Valuespublic static final int RG_RESTH
getRlogic(int)
,
setRlogic(int, int)
,
Constant Field ValuesConstructor Detail |
public RgMolecule()
Method Detail |
public void setRoot(Molecule mol)
mol
- the root structurepublic Molecule getRoot()
public int getRgroupCount()
public int getRgroupId(int i)
i
- R-group index
public int findRgroupIndex(int rgid)
rgid
- number between 1 and 32
public int getRgroupMemberCount(int i)
i
- R-group index
public Molecule getRgroupMember(int i, int j)
i
- R-group indexj
- member index
public int addRgroup(int rl, Molecule m)
rl
- R-logic flags or an R-group ID number between 1 and 32m
- the R-group
public int getRlogic(int i)
i
- R-group index
public void setRlogic(int i, int f)
i
- R-group indexf
- R-logic flagspublic java.lang.String getRlogicRange(int i)
i
- R-group index
public void setRlogicRange(int index, java.lang.String range) throws java.lang.IllegalArgumentException
index
- R-group indexrange
- range of occurance
java.lang.IllegalArgumentException
- bad occurence rangepublic java.lang.String checkRlogicRange(int index, java.lang.String range) throws java.lang.IllegalArgumentException
index
- R-group indexrange
- range of occurance
java.lang.IllegalArgumentException
- bad occurence rangepublic 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.public void setName(java.lang.String s)
setName
in class Molecule
s
- the molecule name, empty string or null
(null is equivalent to empty string)public java.lang.String getName()
getName
in class Molecule
public void setInputFormat(java.lang.String format)
setInputFormat
in class Molecule
format
- the input formatMolecule.getInputFormat()
public void clearProperties()
clearProperties
in class Molecule
public int getPropertyCount()
getPropertyCount
in class Molecule
public java.util.Enumeration getPropertyKeys()
getPropertyKeys
in class Molecule
public java.lang.String getPropertyKey(int n)
getPropertyKey
in class Molecule
n
- property index
public java.lang.String getProperty(java.lang.String key)
getProperty
in class Molecule
key
- property name
public java.lang.Object getPropertyObject(java.lang.String key)
getPropertyObject
in class Molecule
key
- property name
public void setProperty(java.lang.String key, java.lang.String value)
setProperty
in class Molecule
key
- the property namevalue
- the value or nullpublic void setPropertyObject(java.lang.String key, java.lang.Object value)
setPropertyObject
in class Molecule
key
- the property namevalue
- the value or nullpublic MolAtom reuseAtom(int z, int i)
reuseAtom
in class Molecule
z
- atomic numberi
- atom index
public void endReuse(int n)
endReuse
in class Molecule
n
- number of atomspublic int[][] getCtab()
getCtab
in class CGraph
public int[][] getBtab()
getBtab
in class CGraph
public int getGrinv(int[] gi)
getGrinv
in class MoleculeGraph
gi
- the output array
protected int[] getGrinv()
getGrinv
in class CGraph
public int rgroupIdOf(CNode node)
node
- the atom
public int rgroupIndexOf(CNode node)
node
- the atom
public 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 i, CNode node)
setNode
in class CGraph
i
- the atom indexnode
- the atompublic void add(CNode node)
add
in class CGraph
node
- the atomprotected void insertNullNodes(int i, int count)
insertNullNodes
in class CGraph
i
- starting indexcount
- number of new entriesprotected void insertNullEdges(int i, int count)
insertNullEdges
in class CGraph
i
- starting indexcount
- number of new entriespublic int getEdgeCount()
CGraph
getEdgeCount
in class CGraph
public CEdge getEdge(int i)
getEdge
in class CGraph
i
- edge index
public void setEdge(int i, CEdge edge)
setEdge
in class CGraph
i
- the bond indexedge
- the bondpublic void add(CEdge edge)
add
in class CGraph
edge
- the bond to addpublic int indexOf(CNode node)
indexOf
in class CGraph
node
- the node
public int indexOf(CEdge edge)
indexOf
in class CGraph
edge
- the edge
public boolean contains(java.lang.Object o)
contains
in class CGraph
o
- the node or edge object
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 Molecule getSimplifiedMolecule()
getSimplifiedMolecule
in class Molecule
public RgMolecule addRgroupsTo(Molecule m)
m
- the simple molecule object
public void removeNode(CNode node, int cleanupFlags)
CGraph.removeNode(CNode)
instead unless you are sure what you are doing.
removeNode
in class Molecule
node
- the atomcleanupFlags
- extra clean-up methodsCGraph.RMCLEANUP_NONE
,
CGraph.RMCLEANUP_ALL
,
CGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
public void removeNode(int i, int cleanupFlags)
CGraph.removeNode(CNode)
instead unless you are sure what you are doing.
removeNode
in class Molecule
i
- the atom indexcleanupFlags
- 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 bondcleanupFlags
- extra clean-up methodsCGraph.RMCLEANUP_NONE
,
CGraph.RMCLEANUP_ALL
,
CGraph.RMCLEANUP_EDGES
,
MoleculeGraph.RMCLEANUP_STEREO
protected void removeEdge(int i, int cleanupFlags)
removeEdge
in class Molecule
i
- the bond indexcleanupFlags
- 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 sortEdgesAccordingTo(CEdge[] order)
sortEdgesAccordingTo
in class CGraph
order
- the arraypublic void setLocation(DPoint3 p)
setLocation
in class MoleculeGraph
p
- the locationMoleculeGraph.orix
public void fuse(CGraph graph)
fuse
in class CGraph
graph
- the other moleculeprotected void fuse0(CGraph graph)
fuse0
in class CGraph
graph
- the graph that will be fused into this moleculepublic void mergeNodes(CNode that, CNode a)
mergeNodes
in class Molecule
that
- the atoma
- the other atompublic 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
- if neither root, nor any R-group
contains the atompublic void clonecopy(CGraph g)
clonecopy
in class Molecule
g
- the target moleculepublic void clonelesscopy(CGraph g)
clonelesscopy
in class Molecule
g
- the target moleculepublic Molecule cloneMolecule()
cloneMolecule
in class Molecule
public java.lang.String getFormula()
getFormula
in class MoleculeGraph
public double getMass()
getMass
in class MoleculeGraph
public CGraph newInstance()
newInstance
in class Molecule
public boolean isIncompleteReaction()
protected void transform(CTransform3D t, boolean incg)
transform
in class MoleculeGraph
t
- the transformation matrixincg
- increase grinvCC or notpublic static Molecule createMol(java.lang.String fmt)
MolImportIface.createMol()
must be used.
fmt
- the file format
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 |