Energy derivatives for configuration interaction wave functions