Symplectic algorithm for constant-pressure molecular dynamics using a Nosé–Poincaré thermostat