 cudaError_t gpu_nph_rigid_step_two( const gpu_rigid_data_arrays& rigid_data,
                                     unsigned int *d_group_members,
                                     unsigned int group_size,
-                                    float4 *d_net_force,
-                                    float *d_net_virial,
+                                    Scalar4 *d_net_force,
+                                    Scalar *d_net_virial,
                                     const BoxDim& box, 
                                     const gpu_npt_rigid_data& npt_rdata,
-                                    float deltaT)
+                                    Scalar deltaT)
     {
     unsigned int n_bodies = rigid_data.n_bodies;
     unsigned int n_group_bodies = rigid_data.n_group_bodies;

    matrix_dot(ex_space, ey_space, ez_space, torque, tbody);
    quatvec(orientation, tbody, fquat);
    
    float4  conjqm2, angmom2;
    conjqm2.x = scale_r * conjqm.x + deltaT * fquat.x;
    conjqm2.y = scale_r * conjqm.y + deltaT * fquat.y;
    conjqm2.z = scale_r * conjqm.z + deltaT * fquat.z;

    akin_t = body_mass * tmp;

    // update position
    Scalar3 pos2;
    pos2.x = com.x + vel2.x * scale_v;
    pos2.y = com.y + vel2.y * scale_v;
    pos2.z = com.z + vel2.z * scale_v;
