Molecular Dynamics simulation of rigid molecules