It's really fairly simple, as long as you know the format you want, all you need to do is loop over the coordinates and "print" them in the appropriate way. I don't know exactly how LAMMPS expects the coordinates, but a very simple way to export anything from ATK is to "nlprint" a configuration, then you get a XYZ file.