Molecular dynamics study of the thermopower of Ag, Au, and Pt nanocontacts