  A novel combination of discontinuous molecular dynamics and the Langevin
equation, together with an intermediate-resolution model, are used to carry out
long (several $\mu$s) simulation and study folding transition and transport of
proteins in slit nanopores. Both attractive ($U^+$) and repulsive ($U^-$)
interaction potentials between the proteins and the pore walls are considered.
Near the folding temperature $T_f$ and in the presence of $U^+$ the proteins
undergo a repeating sequence of folding/partially-folding/ unfolding
transitions, while $T_f$ decreases with decreasing pore sizes. The opposite is
true when $U^-$ is present. The proteins' effective diffusivity $D$ is computed
as a function of their length (number of the amino acid groups), temperature
$T$, the pore size, and the interaction potentials $U^\pm$. Far from $T_f$, $D$
increases (roughly) linearly with $T$, but due to the thermal fluctuations and
their effect on the proteins' structure near $T_f$, the dependence of $D$ on
$T$ in this region is nonlinear. Under certain conditions, transport of
proteins in smaller pores can be {\it faster} than that in larger pores.
