|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
showMol.ShowMol
public class ShowMol
ShowMol is a molecular viewer for the following file types:
Applet Parameters
| NAME | Variable Type | Default | Description |
|---|---|---|---|
| BackgroundColor | String | 000000 | Sets the background color for the display. By default the background is black. Color is specified by six digit hexadecimal RGB value. |
| Center | Boolean | true | If true, the molecule is positioned at the center of the display. Applies only to the file specified by the File parameter. |
| Display | Integer | 1 | Display format. See documentation for codes. |
| File | String | Name of file to be loaded. | |
| Format | String | PDB | Format of the molecular structure file.
XYZ List of atoms with x,y,z positions COM Gaussian job file CUBE Gaussian cube file <\UL> |
| IsReady | String | JavaScript variable that will be set to true when applet has initialized. Must use MAYSCRIPT in APPLET tag to use this feature. | |
| Path | String | Path from the current directory to the orbital VRML files | |
| ViewDistance | float | 20.0 | Distance of view from origin. Set to keep entire molecule in view. |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.BaselineResizeBehavior |
| Field Summary | |
|---|---|
static int |
BALL
|
static int |
BALLANDSTICK
|
static int |
CENTERED
|
static int |
COM
|
static int |
CREATEBONDS
|
static int |
CUBE
|
static int |
PDB
|
static int |
SPACEFILLING
|
static int |
WIREFRAME
|
static int |
XYZ
|
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ShowMol()
|
|
| Method Summary | |
|---|---|
void |
addLine(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
Creates a line between two points with the pre-defined emissive color. |
void |
addMolecule(java.lang.String filename)
Adds a molecule to the display. |
void |
addMolecule(java.lang.String filename,
int dFormat)
Adds a molecule to the display. |
void |
addMolecule(java.lang.String filename,
int dFormat,
int fFormat)
Adds a molecule to the display. |
void |
addMoleculeRotation(int n,
double x,
double y,
double z,
double a)
Rotates the selected molecule. |
void |
addSpecial(int s)
Adds a Molecule based upon one of the special, pre-defined settings. |
void |
addSphere(float r,
float x,
float y,
float z)
Adds a sphere to the display. |
void |
centerMolecule(int idx)
Centers the specified molecule. |
void |
centerMoleculeOnAtom(int idx,
int a)
Translates the indicated molecule so that the specified atom is at the origin. |
void |
centerSpheres()
Translates all spheres so that the center of the set lies at the origin. |
void |
clearMouse()
Clears the mouse transformations. |
void |
clearRotation(int idx)
Clears the rotation component of the transform for this specified molecule. |
void |
destroy()
|
java.lang.String |
getAppletInfo()
|
java.lang.String |
getParameter(java.lang.String key,
java.lang.String def)
|
java.lang.String[][] |
getParameterInfo()
|
void |
init()
|
void |
setDiffuseColor(float r,
float g,
float b)
Sets the diffuse color for new spheres and lines. |
void |
setDisplayFormat(int d)
Sets the display format for molecules that will be loaded. |
void |
setDisplayFormat(int n,
int d)
Sets the display format for the indicated molecule, which must have previously been loaded. |
void |
setDisplayFormats(int d)
Sets the display format for all molecules currently loaded. |
void |
setEmissiveColor(float r,
float g,
float b)
Sets the emissive color for new spheres and lines. |
void |
setFileFormat(int format)
Sets the default format for molecular structure files. |
void |
setMoleculeRotation(int n,
double x,
double y,
double z,
double a)
Rotates the selected molecule. |
void |
setMoleculeRotationOnAtom(int n,
int idx,
double x,
double y,
double z,
double a)
Rotates the selected molecule. |
void |
setMoleculesVisible(boolean s)
Sets all or none of the molecules to be visible |
void |
setMoleculeTranslation(int n,
double x,
double y,
double z)
Sets the location of the selected molecule. |
void |
setMoleculeVisible(int n,
boolean s)
Determines whether the specified molecule is displayed. |
void |
setPath(java.lang.String filePath)
Sets the default path for files. |
void |
setRotation(double x,
double y,
double z,
double a)
Rotates the scene. |
void |
setTranslation(double x,
double y,
double z)
Shifts the position of the scene. |
void |
setViewDistance(float r)
Sets the viewing distance. |
void |
start()
|
void |
stop()
|
| Methods inherited from class java.applet.Applet |
|---|
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
| Methods inherited from class java.awt.Panel |
|---|
addNotify |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int PDB
public static int XYZ
public static int COM
public static int CUBE
public static int BALLANDSTICK
public static int BALL
public static int SPACEFILLING
public static int WIREFRAME
public static int CENTERED
public static int CREATEBONDS
| Constructor Detail |
|---|
public ShowMol()
| Method Detail |
|---|
public java.lang.String getAppletInfo()
getAppletInfo in class java.applet.Appletpublic java.lang.String[][] getParameterInfo()
getParameterInfo in class java.applet.Applet
public java.lang.String getParameter(java.lang.String key,
java.lang.String def)
public void init()
init in class java.applet.Appletpublic void start()
start in class java.applet.Appletpublic void stop()
stop in class java.applet.Appletpublic void destroy()
destroy in class java.applet.Appletpublic void addMolecule(java.lang.String filename)
filename - name of file to be loadedsetDisplayFormat,
setFileFormat
public void addMolecule(java.lang.String filename,
int dFormat)
filename - name of file to be loadeddFormat - index for display formatsetFileFormat
public void addMolecule(java.lang.String filename,
int dFormat,
int fFormat)
filename - name of file to be loadeddFormat - index for the display formatfFormat - index for file formatpublic void addSpecial(int s)
s - index of special molecule
public void addMoleculeRotation(int n,
double x,
double y,
double z,
double a)
n - index of molecule to be rotatedx - x component of axis of rotationy - y component of axis of rotationz - z component of axis of rotationa - angle of rotation
public void addSphere(float r,
float x,
float y,
float z)
r - radius of spherex - x coordinate for center of spherey - y coordinate for center of spherez - z coordinate for center of spheresetDiffuseColor,
setEmissiveColor
public void addLine(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
x1 - y1 - z1 - x2 - y2 - z2 - setEmissiveColorpublic void centerMolecule(int idx)
idx - index of molecule to be centered
public void centerMoleculeOnAtom(int idx,
int a)
idx - index of molecule to be centereda - index of atom to place at the originpublic void centerSpheres()
public void clearMouse()
public void clearRotation(int idx)
idx - index of molecule to be centered
public void setDiffuseColor(float r,
float g,
float b)
r - red componentg - green componentb - blue component
public void setEmissiveColor(float r,
float g,
float b)
r - red componentg - green componentb - blue componentpublic void setDisplayFormat(int d)
n - index for the moleculed - index for display
public void setDisplayFormat(int n,
int d)
n - index for the moleculed - index for displaypublic void setDisplayFormats(int d)
d - index for displaypublic void setFileFormat(int format)
format - format index
public void setMoleculeRotation(int n,
double x,
double y,
double z,
double a)
n - index of molecule to be rotatedx - x component of axis of rotationy - y component of axis of rotationz - z component of axis of rotationa - angle of rotation
public void setMoleculeRotationOnAtom(int n,
int idx,
double x,
double y,
double z,
double a)
n - index of molecule to be rotatedidx - index of atom about which rotation occursx - x component of axis of rotationy - y component of axis of rotationz - z component of axis of rotationa - angle of rotation
public void setMoleculeTranslation(int n,
double x,
double y,
double z)
n - index of molecule to be movedx - x component of translationy - y component of translationz - z component of translation
public void setMoleculeVisible(int n,
boolean s)
n - index of molecules - visibility statepublic void setMoleculesVisible(boolean s)
s - visibility statepublic void setPath(java.lang.String filePath)
filePath - path to files
public void setRotation(double x,
double y,
double z,
double a)
x - x component of axis of rotationy - y component of axis of rotationz - z component of axis of rotationa - angle of rotation
public void setTranslation(double x,
double y,
double z)
x - x component of translationy - y component of translationz - z component of translationpublic void setViewDistance(float r)
r - new viewing distance (along z axis)setBoundsRadius
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||