Linear response function approach for the boundary problem of QM/MM methods