Change directory namd and hierarchy.