excess energy calculation

Dear All,
I would like to calculate the excess energy of a bulk system as a function of a per-existed crack advancement. Any suggestions how to achieve that in LAMMPS?
Thank you very much.
Feng

There are a number of ways to shear or apply a local external force to
the system in LAMMPS in order to encourage a crack to form.

You can certainly ask LAMMPS to calculate the energy of a subset of
atoms. You can ask LAMMPS to calculate the interaction energy and
forces between two different groups of atoms.
You can post-process a trajectory created by LAMMPS, and calculate the
energy of each frame using an arbitrary new/different Hamiltonian than
the one you used to run the simulation (although this currently
requires a clunky bash script).

I don't know if that helps. Somebody more knowledgeable than I can
elaborate or correct me if they like.
Cheers