SALMON VR: Visualizing Light–Matter Dynamics
Abstract
This study presents SALMON VR, a visualization program designed to visualize the time evolution of electronic density changes and vector potentials in virtual reality (VR) space. The time-series electronic density data computed by SALMON are stored in CUBE format. SALMON VR processes these data to construct isosurfaces of electronic density variations and two-dimensional representations of vector potentials. Equipped with a user-friendly interface using VR technology, the program is available in two versions: one for the Meta Quest 3 head-mount display (Meta Platforms Inc., California) and one for PCs. Atoms are displayed as spheres of different sizes and colors according to their elemental properties. This visual representation facilitates a deeper understanding of the complex interactions between light and electrons. Users can easily manipulate the isosurface values, speed of animation, and color map of the vector potential. SALMON VR will enable researchers and educators to enhance their understanding of physical phenomena and improve engagement in learning environments.
I Introduction
In recent years, the visualization of data in computational physics and materials science has become an indispensable element in the advancement of research. Understanding complex three-dimensional data such as electron density variations, current density, and vector potentials is crucial for gaining deep insights into physical phenomena. In the last few decades, visualization technologies have evolved significantly, particularly given the proliferation of virtual reality (VR) and augmented reality (AR) technologies, which have laid the groundwork for exploring data from new perspectives [1].
Understanding the interaction between light and matter is critical for understanding the properties of materials. In particular, the electron dynamics under coherent light pulses in the femto- and/or atto-second regions is a state-of-the-art topic in science [2]. We have been developing a first-principles light–matter interaction simulator called Scalable Ab-initio Light–Matter simulator for Optics and Nanoscience (SALMON) [3]. SALMON enables first-principles calculations that couple electron dynamics with electromagnetic field dynamics. Our first principles approach on SALMON enables us to perform precise simulation of material optical properties not only in the linear regime but also in the non-perturbative regime. The data produced by SALMON include three-dimensional spatial data and their evolution over time. Therefore, these datasets are highly complex and multidimensional.
In this study, we have developed SALMON VR, which is an application for visualizing the data calculated by SALMON as continuous time-series files in CUBE format [4] in the VR space of the Meta Quest 3 (Meta Platforms Inc., California) and on a PC. SALMON VR offers users a real-time experience of the computational results, providing a novel platform enabling researchers and students to explore and analyze data on site. Recent advances in visualization technologies enable users to explore large datasets in immersive environments. This dynamic use of SALMON’s unique data has the potential to enhance understanding and facilitate new discoveries, allowing scientists to engage deeply with complex data through interactive experiences in virtual space.
II SALMON
II.1 Simulation with SALMON
SALMON is an open-source program for calculating the electron dynamics under a light field using time-dependent density functional theory (TDDFT) and Maxwell’s equations in the time domain [3, 5]. The time-dependent Kohn-Sham (TDKS) equation [6, 3] is used to calculate the electron dynamics, as follows:
(1) |
where the scalar potential includes the Hartree potential from the electrons plus the local part of the ionic pseudopotentials, and we have defined . Here, and are the non-local part of the ionic pseudopotentials[7] and exchange-correlation potential, respectively. In addition to hybrid functionals, SALMON can use various other .
The TDKS equation combined with Maxwell’s equations can be used to describe the propagation of light. SALMON has two types of light-matter coupling, multiscale and single-scale modes. Because SALMON VR is made for the single-scale mode [8], we focus on the single-scale mode in this paper. Using Maxwell’s equations in single-scale mode, the propagation of the electromagnetic fields in the form of the vector potential is described as
(2) |
where is the microscopic current density and is the scalar potential. Both the TDKS and Maxwell’s equations are discretized using uniform real-space grids.
II.2 Output files
SALMON has two options for writing the changes in electron density
(3) |
current density
(4) |
and vector potential (). Here, is the electron density distribution at time . The first option, “yn_out_dns_ac_je=y/n,” outputs the electron density distribution, vector potential , and ionic coordinates in CUBE format [4] during the time propagation. The data are output every time step, which is defined by the “out_dns_ac_je_step” parameter. The default output files are “it time step number_drho.cube” for the electron density, “it time step number_je_x/y/z.cube” for the current density, and “it time step number_Ac_x/y/z.cube” for the vector potentials. Here, “_x,” “_y,” and “_z” indicate the , , and components of the vector in Cartesian coordinates, respectively. All CUBE files should be moved to the directory defined in the configuration file, which we discuss below.
III SALMON VR
SALMON VR [9] is a visualization application that was developed using Unity [10]. In the default setting, SALMON VR loads the CUBE files and displays the atoms and . As an example, we present a visualization of a silicon thin-film capped by hydrogen atoms. Figure 1 shows a snapshot of the animation. We used the local density approximation for the exchange correlation functional [11]. The atoms are rendered as spherical objects, using different colors and sizes for each type. The color and size assignments follow the standard VESTA definition [12]. In Fig. 1, the large blue spheres are silicon atoms and the small gray spheres are hydrogen atoms. The values of are rendered on two isosurfaces, where positive values are blue and negative values are yellow. The isosurfaces are calculated using the marching cubes algorithm [13]. The color range of an isosurface is automatically normalized by the maximum absolute .
Vector potentials are rendered as mapped planes on the bottom boundary of the computational space. In many cases, the wavelength of the light is much larger than the target, and density changes and vector potentials can be difficult to discern when they overlap. To simplify visualization, the vertical component of the vector potential is averaged using an arithmetic mean. This process reduces visual noise and allows for a clearer understanding of the main trends. The values of each grid are represented as red for positive values and blue for negative values. The closer the value is to zero, the more transparent the point becomes, with zero being completely transparent. The values are normalized so that the maximum values are red (#FF0000FF) and blue (#0000FFFF).
Because the data are output in intervals defined by “out_dns_ac_je_step,” the animation does not run smoothly when the intervals are large. Hence, SALMON VR uses the previous and next data to interpolate linearly as
(5) |
and generate images of the missing time steps. Here, denotes the previous (next) loaded data, and denotes the previous (next) time step. Moreover, – are defined by the SALMON parameter “out_dns_ac_je.”

III.1 Application for the Meta Quest 3
There are two versions of SALMON VR, one is for a PC and the other is for the Meta Quest 3. Using the Meta Quest 3 enables viewers to “feel” the electron dynamics and vector potential in VR space.

Figure 2 presents a typical scene in the Meta Quest 3. The graphical user interface (GUI) control panel (Fig. 2 (1)) appears above the left controller, with the panel oriented to match the control surface where the stick and buttons are located. The animation and isosurface level can be controlled using this control panel, as shown in Fig 3. The computational box is indicated by the black lines (Fig. 2 (2)). The atoms and are shown in the computational box (Fig. 2 (3)). Finally, Figure 2 (4) is the averaged vector potential.
The Meta Quest 3 has two controllers, one for the right hand and one for the left hand. The viewpoint is controlled by these controllers. Table 1 lists the actions the user can take.

Controller | Action | ||||
---|---|---|---|---|---|
Left Stick |
|
||||
Left Trigger | Speed up the movement | ||||
Right Stick |
|
||||
Right Trigger | Speed up the rotation | ||||
A | Play/Stop | ||||
B | Reverse/Stop | ||||
Y | Speed up | ||||
X | Speed up the reverse |
III.2 Application for MacOS and Windows
SALMON VR has also been implemented as a PC application (MacOS and Windows). Although the Meta Quest 3 is a good device for interacting with the visualization, a typical PC monitor can be more suitable for sharing the image. Figure 4 indicates the panel of SALMON VR on MacOS. With the exception of the control panel position, the definitions are the same as those of the Meta Quest 3.
The viewpoint and position can be controlled by the keyboard (Table 2) and the mouse controller (Table 3).

Key | Action |
---|---|
w | Forward |
s | Backward |
a | Leftward |
d | Rightward |
e | Upward |
q | Downward |
↑ | Upward rotation |
↓ | Downward rotation |
← | Left rotation |
→ | Right rotation |
Operation | Action |
---|---|
Scroll | Move forward/backward |
Drag with right button | Rotation |
Drag with middle button | Move Up/Down/Left/Right |
III.3 Configuration file
Parameter | Value | Type | Default | ||||
CubeFilesDirectoryName | Directory where the Cube files are located | Text | ”Ac_Je_drho_CUBE” | ||||
InfomationText | Additional text in GUI panel | Text | ”0.25fs” | ||||
TimestepPerSecond |
|
Integer | 100 | ||||
DrhoFileFormat | File name for the isosurface | Text | ”*drho.cube” | ||||
AcFileFormat | File name for the 2D-plot on the floor | Text | ”*Ac_x.cube” | ||||
EnableAcGammaCorrection |
|
Boolean | false | ||||
AcGamma |
|
Real number | 2.2 |
Although SALMON VR can be used without any preparation other than providing CUBE files,
we can change some parameters using the config.json configuration file.
An example of the config.json file is as follows:
{
”CubeFilesDirectoryName”: ”Ac_Je_drho_CUBE”,
”InfomationText”: ”0.25fs”,
”TimestepPerSecond”: 100,
”DrhoFileFormat”: ”*drho.cube”,
”AcFileFormat”: ”*Ac_x.cube”,
”EnableAcGammaCorrection”: false,
”AcGamma”: 2.2
}.
Table 4 lists the definitions of the parameters for config.json. “CubeFilesDirectoryName” defines the directory where the CUBE files to be loaded exist. “InformationText” is the text displayed as the additional information. “TimestepPerSecond” defines the speed of the animation (time steps per second). The default configuration describes the isosurface of and the 2D plot of the x-component of . By changing “DrhoFileFormat” and “AcFileFormat” we can create an animation of other data, such as . The gamma corrected color map [14] can be used by setting “EnableAcGammaCorrecti” to “true” and selecting the correct coefficient of gamma correction if the “AcFileFormat” color map is not suitable for the data. Gamma correction is a non-linear operation to encode and decode transparency values. We employ the simple gamma correction
(6) |
where is the non-corrected data, is the corrected data, and is the coefficient for gamma correction. The new color scale is defined by . The config.json file is valid for both Meta Quest 3 and PC applications.
IV Conclusion
This paper presented SALMON VR, a versatile visualization tool with potential for both research and education. Its intuitive VR interface and interactive features overcome common challenges in visualizing complex scientific data, thereby enhancing understanding and promoting engagement among students and researchers alike. The accessibility of SALMON VR, coupled with its potential for integration into educational settings, has promise for improving the teaching and learning of optics and laser physics.
In addition to electron density and vector potential, SALMON VR can be modified to display various time series in CUBE files by changing the configuration file. Therefore, SALMON VR is not just an application for SALMON; it can visualize any 4D data in VR space.
Acknowledgements
This research was supported by MEXT Quantum Leap Flagship Program (MEXT Q-LEAP) Grant Number JPMXS0118067246 and KAKENHI Grant Number 24K01224. We thank Kimberly Moravec, PhD, from Edanz (https://jp.edanz.com/ac) for editing a draft of this manuscript.
References
- Jiang et al. [2023] J. Jiang, G. Zhou, B. M. Duffy, and V. G. Duffy, Ar and vr – a review on recent progress and applications, in HCI International 2023 – Late Breaking Papers, edited by J. Y. C. Chen, G. Fragomeni, and X. Fang (Springer Nature Switzerland, Cham, 2023) pp. 46–63.
- L’Huillier [2024] A. L’Huillier, Nobel lecture: The route to attosecond pulses, Rev. Mod. Phys. 96, 030503 (2024).
- Noda et al. [2019] M. Noda, S. A. Sato, Y. Hirokawa, M. Uemoto, T. Takeuchi, S. Yamada, A. Yamada, Y. Shinohara, M. Yamaguchi, K. Iida, I. Floss, T. Otobe, K.-M. Lee, K. Ishimura, T. Boku, G. F. Bertsch, K. Nobusada, and K. Yabana, Salmon: Scalable ab-initio light–matter simulator for optics and nanoscience, Computer Physics Communications 235, 356 (2019).
- [4] Gaussian cube files, https://paulbourke.net/dataformats/cube/.
- Sal [a] Salmon official, http://salmon-tddft.jp (a).
- Runge and Gross [1984] E. Runge and E. K. U. Gross, Density-functional theory for time-dependent systems, Phys. Rev. Lett. 52, 997 (1984).
- Troullier and Martins [1991] N. Troullier and J. L. Martins, Efficient pseudopotentials for plane-wave calculations, Phys. Rev. B 43, 1993 (1991).
- Yamada and Yabana [2021] S. Yamada and K. Yabana, Determining the optimum thickness for high harmonic generation from nanoscale thin films: An ab initio computational study, Phys. Rev. B 103, 155426 (2021).
- Sal [b] Salmon vr, https://github.com/SALMON-TDDFT/SALMON-VR (b).
- [10] Unity tecnologies, https://github.com/Unity-Technologies.
- Perdew and Zunger [1981] J. P. Perdew and A. Zunger, Self-interaction correction to density-functional approximations for many-electron systems, Phys. Rev. B 23, 5048 (1981).
- Momma and Izumi [2011] K. Momma and F. Izumi, VESTA3 for three-dimensional visualization of crystal, volumetric and morphology data, Journal of Applied Crystallography 44, 1272 (2011).
- Lorensen and Cline [1987] W. E. Lorensen and H. E. Cline, Marching cubes: A high resolution 3d surface construction algorithm, SIGGRAPH Comput. Graph. 21, 163 (1987).
- Poynton [2003] C. Poynton, Digital Video and HD: Algorithms and Interfaces, Electronics & Electrical (Elsevier Science, 2003).