Script to calculate surface energy of a crystal

The surface energy of a crystal, is the amount of energy required to cleave a surface from a bulk crystal. It is used in Equilibrium Morphology calculations to determine the stability of each crystal face and ultimately the crystal's shape 'in the wild'. This formalism assumes we are using an atomistic forcefield and that we are not cleaving bonds to form the surface.

The attached script will calculate the same surface energy that you get from an Equilibrium Morphology calculation. The only difference is that you can apply it to a specific Miller index. This is useful when you have a 2D infinite network like a polymer crystal or graphite - since Morphology cannot be used.

I tested this for the ethanol crystal (Structures\\molecular-crystals\\misc\\ethanol.msi) and graphite (Structures\\ceramics\\graphite.msi) for M=10. Here are the surface energies in kcal/mol/A^2:

SystemScript
Morphology
ethanol (100)

0.017457

0.017420

ethanol (001)

0.021707

0.021553

graphite (001)

0.35282


The script can be run on its own or with the attached "User Menu.xml" (i.e. import from User | Library | User Menu).