Simulating chemistry in star forming environments