Modeling Electronic Structure And Dynamics Of Molecules On Metal Surfaces