Package chemaxon.struc.graphics
Class MChemicalStruct
java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.graphics.MChemicalStruct
- All Implemented Interfaces:
Serializable,Cloneable
Molecule graph object.
- Since:
- Marvin 3.3
- See Also:
-
Field Summary
Fields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCopy constructor.Contructs a molecule graph object. -
Method Summary
Modifier and TypeMethodDescriptionvoidcalcCenter(DPoint3 p, CTransform3D t) Calculates the geometrical center.clone()Creates a clone.booleanChecks if the atom set contains the specified atom object.doubledistanceFrom(double x, double y, CTransform3D t) Gets the 2D distance from the specified point.static doubledistanceFrom(MoleculeGraph molg, double x, double y, CTransform3D t) Gets the 2D distance from the specified point.getAtomOf(MElectronContainer container) intgetMElectronContainerIndexInAtom(MolAtom atom, MElectronContainer container) Deprecated, for removal: This API element is subject to removal in a future version.Gets the stored molecule graph.getPoint(int i) Gets a point of the object.intGets the number of points (atoms).booleanhasElectronContainer(MolAtom atom) booleanChecks the existence of the selection.static booleanhasSelection(MoleculeGraph molg) Checks the existence of the selection.booleanisEmpty()A chemical structure object is empty if the molecule graph is empty.voidremoveAtom(MolAtom atom) Removes the atom from the corresponding molecule object.voidremoveElectronToAtomMapping(MolAtom atom, MElectronContainer container) voidsetElectronToAtomMapping(MolAtom atom, MElectronContainer container) voidsetSelected(boolean s) Selects or unselects the object.static voidsetSelected(MoleculeGraph molg, boolean s) Selects or unselects atoms in a molecule graph.voidtransform(CTransform3D t, int opts, CTransform3D trot) Transforms all points.voidUnselects atoms.Methods inherited from class chemaxon.struc.MObject
addAttributeKeys, addCdataAttributeKeys, addNotify, checkValidity, clearProperties, connectToSgroupOfAtom, containsPoint, containsPropertyKey, distanceFrom, finishCloning, fixClonedPoints, getAttribute, getBackground, getColor, getContainerMObject, getLineColor, getPointRef, getPointRefCount, getProperty, hasBackground, hasColor, hasLineColor, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, propertyCount, propertyKeySet, propertySet, putProperty, removeChild, removeNotify, removeProperty, replaceAtom, setAttribute, setBackground, setColor, setLineColor, toString, updateBoundingRect, updateBoundingRect
-
Constructor Details
-
MChemicalStruct
Contructs a molecule graph object.- Parameters:
m- the molecule graph
-
MChemicalStruct
Copy constructor.- Parameters:
mcs- the original object
-
-
Method Details
-
getMoleculeGraph
Gets the stored molecule graph.- Returns:
- the molecule graph
-
clone
Creates a clone. -
isEmpty
public boolean isEmpty()A chemical structure object is empty if the molecule graph is empty. -
getPointCount
public int getPointCount()Gets the number of points (atoms).- Specified by:
getPointCountin classMObject- Returns:
- the number of points
-
getPoint
Gets a point of the object. -
containsAtom
Checks if the atom set contains the specified atom object.- Overrides:
containsAtomin classMObject- Returns:
- true if the atom set contains the specified object, false otherwise
- Since:
- Marvin 3.5, 07/04/2004
-
transform
Transforms all points. -
calcCenter
Calculates the geometrical center.- Specified by:
calcCenterin classMObject- Parameters:
p- store the coordinates heret- the transformation matrix or null- Since:
- Marvin 4.1, 04/28/2006
-
distanceFrom
Gets the 2D distance from the specified point.- Specified by:
distanceFromin classMObject- Parameters:
x- the x coordinatey- the y coordinatet- transformation or null- Since:
- 3.5, 11/04/2004
-
distanceFrom
Gets the 2D distance from the specified point.- Parameters:
x- the x coordinatey- the y coordinatet- transformation or null- Since:
- 4.0, 06/30/2005
-
setSelected
public void setSelected(boolean s) Selects or unselects the object.- Overrides:
setSelectedin classMObject- Parameters:
s- use true to select, false to unselect
-
setSelected
Selects or unselects atoms in a molecule graph.- Parameters:
s- use true to select, false to unselect- Since:
- Marvin 4.0, 06/30/2005
-
hasSelection
public boolean hasSelection()Checks the existence of the selection.- Returns:
- true if selection exists, false otherwise
-
hasSelection
Checks the existence of the selection.- Returns:
- true if selection exists, false otherwise
- Since:
- Marvin 4.0, 06/30/2005
-
unselectContents
public void unselectContents()Unselects atoms.- Overrides:
unselectContentsin classMObject
-
setElectronToAtomMapping
-
removeElectronToAtomMapping
-
removeAtom
Description copied from class:MObjectRemoves the atom from the corresponding molecule object.- Overrides:
removeAtomin classMObject- Parameters:
atom- the atom to remove
-
getAtomOf
-
getElectronContainersOf
-
hasElectronContainer
-
getMElectronContainerIndexInAtom
-
getMElectronContainerOf
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public MElectronContainer getMElectronContainerOf(MElectron e) Deprecated, for removal: This API element is subject to removal in a future version.
-