Skip to content

Commit 4e0bd84

Browse files
committed
Revising paper
1 parent 0799b3c commit 4e0bd84

File tree

5 files changed

+85
-55
lines changed

5 files changed

+85
-55
lines changed

paper/img/MO_benzene_CAN.png

468 KB
Loading
177 KB
Loading

paper/jats/isosurface_examples.jpg

84.1 KB
Loading

paper/paper.bib

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ @misc{TclapLibrary
9292
howpublished = "{https://tclap.sourceforge.net/}",
9393
}
9494

95+
@software{PyQInt,
96+
author = {Ivo A.W. Filot},
97+
year = {2020},
98+
title = {PyQInt: An Educational Hartree-Fock Code in Python},
99+
url = {https://github.com/ifilot/pyqint},
100+
}
101+
95102
@Article{hunter:2007,
96103
Author = {Hunter, J. D.},
97104
Title = {Matplotlib: A 2D graphics environment},
@@ -256,3 +263,11 @@ @article{su:2018
256263
year = {2018},
257264
doi = {10.1021/acscatal.7b03295},
258265
}
266+
267+
@software{Blender,
268+
title = {Blender - a 3D modelling and rendering package},
269+
organization = {Blender Foundation},
270+
address = {Stichting Blender Foundation, Amsterdam},
271+
year = {2018},
272+
url = {http://www.blender.org},
273+
}

paper/paper.md

Lines changed: 70 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -16,57 +16,75 @@ bibliography: paper.bib
1616

1717
# Summary
1818

19-
Electron density is central to electronic structure calculations, providing a
20-
detailed depiction of electron distribution in materials or molecules. In
21-
various methodologies, particularly Density Functional Theory, electron density
22-
is crucial for deriving properties such as energy, potential, and forces. It
23-
reveals the complexities of chemical bonding and reactivity, crucial for
24-
predicting and understanding the characteristics of materials and molecules,
25-
especially in terms of electron redistribution during bond formation or rupture.
26-
27-
The electron density is a scalar field, which means that it is a function that
28-
assigns a scalar value to each point in space. In the case of the electron
29-
density, this scalar value represents the probability density of finding an
30-
electron at that point in space. Specialized visualization tools and techniques
31-
are often required to effectively visualize scalar fields such as the electron
32-
density. These tools may include contour plots, isosurface rendering, or volume
33-
rendering, among others. Visualizing the electron density is essential for
34-
gaining insights into the electronic properties and behavior of materials and
35-
molecules.
36-
37-
`Den2Obj` is a C++-based command-line tool designed to construct isosurfaces of
38-
an electron density scalar field. It can parse CHGCAR and PARCHG files of VASP
39-
as well as Gaussian Cube files. `Den2Obj` also supports converting these into
40-
native `.d2o` files which offer a significant compression in size with respect
41-
to these former files. The resulting isosurfaces can be stored in
42-
Stereolitography (`.stl`), Polygon File Format (`.ply`) and Wavefront (`.obj`)
43-
files, allowing for facile post-processing in various other programs.
19+
Electron density plays a foundational role in electronic structure calculations.
20+
It offers a detailed spatial representation of the distribution of electrons in
21+
molecules and materials. In computational methodologies, most notably Density
22+
Functional Theory (DFT), electron density serves as a central quantity from
23+
which key properties such as total energy, electrostatic potential, and atomic
24+
forces are derived. The analysis of electron density provides significant
25+
insights into chemical bonding, reactivity, and electron redistribution,
26+
especially during bond formation and dissociation. This capability enables the
27+
prediction and interpretation of the properties of materials and molecular
28+
systems.
29+
30+
Electron density is mathematically represented as a scalar field. It assigns a
31+
scalar value, corresponding to the probability density of finding an electron,
32+
to each point in three-dimensional space. Due to the complexity and high
33+
dimensionality of such data, specialized visualization techniques are necessary
34+
for meaningful interpretation. Common methods include contour plotting,
35+
isosurface generation, and volumetric rendering. These techniques facilitate the
36+
exploration of electronic behavior and structural characteristics.
37+
38+
This utility, `Den2Obj`, is a C++ based command line program developed to
39+
generate isosurfaces from electron density scalar fields. It supports input
40+
formats that are commonly used in electronic structure calculations, including
41+
CHGCAR and PARCHG files produced by VASP, as well as Gaussian Cube files.
42+
`Den2Obj` is capable of converting these formats into a native `.d2o` file
43+
format, which achieves substantial reductions in file size through efficient
44+
compression. The resulting isosurfaces can be exported in several widely
45+
supported geometry file formats, including STL (Stereolithography), PLY (Polygon
46+
File Format), and OBJ (Wavefront). These output formats enable convenient
47+
integration with a broad range of visualization and post-processing software
48+
tools.
4449

4550
# Statement of need
4651

47-
Isosurfaces play a pivotal role in both scientific research and engineering
48-
applications, offering a powerful tool for visualizing complex data sets and
49-
understanding intricate phenomena. These surfaces represent points in a field
50-
where a specific value, known as the isovalue, is constant. Due to its
51-
importance, there exist many programs that readily support isosurface
52-
generation, such as `Open Data Explorer` [@OpenDX], `Matlab` [@MATLAB],
53-
`ParaView` [@ParaView], and `Vesta` [@momma:2011]. These tools are mainly
54-
designed for interactive use and utilize a graphical user interface of some
55-
sort.
56-
57-
In contrast, `Den2Obj` is a C++-based command-line tool that performs isosurface
58-
construction from `VASP` [@hafner:2008] `CHGCAR` or `PARCHG` and and Gaussian
59-
[@gaussian] Cube files. The resulting isosurfaces can be stored as
60-
Stereolitography (`.stl`), Polygon File Format (`.ply`) or Wavefront (`.obj`)
61-
files. The isosurfaces can be constructed using the marching cubes
62-
[@lorensen:1987] or the marching tetrahedra [@burke:1994] algorithms by means of
63-
the command-line arguments. Both these algorithms are implemented using OpenMP
64-
parallelization making optimal use of modern multi-core CPUs. When rendering
65-
wavefunctions rather than electron densities, it is convenient to build two
66-
separate isosurfaces corresponding to the different signs of the lobes. `Den2Obj`
67-
readily accomodates this via a single command-line argument.
68-
69-
# picture with benzene orbital
52+
## Isosurface Visualization with `Den2Obj`
53+
54+
Isosurfaces play a central role in scientific research and engineering
55+
applications by providing an effective means of visualizing complex scalar
56+
fields and understanding intricate physical phenomena. An isosurface represents
57+
a set of points in a field where a scalar quantity, known as the *isovalue*,
58+
remains constant. Due to their importance, many software packages support
59+
isosurface generation, including `Open Data Explorer` [@OpenDX], `MATLAB`
60+
[@MATLAB], `ParaView` [@ParaView], and `VESTA` [@momma:2011]. These tools are
61+
primarily designed for interactive use and typically rely on graphical user
62+
interfaces.
63+
64+
In contrast, `Den2Obj` is a C++-based command line tool developed for automated
65+
isosurface extraction from electron density and wavefunction data. It supports
66+
input formats commonly produced by `VASP` [@hafner:2008], such as `CHGCAR` and
67+
`PARCHG`, as well as Gaussian [@gaussian] Cube files. The resulting isosurfaces
68+
can be exported in widely used 3D geometry formats, including Stereolithography
69+
(`.stl`), Polygon File Format (`.ply`), and Wavefront (`.obj`).
70+
71+
Isosurface generation in `Den2Obj` is carried out using either the marching
72+
cubes algorithm [@lorensen:1987] or the marching tetrahedra algorithm
73+
[@burke:1994], both of which can be selected via command line arguments. These
74+
algorithms are implemented with OpenMP parallelization to leverage the
75+
performance of modern multi-core CPUs. When visualizing wavefunctions rather
76+
than electron densities, it is often useful to generate separate isosurfaces for
77+
positive and negative lobes. `Den2Obj` accommodates this by enabling dual
78+
isosurface generation through a single command line argument.
79+
80+
An illustrative example is presented in \autoref{fig:canonical_mo}, which
81+
displays the canonical molecular orbitals of the benzene molecule. These
82+
orbitals were computed using the PyQInt program.[@PyQInt] Isosurfaces were
83+
generated via the marching cubes algorithm as implemented in Den2Obj, producing
84+
.ply files that were subsequently imported into Blender[@Blender], along with
85+
the atomic coordinates of benzene, for rendering.
86+
87+
![Isosurfaces of the first 15 canonical valence molecular orbitals of benzene. \label{fig:canonical_mo}](img/MO_benzene_CAN.png)
7088

7189
For efficient research data management purposes, `Den2Obj` is also able to
7290
convert `CHGCAR` and `PARCHG` files to its own custom `d2o` format, which is a
@@ -84,14 +102,11 @@ that internal details and density variations are more prominently shown,
84102
providing a comprehensive and nuanced understanding of the scalar field. In a
85103
way, volumetric rendering lies in between isosurfaces and contour plots in terms
86104
of visualizing a scalar field. An example for the molecular orbitals of benzene
87-
is provided in \autoref{fig:volumetric_rendering}.
105+
is provided in \autoref{fig:volumetric_rendering}. For demonstration and testing
106+
purposes, also a scalar field generator functionality is included that can
107+
create a number of relevant scalar fields to test the algorithms on.
88108

89-
![Volumetric rendering of the molecular orbitals of benzene using the OpenVDB format. \label{fig:volumetric_rendering}](img/benzene_mos_denscloud.jpg)
90-
91-
For demonstration and testing purposes, also a scalar field generator
92-
functionality is included that can create a number of relevant scalar fields to
93-
test the algorithms on. An example is provided in
94-
\autoref{fig:isosurface_examples}.
109+
![Volumetric rendering of the electron density associated with the first 15 canonical valence molecular orbitals of benzene using the OpenVDB format. \label{fig:volumetric_rendering}](img/benzene_mos_denscloud.jpg)
95110

96111
`Den2Obj` requires a relatively small set of dependencies, being Eigen3
97112
[@eigenweb], Boost [@BoostLibrary], `TCLAP` [@TclapLibrary], `lzma` [@lzmaweb],

0 commit comments

Comments
 (0)