Rigid body constraints realized in massively-parallel molecular dynamics on graphics processing units