Added BSD-3-Clause license.
Fixed atom_groups.

The code is (as far as I can tell) working now.