Class MChemicalStruct

    • Constructor Detail

      • MChemicalStruct

        public MChemicalStruct​(MoleculeGraph m)
        Contructs a molecule graph object.
        Parameters:
        m - the molecule graph
      • MChemicalStruct

        protected MChemicalStruct​(MChemicalStruct mcs)
        Copy constructor.
        Parameters:
        mcs - the original object
    • Method Detail

      • getMoleculeGraph

        public MoleculeGraph getMoleculeGraph()
        Gets the stored molecule graph.
        Returns:
        the molecule graph
      • isEmpty

        public boolean isEmpty()
        A chemical structure object is empty if the molecule graph is empty.
        Overrides:
        isEmpty in class MObject
        Returns:
        true if empty, false otherwise
      • getPointCount

        public int getPointCount()
        Gets the number of points (atoms).
        Specified by:
        getPointCount in class MObject
        Returns:
        the number of points
      • getPoint

        public MPoint getPoint​(int i)
        Gets a point of the object.
        Specified by:
        getPoint in class MObject
        Parameters:
        i - the point index
        Returns:
        the point's clone
      • containsAtom

        public boolean containsAtom​(MolAtom a)
        Checks if the atom set contains the specified atom object.
        Overrides:
        containsAtom in class MObject
        Returns:
        true if the atom set contains the specified object, false otherwise
        Since:
        Marvin 3.5, 07/04/2004
      • calcCenter

        public void calcCenter​(DPoint3 p,
                               CTransform3D t)
        Calculates the geometrical center.
        Specified by:
        calcCenter in class MObject
        Parameters:
        p - store the coordinates here
        t - the transformation matrix or null
        Since:
        Marvin 4.1, 04/28/2006
      • distanceFrom

        public double distanceFrom​(double x,
                                   double y,
                                   CTransform3D t)
        Gets the 2D distance from the specified point.
        Specified by:
        distanceFrom in class MObject
        Parameters:
        x - the x coordinate
        y - the y coordinate
        t - transformation or null
        Since:
        3.5, 11/04/2004
      • distanceFrom

        public static double distanceFrom​(MoleculeGraph molg,
                                          double x,
                                          double y,
                                          CTransform3D t)
        Gets the 2D distance from the specified point.
        Parameters:
        x - the x coordinate
        y - the y coordinate
        t - transformation or null
        Since:
        4.0, 06/30/2005
      • setSelected

        public void setSelected​(boolean s)
        Selects or unselects the object.
        Overrides:
        setSelected in class MObject
        Parameters:
        s - use true to select, false to unselect
      • setSelected

        public static void setSelected​(MoleculeGraph molg,
                                       boolean s)
        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

        public static boolean hasSelection​(MoleculeGraph molg)
        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 class MObject
      • setElectronToAtomMapping

        public void setElectronToAtomMapping​(MolAtom atom,
                                             chemaxon.struc.graphics.MElectronContainer container)
      • removeElectronToAtomMapping

        public void removeElectronToAtomMapping​(MolAtom atom,
                                                chemaxon.struc.graphics.MElectronContainer container)
      • removeAtom

        public void removeAtom​(MolAtom atom)
        Description copied from class: MObject
        Removes the atom from the corresponding molecule object.
        Overrides:
        removeAtom in class MObject
        Parameters:
        atom - the atom to remove
      • getAtomOf

        public MolAtom getAtomOf​(chemaxon.struc.graphics.MElectronContainer container)
      • getElectronContainersOf

        public List<chemaxon.struc.graphics.MElectronContainer> getElectronContainersOf​(MolAtom atom)
      • hasElectronContainer

        public boolean hasElectronContainer​(MolAtom atom)
      • getMElectronContainerIndexInAtom

        public int getMElectronContainerIndexInAtom​(MolAtom atom,
                                                    chemaxon.struc.graphics.MElectronContainer container)
      • getMElectronContainerOf

        public chemaxon.struc.graphics.MElectronContainer getMElectronContainerOf​(chemaxon.struc.graphics.MElectron e)