How to extract the coordinate info of small molecules at different times/frames from a .std file?

I have a .std file from an NVE run: methane molecules inside a kerogen structure.

I have a set called "methane" in this .std file which includes several methane molecules.

I know that I can get the atom coordinate using: \$atom->XYZ

I am wondering how could I get the coordinate info of this "methane" molecules in scripting.