We perform a frequency-resolved analysis of electron dynamics in solids to
obtain microscopic insight into linear and nonlinear optical phenomena. For the
analysis, we first compute the electron dynamics under optical electric fields
and evaluate the microscopic current density as a function of time and space.
Subsequently, we perform the Fourier transformation on the microscopic current
density and obtain the corresponding quantity in the frequency domain. The
frequency-resolved microscopic current density provides insight into the
microscopic electron dynamics in real-space at the frequency of linear and
nonlinear optical responses. We apply frequency-resolved microscopic current
density analysis to light-induced electron dynamics in aluminum, silicon, and
diamond based on the first-principles electron dynamics simulation according to
the time-dependent density functional theory. Consequently, the nature of
delocalized electrons in metals and bound electrons in semiconductors and
insulators is suitably captured by the developed scheme