  In this paper, we present YunMa, an exoplanet cloud simulation and retrieval
package, which enables the study of cloud microphysics and radiative properties
in exoplanetary atmospheres. YunMa simulates the vertical distribution and
sizes of cloud particles and their corresponding scattering signature in
transit spectra. We validated YunMa against results from the literature. When
coupled to the TauREx 3 platform, an open Bayesian framework for spectral
retrievals, YunMa enables the retrieval of the cloud properties and parameters
from transit spectra of exoplanets. The sedimentation efficiency
($f_{\mathrm{sed}}$), which controls the cloud microphysics, is set as a free
parameter in retrievals. We assess the retrieval performances of YunMa through
28 instances of a K2-18 b-like atmosphere with different fractions of H$_2$/He
and N$_2$, and assuming water clouds. Our results show a substantial
improvement in retrieval performances when using YunMa instead of a simple
opaque cloud model and highlight the need to include cloud radiative transfer
and microphysics to interpret the next-generation data for exoplanet
atmospheres. This work also inspires instrumental development for future
flagships by demonstrating retrieval performances with different data quality.
