Linear-scaling implementation of molecular response theory in self-consistent field electronic-structure theory.