Package 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classIsoSolventReader.Edgeprivate classIsoSolventReader.Face
-
Field Summary
Fields Modifier and Type Field Description private BS[]bsAtomMinMaxprivate BS[]bsLocaleprivate BSbsSurfaceDoneprivate BSbsSurfacePointsprivate floatcavityRadiusprivate floatdABprivate floatdAB2private booleandoCalculateTroughsprivate javajs.util.P3[]dotsprivate floatecosASB2private floatenvelopeRadiusprivate java.util.Map<java.lang.String,IsoSolventReader.Edge>htEdgesprivate intiAtomSurfaceprivate booleanisCavityprivate booleanisPocketprivate booleanisSurfacePointprivate AtomIndexIteratoriter(package private) intnTestprotected javajs.util.P3pprotected javajs.util.P4planeprivate javajs.util.P3ptS1private javajs.util.P3ptS2protected javajs.util.P3ptTemp2private floatrASprivate floatrAS2private floatrBSprivate floatrBS2private static booleantestLinearprotected javajs.util.Lst<IsoSolventReader.Edge>vEdgesprivate javajs.util.Lst<IsoSolventReader.Face>vFacesprotected javajs.util.V3vTempprotected javajs.util.V3vTemp2-
Fields inherited from class org.jmol.jvxl.readers.AtomDataReader
ac, atomData, atomIndex, atomNo, atomProp, atomRadius, atomXyzTruncated, bsMyIgnored, bsMySelected, bsNearby, bsSurfaceVoxels, contactPair, doAddHydrogens, doUseIterator, fileDotModel, fileName, firstNearbyAtom, haveOneProperty, havePlane, margin, maxDistance, maxRS, modelIndex, myAtomCount, myIndex, nearbyAtomCount, noFaceSpheres, pt0, pt1, ptV, ptY0, ptZ0, rs, rs2, sr, theProperty, thisAtomSet, thisPlane, thisX, validSpheres, vl0, vl1, vl2, voxelSource
-
Fields inherited from class org.jmol.jvxl.readers.VolumeDataReader
allowMapData, dataType, maxGrid, point, precalculateVoxelData, ptsPerAngstrom, useOriginStepsPoints
-
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, isPeriodic, isProgressive, isQuiet, isXLowToHigh, jvxlColorDataRead, jvxlCutoff, jvxlData, jvxlDataIs2dContour, jvxlDataIsColorDensity, 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
-
-
Constructor Summary
Constructors Constructor Description IsoSolventReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddVertexCopy(javajs.util.T3 vertexXYZ, float value, int assocVertex, boolean asCopy)addVertexCopy is used by the Marching Squares algorithm to uniquely identify a new vertex when an edge is crossed in the 2D plane.private floatcheckSpecialVoxel(javajs.util.P3 ptA, javajs.util.P3 ptB, javajs.util.P3 ptV)(package private) voiddiscardTempData(boolean discardAll)(package private) voiddumpLine(javajs.util.P3 pt1, javajs.util.T3 pt2, java.lang.String label, java.lang.String color)(package private) voiddumpLine2(javajs.util.P3 pt1, javajs.util.P3 pt2, java.lang.String label, float d, java.lang.String color1, java.lang.String color2)(package private) voiddumpPoint(javajs.util.P3 pt, java.lang.String label, java.lang.String color)protected IsoSolventReader.EdgefindEdge(int i, int j)protected voidgenerateCube()private voidgenerateSolventCavity()private voidgenerateSolventCube()private voidgetEdges()private voidgetFaces()float[]getPlane(int x)private booleangetSolventPoints(IsoSolventReader.Edge edge, int ia, int ib, int ic)protected floatgetSurfacePointAndFraction(float cutoff, boolean isCutoffAbsolute, float valueA, float valueB, javajs.util.T3 pointA, javajs.util.V3 edgeVector, int x, int y, int z, int vA0, int vB0, float[] fReturn, javajs.util.T3 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] revision 3/16/2014: isosurfaceArea = [75.13146821881998] isosurfaceVolume = [41.74598178064965] MSMS: msms -if ttest.xyzrn -of ttest -density 5 MSMS 2.6.1 started on Local PC Copyright M.F.floatgetValueAtPoint(javajs.util.T3 pt, boolean getSource)(package private) voidinit(SurfaceGenerator sg)implemented in SurfaceFileReader andprivate voidmarkFaceVoxels(boolean firstPass)private voidmarkToroidVoxels()protected voidpostProcessVertices()protected booleanreadVolumeParameters(boolean isMapData)voidselectPocket(boolean doExclude)protected voidsetup(boolean isMapData)private floatsolventDistance(float rAS, float rAS2, float rBS2, float dAV, float dAV2, float dBV2)protected voidunsetVoxelData()private IsoSolventReader.FacevalidateFace(int ia, int ib, int ic, IsoSolventReader.Edge edge, javajs.util.P3 ptS)-
Methods inherited from class org.jmol.jvxl.readers.AtomDataReader
getAtomMinMax, getAtoms, initADR, markPlaneVoxels, markSphereVoxels, resetPlane, resetVoxelData, setGridLimitsForAtom, setHeader, setRadii, setRanges, setup2, setVertexSource, setVolumeData, setVolumeDataADR, setVolumeForPlane, setVoxel, unsetVoxelData2
-
Methods inherited from class org.jmol.jvxl.readers.VolumeDataReader
closeReader, initVDR, readSurfaceData, readSurfaceDataVDR, readVolumeData, readVoxelDataIndividually, setVolumeDataParams, setVoxelRange, showGridInfo
-
Methods inherited from class org.jmol.jvxl.readers.SurfaceReader
addTriangleCheck, addVC, applyColorScale, colorIsosurface, createIsosurface, discardTempDataSR, excludeMaximumSet, excludeMinimumSet, finalizeMapping, getColorPhaseIndex, getMinMaxMappedValues, getPlaneSR, getSPF, getSurfaceAtomIndex, getSurfacePointIndexAndFraction, getValue, getValue2, gotoAndReadVoxelData, gotoData, initializeMapping, initializeVolumetricData, initPlanes, initSR, jvxlUpdateInfo, newVoxelDataCube, readAndSetVolumeParameters, readColorData, resetIsosurface, setBBox, setOutputChannel, setVectorAnisotropy, setVertexAnisotropy, setVolumeDataV, setVolumetricAnisotropy, setVolumetricOriginAnisotropy, slabIsosurface, updateSurfaceData, updateTriangles
-
-
-
-
Field Detail
-
cavityRadius
private float cavityRadius
-
envelopeRadius
private float envelopeRadius
-
dots
private javajs.util.P3[] dots
-
doCalculateTroughs
private boolean doCalculateTroughs
-
isCavity
private boolean isCavity
-
isPocket
private boolean isPocket
-
iter
private AtomIndexIterator iter
-
bsSurfacePoints
private BS bsSurfacePoints
-
bsSurfaceDone
private BS bsSurfaceDone
-
bsLocale
private BS[] bsLocale
-
htEdges
private java.util.Map<java.lang.String,IsoSolventReader.Edge> htEdges
-
vEdges
protected javajs.util.Lst<IsoSolventReader.Edge> vEdges
-
vFaces
private javajs.util.Lst<IsoSolventReader.Face> vFaces
-
ptS1
private final javajs.util.P3 ptS1
-
ptS2
private final javajs.util.P3 ptS2
-
vTemp
protected final javajs.util.V3 vTemp
-
plane
protected final javajs.util.P4 plane
-
ptTemp2
protected final javajs.util.P3 ptTemp2
-
vTemp2
protected final javajs.util.V3 vTemp2
-
p
protected final javajs.util.P3 p
-
testLinear
private static boolean testLinear
-
bsAtomMinMax
private BS[] bsAtomMinMax
-
isSurfacePoint
private boolean isSurfacePoint
-
iAtomSurface
private int iAtomSurface
-
nTest
int nTest
-
rAS
private float rAS
-
rBS
private float rBS
-
rAS2
private float rAS2
-
rBS2
private float rBS2
-
dAB
private float dAB
-
dAB2
private float dAB2
-
ecosASB2
private float ecosASB2
-
-
Method Detail
-
init
void init(SurfaceGenerator sg)
Description copied from class:SurfaceReaderimplemented in SurfaceFileReader and- Overrides:
initin classVolumeDataReader
-
readVolumeParameters
protected boolean readVolumeParameters(boolean isMapData)
- Overrides:
readVolumeParametersin classVolumeDataReader
-
setup
protected void setup(boolean isMapData)
- Overrides:
setupin classAtomDataReader
-
generateCube
protected void generateCube()
- Overrides:
generateCubein classVolumeDataReader
-
getSurfacePointAndFraction
protected float getSurfacePointAndFraction(float cutoff, boolean isCutoffAbsolute, float valueA, float valueB, javajs.util.T3 pointA, javajs.util.V3 edgeVector, int x, int y, int z, int vA0, int vB0, float[] fReturn, javajs.util.T3 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] revision 3/16/2014: isosurfaceArea = [75.13146821881998] isosurfaceVolume = [41.74598178064965] 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:
getSurfacePointAndFractionin classSurfaceReader- Parameters:
cutoff-isCutoffAbsolute-valueA-valueB-pointA-edgeVector-fReturn-ptReturn-- Returns:
- fractional distance from A to B
-
addVertexCopy
public int addVertexCopy(javajs.util.T3 vertexXYZ, float value, int assocVertex, boolean asCopy)Description copied from interface:VertexDataServeraddVertexCopy 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:
addVertexCopyin interfaceVertexDataServer- Overrides:
addVertexCopyin classSurfaceReaderassocVertex- unique association vertex or -1- Returns:
- new vertex index
-
selectPocket
public void selectPocket(boolean doExclude)
- Overrides:
selectPocketin classSurfaceReader
-
postProcessVertices
protected void postProcessVertices()
- Overrides:
postProcessVerticesin classSurfaceReader
-
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()
-
validateFace
private IsoSolventReader.Face validateFace(int ia, int ib, int ic, IsoSolventReader.Edge edge, javajs.util.P3 ptS)
-
markFaceVoxels
private void markFaceVoxels(boolean firstPass)
-
markToroidVoxels
private void markToroidVoxels()
-
unsetVoxelData
protected void unsetVoxelData()
- Overrides:
unsetVoxelDatain classAtomDataReader
-
getSolventPoints
private boolean getSolventPoints(IsoSolventReader.Edge edge, int ia, int ib, int ic)
-
checkSpecialVoxel
private float checkSpecialVoxel(javajs.util.P3 ptA, javajs.util.P3 ptB, javajs.util.P3 ptV)
-
solventDistance
private float solventDistance(float rAS, float rAS2, float rBS2, float dAV, float dAV2, float dBV2)
-
dumpLine
void dumpLine(javajs.util.P3 pt1, javajs.util.T3 pt2, java.lang.String label, java.lang.String color)
-
dumpLine2
void dumpLine2(javajs.util.P3 pt1, javajs.util.P3 pt2, java.lang.String label, float d, java.lang.String color1, java.lang.String color2)
-
dumpPoint
void dumpPoint(javajs.util.P3 pt, java.lang.String label, java.lang.String color)
-
getValueAtPoint
public float getValueAtPoint(javajs.util.T3 pt, boolean getSource)- Overrides:
getValueAtPointin classSurfaceReadergetSource- TODO- Returns:
- value
-
discardTempData
void discardTempData(boolean discardAll)
- Overrides:
discardTempDatain classSurfaceReader
-
getPlane
public float[] getPlane(int x)
- Specified by:
getPlanein interfaceVertexDataServer- Overrides:
getPlanein classSurfaceReader
-
-