Package chemaxon.struc.graphics
Class MEFlow
java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.graphics.MPolyline
chemaxon.struc.graphics.MEFlow
- All Implemented Interfaces:
- Serializable,- Cloneable
Electron flow arrow.
Representing the movement of one or two electrons in a reaction as a curved arrow.
Electron flow can start from any atom or bond, but not from any atom pairs that has no connection bond.
The logic of the electron flows:
Representing the movement of one or two electrons in a reaction as a curved arrow.
Electron flow can start from any atom or bond, but not from any atom pairs that has no connection bond.
The logic of the electron flows:
- If the source is an Atom, the sink can be:
 - any Atom
- Bond connected to this Atom
- an atom pair from this atom and any other atom (incipient bond)
 
- If the source is a Bond, the sink can be:
 - one of the Atoms on the end of this Bond
- a Bond connected to this Bond (has common ending Atom)
- an atom pair from one of the Atoms on the end of this Bond and any other atom (incipient bond)
 
- If only the sink/source is in an sgroup, the sink/source must be the attachment point.
- Since:
- Marvin 3.5, 07/14/2004
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intElectron sink.static final intElectron source.static final Stringstatic final StringFields inherited from class chemaxon.struc.graphics.MPolylineARROW_BACK_FLAG, ARROW_CROSSED_FLAG, ARROW_CURVED_FLAG, ARROW_DASHED_FLAG, ARROW_EQUILIBRIUM_FLAG, ARROW_GROUP1_MASK, ARROW_GROUP2_MASK, ARROW_HALF_LEFT, ARROW_HALF_MASK, ARROW_HALF_RIGHT, ARROW_RETROSYNTHETIC_FLAG, arrowFlags, CLOSED_FLAG, DEFAULT_ARROW_HEAD_LENGTH, DEFAULT_ARROW_HEAD_WIDTH, DEFAULT_EQUILIBRIUM_HEAD_WIDTH, DEFAULT_MAX_CROSS_SIZE, DEFAULT_RETROSYNTHETIC_HEAD_WIDTH, DEFAULT_THICKNESS, HEAD, points, TAIL, THICKNESS_SET_FLAGFields inherited from class chemaxon.struc.MObjectTRANSFORM_DISTORT
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds the attribute names to the specified vector.clone()Creates a clone.voidCopies line properties to another line object.doubledistanceFrom(double x, double y, CTransform3D t) Gets the 2D distance from the specified point.static MolAtomGets the atom at the terminus of an arrow.static MolAtom[]Gets the atom or atoms at the terminus of an arrow.Gets the value of an attribute.intintstatic MolBondGets the bond at the terminus of an arrow.getEFlowsFromAtom(MolAtom atom) Returns all the EFlow from this atom.getEFlowsOfAtom(MolAtom atom) Returns all the EFlows that are started from this atom or pointing to this atom.getEFlowsToAtom(MolAtom atom) Returns all the EFlows to this atom.getMolObject(int i) Gets the electron source or sink.intGets the number of electrons the arrow represents.getPoint(int i) Gets a point of the line.intGets the number of point references.getSink()Gets the destination of the electron-flow arrow (MolAtom, MolBond, or MolAtom[2] for incipient bond).Gets the atom at the sink of this arrow.MolAtom[]Gets the atom or atoms at the arrow sink.Gets the bond at the sink of this arrow.Gets the origin of the electron-flow arrow (MolAtom or MolBond).Gets the atom at the source of this arrow.MolAtom[]Gets the atom or atoms at the arrow source.Gets the bond at the source of this arrow.static MolAtom[][]getValidSinkAtomPairsForMolecule(Molecule m, MolAtom source) Deprecated, for removal: This API element is subject to removal in a future version.static MolAtom[][]getValidSinkAtomPairsForMolecule(Molecule m, MolBond source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkAtomPairs(Molecule, MolBond).static MolAtom[]getValidSinkAtomsForMolecule(Molecule m, MolAtom source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkAtoms(Molecule, MolAtom).static MolAtom[]getValidSinkAtomsForMolecule(Molecule m, MolBond source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkAtoms(Molecule, MolBond).static MolBond[]getValidSinkBondsForMolecule(Molecule m, MolAtom source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkBonds(Molecule, MolAtom).static MolBond[]getValidSinkBondsForMolecule(Molecule m, MolBond source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkBonds(Molecule, MolBond).static MolAtom[][]Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSourceAtomPairs(Molecule).static MolAtom[]Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSourceAtoms(Molecule).static MolBond[]Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSourceBonds(Molecule).static booleanGets whether the arrow's terminus is at an atom.static booleanGets whether the arrow's terminus is at a bond.static booleanisIncipBond(Object sink) Gets whether the arrow's sink is at an incipient bond.static booleanisValidSourceAndSinkForMolecule(Object source, Object sink, Molecule m) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.isValidFlow(MolAtom, MolAtom, Molecule)or one of the other implementations instead.static booleanisValidSourceForMolecule(Object source, Molecule m) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.isValidSource(MolAtom, Molecule)orEFlowPlacementValidators.isValidSource(MolAtom[], Molecule)orEFlowPlacementValidators.isValidSource(MolBond, Molecule).voidvoidremoveAtom(MolAtom atom) Removes the atom from the corresponding molecule object.voidremoveNotify(MDocument doc) Called when the object is removed from a document.voidresetBaseElectronContainer(MolAtom atom, MDocument doc) voidsetAttribute(String s, String v) Sets the value of an attribute.voidsetBaseElectronContainer(MolAtom atom, MDocument doc) voidsetBaseElectronContainerIndex(int idx) voidsetBaseElectronIndexInContainer(int idx) voidbooleanGets whether this arrow's sink is an atom.booleanGets whether this arrow's sink is a bond.booleanGets whether this arrow's sink is an incipient bond.booleanGets whether this arrow's source is an atom.booleanGets whether this arrow's source is a bond.Methods inherited from class chemaxon.struc.graphics.MPolylinecalcCenter, checkValidity, containsAtom, finishCloning, fixClonedPoints, fixMidPointClones, getArcAngle, getArcCenter, getArcRadius, getArcRadius, getArrowFlags, getArrowLength, getArrowWidth, getFlags, getLineMiddlePoint, getMidPointLocation, getMirroredArrowFlags, getPointCount, getPointRef, getPoints, getSkip, getThickness, hasBackground, hasColor, hasFace, hasLineColor, hasOutline, isArrow, isEmpty, isThicknessSet, removeChild, replaceAtom, reverse, rotate, setArcAngle, setArrow, setArrowFlags, setArrowLength, setArrowWidth, setFlags, setPoints, setSkip, setThickness, transform, unselectContents, updateBoundingRectMethods inherited from class chemaxon.struc.MObjectaddCdataAttributeKeys, addNotify, clearProperties, connectToSgroupOfAtom, containsPoint, containsPropertyKey, distanceFrom, getBackground, getColor, getContainerMObject, getLineColor, getProperty, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, propertyCount, propertyKeySet, propertySet, putProperty, removeProperty, setBackground, setColor, setLineColor, setSelected, toString, updateBoundingRect
- 
Field Details- 
lonePairState- See Also:
 
- 
radicalState- See Also:
 
- 
E_SOURCEpublic static final int E_SOURCEElectron source.- See Also:
 
- 
E_SINKpublic static final int E_SINKElectron sink.- See Also:
 
 
- 
- 
Constructor Details- 
MEFlowpublic MEFlow()Contructs an empty 2 electron flow arrow.
- 
MEFlowpublic MEFlow(int ne) Contructs an empty electron flow arrow.- Parameters:
- ne- one-electron (1) or two-electron (2) transfer
 
- 
MEFlowContructs an electron flow arrow with the specified endpoints.- Parameters:
- p1- the starting point
- p2- the endpoint
- ne- one-electron (1) or two-electron (2) transfer
- See Also:
 
- 
MEFlowCopy constructor.- Parameters:
- l- the original arrow
 
 
- 
- 
Method Details- 
getNumElectronspublic int getNumElectrons()Gets the number of electrons the arrow represents.- Returns:
- 1 or 2
 
- 
getPointGets a point of the line.
- 
cloneDescription copied from class:MObjectCreates a clone.
- 
getMolObjectGets the electron source or sink.
- 
getPointRefCountpublic int getPointRefCount()Gets the number of point references.- Overrides:
- getPointRefCountin class- MPolyline
- Returns:
- 2 because middle point is not needed
 
- 
getSourceGets the origin of the electron-flow arrow (MolAtom or MolBond).- Returns:
- origin of the electron-flow arrow
 
- 
getSinkGets the destination of the electron-flow arrow (MolAtom, MolBond, or MolAtom[2] for incipient bond).- Returns:
- destination of the electron-flow arrow
 
- 
sourceIsAtompublic boolean sourceIsAtom()Gets whether this arrow's source is an atom.- Returns:
- whether this arrow's source is an atom
 
- 
sinkIsAtompublic boolean sinkIsAtom()Gets whether this arrow's sink is an atom.- Returns:
- whether this arrow's sink is an atom
 
- 
isAtomGets whether the arrow's terminus is at an atom.- Parameters:
- terminus- the arrow terminus
- Returns:
- whether the arrow's terminus is at an atom
 
- 
sourceIsBondpublic boolean sourceIsBond()Gets whether this arrow's source is a bond.- Returns:
- whether this arrow's source is a bond
 
- 
sinkIsBondpublic boolean sinkIsBond()Gets whether this arrow's sink is a bond.- Returns:
- whether this arrow's sink is a bond
 
- 
isBondGets whether the arrow's terminus is at a bond.- Parameters:
- terminus- the arrow terminus
- Returns:
- whether the arrow's terminus is at a bond
 
- 
sinkIsIncipBondpublic boolean sinkIsIncipBond()Gets whether this arrow's sink is an incipient bond.- Returns:
- whether this arrow's sink is an incipient bond
 
- 
isIncipBondGets whether the arrow's sink is at an incipient bond.- Parameters:
- sink- the arrow sink
- Returns:
- whether the arrow's sink is at an incipient bond
 
- 
getSourceAtomGets the atom at the source of this arrow. Use only after sourceIsAtom().- Returns:
- the atom at the source of this arrow
 
- 
getSinkAtomGets the atom at the sink of this arrow. Use only after sinkIsAtom().- Returns:
- the atom at the sink of this arrow
 
- 
getAtomGets the atom at the terminus of an arrow.- Parameters:
- terminus- the arrow terminus
- Returns:
- the atom at the terminus of an arrow or null if it is not a MolAtom.
 
- 
getBondGets the bond at the terminus of an arrow.- Parameters:
- terminus- the arrow terminus
- Returns:
- the bond at the terminus of an arrow or null if the terminus is not a MolBond.
 
- 
getSourceBondGets the bond at the source of this arrow. Use only after sourceIsBond().- Returns:
- the bond at the source of this arrow
 
- 
getSinkBondGets the bond at the sink of this arrow. Use only after sinkIsBond().- Returns:
- the bond at the sink of this arrow
 
- 
getSourceAtomsGets the atom or atoms at the arrow source.- Returns:
- the atom or atoms at the arrow source
 
- 
getSinkAtomsGets the atom or atoms at the arrow sink.- Returns:
- the atom or atoms at the arrow sink
 
- 
getAtomsGets the atom or atoms at the terminus of an arrow.- Parameters:
- terminus- the arrow terminus
- Returns:
- the atom or atoms at the terminus of an arrow
 
- 
getEFlowsOfAtomReturns all the EFlows that are started from this atom or pointing to this atom.- Parameters:
- atom- the sink or source atom
- Returns:
- Listof EFlows, empty if no EFlow starts from this atom and no EFlow ends to this atom.
 
- 
getEFlowsFromAtomReturns all the EFlow from this atom. SeegetEFlowsOfAtom(MolAtom).- Returns:
- Listof MEFlows, empty if no electron flow arrow is connected to the atom.
 
- 
getEFlowsToAtomReturns all the EFlows to this atom. SeegetEFlowsOfAtom(MolAtom).- Returns:
- Listof MEFlows, empty if no electron flow arrow is connected to the atom.
 
- 
setSkipsToEndPointspublic void setSkipsToEndPoints()
- 
setBaseElectronContainer
- 
resetBaseElectronContainer
- 
getBaseElectronContainerIndexpublic int getBaseElectronContainerIndex()
- 
setBaseElectronContainerIndexpublic void setBaseElectronContainerIndex(int idx) 
- 
getBaseElectronIndexInContainerpublic int getBaseElectronIndexInContainer()
- 
setBaseElectronIndexInContainerpublic void setBaseElectronIndexInContainer(int idx) 
- 
getValidSourceAtomsForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static MolAtom[] getValidSourceAtomsForMolecule(Molecule m) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSourceAtoms(Molecule).
- 
getValidSourceBondsForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static MolBond[] getValidSourceBondsForMolecule(Molecule m) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSourceBonds(Molecule).
- 
getValidSourceAtomPairsForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static MolAtom[][] getValidSourceAtomPairsForMolecule(Molecule m) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSourceAtomPairs(Molecule).
- 
getValidSinkAtomsForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static MolAtom[] getValidSinkAtomsForMolecule(Molecule m, MolAtom source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkAtoms(Molecule, MolAtom).
- 
getValidSinkAtomsForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static MolAtom[] getValidSinkAtomsForMolecule(Molecule m, MolBond source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkAtoms(Molecule, MolBond).
- 
getValidSinkBondsForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static MolBond[] getValidSinkBondsForMolecule(Molecule m, MolAtom source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkBonds(Molecule, MolAtom).
- 
getValidSinkBondsForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static MolBond[] getValidSinkBondsForMolecule(Molecule m, MolBond source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkBonds(Molecule, MolBond).
- 
getValidSinkAtomPairsForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static MolAtom[][] getValidSinkAtomPairsForMolecule(Molecule m, MolAtom source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkAtomPairs(Molecule, MolAtom).
- 
getValidSinkAtomPairsForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static MolAtom[][] getValidSinkAtomPairsForMolecule(Molecule m, MolBond source) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.getValidSinkAtomPairs(Molecule, MolBond).
- 
isValidSourceForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean isValidSourceForMolecule(Object source, Molecule m) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.isValidSource(MolAtom, Molecule)orEFlowPlacementValidators.isValidSource(MolAtom[], Molecule)orEFlowPlacementValidators.isValidSource(MolBond, Molecule).
- 
isValidSourceAndSinkForMolecule@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean isValidSourceAndSinkForMolecule(Object source, Object sink, Molecule m) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.1, replaced byEFlowPlacementValidators.isValidFlow(MolAtom, MolAtom, Molecule)or one of the other implementations instead.
- 
distanceFromDescription copied from class:MPolylineGets the 2D distance from the specified point.- Overrides:
- distanceFromin class- MPolyline
- Parameters:
- x- the x coordinate
- y- the y coordinate
- t- transformation or null
 
- 
copyPropertiesDescription copied from class:MPolylineCopies line properties to another line object.- Overrides:
- copyPropertiesin class- MPolyline
- Parameters:
- l- the other line
 
- 
getAttributeDescription copied from class:MPolylineGets the value of an attribute.- Overrides:
- getAttributein class- MPolyline
- Parameters:
- s- the attribute name
- Returns:
- the value or null
 
- 
addAttributeKeysDescription copied from class:MPolylineAdds the attribute names to the specified vector.- Overrides:
- addAttributeKeysin class- MPolyline
- Parameters:
- v- the vector
 
- 
setAttributeDescription copied from class:MPolylineSets the value of an attribute.- Overrides:
- setAttributein class- MPolyline
- Parameters:
- s- the attribute name
- v- the attribute value
 
- 
getMElectron
- 
getMElectronRef
- 
getMElectronContainer
- 
releaseBaseMElectronspublic void releaseBaseMElectrons()
- 
removeAtomDescription copied from class:MObjectRemoves the atom from the corresponding molecule object.- Overrides:
- removeAtomin class- MObject
- Parameters:
- atom- the atom to remove
 
- 
removeNotifyDescription copied from class:MObjectCalled when the object is removed from a document.- Overrides:
- removeNotifyin class- MPolyline
- Parameters:
- doc- The document from which the object is removed.
 
 
- 
EFlowPlacementValidators.getValidSinkAtomPairs(Molecule, MolAtom).