Data-driven construction of a generalized kinetic collision operator from molecular dynamics