  We discuss relative roles played by the magnetic inversion symmetry breaking
and the ferroelectric (FE) atomic displacements in the multiferroic state of
YMnO3. For these purposes we derive a realistic low-energy model, using results
of first-principles calculations and experimental parameters of the crystal
structure. Then, we solve this model in the Hartree-Fock approximation. We
argue that the multiferroic state in YMnO3 has a magnetic origin, and the
centrosymmetric Pbnm structure is formally sufficient for explaining details of
the noncentrosymmetric magnetic ground state. The relativistic spin-orbit
interaction lifts the degeneracy, caused by the frustration of isotropic
interactions, and stabilizes a twofold periodic magnetic state, which is
similar to the E-state apart from the spin canting. The noncentrosymmetric
atomic displacements in the P2_1nm phase reduce the spin canting, but do not
change the symmetry of the magnetic state. The effect of the P2_1nm distortion
on the FE polarization P_a is twofold: (i) it gives rise to ionic
contributions, associated with the Y and O sites; (ii) it affects the
electronic polarization, through the change of the spin canting. The relatively
small value of P_a, observed in the experiment, is caused by a partial
cancelation of the electronic and ionic contributions in the experimental
P2_1nm structure. Finally, we theoretically optimize the crystal structure, by
using the LSDA+U approach and assuming the collinear E-type alignment. We have
found that the agreement with the experimental data in this case is less
satisfactory and P_a is largely overestimated. Although the magnetic structure
can be formally tuned by varying the Coulomb repulsion U as a parameter,
apparently LSDA+U fails to reproduce some fine details of the experimental
structure, and the cancelation of different contributions in P_a does not
occur.
