org.jmol.jvxl.readers
Class IsoSolventReader
java.lang.Object
org.jmol.jvxl.readers.SurfaceReader
org.jmol.jvxl.readers.VolumeDataReader
org.jmol.jvxl.readers.AtomDataReader
org.jmol.jvxl.readers.IsoSolventReader
- All Implemented Interfaces:
- VertexDataServer
class IsoSolventReader
- extends AtomDataReader
Fields inherited from class org.jmol.jvxl.readers.AtomDataReader |
atomCount, atomData, atomIndex, atomNo, atomProp, atomRadius, atomXyz, bsMyIgnored, bsMySelected, bsNearby, bsSurfaceVoxels, contactPair, doAddHydrogens, doUseIterator, fileDotModel, fileName, firstNearbyAtom, havePlane, margin, maxDistance, modelIndex, myAtomCount, myIndex, nearbyAtomCount, noFaceSpheres, pt0, pt1, ptXyzTemp, ptY0, ptZ0, thisAtomSet, thisPlane, thisX, validSpheres, voxelSource |
Fields inherited from class org.jmol.jvxl.readers.SurfaceReader |
allowSigma, ANGSTROMS_PER_BOHR, anisotropy, center, cJvxlEdgeNaN, colorFractionBase, colorFractionRange, contourVertexCount, dataMax, dataMean, dataMin, defaultCutoff, defaultMappedDataMax, defaultMappedDataMin, eccentricityMatrix, eccentricityMatrixInverse, eccentricityRatio, eccentricityScale, edgeFractionBase, edgeFractionRange, fractionData, hasColorData, haveSurfaceAtoms, isAnisotropic, isEccentric, isJvxl, isProgressive, isQuiet, isXLowToHigh, jvxlColorDataRead, jvxlCutoff, jvxlData, jvxlDataIs2dContour, jvxlDataIsColorMapped, jvxlDataIsPrecisionColor, jvxlEdgeDataRead, jvxlFileHeaderBuffer, jvxlNSurfaceInts, jvxlVoxelBitSet, marchingCubes, marchingSquares, meshData, meshDataServer, minMax, nBytes, nDataPoints, nPointsX, nPointsY, nPointsZ, params, ptTemp, qpc, sg, vertexDataOnly, volumeData, volumetricOrigin, volumetricVectors, voxelCounts, voxelData, xyzMax, xyzMin, yzCount, yzPlanes |
Method Summary |
int |
addVertexCopy(javax.vecmath.Point3f vertexXYZ,
float value,
int assocVertex)
addVertexCopy is used by the Marching Squares algorithm to
uniquely identify a new vertex when an edge is crossed in the 2D plane. |
private float |
checkSpecialVoxel(javax.vecmath.Point3f ptA,
float rAS,
javax.vecmath.Point3f ptB,
float rBS,
float dAB,
javax.vecmath.Point3f ptV)
|
(package private) void |
dumpLine(javax.vecmath.Point3f pt1,
javax.vecmath.Tuple3f pt2,
java.lang.String label,
java.lang.String color)
|
(package private) void |
dumpLine2(javax.vecmath.Point3f pt1,
javax.vecmath.Point3f pt2,
java.lang.String label,
float d,
java.lang.String color1,
java.lang.String color2)
|
(package private) void |
dumpPoint(javax.vecmath.Point3f pt,
java.lang.String label,
java.lang.String color)
|
protected IsoSolventReader.Edge |
findEdge(int i,
int j)
|
protected void |
generateCube()
|
private void |
generateSolventCavity()
|
private void |
generateSolventCube()
|
private void |
getEdges()
|
private void |
getFaces()
|
(package private) void |
getMaxRadius()
|
float[] |
getPlane(int x)
|
protected double |
getPointP(int ia,
int ib)
|
private boolean |
getSolventPoints(int ia,
int ib,
int ic)
|
protected float |
getSurfacePointAndFraction(float cutoff,
boolean isCutoffAbsolute,
float valueA,
float valueB,
javax.vecmath.Point3f pointA,
javax.vecmath.Vector3f edgeVector,
int x,
int y,
int z,
int vA0,
int vB0,
float[] fReturn,
javax.vecmath.Point3f ptReturn)
TEST: alternative EXACT position of fraction for spherical MarchingCubes
FOR: ttest.xyz:
2
isosurface molecular test showing discontinuities
C -2.70 0 0
C 2.75 0 0
RESULT:
LINEAR (points slightly within R):
$ isosurface resolution 5 volume area solvent 1.5 full
isosurface1 created with cutoff=0.0; number of isosurfaces = 1
isosurfaceArea = [75.06620391572324]
isosurfaceVolume = [41.639681683494324]
NONLINEAR:
$ isosurface resolution 5 volume area solvent 1.5 full
isosurface1 created with cutoff=0.0; number of isosurfaces = 1
isosurfaceArea = [75.11873783245028]
isosurfaceVolume = [41.727027252180655]
MSMS:
msms -if ttest.xyzrn -of ttest -density 5
MSMS 2.6.1 started on Local PC
Copyright M.F. |
float |
getValueAtPoint(javax.vecmath.Point3f pt)
|
private void |
markFaceVoxels(boolean firstPass)
|
private void |
markToroidVoxels()
|
private static void |
mergeLimits(javax.vecmath.Point3i ptA,
javax.vecmath.Point3i ptB,
javax.vecmath.Point3i pt0,
javax.vecmath.Point3i pt1)
|
protected void |
postProcessVertices()
|
protected boolean |
readVolumeParameters(boolean isMapData)
|
void |
selectPocket(boolean doExclude)
|
protected void |
setup(boolean isMapData)
|
private float |
solventDistance(float rAS,
float rBS,
float dAB,
float dAV,
float dBV)
|
protected void |
unsetVoxelData()
|
private boolean |
validateFace(IsoSolventReader.Face f)
|
private static boolean |
voxelIsInTrough(float dXC,
float rAC2,
float rBC,
float dAB,
float dAX)
|
Methods inherited from class org.jmol.jvxl.readers.AtomDataReader |
fixTitleLine, getAtomMinMax, getAtoms, markPlaneVoxels, markSphereVoxels, resetPlane, resetVoxelData, setGridLimitsForAtom, setHeader, setRanges, setVertexSource, setVolumeData, setVolumeForPlane, setVoxel |
Methods inherited from class org.jmol.jvxl.readers.SurfaceReader |
addTriangleCheck, applyColorScale, colorIsosurface, createIsosurface, discardTempData, excludeMaximumSet, excludeMinimumSet, finalizeMapping, getColorPhaseIndex, getMinMaxMappedValues, getSurfaceAtomIndex, getSurfacePointIndexAndFraction, getValue, gotoAndReadVoxelData, gotoData, initializeMapping, initializeVolumetricData, initPlanes, jvxlUpdateInfo, newVoxelDataCube, readAndSetVolumeParameters, readColorData, resetIsosurface, setBoundingBox, setOutputStream, setVectorAnisotropy, setVertexAnisotropy, setVolumeData, setVolumetricAnisotropy, setVolumetricOriginAnisotropy, slabIsosurface, updateSurfaceData, updateTriangles |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cavityRadius
private float cavityRadius
envelopeRadius
private float envelopeRadius
dots
private javax.vecmath.Point3f[] dots
doCalculateTroughs
private boolean doCalculateTroughs
isCavity
private boolean isCavity
isPocket
private boolean isPocket
solventRadius
protected float solventRadius
iter
private AtomIndexIterator iter
bsSurfacePoints
private java.util.BitSet bsSurfacePoints
bsSurfaceDone
private java.util.BitSet bsSurfaceDone
bsLocale
private java.util.BitSet[] bsLocale
htEdges
private java.util.Map<java.lang.String,IsoSolventReader.Edge> htEdges
vEdges
private java.util.List<IsoSolventReader.Edge> vEdges
aEdges
private IsoSolventReader.Edge[] aEdges
vFaces
private java.util.List<IsoSolventReader.Face> vFaces
vTemp
protected javax.vecmath.Vector3f vTemp
plane
protected javax.vecmath.Point4f plane
ptTemp2
protected javax.vecmath.Point3f ptTemp2
ptS1
private javax.vecmath.Point3f ptS1
ptS2
private javax.vecmath.Point3f ptS2
vTemp2
protected javax.vecmath.Vector3f vTemp2
vTemp3
private javax.vecmath.Vector3f vTemp3
dPX
private float dPX
p
protected final javax.vecmath.Point3f p
maxRadius
private float maxRadius
bsAtomMinMax
private java.util.BitSet[] bsAtomMinMax
isSurfacePoint
private boolean isSurfacePoint
iAtomSurface
private int iAtomSurface
testLinear
private static boolean testLinear
nTest
protected int nTest
IsoSolventReader
IsoSolventReader(SurfaceGenerator sg)
readVolumeParameters
protected boolean readVolumeParameters(boolean isMapData)
- Overrides:
readVolumeParameters
in class VolumeDataReader
setup
protected void setup(boolean isMapData)
- Overrides:
setup
in class AtomDataReader
generateCube
protected void generateCube()
- Overrides:
generateCube
in class VolumeDataReader
getSurfacePointAndFraction
protected float getSurfacePointAndFraction(float cutoff,
boolean isCutoffAbsolute,
float valueA,
float valueB,
javax.vecmath.Point3f pointA,
javax.vecmath.Vector3f edgeVector,
int x,
int y,
int z,
int vA0,
int vB0,
float[] fReturn,
javax.vecmath.Point3f ptReturn)
- TEST: alternative EXACT position of fraction for spherical MarchingCubes
FOR: ttest.xyz:
2
isosurface molecular test showing discontinuities
C -2.70 0 0
C 2.75 0 0
RESULT:
LINEAR (points slightly within R):
$ isosurface resolution 5 volume area solvent 1.5 full
isosurface1 created with cutoff=0.0; number of isosurfaces = 1
isosurfaceArea = [75.06620391572324]
isosurfaceVolume = [41.639681683494324]
NONLINEAR:
$ isosurface resolution 5 volume area solvent 1.5 full
isosurface1 created with cutoff=0.0; number of isosurfaces = 1
isosurfaceArea = [75.11873783245028]
isosurfaceVolume = [41.727027252180655]
MSMS:
msms -if ttest.xyzrn -of ttest -density 5
MSMS 2.6.1 started on Local PC
Copyright M.F. Sanner (1994)
Compilation flags
INPUT ttest.xyzrn 2 spheres 0 collision only, radii 1.700 to 1.700
PARAM Probe_radius 1.500 density 5.000 hdensity 3.000
Couldn't find first face trying -all option
ANALYTICAL SURFACE AREA :
Comp. probe_radius, reent, toric, contact SES SAS
0 1.500 0.000 8.144 67.243 75.387 238.258
NUMERICAL VOLUMES AND AREA
Comp. probe_radius SES_volume SES_area)
0 1.50 40.497 74.132
Total ses_volume: 40.497
MSMS terminated normally
CONCLUSION:
-- surfaces are essentially identical
-- nonlinear is slightly closer to analytical area (75.387), as expected
-- both are better than MSMS triangulation for same "resolution":
prog parameters %Error
MSMS -density 5 1.66% (1412 faces)
MSMS -density 20 0.36% (2968 faces)
JMOL LINEAR resol 5 0.42% (2720 faces)
JMOL NONLINEAR resol 5 0.32% (2720 faces)
-- Marching Cubes is slightly improved using nonlinear calc.
- Overrides:
getSurfacePointAndFraction
in class SurfaceReader
- Parameters:
cutoff
- isCutoffAbsolute
- valueA
- valueB
- pointA
- edgeVector
- fReturn
- ptReturn
- x
- TODOy
- TODOz
- TODO
- Returns:
- fractional distance from A to B
addVertexCopy
public int addVertexCopy(javax.vecmath.Point3f vertexXYZ,
float value,
int assocVertex)
- Description copied from interface:
VertexDataServer
- addVertexCopy is used by the Marching Squares algorithm to
uniquely identify a new vertex when an edge is crossed in the 2D plane.
The implementing method should COPY the Point3f using Point3f.set().
The data consumer can use the association key to group this vertex with others
near the same gridpoint.
- Specified by:
addVertexCopy
in interface VertexDataServer
- Overrides:
addVertexCopy
in class SurfaceReader
assocVertex
- unique association vertex or -1
- Returns:
- new vertex index
selectPocket
public void selectPocket(boolean doExclude)
- Overrides:
selectPocket
in class SurfaceReader
postProcessVertices
protected void postProcessVertices()
- Overrides:
postProcessVertices
in class SurfaceReader
generateSolventCavity
private void generateSolventCavity()
generateSolventCube
private void generateSolventCube()
getEdges
private void getEdges()
findEdge
protected IsoSolventReader.Edge findEdge(int i,
int j)
getFaces
private void getFaces()
getSolventPoints
private boolean getSolventPoints(int ia,
int ib,
int ic)
validateFace
private boolean validateFace(IsoSolventReader.Face f)
markFaceVoxels
private void markFaceVoxels(boolean firstPass)
markToroidVoxels
private void markToroidVoxels()
unsetVoxelData
protected void unsetVoxelData()
- Overrides:
unsetVoxelData
in class AtomDataReader
getMaxRadius
void getMaxRadius()
mergeLimits
private static void mergeLimits(javax.vecmath.Point3i ptA,
javax.vecmath.Point3i ptB,
javax.vecmath.Point3i pt0,
javax.vecmath.Point3i pt1)
checkSpecialVoxel
private float checkSpecialVoxel(javax.vecmath.Point3f ptA,
float rAS,
javax.vecmath.Point3f ptB,
float rBS,
float dAB,
javax.vecmath.Point3f ptV)
voxelIsInTrough
private static boolean voxelIsInTrough(float dXC,
float rAC2,
float rBC,
float dAB,
float dAX)
solventDistance
private float solventDistance(float rAS,
float rBS,
float dAB,
float dAV,
float dBV)
getPointP
protected double getPointP(int ia,
int ib)
dumpLine
void dumpLine(javax.vecmath.Point3f pt1,
javax.vecmath.Tuple3f pt2,
java.lang.String label,
java.lang.String color)
dumpLine2
void dumpLine2(javax.vecmath.Point3f pt1,
javax.vecmath.Point3f pt2,
java.lang.String label,
float d,
java.lang.String color1,
java.lang.String color2)
dumpPoint
void dumpPoint(javax.vecmath.Point3f pt,
java.lang.String label,
java.lang.String color)
getValueAtPoint
public float getValueAtPoint(javax.vecmath.Point3f pt)
- Overrides:
getValueAtPoint
in class SurfaceReader
- Returns:
- value
getPlane
public float[] getPlane(int x)
- Specified by:
getPlane
in interface VertexDataServer
- Overrides:
getPlane
in class SurfaceReader