Implemented a new, generic version of linear response calculation