|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.struc.MoleculeGraph
chemaxon.struc.Molecule
public class Molecule
Molecule class. A MoleculeGraph that may also contain S-groups.
| Field Summary | |
|---|---|
static int |
DEFAULT_UNGROUP
Do not ungroup and do not expand S-group's children. |
static int |
RECURSIVE_UNGROUP
Ungroup and expand (if possible) the child S-groups. |
static int |
RMCLEANUP_FROMSGROUPS
Remove atoms from S-groups. |
static int |
RMCLEANUP_SGROUPATOMS
Remove S-groups of removed superatoms. |
protected static int |
RMSG_DEFAULT
Remove S-group's children and remove S-group from its parent. |
protected static int |
RMSG_KEEP_CHILDREN
Do not remove S-group's children. |
protected static int |
RMSG_KEEP_MULTICENTER
Do not remove central atom of multicenter S-groups. |
protected static int |
RMSG_KEEP_PARENT
Do not remove S-group from its parent. |
| 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 | |
|---|---|
Molecule()
Construct a molecule. |
|
Molecule(Molecule p,
int na,
int nb)
Construct a molecule or fragment with the specified number of atoms and bonds. |
|
Molecule(Molecule p,
MolAtom a)
Construct a graph consisting of a single vertex (atom). |
|
Molecule(Molecule p,
MolBond b)
Construct a graph consisting of a single edge (bond). |
|
| Method Summary | |
|---|---|
protected void |
addAtom0(MolAtom node)
Adds a node. |
void |
addSgroup(Sgroup sg,
boolean setparent)
Adds an S-group to this object. |
protected void |
addSgroupClones(Molecule origparentm,
Molecule origm,
Molecule newm)
Adds the S-groups of a child molecule clone to the new parent molecule clone. |
protected void |
addSgroupsOf(Molecule m)
Adds S-groups to this object and its parent. |
void |
aromatize(int method)
Aromatizes molecule. |
void |
aromatize(int method,
boolean checkAmbiguity)
Aromatizes molecule. |
double |
bondlength()
Calculate the regular bond length for the unified structure. |
boolean |
canBeReactionComponent()
Tests whether an object of this class can be a reaction component. |
void |
checkConsistency()
Checks the internal consistency of the structure. |
protected void |
checkSgroupConsistency()
Checks the internal consisitency of S-groups. |
boolean |
clean(int dim,
java.lang.String opts,
MProgressMonitor pmon)
Calculates atom coordinates. |
protected void |
cleanSgroups(int dim,
java.lang.String opts)
Clean S-groups. |
void |
clear()
Clears the molecule. |
void |
clearExtraLabels()
Clears extra atom labels. |
void |
clearForImport(java.lang.String format)
Initializes molecule for import. |
void |
clearObjects()
|
void |
clearProperties()
Clears RDfile/SDfile properties. |
java.lang.Object |
clone()
Makes an identical copy of the molecule. |
void |
clonecopy(int[] iatoms,
MoleculeGraph g)
Copies the specified atoms and bonds of this graph to another one. |
void |
clonecopy(MoleculeGraph g)
Makes another molecule identical to this one. |
protected void |
clonecopyWithoutSgroups(Molecule m)
Copies the all the contents except the S-groups into another molecule object. |
void |
clonelesscopy(MoleculeGraph g)
Copies to selection. |
Molecule |
cloneMolecule()
Makes an identical copy of the molecule. |
Molecule |
cloneMoleculeWithDocument()
Makes an identical copy of the molecule and its document. |
boolean |
contains(MolAtom node)
Checks if the graph contains the specified node. |
protected void |
contractExpandedSgroups()
|
boolean |
contractSgroups()
Contracts all S-groups. |
Molecule[] |
convertToFrags()
Converts this molecule to its disconnected fragments. |
int |
countExpandableContractableSgroups()
Counts the expandable and contractable S-groups. |
int |
countOrderedComponentSgroups()
Counts the ordered component S-groups. |
protected chemaxon.struc.gearch.MoleculeGraphGearch |
createGearch()
|
boolean |
dearomatize()
Dearomatize molecule. |
void |
draw(java.awt.Graphics g,
java.lang.String opts)
Deprecated. As of release 4.1.6, replaced by chemaxon.marvin.util.MPainterUtil.draw(Molecule,Graphics,String) |
void |
endReuse(int n)
End reusing atoms. |
boolean |
expandSgroups()
Expands all S-groups. |
boolean |
expandSgroups(int opts)
Expands all S-groups. |
byte[] |
exportToBinFormat(java.lang.String fmt)
Creates a binary representation of the molecule. |
java.lang.String |
exportToFormat(java.lang.String fmt)
Creates a string representation of the molecule. |
java.lang.Object |
exportToObject(java.lang.String fmt)
Creates a String, byte[] array or Image representation of the molecule. |
protected void |
fillSelectionMolecule(SelectionMolecule s)
Adds all atoms and bonds to the specified molecule. |
Sgroup[] |
findAllSgroupContaining(MolAtom a)
Finds the smallest S-groups containing the specified node. |
chemaxon.struc.sgroup.MulticenterSgroup |
findContainingMulticenterSgroup(MolAtom atom)
Gets the containing multicenter S-group of a multicenter atom. |
Sgroup |
findContractableSgroup()
Finds an expanded residue. |
Sgroup |
findExpandableSgroup()
Finds a contracted residue. |
SelectionMolecule[] |
findFrags()
Determines the disconnected fragments and puts them into an array. |
MoleculeGraph[] |
findFrags(java.lang.Class cl)
Determines the disconnected fragments and puts them into an array. |
Sgroup |
findSgroupContaining(MolAtom a)
Finds the largest S-group that contains the specified node. |
Sgroup |
findSgroupOf(MolAtom a)
Finds the smallest S-group related to the specified node. |
Sgroup |
findSmallestSgroupContaining(MolAtom a)
Finds the smallest S-group that contains the specified node. |
protected boolean |
fixSelfReferringProperty(MProp prop)
Fix a property containing reference to the molecule. |
java.util.List<MObject> |
getAllObjects()
|
java.lang.String |
getComment()
Gets the comment. |
long |
getEndPosition()
Gets the end position of this molecule in the input file. |
protected SelectionMolecule |
getGraphUnionAsSelection()
Gets a selection molecule containing all the atoms and bonds. |
MolImageSize |
getImageSize(java.lang.String fmt)
Gets size information of an image created with the specified format string. |
java.lang.String |
getInputFormat()
Gets the input file format. |
protected Molecule |
getMostSimplifiedMolecule()
Gets the simplified molecule object even if there is a parent document with other objects. |
java.lang.String |
getName()
Gets the molecule name. |
int |
getObjectCount()
|
java.lang.String |
getProperty(java.lang.String key)
Gets an RDfile/SDfile property. |
int |
getPropertyCount()
Gets the total number of RDfile/SDfile properties. |
java.lang.String |
getPropertyKey(int i)
Gets an RDfile/SDfile property key. |
java.util.Enumeration |
getPropertyKeys()
Deprecated. as of Marvin 4.1, replaced by properties().getKeys() |
java.lang.Object |
getPropertyObject(java.lang.String key)
Gets an RDfile/SDfile property object. |
Sgroup |
getSgroup(int i)
Gets an S-group. |
Sgroup[] |
getSgroupArray()
Gets the array of S-groups. |
int |
getSgroupCount()
Gets the number of S-groups. |
MolAtom[] |
getSgroupLigands()
Gets the S-group's ligands if the structure represents an S-group. |
Molecule |
getSimplifiedMolecule()
Gets the simplified molecule object. |
Sgroup[] |
getSortedSgroups()
Gets the sorted S-groups in parent-child order. |
long |
getStartPosition()
Gets the starting position of this molecule in the input file. |
double[] |
getVisibleCoords(MolAtom ma)
Returns the coordinates of the given atom (contained in the molecule). |
int |
indexOf(Sgroup sg)
Gets the array index of an S-group. |
boolean |
isEmpty()
Tests whether the molecule is empty. |
boolean |
isExpandable(int opts)
Tests if the molecule is expandable with the specified options. |
boolean |
isGUIContracted()
Tests if the molecule has a GUI-contracted S-group or not. |
boolean |
isMolecule()
Checks if the object is an instance of Molecule or not. |
protected boolean |
isPeptideChain(Molecule mol)
|
boolean |
isReaction()
Checks if the structure represents a reaction or not. |
boolean |
isSgroup()
Checks if the structure represents an S-group or not. |
protected void |
makeBiopolymerSnake(Molecule mol)
If there is a chain with all the members being SuperatomSgroups, the method arranges them into a "snake" form to fit into the canvas (intead of being linear). |
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 |
mergeFrags()
Merges fragments of atoms that are in the same S-group. |
MoleculeGraph |
newInstance()
Creates a new Molecule object. |
SelectionMolecule |
newSelectionMolecule()
Creates a new SelectionMolecule object appropriate for storing selection from this molecule. |
boolean |
partialClean(int dim,
int[] fixed,
java.lang.String opts)
Calculates atom coordinates by using fixed atoms. |
protected void |
postClean()
Operations performed after cleaning. |
void |
removeAll()
Removes all the nodes and edges. |
void |
removeAllBonds()
Removes all edges. |
protected void |
removeAllSgroups()
Removes all S-groups. |
void |
removeAtom(int i,
int cleanupFlags)
Remove a node and its edges. |
void |
removeAtom(MolAtom node,
int cleanupFlags)
Removes a node and its edges. |
protected void |
removeBond(int i,
int cleanupFlags)
Removes an edge. |
protected void |
removeBond(MolBond edge,
int cleanupFlags)
Removes an edge by reference. |
void |
removeObject(MObject mo)
|
protected void |
removeSgroupFromList(Sgroup sg)
Removes an S-group from the sgroupVector. |
protected void |
removeSgroupsOf(Molecule m)
Removes S-groups from this object and its parent. |
protected void |
removeSgroupsOf(Molecule m,
int rmflags)
Removes S-groups that are contained in a given molecule but not contained in another molecule. |
protected void |
reparentSgroups(Molecule p)
Change parents of all S-groups in this molecule. |
void |
replaceSgroup(Sgroup sgroup,
Sgroup newSgroup)
Replaces an S-group with a new sgroup in the molecule. |
static java.lang.String |
residueSymbolOf(int id)
Gets the name of a residue. |
static int |
residueTypeOf(java.lang.String name)
Gets the residue identifier for a residue name. |
MolAtom |
reuseAtom(int z,
int i)
Reuse an atom or create a new one. |
void |
selectAllObjects(boolean s)
|
protected void |
setAtom0(int i,
MolAtom node)
Sets the node at the specified index. |
void |
setComment(java.lang.String s)
Sets the comment. |
void |
setDim(int d)
Sets the dimension. |
void |
setEndPosition(long off)
Sets the end position of this molecule in the input file. |
void |
setGUIContracted(boolean v)
Contracts some S-groups to use in GUI or expands for any other use. |
void |
setInputFormat(java.lang.String format)
Sets the input file format. |
void |
setName(java.lang.String s)
Sets the molecule name. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets an RDfile/SDfile property. |
void |
setPropertyObject(java.lang.String key,
java.lang.Object value)
Sets an RDfile/SDfile property object. |
void |
setSgroupParent(MolAtom a,
Sgroup sg,
boolean set)
Sets or unsets an S-group as a parent of an atom. |
void |
setStartPosition(long off)
Sets the starting position of this molecule in the input file. |
void |
sortSgroupXBonds()
Sorts superatom S-group crossing bonds in attachment point number order. |
byte[] |
toBinFormat(java.lang.String fmt)
Creates a binary representation of the molecule. |
java.lang.String |
toFormat(java.lang.String fmt)
Creates a string representation of the molecule. |
java.lang.Object |
toObject(java.lang.String fmt)
Creates a String, byte[] array or Image representation of the molecule. |
void |
transform(CTransform3D t,
boolean incg)
Apply a transformation matrix to the atomic coordinates and Data Sgroup coordinates. |
boolean |
ungroupSgroup(int i)
Ungroups the specified S-group and expands it if it is an Expandable S-group. |
boolean |
ungroupSgroup(int i,
int opts)
Ungroups the specified S-group and expands it if it is an Expandable S-group. |
boolean |
ungroupSgroup(Sgroup sg)
Ungroups the specified S-group and expands it if it is an Expandable S-group. |
boolean |
ungroupSgroup(Sgroup sg,
int opts)
Expand and ungroup the specified S-group. |
boolean |
ungroupSgroups()
Expand and ungroup all S-groups. |
void |
ungroupSgroups(int type)
Ungroups all S-groups of a specified type. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int RMCLEANUP_SGROUPATOMS
removeAtom(MolAtom, int),
removeAtom(int, int),
MoleculeGraph.RMCLEANUP_ALL,
Constant Field Valuespublic static final int RMCLEANUP_FROMSGROUPS
removeAtom(MolAtom, int),
removeAtom(int, int),
MoleculeGraph.RMCLEANUP_ALL,
Constant Field Valuesprotected static final int RMSG_DEFAULT
protected static final int RMSG_KEEP_CHILDREN
protected static final int RMSG_KEEP_PARENT
protected static final int RMSG_KEEP_MULTICENTER
public static final int RECURSIVE_UNGROUP
public static final int DEFAULT_UNGROUP
| Constructor Detail |
|---|
public Molecule(Molecule p,
int na,
int nb)
p - the molecule that contains the created fragmentna - no reallocation needed until the number of atoms is less than
this valuenb - no reallocation needed until the number of bonds is less than
this value
public Molecule(Molecule p,
MolAtom a)
p - the parent structurea - the atom
public Molecule(Molecule p,
MolBond b)
p - the parent structureb - the bondpublic Molecule()
| Method Detail |
|---|
public void setDim(int d)
setDim in class MoleculeGraphd - 0, 2, or 3MoleculeGraph.getFlags()public void clear()
clear in class MoleculeGraphMoleculeGraph.clearForImport(java.lang.String),
MoleculeGraph.theAtomspublic void clearForImport(java.lang.String format)
clearForImport in class MoleculeGraphformat - input file formatMoleculeGraph.theBonds,
MoleculeGraph.orix,
MoleculeGraph.oriy,
MoleculeGraph.oriz,
MoleculeGraph.setFlags(int)public long getStartPosition()
public void setStartPosition(long off)
off - the starting positionpublic long getEndPosition()
public void setEndPosition(long off)
off - the end positionpublic java.lang.String getName()
getName in interface IncompleculegetName in class MoleculeGraphpublic void setName(java.lang.String s)
s - the molecule name, empty string or null
(null is equivalent to empty string)public final java.lang.String getComment()
public final void setComment(java.lang.String s)
s - the comment, empty string or null
(null is equivalent to empty string)public final java.lang.String getInputFormat()
public void setInputFormat(java.lang.String format)
format - the input formatgetInputFormat()public void clearProperties()
public int getPropertyCount()
public java.util.Enumeration getPropertyKeys()
properties().getKeys()
public java.lang.String getPropertyKey(int i)
i - property index
public java.lang.String getProperty(java.lang.String key)
key - property name
public java.lang.Object getPropertyObject(java.lang.String key)
key - property name
public void setProperty(java.lang.String key,
java.lang.String value)
key - the property namevalue - the value or null
public void setPropertyObject(java.lang.String key,
java.lang.Object value)
key - the property namevalue - the value or nullpublic static int residueTypeOf(java.lang.String name)
name - residue name
public static java.lang.String residueSymbolOf(int id)
id - the residue identifier
protected void setAtom0(int i,
MolAtom node)
setAtom0 in class MoleculeGraphi - the atom indexnode - the atom
public void removeAtom(MolAtom node,
int cleanupFlags)
MoleculeGraph.removeAtom(MolAtom)
instead unless you are sure what you are doing.
removeAtom in class MoleculeGraphnode - the nodecleanupFlags - extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE,
MoleculeGraph.RMCLEANUP_ALL,
MoleculeGraph.RMCLEANUP_EDGES,
MoleculeGraph.RMCLEANUP_STEREO
public void removeAtom(int i,
int cleanupFlags)
MoleculeGraph.removeAtom(MolAtom)
instead unless you are sure what you are doing.
removeAtom in class MoleculeGraphi - the node indexcleanupFlags - extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE,
MoleculeGraph.RMCLEANUP_ALL,
MoleculeGraph.RMCLEANUP_EDGES,
MoleculeGraph.RMCLEANUP_STEREO
protected void removeBond(MolBond edge,
int cleanupFlags)
removeBond in class MoleculeGraphedge - the edgecleanupFlags - extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE,
MoleculeGraph.RMCLEANUP_ALL,
MoleculeGraph.RMCLEANUP_EDGES,
MoleculeGraph.RMCLEANUP_STEREO
protected void removeBond(int i,
int cleanupFlags)
removeBond in class MoleculeGraphi - the edge indexcleanupFlags - extra clean-up methodsMoleculeGraph.RMCLEANUP_NONE,
MoleculeGraph.RMCLEANUP_ALL,
MoleculeGraph.RMCLEANUP_EDGES,
MoleculeGraph.RMCLEANUP_STEREOpublic void removeAllBonds()
removeAllBonds in class MoleculeGraphpublic void removeAll()
removeAll in class MoleculeGraphpublic boolean isEmpty()
isEmpty in class MoleculeGraphtrue if the graph does not contain any nodes,
edges or non-empty S-groups, false otherwise
public boolean clean(int dim,
java.lang.String opts,
MProgressMonitor pmon)
clean in class MoleculeGraphdim - dimensionsopts - cleaning options or nullpmon - progress observer object or null
java.lang.SecurityException - cannot load module because
of a security problem (firewall)MoleculeGraph.clean(int, java.lang.String)
protected void cleanSgroups(int dim,
java.lang.String opts)
dim - dimensionsopts - cleaning options or nullprotected void contractExpandedSgroups()
protected boolean isPeptideChain(Molecule mol)
protected void postClean()
protected void makeBiopolymerSnake(Molecule mol)
public void aromatize(int method)
aromatize in class MoleculeGraphmethod - Specifies the algorithm for aromatization.
java.lang.SecurityException - cannot load module because of a security
problem (firewall)MoleculeGraph.AROM_BASIC,
MoleculeGraph.AROM_GENERAL,
MoleculeGraph.AROM_LOOSE,
Document about aromatization
public void aromatize(int method,
boolean checkAmbiguity)
aromatize in class MoleculeGraphmethod - Specifies the algorithm for aromatization.checkAmbiguity - Specifies whether ANY bonds should be considered
during aromatization.
java.lang.SecurityException - cannot load module because of a security
problem (firewall)MoleculeGraph.AROM_BASIC,
MoleculeGraph.AROM_GENERAL,
MoleculeGraph.AROM_LOOSE,
Document about aromatizationpublic boolean dearomatize()
dearomatize in class MoleculeGraphjava.lang.SecurityException - cannot load module because of a security
problem (firewall)public void clonecopy(MoleculeGraph g)
clonecopy in class MoleculeGraphg - the target moleculeprotected boolean fixSelfReferringProperty(MProp prop)
fixSelfReferringProperty in class MoleculeGraphprop - the propertyMoleculeGraph.clonecopy(MoleculeGraph)
protected final void addSgroupClones(Molecule origparentm,
Molecule origm,
Molecule newm)
origparentm - the original parent moleculeorigm - the original child moleculenewm - the new child molecule (clone of the original)
public void clonecopy(int[] iatoms,
MoleculeGraph g)
clonecopy in class MoleculeGraphiatoms - array of node indices to copy or nullg - the target graphprotected void clonecopyWithoutSgroups(Molecule m)
m - the target moleculepublic void clonelesscopy(MoleculeGraph g)
clonelesscopy in class MoleculeGraphg - the target molecule object (the selection)public Molecule cloneMoleculeWithDocument()
public Molecule cloneMolecule()
public final java.lang.Object clone()
clone in class MoleculeGraphpublic MolImageSize getImageSize(java.lang.String fmt)
MolImageSize g1 = mol.getImageSize("image:scale24");
// (g1.width, g2.width) is the bounding box size for an image created
// with scaling factor 24
MolImageSize g2 = mol.getImageSize("image:w100h100");
// g2.scale is the maximum scaling factor for 100x100 image
fmt - format string that contains the image export options
java.lang.IllegalArgumentException - Invalid format string.
java.lang.SecurityException - Export module cannot be loaded because of
security reasons (firewall).toBinFormat(java.lang.String),
toObject(java.lang.String)public final java.lang.String toFormat(java.lang.String fmt)
s1 = mol.toFormat("mol");
s2 = mol.toFormat("smiles:a-H"); // aromatize and remove Hydrogens
fmt - the format descriptor string
java.lang.IllegalArgumentException - Invalid format string.
java.lang.SecurityException - Export module cannot be loaded because of
security reasons (firewall).toObject(java.lang.String)
public final java.lang.String exportToFormat(java.lang.String fmt)
throws MolExportException
toFormat(String), the only difference is that
export exceptions are not converted to
IllegalArgumentException.
fmt - the format descriptor string
MolExportException - Export error
java.lang.IllegalArgumentException - Invalid format string.
java.lang.SecurityException - Export module cannot be loaded because of
security reasons (firewall).toFormat(String)public final byte[] toBinFormat(java.lang.String fmt)
toFormat method, and also with the binary image
formats (jpeg, msbmp, png, ppm). When creating an image,
display
options can also be specified in the format descriptor string.
Format and options are separated by a colon, multiple options can be
separated by commas. See the possible formats and their options on the
File Formats in Marvin
page. Examples:
byte[] d1 = mol.toBinFormat("mol");
byte[] d2 = mol.toBinFormat("smiles:a-H"); // aromatize and remove H
byte[] d3 = mol.toBinFormat("ppm:w300,h300,#ffff00");
byte[] d4 = mol.toBinFormat("png:w300,h300,b32,#00ffff00");
byte[] d5 = mol.toBinFormat("jpeg:w300,h300,Q95,#ffff00,spacefill");
fmt - the format descriptor string
java.lang.IllegalArgumentException - Invalid format string.
java.lang.SecurityException - Export module cannot be loaded because of
security reasons (firewall).toObject(java.lang.String),
getImageSize(java.lang.String)
public final byte[] exportToBinFormat(java.lang.String fmt)
throws MolExportException
toBinFormat(String), the only difference is that
export exceptions are not converted to
IllegalArgumentException.
fmt - the format descriptor string
MolExportException - Export error
java.lang.IllegalArgumentException - Invalid format string.
java.lang.SecurityException - Export module cannot be loaded because of
security reasons (firewall).toBinFormat(String)public java.lang.Object toObject(java.lang.String fmt)
import java.awt.Image;
...
String s1 = (String)mol.toObject("mol");
String s2 = (String)mol.toObject("smiles:a-H"); // aromatize, remove H
Image img = (Image)mol.toObject("image:w300,h300,#ffff00");
byte[] d3 = (byte[])mol.toObject("ppm:w300,h300,#ffff00");
byte[] d4 = (byte[])mol.toObject("png:w300,h300,b32,#00ffff00");
byte[] d5 = (byte[])mol.toObject("jpeg:w300,h300,Q95,#ffff00,spacefill");
fmt - the format descriptor string
java.lang.IllegalArgumentException - Invalid format string.
java.lang.SecurityException - Export module cannot be loaded because of
security reasons (firewall).toFormat(java.lang.String),
toBinFormat(java.lang.String),
getImageSize(java.lang.String)
public java.lang.Object exportToObject(java.lang.String fmt)
throws MolExportException
toObject(String), the only difference is that
export exceptions are not converted to
IllegalArgumentException.
fmt - the format descriptor string
MolExportException - Export error
java.lang.IllegalArgumentException - Invalid format string.
java.lang.SecurityException - Export module cannot be loaded because of
security reasons (firewall).toObject(String)
public void draw(java.awt.Graphics g,
java.lang.String opts)
g - the graphics contextopts - the export options
java.lang.SecurityException - Export module cannot be loaded because of
security reasons (firewall).toObject(String),
MPainterUtil.draw(Molecule, Graphics, String)
public MolAtom reuseAtom(int z,
int i)
z - the atomic numberi - the atom index
public void endReuse(int n)
n - number of atomspublic MoleculeGraph newInstance()
newInstance in class MoleculeGraphpublic SelectionMolecule newSelectionMolecule()
protected void makeItSimilar(MoleculeGraph g)
makeItSimilar in class MoleculeGraphg - the molecule to changepublic final Molecule getSimplifiedMolecule()
this
usually. In case of RgMolecule, it returns the root structure
if there are no R-groups present.
It can simplify the molecule only if there is no parent document
containing other objects.
protected Molecule getMostSimplifiedMolecule()
this usually.
In case of RgMolecule, it returns the root structure if there
are no R-groups present.
this in the default implementationpublic boolean isMolecule()
x.isMolecule() is equivalent to x instanceof Molecule,
only faster.
isMolecule in class MoleculeGraphpublic boolean isReaction()
public boolean canBeReactionComponent()
true
true if it can be a reactant, product or agent,
false if adding it to an RxnMolecule is not
supportedpublic boolean isSgroup()
public MolAtom[] getSgroupLigands()
public final Sgroup findExpandableSgroup()
public final Sgroup findContractableSgroup()
public final Sgroup[] getSgroupArray()
Warning! Expansion or contraction of an S-group in this array may invalidate other array elements. Examples:
public final int getSgroupCount()
public final int countExpandableContractableSgroups()
public final int countOrderedComponentSgroups()
public final Sgroup getSgroup(int i)
i - S-group indexpublic final Sgroup[] getSortedSgroups()
Warning! Expansion or contraction of an S-group in this array may invalidate other array elements. Examples:
public void sortSgroupXBonds()
public final int indexOf(Sgroup sg)
sg - the S-grouppublic final Sgroup findSgroupOf(MolAtom a)
a - the node
public final Sgroup findSgroupContaining(MolAtom a)
a - the node
public final Sgroup findSmallestSgroupContaining(MolAtom a)
a - the node
public Sgroup[] findAllSgroupContaining(MolAtom a)
a - the node
public boolean contains(MolAtom node)
contains in class MoleculeGraphnode - the node object
public void setSgroupParent(MolAtom a,
Sgroup sg,
boolean set)
a - the atomsg - the S-groupset - set (true) or unset (false)
java.lang.IllegalArgumentException - molecule does not contain the atomprotected final void reparentSgroups(Molecule p)
p - the new parent
java.lang.IllegalArgumentException - molecule does not contain the atom
public void mergeAtoms(MolAtom that,
MolAtom node)
mergeAtoms in class MoleculeGraphthat - the atomnode - the other atomprotected void addAtom0(MolAtom node)
addAtom0 in class MoleculeGraphnode - the node referencepublic final boolean contractSgroups()
public final boolean expandSgroups()
expandSgroups(int)public final boolean expandSgroups(int opts)
opts - expansion options
Expandable.expand(int),
Expandable.DEFAULT_OPTIONS,
Expandable.MDL_EXPAND,
Expandable.REVERSIBLE_EXPANDpublic final boolean isExpandable(int opts)
opts - expansion options
Expandable.DEFAULT_OPTIONS,
Expandable.REVERSIBLE_EXPANDpublic final void setGUIContracted(boolean v)
v - true in case of GUI usage, false for other casespublic final boolean isGUIContracted()
public final boolean ungroupSgroup(Sgroup sg)
sg - the S-group
RECURSIVE_UNGROUP,
ungroupSgroup(int)
public final boolean ungroupSgroup(Sgroup sg,
int opts)
sg - the S-groupopts - option to specify the ungroup type
RECURSIVE_UNGROUP,
DEFAULT_UNGROUP,
ungroupSgroup(int, int)public final boolean ungroupSgroup(int i)
i - the S-group index
ungroupSgroup(chemaxon.struc.Sgroup),
RECURSIVE_UNGROUPpublic final void ungroupSgroups(int type)
type - the S-group type
public final boolean ungroupSgroup(int i,
int opts)
i - the S-group indexopts - option to specify the ungroup type
RECURSIVE_UNGROUP,
DEFAULT_UNGROUP,
ungroupSgroup(chemaxon.struc.Sgroup)public final boolean ungroupSgroups()
protected final void addSgroupsOf(Molecule m)
protected final void removeSgroupsOf(Molecule m,
int rmflags)
m - the molecule whose S-groups are to removermflags - removal flagsRMSG_DEFAULT,
RMSG_KEEP_CHILDREN,
RMSG_KEEP_PARENTprotected final void removeSgroupsOf(Molecule m)
protected void removeAllSgroups()
protected void removeSgroupFromList(Sgroup sg)
public void addSgroup(Sgroup sg,
boolean setparent)
sg - the S-group to add.setparent - if true then the parent of the S-group is set to this molecule
and the S-group is removed from the old parent molecule.protected final SelectionMolecule getGraphUnionAsSelection()
SelectionMoleculepublic double bondlength()
bondlength in class MoleculeGraphpublic final MoleculeGraph[] findFrags(java.lang.Class cl)
findFrags in class MoleculeGraphcl - create fragment objects of this class
public final Molecule[] convertToFrags()
Warning: Atoms are removed from the original molecule object to the created fragments, therefore the original molecule becomes inconsistent.
The original node order is preserved in the returned fragments. Fragment order is also determined by the original node order. The first fragment is the one containing node 0, the second fragment is the one containing the smallest indexed node not in the first fragment, etc.
public final SelectionMolecule[] findFrags()
The original node order is preserved in the returned fragments. Fragment order is also determined by the original node order. The first fragment is the one containing node 0, the second fragment is the one containing the smallest indexed node not in the first fragment, etc.
protected void fillSelectionMolecule(SelectionMolecule s)
s - the selection moleculepublic void clearExtraLabels()
public void checkConsistency()
checkConsistency in class MoleculeGraphjava.lang.RuntimeException - if inconsistency foundprotected void checkSgroupConsistency()
java.lang.RuntimeException - if inconsistency foundpublic double[] getVisibleCoords(MolAtom ma)
getVisibleCoords in class MoleculeGraphma - The atom to be queried.
public void transform(CTransform3D t,
boolean incg)
transform in class MoleculeGrapht - the transformation matrixincg - graph invariants are changed (true) or not (false)public chemaxon.struc.sgroup.MulticenterSgroup findContainingMulticenterSgroup(MolAtom atom)
atom - the multicenter atom.
MulticenterSgroup,
MolAtom.MULTICENTERprotected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
createGearch in class MoleculeGraph
public boolean partialClean(int dim,
int[] fixed,
java.lang.String opts)
partialClean in class MoleculeGraphdim - dimensionsfixed - atom indexes to be fixedopts - cleaning options
java.lang.SecurityException - cannot load module because
of a security problem (firewall)public void clearObjects()
clearObjects in interface chemaxon.struc.MObjectContainerpublic int getObjectCount()
getObjectCount in interface chemaxon.struc.MObjectContainerpublic void removeObject(MObject mo)
removeObject in interface chemaxon.struc.MObjectContainerpublic void selectAllObjects(boolean s)
selectAllObjects in interface chemaxon.struc.MObjectContainerpublic java.util.List<MObject> getAllObjects()
getAllObjects in interface chemaxon.struc.MObjectContainer
public void replaceSgroup(Sgroup sgroup,
Sgroup newSgroup)
sgroup - the sgroup to replacenewSgroup - the sgroup to replace withpublic void mergeFrags()
mergeFrags in class MoleculeGraph
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||