Guest User

Untitled

a guest
Jan 6th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. dataRange = Map[MinMax, {xg, yg, zg}]; (* the 3D range *)
  2. espRange = {-0.03, 0.01}; (* the range of values for the electrostatic potential*)
  3. esp = ListInterpolation[Transpose[espdata, {3, 2, 1}], dataRange]; (* Interpolate the electrostatic potential so that we can use it to color the electron density isosurface via the ColorFunction directive *)
  4. vp = ViewPoint -> {1.3, -2.4, 2.0};
  5. labels = Directive[FontSize -> 24, Black, FontFamily -> "Helvetica"];
  6. densityPlot =
  7. Legended[ListContourPlot3D[Transpose[cubedata, {3, 2, 1}],
  8. DataRange -> dataRange, Contours -> {0.001}, PlotRange -> Automatic,
  9. BoxRatios -> Automatic, Axes -> False, vp, Boxed -> False,
  10. MeshStyle -> Directive[Thickness[0.0075], Blue]
  11. , ColorFunction ->
  12. Function[{x, y, z},
  13. ColorData["NeonColors", Rescale[esp[x, y, z], espRange]]],
  14. ColorFunctionScaling -> False, MeshFunctions -> {esp[#, #2, #3] &},
  15. Mesh -> {{-0.03, -0.02, -0.01, 0.00, 0.01}}],
  16. BarLegend[{"NeonColors", espRange}, LabelStyle -> labels]]
Add Comment
Please, Sign In to add comment