General purpose shared utilities for diffpy.