We investigate general aspects of molecular line formation under conditions
which are typical of prestellar cores. Focusing on simple linear molecules, we
study formation of their rotational lines by radiative transfer simulations. We
present a thermalization diagram to show the effects of collisions and
radiation on the level excitation. We construct a detailed scheme (contribution
chart) to illustrate the formation of emission line profiles. This chart can be
used as an efficient tool to identify which parts of the cloud contribute to a
specific line profile. We show how molecular line characteristics for uniform
model clouds depend on hydrogen density, molecular column density, and kinetic
temperature. The results are presented in a 2D plane to illustrate cooperative
effects of the physical factors. We also use a core model with a non-uniform
density distribution and chemical stratification to study the effects of cloud
contraction and rotation on spectral line maps. We discuss the main issues that
should be taken into account when dealing with interpretation and simulation of
observed molecular lines.Comment: Accepted for publication in Ap