Class JmolSymmetryScriptGenerator

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String colorBySequenceCluster()
      Returns a Jmol script that colors subunits by their sequence cluster ids.
      abstract java.lang.String colorBySubunit()
      Returns a Jmol script that colors the subunits of a structure by different colors
      abstract java.lang.String colorBySymmetry()
      Returns a Jmol script that colors subunits to highlight the symmetry within a structure
      abstract java.lang.String drawAxes()
      Returns a Jmol script that draws symmetry or inertia axes for a structure.
      abstract java.lang.String drawPolyhedron()
      Returns a Jmol script that draws an invisible polyhedron around a structure.
      protected static java.lang.String f1Dot2​(float number)  
      protected static java.lang.String fDot2​(double number)  
      abstract java.lang.String getDefaultOrientation()
      Returns a Jmol script to set the default orientation for a structure
      static JmolSymmetryScriptGenerator getInstance​(AxisAligner axisAligner, java.lang.String name)
      Returns an instance of a JmolSymmetryScriptGenerator, based on the symmetry of a structure (factory method)
      java.lang.String getInstantaneousOrientation​(int index)
      Returns a Jmol script that sets a specific orientation instantaneously
      protected static java.lang.String getJmolColor​(javax.vecmath.Color4f color)  
      protected static java.lang.String getJmolColorScript​(java.util.Map<javax.vecmath.Color4f,​java.util.List<java.lang.String>> map)  
      protected static java.lang.String getJmolLigandScript()  
      protected static java.lang.String getJmolPoint​(javax.vecmath.Tuple3d point)  
      abstract java.lang.String getOrientation​(int index)
      Returns a Jmol script that sets a specific orientation
      abstract int getOrientationCount()
      Returns the number of orientations available for this structure
      abstract java.lang.String getOrientationName​(int index)
      Returns the name of a specific orientation
      abstract java.lang.String getOrientationWithZoom​(int index)
      Returns a Jmol script that sets a specific orientation and zoom to draw either axes or polyhedron
      abstract javax.vecmath.Matrix4d getTransformation()
      Returns transformation matrix to orient structure
      abstract int getZoom()
      Returns the Jmol zoom to fit polyhedron and symmetry axes.
      abstract java.lang.String hideAxes()
      Returns a Jmol script to hide axes
      abstract java.lang.String hidePolyhedron()  
      protected static float jMolFloat​(double f)
      Returns a lower precision floating point number for Jmol
      abstract java.lang.String playOrientations()
      Returns a Jmol script that displays a symmetry polyhedron and symmetry axes and then loop through different orientations
      abstract void setDefaultColoring​(java.lang.String colorScript)
      Sets a default Jmol script used for coloring.
      abstract void setOnTheFly​(boolean onTheFly)
      Sets the type of bioassembly to be colored.
      abstract java.lang.String showAxes()
      Returns a Jmol script to show axes
      abstract java.lang.String showPolyhedron()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JmolSymmetryScriptGenerator

        public JmolSymmetryScriptGenerator()
    • Method Detail

      • getInstance

        public static JmolSymmetryScriptGenerator getInstance​(AxisAligner axisAligner,
                                                              java.lang.String name)
        Returns an instance of a JmolSymmetryScriptGenerator, based on the symmetry of a structure (factory method)
        Parameters:
        axisAligner -
        rotationGroup -
        Returns:
        instance of JmolSymmetryScriptGenerator
      • getZoom

        public abstract int getZoom()
        Returns the Jmol zoom to fit polyhedron and symmetry axes. This zoom level should be used so that the polyhedron and symmetry axes are not cutoff.
        Returns:
      • getDefaultOrientation

        public abstract java.lang.String getDefaultOrientation()
        Returns a Jmol script to set the default orientation for a structure
        Returns:
        Jmol script
      • getOrientationCount

        public abstract int getOrientationCount()
        Returns the number of orientations available for this structure
        Returns:
        number of orientations
      • getOrientation

        public abstract java.lang.String getOrientation​(int index)
        Returns a Jmol script that sets a specific orientation
        Parameters:
        index - orientation index
        Returns:
        Jmol script
      • getInstantaneousOrientation

        public java.lang.String getInstantaneousOrientation​(int index)
        Returns a Jmol script that sets a specific orientation instantaneously
        Parameters:
        index - orientation index
        Returns:
        Jmol script
      • getOrientationWithZoom

        public abstract java.lang.String getOrientationWithZoom​(int index)
        Returns a Jmol script that sets a specific orientation and zoom to draw either axes or polyhedron
        Parameters:
        index - orientation index
        Returns:
        Jmol script
      • getOrientationName

        public abstract java.lang.String getOrientationName​(int index)
        Returns the name of a specific orientation
        Parameters:
        index - orientation index
        Returns:
        name of orientation
      • getTransformation

        public abstract javax.vecmath.Matrix4d getTransformation()
        Returns transformation matrix to orient structure
        Returns:
        transformation matrix
      • setDefaultColoring

        public abstract void setDefaultColoring​(java.lang.String colorScript)
        Sets a default Jmol script used for coloring. This method is used in local symmetry cases to color those subunits that are not related by symmetry.
        Parameters:
        colorScript -
      • setOnTheFly

        public abstract void setOnTheFly​(boolean onTheFly)
        Sets the type of bioassembly to be colored. If set to true, it will generate a Jmol script for a bioassembly generated by Jmol on the fly. If set to false, it will generate Jmol script for a bioassembly file read by Jmol.
      • drawPolyhedron

        public abstract java.lang.String drawPolyhedron()
        Returns a Jmol script that draws an invisible polyhedron around a structure. Use showPolyhedron() and hidePolyhedron() to toggle visibility.
        Returns:
        Jmol script
      • hidePolyhedron

        public abstract java.lang.String hidePolyhedron()
      • showPolyhedron

        public abstract java.lang.String showPolyhedron()
      • drawAxes

        public abstract java.lang.String drawAxes()
        Returns a Jmol script that draws symmetry or inertia axes for a structure. Use showAxes() and hideAxes() to toggle visibility.
        Returns:
        Jmol script
      • hideAxes

        public abstract java.lang.String hideAxes()
        Returns a Jmol script to hide axes
        Returns:
        Jmol script
      • showAxes

        public abstract java.lang.String showAxes()
        Returns a Jmol script to show axes
        Returns:
        Jmol script
      • playOrientations

        public abstract java.lang.String playOrientations()
        Returns a Jmol script that displays a symmetry polyhedron and symmetry axes and then loop through different orientations
        Returns:
        Jmol script
      • colorBySubunit

        public abstract java.lang.String colorBySubunit()
        Returns a Jmol script that colors the subunits of a structure by different colors
        Returns:
      • colorBySequenceCluster

        public abstract java.lang.String colorBySequenceCluster()
        Returns a Jmol script that colors subunits by their sequence cluster ids.
        Returns:
        Jmol script
      • colorBySymmetry

        public abstract java.lang.String colorBySymmetry()
        Returns a Jmol script that colors subunits to highlight the symmetry within a structure
        Returns:
        Jmol script
      • getJmolColorScript

        protected static java.lang.String getJmolColorScript​(java.util.Map<javax.vecmath.Color4f,​java.util.List<java.lang.String>> map)
      • getJmolColor

        protected static java.lang.String getJmolColor​(javax.vecmath.Color4f color)
      • getJmolPoint

        protected static java.lang.String getJmolPoint​(javax.vecmath.Tuple3d point)
      • f1Dot2

        protected static java.lang.String f1Dot2​(float number)
      • fDot2

        protected static java.lang.String fDot2​(double number)
      • jMolFloat

        protected static float jMolFloat​(double f)
        Returns a lower precision floating point number for Jmol
        Parameters:
        f -
        Returns:
      • getJmolLigandScript

        protected static java.lang.String getJmolLigandScript()