Added docstrings and support for multiple atom groups.