  Several extensions of the standard cosmological model include scalar fields
as new degrees of freedom in the underlying gravitational theory. A particular
class of these scalar field theories include screening mechanisms intended to
hide the scalar field below observational limits in the solar system, but not
on galactic scales, where data still gives freedom to find possible signatures
of their presence. In order to make predictions to compare with observations
coming from galactic and clusters scales (i.e. in the non-linear regime of
cosmological evolution), cosmological N-body simulations are needed, for which
codes that can solve for the scalar field must be developed. We present a new
implementation of scalar-tensor theories of gravity which include screening
mechanisms. The code is based in the already existing code RAMSES, to which we
have added a non-linear multigrid solver that can treat a large class of scalar
tensor theories of modified gravity. We present details of the implementation
and the tests that we made to it. As application of the new code, we have
studied the influence that two particular modified gravity theories, the
symmetron and $f(R)$ gravity, have on the shape of cluster sized dark matter
halos and found consistent results with previous estimations made with a static
analysis.
