  For studies of the long-term evolution of small Solar System objects, it is
fundamental to add the Yarkovsky and Yarkovsky-O'Keefe-Radzievskii-Paddack
(YORP) effects in the dynamical model. Still, implementations of these effects
in publicly available N-body codes are often lacking, or the effects are
implemented using significantly simplified models. In this paper, we present an
implementation of the coupled Yarkovsky/YORP effects in the mercury and OrbFit
$N$-body codes. Along with these two effects, we also included the effects of
non-destructive collisions and rotationally induced breakups to model the
asteroid spin state properly. Given the stochastic nature of many incorporated
effects, the software is suitable for statistical dynamical studies. Here we
explained the scientific aspect of the implementation, while technical details
will be made freely available along with the source codes.
