|
|||||||||
| 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.RgMolecule
public class 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_FLAG
Other R-group ID's presence flag 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.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 | |
|---|---|
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. |
void |
aromatize(int method)
Aromatize molecule. |
boolean |
canBeReactionComponent()
Tests whether an object of this class can be a reaction component. |
void |
checkConsistency()
Checks the internal consistency of the structure. |
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. |
protected void |
checkSgroupConsistency()
Checks the consistency of S-groups. |
void |
cleanupRemovedRgroupMember(MoleculeGraph m,
int f)
Clean-up after R-group removal. |
void |
clearForImport(java.lang.String fmt)
Clear the edges vector and the properties. |
void |
clearObjects()
Removes all objects that belong to a chemical structure. |
void |
clonecopy(CGraph g)
Make another molecule identical to this one. |
void |
clonecopy(int[] iatoms,
MoleculeGraph g)
Copies the specified atoms 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 the root structure or an R-group contains the specified edge. |
boolean |
contains(CNode node)
Checks if the root structure or an R-group contains the specified node. |
static Molecule |
createMol(java.lang.String fmt)
Deprecated. As of Marvin 3.4, MolImportModule.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#. |
protected boolean |
fixSelfReferringProperty(MProp prop)
Fix a property containing reference to the molecule. |
void |
fuse(CGraph g,
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. |
int[][] |
getBtab()
Gets the bond table of the root structre. |
int[][] |
getCtab()
Gets the connection table of the root structure. |
protected MDocument |
getDocumentForChild(MoleculeGraph g)
Gets the parent document for a child graph. |
CEdge |
getEdge(int i)
Gets an edge in the graph union. |
int |
getEdgeCount()
Gets the number of edges in the root structure. |
int |
getFlags()
Gets the dimension and chiral flags. |
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. |
int |
getGrinv(int[] gi,
int options)
Gets the graph invariants (canonical labels). |
int |
getLonePairCount(int i)
Gets the number of lone pairs. |
double |
getMass()
Calculates the molecular weight of the molecule. |
protected Molecule |
getMostSimplifiedMolecule()
Gets the simplified molecule object even if there is a parent document with other objects. |
java.lang.String |
getName()
Gets the name of the root molecule. |
CNode |
getNode(int i)
Gets a node in the graph union. |
int |
getNodeCount()
Gets the number of nodes in the root structure. |
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. |
int |
getRgroupCount()
Gets the number of R-groups. |
int |
getRgroupId(int i)
Gets the ID of an R-group. |
int |
getRgroupIndex(long id)
Gets the R-group index from the R-group member ID. |
Molecule |
getRgroupMember(int i,
int j)
Gets an R-group member. |
int |
getRgroupMemberCount(int i)
Gets the number of R-group members. |
MoleculeGraph |
getRgroupMemberG(int i,
int j)
Gets an R-group member. |
long |
getRgroupMemberID(CNode node)
Gets the unique indentifier of the R-group member that contains the specified atom. |
int |
getRgroupMemberIndex(long id)
Gets the R-group member index from the R-group member ID. |
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. |
MoleculeGraph |
getRootG()
Gets the root structure. |
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. |
boolean |
hasRgroupContainedBy(java.util.Set set)
Tests whether the molecule has an R-group that is a subset of the specified set of atoms. |
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. |
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 |
isQuery()
Indicates if the molecule has query features. |
boolean |
isReaction()
Checks if the structure represents a reaction or not. |
protected boolean |
isRealNodeParent()
R-group molecule objects cannot be real node parents. |
boolean |
isSelfReference(MProp p)
Tests whether the specified property is a self reference to the molecule. |
protected void |
makeItSimilar(CGraph g)
Copies some properties of this molecule to the other one specified as argument. |
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. |
SelectionMolecule |
newSelectionMolecule()
Creates a new SelectionMolecule object appropriate for storing selection from this molecule. |
protected void |
postClean()
Operations performed after cleaning. |
MPropertyContainer |
properties()
Gets the property container. |
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. |
void |
removeObject(MObject mo)
Removes an object that belongs to a chemical structure. |
void |
replaceAtomsWithNewRgroup(SelectionMolecule sel,
int rgid)
Replaces selected atoms with a new R-group. |
void |
replaceEdge(CEdge olde,
CEdge newe)
Replaces an edge by another one. |
MolAtom |
reuseAtom(int z,
int i)
Reuse an atom or create a new one. |
void |
revalidateCoordDependentProps()
Revalidate coordinate dependent properties. |
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 |
selectAllObjects(boolean s)
Selects or deselects all objects that belong to a chemical structure. |
void |
setAbsStereo(boolean c)
Sets the absolute stereoconfiguration flag for the root structure and the R-groups. |
void |
setAbsStereo(boolean c,
int i,
int j)
Deprecated. as of Marvin 5.1.1, please call MoleculeGraph.setAbsStereo(boolean) for the
component |
void |
setDim(int d)
Sets the dimension of the root structure and the R-groups. |
void |
setEdge(int iu,
CEdge edge)
Sets the edge at the specified index in the graph union. |
protected void |
setFlags(int f)
Sets the dimension and chiral flags. |
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 iu,
CNode node)
Sets the node at the specified index in the graph union. |
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 |
sumConservedQuantities(MolAtom a,
int[] atoms,
int sign)
For internal use only. |
java.lang.String |
toString()
Overrides Object.toString() to ease debugging. |
void |
transform(CTransform3D t,
boolean incg)
Apply a transformation matrix to the atomic coordinates. |
int |
unRgroupAtoms(java.util.Set set)
Ungroup R-groups consisting of the specified atoms and make the be part of root. |
| 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_FLAG
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 Values| Constructor Detail |
|---|
public RgMolecule()
| Method Detail |
|---|
public void setRoot(Molecule mol)
mol - the root structurepublic Molecule getRoot()
public final MoleculeGraph getRootG()
getRootG in interface chemaxon.struc.RgMoleculeGraphIfacepublic int getRgroupCount()
getRgroupCount in interface chemaxon.struc.RgMoleculeGraphIfacepublic int getRgroupMemberCount(int i)
getRgroupMemberCount in interface chemaxon.struc.RgMoleculeGraphIfacei - R-group index
public Molecule getRgroupMember(int i,
int j)
i - R-group indexj - member index
public final MoleculeGraph getRgroupMemberG(int i,
int j)
getRgroupMemberG in interface chemaxon.struc.RgMoleculeGraphIfacei - R-group indexj - member index
public int getRgroupId(int i)
getRgroupId in interface chemaxon.struc.RgMoleculeGraphIfacei - R-group index
MolAtom.RGROUP_MAXpublic int findRgroupIndex(int rgid)
findRgroupIndex in interface chemaxon.struc.RgMoleculeGraphIfacergid - number between 0 and MolAtom.RGROUP_MAX
public int addRgroup(int rl,
Molecule m)
rl - R-logic flags or an R-group ID number between 0 and
MolAtom.RGROUP_MAXm - the R-group
public boolean hasRgroupContainedBy(java.util.Set set)
set - set of atomspublic int unRgroupAtoms(java.util.Set set)
set - selected atoms
public void replaceAtomsWithNewRgroup(SelectionMolecule sel,
int rgid)
sel - selected atomsrgid - R-group IDpublic int getRlogic(int i)
getRlogic in interface chemaxon.struc.RgMoleculeGraphIfacei - R-group index
RG_ID_MASK,
RG_ID2_FLAG,
RG_ID2_OFF,
RG_ID2_MASK,
RG_RESTH
public void setRlogic(int i,
int f)
i - R-group indexf - R-logic flagsRG_ID_MASK,
RG_ID2_FLAG,
RG_ID2_OFF,
RG_ID2_MASK,
RG_RESTHpublic java.lang.String getRlogicRange(int i)
getRlogicRange in interface chemaxon.struc.RgMoleculeGraphIfacei - 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 range
public 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 Moleculefmt - input file format.
See the text formats on the
File Formats in
Marvin page.CGraph.edges,
MoleculeGraph.orix,
MoleculeGraph.oriy,
MoleculeGraph.oriz,
MoleculeGraph.setFlags(int)public void setName(java.lang.String s)
setName in class Molecules - the molecule name, empty string or null
(null is equivalent to empty string)public java.lang.String getName()
getName in interface chemaxon.struc.ReadableMoleculegetName in class Moleculepublic MPropertyContainer properties()
properties in interface chemaxon.struc.ReadableMoleculeproperties in class MoleculeGraphpublic void revalidateCoordDependentProps()
revalidateCoordDependentProps in class MoleculeGraphpublic void setInputFormat(java.lang.String format)
setInputFormat in class Moleculeformat - the input formatMolecule.getInputFormat()
public MolAtom reuseAtom(int z,
int i)
reuseAtom in class Moleculez - atomic numberi - atom index
public void endReuse(int n)
endReuse in class Moleculen - number of atomspublic int[][] getCtab()
getCtab in class CGraphpublic int[][] getBtab()
getBtab in class CGraphpublic int getGrinv(int[] gi)
getGrinv in class MoleculeGraphgi - the output array
protected int[] getGrinv()
getGrinv in class CGraph
public int getGrinv(int[] gi,
int options)
getGrinv in class MoleculeGraphgi - output array, its length must be equal to the number of
atomsoptions - options for the generation of graph invariants
java.lang.SecurityException - the GraphInvariants module cannot be loaded
because of security reasons (firewall)MoleculeGraph.GRINV_NOHYDROGEN,
MoleculeGraph.GRINV_STEREOpublic int rgroupIdOf(CNode node)
rgroupIdOf in interface chemaxon.struc.RgMoleculeGraphIfacenode - the atom
public int rgroupIndexOf(CNode node)
rgroupIndexOf in interface chemaxon.struc.RgMoleculeGraphIfacenode - the atom
public long getRgroupMemberID(CNode node)
getRgroupMemberID in interface chemaxon.struc.RgMoleculeGraphIfacenode - the atom
public int getRgroupIndex(long id)
getRgroupIndex in interface chemaxon.struc.RgMoleculeGraphIfaceid - the R-group member ID or -1
public int getRgroupMemberIndex(long id)
getRgroupMemberIndex in interface chemaxon.struc.RgMoleculeGraphIfaceid - the R-group member ID or -1
public void setDim(int d)
setDim in class Moleculed - 0, 2 or 3MoleculeGraph.getFlags()public int getFlags()
getFlags in class MoleculeGraphprotected void setFlags(int f)
setFlags in class MoleculeGraphf - the flags
public void setAbsStereo(boolean c,
int i,
int j)
MoleculeGraph.setAbsStereo(boolean) for the
component
public void setAbsStereo(boolean c)
setAbsStereo in class MoleculeGraphc - the absolute stereoconfiguration flagMoleculeGraph.setFlags(int)public int getNodeCount()
getNodeCount in class CGraphpublic CNode getNode(int i)
getNode in class CGraphi - node index
public void setNode(int iu,
CNode node)
setNode in class CGraphiu - the atom indexnode - the atompublic void add(CNode node)
add in class CGraphnode - the atom
protected void insertNullNodes(int i,
int count)
insertNullNodes in class CGraphi - starting indexcount - number of new entries
protected void insertNullEdges(int i,
int count)
insertNullEdges in class CGraphi - starting indexcount - number of new entriespublic int getEdgeCount()
getEdgeCount in class CGraphpublic CEdge getEdge(int i)
getEdge in class CGraphi - edge index
public void setEdge(int iu,
CEdge edge)
setEdge in class MoleculeGraphiu - the bond indexedge - the bond
public void replaceEdge(CEdge olde,
CEdge newe)
replaceEdge in class CGrapholde - the old edgenewe - the new edgepublic void add(CEdge edge)
add in class CGraphedge - the bond to addpublic int indexOf(CNode node)
indexOf in class CGraphnode - the node
public int indexOf(CEdge edge)
indexOf in class CGraphedge - the edge
public boolean contains(CNode node)