|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.marvin.space.GraphicComponent
chemaxon.marvin.space.MolecularSurfaceComponent
public class MolecularSurfaceComponent
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.
| 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.GL gl,
javax.media.opengl.glu.GLU glu)
Sets the GL 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 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 |
|---|
public static final int SURFACE_TYPE_VDW
public static final int SURFACE_TYPE_CONNOLLY
public static final int SURFACE_TYPE_SAS
public static final int SURFACE_TYPE_BLOBBY
public static final int SURFACE_TYPE_GAUSSIAN
protected static final float[] highPrecisions
protected static final float[] mediumPrecisions
protected static final float[] lowPrecisions
protected static final int[] precisionThresholds
protected static final int SURFACE_SMOOTHNESS
protected static final boolean SURFACE_SIMPLIFICATION_ENABLED
protected static final boolean AUTO_RESOLUTION_ENABLED
public static final float DEFAULT_RESOLUTION
public static final float DEFAULT_PROBE_RADIUS
public static final float DEFAULT_ISOVALUE
public static final int SURFACE_COLOR_TYPE_CONSTANT
public static final int SURFACE_COLOR_TYPE_ATOMTYPE
public static final int SURFACE_COLOR_TYPE_RESIDUE
public static final int SURFACE_COLOR_TYPE_CHAIN
public static final int SURFACE_COLOR_TYPE_EP
public static final int SURFACE_COLOR_TYPE_SS
public static final int SURFACE_COLOR_GRID_MAPPING
public static final int SURFACE_COLOR_PROPERTY_MAPPING
public static final int SURFACE_COLOR_TYPE_B_FACTOR
public static final int SURFACE_COLOR_TYPE_RAINBOW
protected int paletteId
protected byte[][] customPaletteColors
protected float surfaceGridPrecision
protected int surfaceSmoothnessFactor
protected boolean surfaceSimplificationEnabled
protected float surfaceSimplificationTolerance
protected boolean automaticSettingOfGridSize
protected int atomCount
protected int surfaceType
protected int surfaceColorType
| Constructor Detail |
|---|
public MolecularSurfaceComponent()
public MolecularSurfaceComponent(chemaxon.struc.MoleculeIterators.MoleculeInterface mi,
chemaxon.marvin.modules.mprop.VolumetricData vd)
throws java.lang.Exception
java.lang.Exception
public MolecularSurfaceComponent(chemaxon.struc.MoleculeIterators.MoleculeInterface mi,
chemaxon.marvin.modules.mprop.VolumetricData vd,
float isoValue)
throws java.lang.Exception
java.lang.Exceptionpublic MolecularSurfaceComponent(java.util.ArrayList molecules)
setSurfaceType()
should be called.
public MolecularSurfaceComponent(java.util.ArrayList molecules,
java.lang.String surfaceType)
throws java.lang.Exception
surfaceType - can be "van der Waals", "Solvent-accessible", "Connolly", "Blobby".
java.lang.Exception| Method Detail |
|---|
public static java.lang.String getSurfaceTypeString(int surfaceType)
public static int getSurfaceType(java.lang.String type)
public void onRemoveGraphicComponent()
onRemoveGraphicComponent in class GraphicComponentpublic void setProgressBar(chemaxon.marvin.space.ProgressBarInterface PB)
setProgressBar in class GraphicComponentpublic void receiveNotificationOnCoordinateChange(GraphicComponent gc)
receiveNotificationOnCoordinateChange in class GraphicComponentgc - component changing coordinatespublic boolean isControllable(java.lang.String type)
isControllable in class GraphicComponenttype - control event type, Resize and Shift>
are interpreted by this component
- Returns:
- true if
type is either Resize or Shift public void translate(float[] v)
translate in class GraphicComponentv - 3D translation vector
public void resize(double x,
double y,
double z)
resize in class GraphicComponentx - size increment/decrementy - size increment/decrementz - size increment/decrementpublic boolean surfaceOf(GraphicComponent gc)
public void setMolecules(java.util.ArrayList molecules)
molecules - MoleculeInterfaces and MoleculeVisualizers
(now every MoleculeVisualizer is also a MoleculeInterface)public void draw()
draw in class GraphicComponentpublic void drawTransparentPart()
drawTransparentPart in class GraphicComponentpublic java.awt.Color getColor()
getColor in interface chemaxon.marvin.space.UsableObjectgetColor in class GraphicComponentpublic void setColor(java.awt.Color c)
GraphicComponent
setColor in interface chemaxon.marvin.space.UsableObjectsetColor in class GraphicComponentpublic SurfaceComponent getSurface()
public int getSurfaceType()
String with {#getSurfaceTypeString(int)}.
public void setSurfaceType(java.lang.String s)
throws java.lang.Exception
java.lang.Exceptionpublic int getSurfaceSmoothnessFactor()
public void setSurfaceSimplificationEnabled(boolean b)
public boolean getSurfaceSimplificationEnabled()
setSurfaceSimplificationEnabled(boolean) for details.
public float getSurfaceThreshold()
public double getProbeRadius()
public void setProbeRadius(double r)
public void setVisible(boolean state)
setVisible in interface chemaxon.marvin.space.UsableObjectsetVisible in class GraphicComponentstate - of visibilitypublic double getSurfacePrecision()
public void setSurfacePrecision(java.lang.String quality)
throws java.lang.Exception
quality - can be "High", "Medium", "Low"
java.lang.Exceptionpublic void setSurfacePrecision(float v)
public void setSurfacePrecision()
public void setDrawProperty(java.lang.String propertyName,
java.lang.String propertyValue)
throws java.lang.Exception
GraphicComponent.setDrawProperty(String, String).
Accepts:
String
String
setDrawProperty in interface chemaxon.marvin.space.UsableObjectsetDrawProperty in class GraphicComponentpropertyName - identifier of the draw propertypropertyValue - value of the draw property as a String
java.lang.Exception
public void refreshColoring()
throws java.lang.Exception
java.lang.Exceptionpublic int getDrawType()
SurfaceComponent.getDrawType().
public boolean hasTransparentPart()
MESH_TYPE or TRANSPARENT_TYPE.
hasTransparentPart in class GraphicComponentpublic int getColorType()
SURFACE_COLOR_TYPE_CONSTANT, SURFACE_COLOR_TYPE_ATOMTYPE,
SURFACE_COLOR_TYPE_RESIDUE, SURFACE_COLOR_TYPE_CHAIN, SURFACE_COLOR_TYPE_EP}
public void setPalette(int paletteId)
paletteId - id of the palette, see SurfaceColoring.COLOR_MAPPER_RAINBOW,
SurfaceColoring.COLOR_MAPPER_BLUE_TO_GREEN, etc.public void setPalette(byte[][] colors)
colors - array of byte[3] colorspublic void setExclusiveDrawing(boolean b)
SurfaceComponent.setExclusiveColor(byte[]).
b - public boolean isVolumeVisible()
public void showVolume(boolean b)
b -
public void setNegativeCriterium(double v)
throws java.lang.Exception
java.lang.Exception
public void setPositiveCriterium(double v)
throws java.lang.Exception
java.lang.Exception
public void setPaletteMinimum(double v)
throws java.lang.Exception
java.lang.Exception
public void setPaletteMaximum(double v)
throws java.lang.Exception
java.lang.Exceptionpublic chemaxon.marvin.space.util.Palette getPalette()
public java.lang.String getPaletteString()
ColorPaletteUtil.getBuiltInPalette(Object)public double getMinimumMappedValue()
public double getMaximumMappedValue()
public boolean isColorMapperEnabled()
public void mapPropertyToSurface(chemaxon.marvin.modules.mprop.VolumetricData vd)
throws java.lang.Exception
vd - property grid
java.lang.Exception
public void mapPropertyToSurface(chemaxon.marvin.space.grid.Grid grid)
throws java.lang.Exception
java.lang.Exception
public void updatePropertyMapping()
throws java.lang.Exception
java.lang.Exceptionpublic void setAtomPropertyList(java.util.ArrayList atomProperties)
atomProperties - public void select()
GraphicComponentunSelect().
select in interface chemaxon.marvin.space.UsableObjectselect in class GraphicComponent
public void surfaceSimplification()
throws java.lang.Exception
java.lang.Exception
public void setGL(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu)
GraphicComponent
setGL in class GraphicComponentgl - Interface to OpenGLglu - Interface to OpenGLprotected void drawSelection(int mode)
GraphicComponent
drawSelection in class GraphicComponentmode - GL_RENDER or GL_SELECTpublic void setRotateMatrix(float[] rotateMatrix)
GraphicComponent
setRotateMatrix in class GraphicComponentrotateMatrix - float array having 16 elements representing a 4 by 4 rotation matrix
public java.lang.Object callback(java.lang.String method,
java.lang.Object arg)
callback in interface chemaxon.marvin.util.CallbackIface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||