Class MMoleculeMovie

java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.graphics.MMoleculeMovie
All Implemented Interfaces:
Serializable, Cloneable

@PublicApi public class MMoleculeMovie extends MObject
Molecule animation.
Since:
Marvin 4.0, 06/30/2005
See Also:
  • Constructor Details

    • MMoleculeMovie

      public MMoleculeMovie(Molecule[] mols)
      Contructs a molecule animation.
      Parameters:
      mols - the molecules
    • MMoleculeMovie

      protected MMoleculeMovie(MMoleculeMovie mma)
      Copy constructor.
      Parameters:
      mma - the original object
  • Method Details

    • getMoleculeCount

      public int getMoleculeCount()
      Gets the number of frames.
      Returns:
      the number of frames
    • getMolecule

      public Molecule getMolecule(int i)
      Gets the specified frame.
      Returns:
      a molecule
    • getMolecules

      public Molecule[] getMolecules()
      Gets all molecules.
      Returns:
      molecules
    • getCurrentFrameIndex

      public int getCurrentFrameIndex()
      Gets the current frame index.
      Returns:
      the frame index
    • setCurrentFrameIndex

      public void setCurrentFrameIndex(int i)
      Sets the current frame index.
      Parameters:
      i - the frame index
    • getCurrentMolecule

      public Molecule getCurrentMolecule()
      Gets the stored molecule graph.
      Returns:
      the molecule graph
    • clone

      public MMoleculeMovie clone()
      Creates a clone.
      Overrides:
      clone in class MObject
      Returns:
      the clone
    • 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
    • transform

      public void transform(CTransform3D t, int opts, CTransform3D trot)
      Transforms all points.
      Specified by:
      transform in class MObject
      Parameters:
      t - the transformation matrix
      opts - transform options or 0
      trot - the viewing transformation or null
      See Also:
    • 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
    • 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
    • hasSelection

      @Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean hasSelection()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks the existence of the selection.
      Returns:
      true if selection exists, false otherwise
    • unselectContents

      public void unselectContents()
      Unselects atoms.
      Overrides:
      unselectContents in class MObject
    • 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