Theoretical Foundation and Rheological Application of Nonequilibrium Molecular Dynamics