chemaxon.marvin.space
Class MolecularSurfaceComponent

java.lang.Object
  extended by chemaxon.marvin.space.GraphicComponent
      extended by chemaxon.marvin.space.MolecularSurfaceComponent
All Implemented Interfaces:
chemaxon.marvin.space.UsableObject, chemaxon.marvin.util.CallbackIface

public class MolecularSurfaceComponent
extends GraphicComponent
implements chemaxon.marvin.util.CallbackIface, chemaxon.marvin.space.UsableObject

Class that represents a surface of a molecule. The surface can be computed different ways, this class connects the molecule with the somehow-computed surface e.g. by handling coordinate-change of the molecule or by coloring the surface based on a molecular property.

Since:
Marvin 4.0.2
Version:
MarvinSpace 1.0
Author:
Judit Papp

Field Summary
protected  int atomCount
           
protected static boolean AUTO_RESOLUTION_ENABLED
           
protected  boolean automaticSettingOfGridSize
           
protected  byte[][] customPaletteColors
           
static float DEFAULT_ISOVALUE
           
static float DEFAULT_PROBE_RADIUS
           
static float DEFAULT_RESOLUTION
           
protected static float[] highPrecisions
           
protected static float[] lowPrecisions
           
protected static float[] mediumPrecisions
           
protected  int paletteId
           
protected static int[] precisionThresholds
           
static int SURFACE_COLOR_GRID_MAPPING
           
static int SURFACE_COLOR_PROPERTY_MAPPING
           
static int SURFACE_COLOR_TYPE_ATOMTYPE
           
static int SURFACE_COLOR_TYPE_B_FACTOR
           
static int SURFACE_COLOR_TYPE_CHAIN
           
static int SURFACE_COLOR_TYPE_CONSTANT
           
static int SURFACE_COLOR_TYPE_EP
           
static int SURFACE_COLOR_TYPE_RAINBOW
           
static int SURFACE_COLOR_TYPE_RESIDUE
           
static int SURFACE_COLOR_TYPE_SS
           
protected static boolean SURFACE_SIMPLIFICATION_ENABLED
           
protected static int SURFACE_SMOOTHNESS
           
static int SURFACE_TYPE_BLOBBY
           
static int SURFACE_TYPE_CONNOLLY
           
static int SURFACE_TYPE_GAUSSIAN
           
static int SURFACE_TYPE_SAS
           
static int SURFACE_TYPE_VDW
           
protected  int surfaceColorType
           
protected  float surfaceGridPrecision
           
protected  boolean surfaceSimplificationEnabled
           
protected  float surfaceSimplificationTolerance
           
protected  int surfaceSmoothnessFactor
           
protected  int surfaceType
           
 
Fields inherited from class chemaxon.marvin.space.GraphicComponent
active, associatedComponents, boundingBox, color, COMPONENT_TYPE_ENTIRE, drawProperties, drawType, gl, glu, graphicCell, irm, modifiesOrigin, motionMode, mousex, mousey, name, pickedItem, RENDERING_QUALITY_HIGH, RENDERING_QUALITY_LOW, RENDERING_QUALITY_MEDIUM, renderingQuality, rm, uoid, visible
 
Constructor Summary
MolecularSurfaceComponent()
          Creates a new instance of MolecularSurfaceComponent without setting anything.
MolecularSurfaceComponent(java.util.ArrayList molecules)
          Creates a MolecularSurfaceComponent to the given list of MoleculeInterfaces and MoleculeVisualizers.
MolecularSurfaceComponent(java.util.ArrayList molecules, java.lang.String surfaceType)
          Creates a MolecularSurfaceComponent to the given list of MoleculeInterfaces and MoleculeVisualizers.
MolecularSurfaceComponent(chemaxon.struc.MoleculeIterators.MoleculeInterface mi, chemaxon.marvin.modules.mprop.VolumetricData vd)
          Creates a MolecularSurfaceComponent from the given MoleculeInterface and VolumetricData, which usually comes from a Gaussian Cube file.
MolecularSurfaceComponent(chemaxon.struc.MoleculeIterators.MoleculeInterface mi, chemaxon.marvin.modules.mprop.VolumetricData vd, float isoValue)
          Creates a MolecularSurfaceComponent from the given MoleculeInterface and VolumetricData, which usually comes from a Gaussian Cube file.
 
Method Summary
 java.lang.Object callback(java.lang.String method, java.lang.Object arg)
           
 void draw()
          Draws the molecular surface, and recomputes it if the coordinates of the molecule have been changed.
protected  void drawSelection(int mode)
          Draws the component in the given mode (usually in selection mode), the rendering mode is for checking.
 void drawTransparentPart()
          Draws the surface if it was transparent or mesh.
 java.awt.Color getColor()
          Returns the constant color of the surface.
 int getColorType()
          Returns the color type of the surface.
 int getDrawType()
          Returns the drawing type of the molecular surface.
 double getMaximumMappedValue()
          Returns the maximum value of the mapped property on this surface.
 double getMinimumMappedValue()
          Returns the minimum value of the mapped property on this surface.
 chemaxon.marvin.space.util.Palette getPalette()
          Returns the used built-in palette.
 java.lang.String getPaletteString()
          Returns the string identifier of the used built-in palette.
 double getProbeRadius()
          Returns the probe radius the surface computing will use.
 SurfaceComponent getSurface()
          Returns the surface.
 double getSurfacePrecision()
          Returns the grid resolution from which the surface is computed.
 boolean getSurfaceSimplificationEnabled()
          Returns true if Surface Simplification is enabled.
 int getSurfaceSmoothnessFactor()
          Surfaces can be smoothed by the following algorithm: Paul Bourke: Surface Relaxation and Smoothing http://astronomy.swin.edu.au/~pbourke/modelling/relax/ This algorithm has a smoothness factor.
 float getSurfaceThreshold()
          Returns the isovalue/threshold of the surface.
 int getSurfaceType()
          Returns the type of the surface.
static int getSurfaceType(java.lang.String type)
           
static java.lang.String getSurfaceTypeString(int surfaceType)
           
 boolean hasTransparentPart()
          Returns true if the drawing type of the molecular surface was MESH_TYPE or TRANSPARENT_TYPE.
 boolean isColorMapperEnabled()
           
 boolean isControllable(java.lang.String type)
          Returns whether controling by the given type of controller is allowed to the component.
 boolean isVolumeVisible()
          Tells whether the volumetric data is shown or not.
 void mapPropertyToSurface(chemaxon.marvin.space.grid.Grid grid)
           
 void mapPropertyToSurface(chemaxon.marvin.modules.mprop.VolumetricData vd)
          Coloring surface based on the given grid.
 void onRemoveGraphicComponent()
           
 void receiveNotificationOnCoordinateChange(GraphicComponent gc)
          The molecule will notify the surface when its coordinates change.
 void refreshColoring()
           
 void resize(double x, double y, double z)
          Resizes the component according to given factors.
 void select()
          Sets the component to be selected.
 void setAtomPropertyList(java.util.ArrayList atomProperties)
          Sets a list of atomic properties that can be mapped as coloring on the surface.
 void setColor(java.awt.Color c)
          Sets the constant color of the component.
 void setDrawProperty(java.lang.String propertyName, java.lang.String propertyValue)
          This is the gate of draw properties from outside to the component.
 void setExclusiveDrawing(boolean b)
          Enables/disables exclusive drawing, see SurfaceComponent.setExclusiveColor(byte[]).
 void setGL(javax.media.opengl.GL2 gl, javax.media.opengl.glu.GLU glu)
          Sets the GL2 rendering environment.
 void setMolecules(java.util.ArrayList molecules)
          The surface will be the molecular surface of the given molecules.
 void setNegativeCriterium(double v)
          Sets the lowest negative value colored.
 void setPalette(byte[][] colors)
          Sets colors to be used by the color palette.
 void setPalette(int paletteId)
          Sets a built-in palette used during coloring the molecular surface.
 void setPaletteMaximum(double v)
          Sets the largest positive value colored.
 void setPaletteMinimum(double v)
          Sets the largest negative value colored.
 void setPositiveCriterium(double v)
          Sets the lowest positive value colored.
 void setProbeRadius(double r)
          Sets thwe probe radius that is the radius of a water molecule used in computing surfaces.
 void setProgressBar(chemaxon.marvin.space.ProgressBarInterface PB)
           
 void setRotateMatrix(float[] rotateMatrix)
          Sets the rotation matrix in order to get the proper mapping of a vector to the viewing plane.
 void setSurfacePrecision()
          Resolution will be set automatically according to the number of atoms and the rendering quality.
 void setSurfacePrecision(float v)
          Explicitly sets the grid resolution from which the surface is computed.
 void setSurfacePrecision(java.lang.String quality)
          Sets the surface precision by setting a quality.
 void setSurfaceSimplificationEnabled(boolean b)
          The number of surface polygons can be reduced by the following algorithm: Paul Bourke: Surface (polygonal) Simplification http://astronomy.swin.edu.au/~pbourke/modelling/surfsimp/ This method enables/disables simplification.
 void setSurfaceType(java.lang.String s)
          Sets the type of the surface and computes the surface with the necessary method.
 void setVisible(boolean state)
          Sets the surface to be visible/invisible.
 void showVolume(boolean b)
          For Gaussian Cube surfaces it can be enabled to visualize the volumetric data from which the surface is generated.
 boolean surfaceOf(GraphicComponent gc)
          Tells whether it is the molecular surface of the given component (molecule).
 void surfaceSimplification()
          Runs the (might be time-consuming) algorithm thst reduces the number of triangles of the surface.
 void translate(float[] v)
          Translates the component with the given translation vector.
 void updatePropertyMapping()
           
 
Methods inherited from class chemaxon.marvin.space.GraphicComponent
addDrawProperties, associate, draw2DPart, drawBoundingBox, drawCoordinateAxes, exclusiveSelection, exclusiveSelection, extendSelection, extendSelection, fadeSelected, fadeUnselected, getAssociatedComponents, getBoundingBox, getBoundingSphereRadius, getCell, getComponentElement, getCoordinates, getCoordinates, getDescription, getDescription, getDrawProperties, getDrawProperty, getGraphicComponent, getId, getLabelInformation, getLabelInformation, getName, getRenderingQuality, getUsableObject, getZCoordinateTo2DPart, glColor, has2DPart, hasSelectedElements, hideSelected, hideUnselected, invertSelection, invertSelection, isGraphicComponent, isSelected, isSelected, isVisible, isVisible, locateObject, notifyCoordinateChange, notifyInvisibility, notifySelection, notifyUnSelection, notifyVisibility, pickObject, projectVector, receiveNotificationOnInvisibility, receiveNotificationOnSelection, receiveNotificationOnUnSelection, receiveNotificationOnVisibility, removeAssociation, rotate, rotate, rotate, select, selectComponentElementsInside, setColor, setColor, setDrawProperties, setMotionMode, setName, setRenderingQuality, showFaded, storeDrawProperty, toString, touchObject, unSelect, unSelect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface chemaxon.marvin.space.UsableObject
getGraphicComponent, getId, getName, isGraphicComponent, isSelected, isVisible, setName, toString, unSelect
 

Field Detail

SURFACE_TYPE_VDW

public static final int SURFACE_TYPE_VDW
See Also:
Constant Field Values

SURFACE_TYPE_CONNOLLY

public static final int SURFACE_TYPE_CONNOLLY
See Also:
Constant Field Values

SURFACE_TYPE_SAS

public static final int SURFACE_TYPE_SAS
See Also:
Constant Field Values

SURFACE_TYPE_BLOBBY

public static final int SURFACE_TYPE_BLOBBY
See Also:
Constant Field Values

SURFACE_TYPE_GAUSSIAN

public static final int SURFACE_TYPE_GAUSSIAN
See Also:
Constant Field Values

highPrecisions

protected static final float[] highPrecisions

mediumPrecisions

protected static final float[] mediumPrecisions

lowPrecisions

protected static final float[] lowPrecisions

precisionThresholds

protected static final int[] precisionThresholds

SURFACE_SMOOTHNESS

protected static final int SURFACE_SMOOTHNESS
See Also:
Constant Field Values

SURFACE_SIMPLIFICATION_ENABLED

protected static final boolean SURFACE_SIMPLIFICATION_ENABLED
See Also:
Constant Field Values

AUTO_RESOLUTION_ENABLED

protected static final boolean AUTO_RESOLUTION_ENABLED
See Also:
Constant Field Values

DEFAULT_RESOLUTION

public static final float DEFAULT_RESOLUTION
See Also:
Constant Field Values

DEFAULT_PROBE_RADIUS

public static final float DEFAULT_PROBE_RADIUS
See Also:
Constant Field Values

DEFAULT_ISOVALUE

public static final float DEFAULT_ISOVALUE
See Also:
Constant Field Values

SURFACE_COLOR_TYPE_CONSTANT

public static final int SURFACE_COLOR_TYPE_CONSTANT
See Also:
Constant Field Values

SURFACE_COLOR_TYPE_ATOMTYPE

public static final int SURFACE_COLOR_TYPE_ATOMTYPE
See Also:
Constant Field Values

SURFACE_COLOR_TYPE_RESIDUE

public static final int SURFACE_COLOR_TYPE_RESIDUE
See Also:
Constant Field Values

SURFACE_COLOR_TYPE_CHAIN

public static final int SURFACE_COLOR_TYPE_CHAIN
See Also:
Constant Field Values

SURFACE_COLOR_TYPE_EP

public static final int SURFACE_COLOR_TYPE_EP
See Also:
Constant Field Values

SURFACE_COLOR_TYPE_SS

public static final int SURFACE_COLOR_TYPE_SS
See Also:
Constant Field Values

SURFACE_COLOR_GRID_MAPPING

public static final int SURFACE_COLOR_GRID_MAPPING
See Also:
Constant Field Values

SURFACE_COLOR_PROPERTY_MAPPING

public static final int SURFACE_COLOR_PROPERTY_MAPPING
See Also:
Constant Field Values

SURFACE_COLOR_TYPE_B_FACTOR

public static final int SURFACE_COLOR_TYPE_B_FACTOR
See Also:
Constant Field Values

SURFACE_COLOR_TYPE_RAINBOW

public static final int SURFACE_COLOR_TYPE_RAINBOW
See Also:
Constant Field Values

paletteId

protected int paletteId

customPaletteColors

protected byte[][] customPaletteColors

surfaceGridPrecision

protected float surfaceGridPrecision

surfaceSmoothnessFactor

protected int surfaceSmoothnessFactor

surfaceSimplificationEnabled

protected boolean surfaceSimplificationEnabled

surfaceSimplificationTolerance

protected float surfaceSimplificationTolerance

automaticSettingOfGridSize

protected boolean automaticSettingOfGridSize

atomCount

protected int atomCount

surfaceType

protected int surfaceType

surfaceColorType

protected int surfaceColorType
Constructor Detail

MolecularSurfaceComponent

public MolecularSurfaceComponent()
Creates a new instance of MolecularSurfaceComponent without setting anything.


MolecularSurfaceComponent

public MolecularSurfaceComponent(chemaxon.struc.MoleculeIterators.MoleculeInterface mi,
                                 chemaxon.marvin.modules.mprop.VolumetricData vd)
                          throws java.lang.Exception
Creates a MolecularSurfaceComponent from the given MoleculeInterface and VolumetricData, which usually comes from a Gaussian Cube file.

Throws:
java.lang.Exception

MolecularSurfaceComponent

public MolecularSurfaceComponent(chemaxon.struc.MoleculeIterators.MoleculeInterface mi,
                                 chemaxon.marvin.modules.mprop.VolumetricData vd,
                                 float isoValue)
                          throws java.lang.Exception
Creates a MolecularSurfaceComponent from the given MoleculeInterface and VolumetricData, which usually comes from a Gaussian Cube file.

Throws:
java.lang.Exception

MolecularSurfaceComponent

public MolecularSurfaceComponent(java.util.ArrayList molecules)
Creates a MolecularSurfaceComponent to the given list of MoleculeInterfaces and MoleculeVisualizers. Does not compute a surface, setSurfaceType() should be called.


MolecularSurfaceComponent

public MolecularSurfaceComponent(java.util.ArrayList molecules,
                                 java.lang.String surfaceType)
                          throws java.lang.Exception
Creates a MolecularSurfaceComponent to the given list of MoleculeInterfaces and MoleculeVisualizers.

Parameters:
surfaceType - can be "van der Waals", "Solvent-accessible", "Connolly", "Blobby".
Throws:
java.lang.Exception
Method Detail

getSurfaceTypeString

public static java.lang.String getSurfaceTypeString(int surfaceType)

getSurfaceType

public static int getSurfaceType(java.lang.String type)

onRemoveGraphicComponent

public void onRemoveGraphicComponent()
Overrides:
onRemoveGraphicComponent in class GraphicComponent

setProgressBar

public void setProgressBar(chemaxon.marvin.space.ProgressBarInterface PB)
Overrides:
setProgressBar in class GraphicComponent

receiveNotificationOnCoordinateChange

public void receiveNotificationOnCoordinateChange(GraphicComponent gc)
The molecule will notify the surface when its coordinates change.

Overrides:
receiveNotificationOnCoordinateChange in class GraphicComponent
Parameters:
gc - component changing coordinates

isControllable

public boolean isControllable(java.lang.String type)
Returns whether controling by the given type of controller is allowed to the component. This component is allowed to be resized.

Overrides:
isControllable in class GraphicComponent
Parameters:
type - control event type, Resize and Shift> are interpreted by this component
Returns:
true if type is either Resize or Shift

translate

public void translate(float[] v)
Translates the component with the given translation vector.

Overrides:
translate in class GraphicComponent
Parameters:
v - 3D translation vector

resize

public void resize(double x,
                   double y,
                   double z)
Resizes the component according to given factors.

Overrides:
resize in class GraphicComponent
Parameters:
x - size increment/decrement
y - size increment/decrement
z - size increment/decrement

surfaceOf

public boolean surfaceOf(GraphicComponent gc)
Tells whether it is the molecular surface of the given component (molecule).


setMolecules

public void setMolecules(java.util.ArrayList molecules)
The surface will be the molecular surface of the given molecules.

Parameters:
molecules - MoleculeInterfaces and MoleculeVisualizers (now every MoleculeVisualizer is also a MoleculeInterface)

draw

public void draw()
Draws the molecular surface, and recomputes it if the coordinates of the molecule have been changed.

Overrides:
draw in class GraphicComponent

drawTransparentPart

public void drawTransparentPart()
Draws the surface if it was transparent or mesh.

Overrides:
drawTransparentPart in class GraphicComponent

getColor

public java.awt.Color getColor()
Returns the constant color of the surface.

Specified by:
getColor in interface chemaxon.marvin.space.UsableObject
Overrides:
getColor in class GraphicComponent

setColor

public void setColor(java.awt.Color c)
Description copied from class: GraphicComponent
Sets the constant color of the component.

Specified by:
setColor in interface chemaxon.marvin.space.UsableObject
Overrides:
setColor in class GraphicComponent

getSurface

public SurfaceComponent getSurface()
Returns the surface.


getSurfaceType

public int getSurfaceType()
Returns the type of the surface. See {#SURFACE_TYPE_VDW}, {#SURFACE_TYPE_CONNOLLY}, {#SURFACE_TYPE_SAS}, {#SURFACE_TYPE_BLOBBY}, {#SURFACE_TYPE_GAUSSIAN} types. Type can be returned as String with {#getSurfaceTypeString(int)}.


setSurfaceType

public void setSurfaceType(java.lang.String s)
                    throws java.lang.Exception
Sets the type of the surface and computes the surface with the necessary method. SurfaceType can be "van der Waals", "Solvent-accessible", "Connolly", "Blobby".

Throws:
java.lang.Exception

getSurfaceSmoothnessFactor

public int getSurfaceSmoothnessFactor()
Surfaces can be smoothed by the following algorithm: Paul Bourke: Surface Relaxation and Smoothing http://astronomy.swin.edu.au/~pbourke/modelling/relax/ This algorithm has a smoothness factor. If the factor is 0, the algorithm will not have effect.


setSurfaceSimplificationEnabled

public void setSurfaceSimplificationEnabled(boolean b)
The number of surface polygons can be reduced by the following algorithm: Paul Bourke: Surface (polygonal) Simplification http://astronomy.swin.edu.au/~pbourke/modelling/surfsimp/ This method enables/disables simplification. If this is enabled, computing surface will require more time, but displaying will be much easier and faster, and data will cost less memory.


getSurfaceSimplificationEnabled

public boolean getSurfaceSimplificationEnabled()
Returns true if Surface Simplification is enabled. See setSurfaceSimplificationEnabled(boolean) for details.


getSurfaceThreshold

public float getSurfaceThreshold()
Returns the isovalue/threshold of the surface.


getProbeRadius

public double getProbeRadius()
Returns the probe radius the surface computing will use. Connolly and Solvent-accesible surfaces use a so-called probe radius, which approximates the radius of a water molecule.


setProbeRadius

public void setProbeRadius(double r)
Sets thwe probe radius that is the radius of a water molecule used in computing surfaces.


setVisible

public void setVisible(boolean state)
Sets the surface to be visible/invisible.

Specified by:
setVisible in interface chemaxon.marvin.space.UsableObject
Overrides:
setVisible in class GraphicComponent
Parameters:
state - of visibility

getSurfacePrecision

public double getSurfacePrecision()
Returns the grid resolution from which the surface is computed.


setSurfacePrecision

public void setSurfacePrecision(java.lang.String quality)
                         throws java.lang.Exception
Sets the surface precision by setting a quality. Grid resolution from which the surface is computed will be set according to the given quality.

Parameters:
quality - can be "High", "Medium", "Low"
Throws:
java.lang.Exception

setSurfacePrecision

public void setSurfacePrecision(float v)
Explicitly sets the grid resolution from which the surface is computed.


setSurfacePrecision

public void setSurfacePrecision()
Resolution will be set automatically according to the number of atoms and the rendering quality. Larger number of atoms means lower precision.


setDrawProperty

public void setDrawProperty(java.lang.String propertyName,
                            java.lang.String propertyValue)
                     throws java.lang.Exception
This is the gate of draw properties from outside to the component. See also GraphicComponent.setDrawProperty(String, String). Accepts:
  • "Surface.DrawType" -- "Dot", "Mesh", "Solid", "Transparent"
  • "Surface.ColorType" "Constant", "AtomType", "ResidueType", "ChainType", "ElectrostaticPotential"
  • "Surface.Color" -- java.awt.Color value as String
  • "CarbonColorStyle" -- Integer value as String
    (Carbon color is 0: lightgray, 1: darkgray, 2: green, 3:cyan)

Specified by:
setDrawProperty in interface chemaxon.marvin.space.UsableObject
Overrides:
setDrawProperty in class GraphicComponent
Parameters:
propertyName - identifier of the draw property
propertyValue - value of the draw property as a String
Throws:
java.lang.Exception

refreshColoring

public void refreshColoring()
                     throws java.lang.Exception
Throws:
java.lang.Exception

getDrawType

public int getDrawType()
Returns the drawing type of the molecular surface. See SurfaceComponent.getDrawType().


hasTransparentPart

public boolean hasTransparentPart()
Returns true if the drawing type of the molecular surface was MESH_TYPE or TRANSPARENT_TYPE.

Overrides:
hasTransparentPart in class GraphicComponent
Returns:
will the component draw with transparency

getColorType

public int getColorType()
Returns the color type of the surface. See SURFACE_COLOR_TYPE_CONSTANT, SURFACE_COLOR_TYPE_ATOMTYPE, SURFACE_COLOR_TYPE_RESIDUE, SURFACE_COLOR_TYPE_CHAIN, SURFACE_COLOR_TYPE_EP}


setPalette

public void setPalette(int paletteId)
Sets a built-in palette used during coloring the molecular surface.

Parameters:
paletteId - id of the palette, see SurfaceColoring.COLOR_MAPPER_RAINBOW, SurfaceColoring.COLOR_MAPPER_BLUE_TO_GREEN, etc.

setPalette

public void setPalette(byte[][] colors)
Sets colors to be used by the color palette.

Parameters:
colors - array of byte[3] colors

setExclusiveDrawing

public void setExclusiveDrawing(boolean b)
Enables/disables exclusive drawing, see SurfaceComponent.setExclusiveColor(byte[]).

Parameters:
b -

isVolumeVisible

public boolean isVolumeVisible()
Tells whether the volumetric data is shown or not. Note that the volume can be visible independently of the surface.

Returns:
true if the surface is a Gaussian Cube surface, and the volumetric data is visible.

showVolume

public void showVolume(boolean b)
For Gaussian Cube surfaces it can be enabled to visualize the volumetric data from which the surface is generated.

Parameters:
b -

setNegativeCriterium

public void setNegativeCriterium(double v)
                          throws java.lang.Exception
Sets the lowest negative value colored. Vertices having larger negative value (nearer to zero) won't be colored.

Throws:
java.lang.Exception

setPositiveCriterium

public void setPositiveCriterium(double v)
                          throws java.lang.Exception
Sets the lowest positive value colored. Vertices having lower positive value (nearer to zero) won't be colored.

Throws:
java.lang.Exception

setPaletteMinimum

public void setPaletteMinimum(double v)
                       throws java.lang.Exception
Sets the largest negative value colored. Vertices having lower negative value (farther from zero) won't be colored.

Throws:
java.lang.Exception

setPaletteMaximum

public void setPaletteMaximum(double v)
                       throws java.lang.Exception
Sets the largest positive value colored. Vertices having larger positive value (farther from zero) won't be colored.

Throws:
java.lang.Exception

getPalette

public chemaxon.marvin.space.util.Palette getPalette()
Returns the used built-in palette.

Returns:
the actually used palette object

getPaletteString

public java.lang.String getPaletteString()
Returns the string identifier of the used built-in palette.

Returns:
a string that identifies the built-in palette by ColorPaletteUtil.getBuiltInPalette(Object)

getMinimumMappedValue

public double getMinimumMappedValue()
Returns the minimum value of the mapped property on this surface.


getMaximumMappedValue

public double getMaximumMappedValue()
Returns the maximum value of the mapped property on this surface.


isColorMapperEnabled

public boolean isColorMapperEnabled()

mapPropertyToSurface

public void mapPropertyToSurface(chemaxon.marvin.modules.mprop.VolumetricData vd)
                          throws java.lang.Exception
Coloring surface based on the given grid.

Parameters:
vd - property grid
Throws:
java.lang.Exception

mapPropertyToSurface

public void mapPropertyToSurface(chemaxon.marvin.space.grid.Grid grid)
                          throws java.lang.Exception
Throws:
java.lang.Exception

updatePropertyMapping

public void updatePropertyMapping()
                           throws java.lang.Exception
Throws:
java.lang.Exception

setAtomPropertyList

public void setAtomPropertyList(java.util.ArrayList atomProperties)
Sets a list of atomic properties that can be mapped as coloring on the surface.

Parameters:
atomProperties -

select

public void select()
Description copied from class: GraphicComponent
Sets the component to be selected. See also unSelect().

Specified by:
select in interface chemaxon.marvin.space.UsableObject
Overrides:
select in class GraphicComponent

surfaceSimplification

public void surfaceSimplification()
                           throws java.lang.Exception
Runs the (might be time-consuming) algorithm thst reduces the number of triangles of the surface. Note that this method is irreversible, and can greatly deform the surface when invoked many times. Usually reducing the number of triangles one time does not change the characteristic (shape) of the surface too much, but reduces the number of triangles by 40-70% so drawing can be much faster after that.

Throws:
java.lang.Exception

setGL

public void setGL(javax.media.opengl.GL2 gl,
                  javax.media.opengl.glu.GLU glu)
Description copied from class: GraphicComponent
Sets the GL2 rendering environment. Without this being set the component cannot draw itself.

Overrides:
setGL in class GraphicComponent
Parameters:
gl - Interface to OpenGL
glu - Interface to OpenGL

drawSelection

protected void drawSelection(int mode)
Description copied from class: GraphicComponent
Draws the component in the given mode (usually in selection mode), the rendering mode is for checking.

Overrides:
drawSelection in class GraphicComponent
Parameters:
mode - GL_RENDER or GL_SELECT

setRotateMatrix

public void setRotateMatrix(float[] rotateMatrix)
Description copied from class: GraphicComponent
Sets the rotation matrix in order to get the proper mapping of a vector to the viewing plane.

Overrides:
setRotateMatrix in class GraphicComponent
Parameters:
rotateMatrix - float array having 16 elements representing a 4 by 4 rotation matrix

callback

public java.lang.Object callback(java.lang.String method,
                                 java.lang.Object arg)
Specified by:
callback in interface chemaxon.marvin.util.CallbackIface