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

		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);
		cudaError err = cudaGetLastError();
		if (cudaSuccess != err)
		{

	}
}

global void reduce_energy(GPUNonCacheInfo *dinfo) {
	int l  = threadIdx.x;
	shared float energies[warpSize];
	float my_energy = dinfo->energies[l];
