Select Atom Indices (by name) in mdtraj

What do you think about moving this code from mixtape? Right now, all the logic is in the AtomIndices script, which makes it difficult to use programatically. 
It removes all extra whitespace. I don't know what the best way to enumerate the options are in the docs