As the components in electronic devices are shrinking to the nanoscale, even a single atom out of place can disrupt their function. But this also presents an opportunity to make them even better.