 		unsigned nr = nrecatoms - off;
 		if (nr > THREADS_PER_BLOCK)
 			nr = THREADS_PER_BLOCK;
-		interaction_energy<<<natoms,nr, sizeof(float)*nr*4>>>(dinfo, off,slope, v);
+		interaction_energy<<<natoms,nr>>>(dinfo, off,slope, v);
 		cudaError err = cudaGetLastError();
 		if (cudaSuccess != err)
 		{

    /* per_ligand_atom_energy<<<natoms,1>>>(dinfo, slope, v); */
#endif
	//get total energy
	reduce_energy<<<1, natoms>>>(dinfo, natoms);
	cudaError err2 = cudaGetLastError();
	if (cudaSuccess != err2)
	{

	}
	cudaThreadSynchronize();
	float e;
	cudaMemcpy(&e, &energies[0], sizeof(float), cudaMemcpyDeviceToHost);
	return e;
	// thrust::device_ptr<float> dptr(energies);
    // float e = thrust::reduce(dptr, dptr + natoms);
