Valency and molecular structure