In the style of gen/structsgen.py, we construct a similar method for keeping the constants in materials.py up to date.