An Undulatory Theory of the Mechanics of Atoms and Molecules