Adaptive mesh refinement computer code for chemo-gravito-magneto-gasdynamical simulations in astrophysics