Encoding Materials Dynamics for Machine Learning Applications