Add a fourth coordinate to virial tests