Please e-mail me (mph(at)brandeis.edu) if you find bugs or errors in any of these programs, if you would like to suggest added features, or just to let me know that you've used them. Please also acknowledge me in any publications resulting from research that makes substantial use of any of them.
A package for doing GR-type tensor algebra and calculus. Compared to other such packages I know, it is easy to use and fairly comprehensive in the number of functions defined. Here is a notebook with documentation and an example of how to use the package. (Updated February 2013 to accommodate a change in Mathematica 9, should still work with Mathematica 8; see changelog at the end of the package.)
A package that teaches Mathematica the Virasoro algebra. It also computes Kac matrices and determinants and conformal blocks. More generally, it defines an environment for implementing any operator algebra. (Updated April 2010.)
A simple package that teaches Mathematica how to do algebra and calculus with Grassmann variables. This package was jointly written with J. Michelson, with contributions from J. Guffin and L. Hlavaty.
A package that translates between Polchinski's theta-function conventions and Mathematica's.
A short snippet of code that teaches Mathematica to invert a diagonal (or block-diagonal) matrix by inverting each diagonal entry (or block) separately. For algebraic matrices this results in simpler output, and for numerical ones it avoids spurious warnings about ill-conditioned matrices.
Fermat.m and psi.m
These packages implement the method for finding "optimal" approximations to the Ricci-flat metric on an algebraic Calabi-Yau manifold, described in the paper "Energy functionals for Calabi-Yau metrics" by myself and A. Nassar (arXiv: 0908.2635 [hep-th]). The use of these packages is illustrated in the notebook optimal.nb. If you want to look inside the packages (for example, to alter them for applications to a different set of Calabi-Yaus), you may find it useful to look at the set of notes strategy.pdf, which describes the calculations, and the notation used, in more detail.
Everything you ever wanted to know about the Kaehler-Einstein metric on the third del Pezzo surface but were afraid to ask!