.mat files are temporarily files used in generating missing atom positions. After generating topology and restart files these can be ignored/deleted.
frg_TMP files are only generated if your structure contains segments for which no frg or sgm files exist in the database.