The AI2PS code