  We present a method of conducting data-driven simulations of solar active
regions and flux emergence with the MURaM radiative magnetohydrodynamics (MHD)
code. The horizontal electric field derived from the full velocity and magnetic
vectors, is implemented at the photospheric (bottom) boundary to drive the
induction equation. The energy equation accounts for thermal conduction along
magnetic fields, optically-thin radiative loss, and heating of coronal plasma
by viscous and resistive dissipation, which allows for a realistic presentation
of the thermodynamic properties of coronal plasma that are key to predicting
the observational features of solar active regions and eruptions. To validate
the method, the photospheric data from a comprehensive radiative MHD simulation
of solar eruption (the ground truth) are used to drive a series of numerical
experiments. The data-driven simulation reproduces the accumulation of free
magnetic energy over the course of flux emergence in the ground truth with an
error of 3\%. The onset time is approximately 8\,min delayed compared to the
ground truth. However, a precursor-like signature can be identified at the
correct onset time. The data-driven simulation captures key eruption-related
emission features and plasma dynamics of the ground truth flare over a wide
temperature span from $\log_{10}T{=}4.5$ to $\log_{10}T{>}8$. The evolution of
the flare and coronal mass ejection as seen in synthetic extreme ultraviolet
images is also reproduced with high fidelity. The method helps to understand
the evolution of magnetic field in a more realistic coronal environment and to
link the magnetic structures to observable diagnostics.
