org.jmol.shapesurface
Class Contact

java.lang.Object
  extended by org.jmol.shape.Shape
      extended by org.jmol.shape.MeshCollection
          extended by org.jmol.shapesurface.Isosurface
              extended by org.jmol.shapesurface.Contact
All Implemented Interfaces:
MeshDataServer, VertexDataServer

public class Contact
extends Isosurface


Field Summary
private  int atomCount
           
protected  Atom[] atoms
           
private  float maxData
           
private  float minData
           
private  javax.vecmath.Point3f pt1
           
private  javax.vecmath.Point3f pt2
           
private static RadiusData rdVDW
           
private  javax.vecmath.Vector3f vX
           
private  javax.vecmath.Vector3f vY
           
private  javax.vecmath.Vector3f vZ
           
 
Fields inherited from class org.jmol.shapesurface.Isosurface
allowMesh, iHaveBitSets, jvxlData, keyXy, sg, thisMesh
 
Fields inherited from class org.jmol.shape.MeshCollection
bsDisplay, colix, color, connections, currentMesh, displayWithinDistance2, displayWithinPoints, explicitID, htObjects, isDisplayWithinNot, isFixed, linkedMesh, meshCount, meshes, modelIndex, myType, nUnnamed, pickedMesh, pickedModel, pickedVertex, PREVIOUS_MESH_ID, previousMeshID, title
 
Fields inherited from class org.jmol.shape.Shape
g3d, isBioShape, modelSet, myVisibilityFlag, RADIUS_MAX, shapeID, translucentAllowed, translucentLevel, viewer, xmlProperties
 
Constructor Summary
Contact()
           
 
Method Summary
protected  void addMeshInfo(IsosurfaceMesh mesh, java.util.Map<java.lang.String,java.lang.Object> info)
           
private static int checkCp(ContactPair cp1, ContactPair cp2, int i1, int i2)
           
private  float combineSurfaces(java.util.List<ContactPair> pairs, int contactType, int displayType, float[] parameters, java.lang.Object func, boolean isColorDensity, boolean colorByType)
           
private  java.util.List<ContactPair> getPairs(java.util.BitSet bsA, java.util.BitSet bsB, RadiusData rd, int intramolecularMode)
           
private static void getVdwClashRadius(ContactPair cp, double x0, double vdwA, double vdwB, double d)
          well, heh, heh...
 void initShape()
           
private  void mergeMesh(MeshData md)
           
private  void newSurface(int displayType, ContactPair cp, java.util.BitSet bs1, java.util.BitSet bs2, RadiusData rd, float[] parameters, java.lang.Object func, boolean isColorDensity, VolumeData volumeData)
           
private  int setColorByScore(float score, int nV)
           
private  void setContacts(java.lang.Object[] value)
           
 void setProperty(java.lang.String propertyName, java.lang.Object value, java.util.BitSet bs)
          may come from any source -- executed AFTER a shape's own setProperty method
private  void setVolumeData(int type, VolumeData volumeData, ContactPair cp, float resolution, int nPairs)
           
 
Methods inherited from class org.jmol.shapesurface.Isosurface
addRequiredFile, addTriangleCheck, addVertexCopy, allocMesh, calculateGeodesicSurface, checkObjectClicked, checkObjectHovered, clearSg, discardTempData, fillMeshData, getCapSlabInfo, getCmd, getPlane, getPolygonColorData, getProperty, getProperty, getShapeDetail, getShapeState, getSurfacePointIndexAndFraction, getValue, invalidateTriangles, merge, newSg, notifySurfaceGenerationCompleted, notifySurfaceMappingCompleted, setOutputStream, setScriptInfo, slabPolygons
 
Methods inherited from class org.jmol.shape.MeshCollection
checkExplicit, clean, deleteMesh, deleteMesh, getIndexFromName, getMesh, setStatusPicked, setVisibilityFlags
 
Methods inherited from class org.jmol.shape.Shape
appendCmd, checkBoundsMinMax, checkObjectDragged, coordinateInRange, findNearestAtomIndex, getColix, getColorCommand, getColorCommand, getFontCommand, getShapeCommands, getShapeCommands, getSize, getSize, getViewer, initializeShape, initModelSet, setColix, setColix, setColix, setModelClickability, setModelSet, setShapeProperty, setShapeSize, setSize, setSize, setStateInfo, setStateInfo, wasClicked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

atoms

protected Atom[] atoms

atomCount

private int atomCount

minData

private float minData

maxData

private float maxData

rdVDW

private static final RadiusData rdVDW

vZ

private javax.vecmath.Vector3f vZ

vY

private javax.vecmath.Vector3f vY

vX

private javax.vecmath.Vector3f vX

pt1

private javax.vecmath.Point3f pt1

pt2

private javax.vecmath.Point3f pt2
Constructor Detail

Contact

public Contact()
Method Detail

initShape

public void initShape()
Overrides:
initShape in class Isosurface

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object value,
                        java.util.BitSet bs)
Description copied from class: Shape
may come from any source -- executed AFTER a shape's own setProperty method

Overrides:
setProperty in class Isosurface

setContacts

private void setContacts(java.lang.Object[] value)

combineSurfaces

private float combineSurfaces(java.util.List<ContactPair> pairs,
                              int contactType,
                              int displayType,
                              float[] parameters,
                              java.lang.Object func,
                              boolean isColorDensity,
                              boolean colorByType)
Parameters:
pairs -
contactType -
displayType -
parameters -
func -
isColorDensity -
colorByType -
Returns:
volume

setColorByScore

private int setColorByScore(float score,
                            int nV)

getPairs

private java.util.List<ContactPair> getPairs(java.util.BitSet bsA,
                                             java.util.BitSet bsB,
                                             RadiusData rd,
                                             int intramolecularMode)
Parameters:
bsA -
bsB -
rd -
intramolecularMode -
Returns:
a list of pairs of atoms to process

checkCp

private static int checkCp(ContactPair cp1,
                           ContactPair cp2,
                           int i1,
                           int i2)
Parameters:
cp1 -
cp2 -
i1 -
i2 -
Returns:
0 (no clash); 1 (remove #1); 2 (remove #2)

newSurface

private void newSurface(int displayType,
                        ContactPair cp,
                        java.util.BitSet bs1,
                        java.util.BitSet bs2,
                        RadiusData rd,
                        float[] parameters,
                        java.lang.Object func,
                        boolean isColorDensity,
                        VolumeData volumeData)

setVolumeData

private void setVolumeData(int type,
                           VolumeData volumeData,
                           ContactPair cp,
                           float resolution,
                           int nPairs)

mergeMesh

private void mergeMesh(MeshData md)

addMeshInfo

protected void addMeshInfo(IsosurfaceMesh mesh,
                           java.util.Map<java.lang.String,java.lang.Object> info)
Overrides:
addMeshInfo in class Isosurface

getVdwClashRadius

private static void getVdwClashRadius(ContactPair cp,
                                      double x0,
                                      double vdwA,
                                      double vdwB,
                                      double d)
well, heh, heh... This calculates the VDW extension x at a given distance for a clashing pair that will produce a volume that is equivalent to the volume for the vdw contact at the point of touching (d0 = vdwA + vdwB) and the transition to clash. This will provide the surface that will surround the clash until the clash size is larger than it.

Parameters:
cp -
x0 -
vdwA -
vdwB -
d -