Discrete molecular dynamics