Builtin example 2¶
Pipeline description¶
This example demostrates how bivariate analysis can be used for the analysis of molecular data. The input to this pipeline are two scalar fields: the electron density field denoted as log(Rho)
and the reduced density gradeint denoted by log(s)
for a simple molecule called 1,2-ethanediol.
First, usual univariate scalar field analysis method is used for the analysis. An isosurafce is extracted in log(Rho)
field which helps in identification of the location of atoms in the molecule, see black surfaces in the lower left panel of the screenshot above. Similarly, an isosurafce in log(s)
identifies the covalent bonds.
Next we perform bivariate analysis which looks at the joint behaviour log(Rho)
and log(s)
rather than looking at these scalar fields individually. We first compute the ContinuousScatterPlot for this bivariate data. This is shown in the top panel of the screenshot above. We then project the isosrfaces extrated earlier during univariate analysis in the range space using ProjectionFromField. As expected these isosurfaces project to two line segments which are perpendicular to each other and parallel to the X axis and Y axis, repectively.
Note how the continuous scatter plot spreads largely diagonally down from top-left corner to bottom-right in the range space with four distinct protrusions coming out on the top and bottom. These protrusions are of interest. We manually select polylines in the range space at these four protrusions and use them for extraction of fiber surfaces using FiberSurface.
Two of the fiber surfaces correspond to the atoms in the molecule, one of which identifies the Oxygen atoms (red surfaces in bottom right panel of the screenshot) while the other surface identifies the Carbon atoms (grey surfaces in bottom right panel of the screenshot). The other two fiber surfaces identify the bonds or interaction sites in the molecule. One surface clearly identifies the covalent bonds (blue surfaces in bottom right panel of the screenshot), while the other identifies a non-covalent interaction site in the molecule (light green surface in bottom right panel of the screenshot). Note that using univariate analysis of the data it is not straightforward to distinguish between different type of atoms and different types of bonds. However, it is much easier to do so using bivariate data analysis.
Lastly, we also compute the JacobiSet for the bivariate data and project it in the range space. Notice how it aligns with the continuous scatter plot and identifies the boundaries and the distinguishable curves within it.
ParaView¶
To reproduce the above screenshot, go to your ttk-data directory and enter the following command:
paraview states/BuiltInExample2.pvsm
Python code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|
Inputs¶
- BuiltInExample2.vti: Bivariate field corresponding to electron density distribution
log(Rho)
and the reduced density gradientlog(s)
around a simple molecule 1,2-ethanediol.
Outputs¶
Univariate analysis outputs¶
logRhoIsosurfaceAtoms.vtp
: An isosurface extracted fromlog(Rho)
scalar field which identifies the locations of the atoms.logSIsosurfaceBonds.vtp
: An isosurface extracted fromlog(s)
scalar field which identifies the locations of the bonds or interaction sites.
Bivariate analysis outputs¶
Continuous scatter plot and projection of isocontours¶
ContinuousScatterPlot.vtu
: The continuous scatter plot for thelog(Rho)
andlog(s)
bivariate field.logRhoIsosurfaceRangeProjection.vtp
: The projection of the isosurface extracted fromlog(Rho)
onto the bivariate range space.logSIsosurfaceRangeProjection.vtp
: The projection of the isosurface extracted fromlog(s)
onto the bivariate range space.
Interesting control polygons in range space¶
OxygenAtomsRangePolygon.vtp
: Manually specified control polygon in range space to select the two Oxygen atoms in the molecule.CarbonAtomsRangePolygon.vtp
: Manually specified control polygon to select the Carbon atoms in the molecule.CovalentBondsRangePolygon.vtp
: Manually specified control polygon to identify the covalent bonds in the molecule.NonCovalentIntercationSiteRangePolygon.vtp
: Manually specified control polygon to identify the non-covalent interaction sites in the molecule.
Corresponding fiber surfaces in spatial domain¶
OxygenAtomsFiberSurface.vtp
: The corresponding fiber surface in the spatial domain for the Oxygen atom control polygon.CarbonAtomsFiberSurface.vtp
: The corresponding fiber surface in the spatial domain for the Carbon atom control polygon.CovalentBondsFiberSurface.vtp
: The corresponding fiber surface in the spatial domain for the covalent bonds control polygon.NonCovalentIntercationSiteFiberSurface.vtp
: The corresponding fiber surface in the spatial domain for the non-covalent bonds control polygon.
Jacobi set projection onto the continuous scatter plot¶
JacobiSetRangeProjection.vtu
: The projection of the Jacobi set of the bivariate field onto the bivariate range space.
Note that you are free to change the VTK file extensions to that of any other supported file format (e.g. csv
) in the above python script.