adding the E_tot computation in optimized_function_C.c