Extract all structures of Gaussian 09 molecular dynamics calculation using babel?
If you have the latest copy of cclib installed, it can extract both the energies and geometries and write the geometries to an XYZ trajectory file that you can open with Avogadro or VMD.

To print the HF or DFT energies to the screen,

$ ccget scfenergies admp.out


but be warned that the energies are in eV, not hartree.

To dump geometries to XYZ files, here's a simplified version of a script I use all the time:



#!/usr/bin/env python

"""cclib_extract_geom.py: Extract geometries from a quantum chemical
output file using cclib.
"""


from __future__ import print_function

import os.path

from cclib.io import ccopen, ccwrite


def getargs():
    """Get command-line arguments."""

    import argparse

    parser = argparse.ArgumentParser()

    parser.add_argument('outputfilename', nargs='+')

    parser.add_argument('--trajectory',
                        action='store_true',
                        help="""Extract all possible geometries into a trajectory-like file?""")
    parser.add_argument('--suffix')

    args = parser.parse_args()

    return args


if __name__ == '__main__':

    args = getargs()

    for outputfilename in args.outputfilename:

        job = ccopen(outputfilename)
        data = job.parse()

        stub = os.path.splitext(outputfilename)[0]
        if args.suffix:
            xyzfilename = ''.join([stub, '.', args.suffix, '.xyz'])
        else:
            xyzfilename = ''.join([stub, '.xyz'])

        ccwrite(data, outputdest=xyzfilename, allgeom=args.trajectory)


To write the energies in to a text file in hartree, you might add something like

        from cclib.parser.utils import convertor # put me at the top of the file
        with open(stub + '.energies', 'w') as fh:
            for energy in data.scfenergies:
                fh.write(str(convertor(energy, 'eV', 'hartree')) + '\n')