Remove unnecessary references to atoms.get_number_of_atoms()
There is a clear difference between len(atoms) and atoms.get_number_of_atoms(), and you should almost always use len(atoms).
Run through the code and remove unnecessary calls to atoms.get_number_of_atoms().
Make the docstring clearer!