I can use the following command to produce the HOMO (highest occupied molecular orbital) in chemistry:
Clear["Global`*"];
cm = 72/2.54;
datapath = "ExampleData/Pyridinecarbonitrile_MO_25_29.cub";
g1 = Import[
datapath,
"Graphics3D",
Contours -> {-0.02, 0.02},
ContourStyle -> {{Blue, Opacity[0.6]}, {Red, Opacity[0.6]}},
Background -> None,
(*MeshStyle->Gray,*)
(*Mesh->Automatic,*)
ImageSize -> {8 cm, 6 cm}
] // First
It looks pretty good, but compared to IboView, it's not as beautiful. Here are some images of the IboView:
This color scheme is really nice! So how do I get the same color scheme in Wolfram as IboView?
=========upgrate=========
by Specularity
and Lighting
function,change some
Clear["Global`*"];
cm = 72/2.54;
datapath = "ExampleData/Pyridinecarbonitrile_MO_25_29.cub";
g1 = Import[
datapath,
"Graphics3D",
Contours -> {-0.02, 0.02},
ContourStyle -> {
{
RGBColor["#c593fc"],
Opacity[0.6],
Specularity[Lighter@RGBColor["#9053e2"], 50]
},
{
RGBColor["#8ab6f4"],
Opacity[0.6],
Specularity[Lighter@RGBColor["#5f9bf0"], 50]
}
},
Lighting -> "ThreePoint",
Method -> {"RelieveDPZFighting" -> True},
Background -> None
(*MeshStyle->Gray,
Mesh->Automatic*)
] // First
It's a little closer to the color scheme.Then I tried the Glow
function
I can use ImageData
function get image color data
i = Import[
"https://cdn.jsdelivr.net/gh/wxyhgk/paper-picture/202207231113165.\
png"]
Flatten[ImageData[ColorConvert[i, "RGB"]], 1]
BubbleChart[
Append @@@
Tally[Round[
Flatten[ImageData[ColorConvert[i, "LAB"]], 1][[All, {2, 3}]],
10^-1]], ColorFunction -> (LABColor[.6, ##] &),
ColorFunctionScaling -> False, BubbleSizes -> {0.01, 0.1}]
Perhaps this color data can be used for ContourStyle? What do I do next, I don't know
Import
statements that run code from some other place because it could be dangerous, but maybe the mods allow it. $\endgroup$"https://github.com/wxyhgk/molecular/releases/download/cube/Ar-I_\ mo40.cub"
, that's the dangerous part. Also, even if the data is safe, there's no guarentee that the link won't be broken in the future. It's better to use ExampleData as in document page instead. $\endgroup$Import["http
. Uploading a file to github so it can be an example here is completely appropriate $\endgroup$