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
ModifierConstructorDescriptionprotected
Copy constructor.Contructs a molecule graph object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
calcCenter
(DPoint3 p, CTransform3D t) Calculates the geometrical center.clone()
Creates a clone.boolean
Checks if the atom set contains the specified atom object.double
distanceFrom
(double x, double y, CTransform3D t) Gets the 2D distance from the specified point.static double
distanceFrom
(MoleculeGraph molg, double x, double y, CTransform3D t) Gets the 2D distance from the specified point.getAtomOf
(MElectronContainer container) int
getMElectronContainerIndexInAtom
(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.int
Gets the number of points (atoms).boolean
hasElectronContainer
(MolAtom atom) boolean
Checks the existence of the selection.static boolean
hasSelection
(MoleculeGraph molg) Checks the existence of the selection.boolean
isEmpty()
A chemical structure object is empty if the molecule graph is empty.void
removeAtom
(MolAtom atom) Removes the atom from the corresponding molecule object.void
removeElectronToAtomMapping
(MolAtom atom, MElectronContainer container) void
setElectronToAtomMapping
(MolAtom atom, MElectronContainer container) void
setSelected
(boolean s) Selects or unselects the object.static void
setSelected
(MoleculeGraph molg, boolean s) Selects or unselects atoms in a molecule graph.void
transform
(CTransform3D t, int opts, CTransform3D trot) Transforms all points.void
Unselects atoms.Methods inherited from class chemaxon.struc.MObject
addAttributeKeys, addCdataAttributeKeys, addNotify, checkValidity, connectToSgroupOfAtom, containsPoint, distanceFrom, finishCloning, fixClonedPoints, getAttribute, getBackground, getColor, getContainerMObject, getLineColor, getPointRef, getPointRefCount, hasBackground, hasColor, hasLineColor, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, removeChild, removeNotify, 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:
getPointCount
in 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:
containsAtom
in 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:
calcCenter
in 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:
distanceFrom
in 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:
setSelected
in 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:
unselectContents
in classMObject
-
setElectronToAtomMapping
-
removeElectronToAtomMapping
-
removeAtom
Description copied from class:MObject
Removes the atom from the corresponding molecule object.- Overrides:
removeAtom
in 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.
-