def generate_bandconf(self):
        # generate mesh.conf
        m = self.m

        bp = m.bandpoints
        bpath = ' '.join([toString(bp[x]) for x in m.bandpath])

        band = """DIM = %s
        ATOM_NAME = %s
        BAND = %s
        BAND_POINTS = 101
        FORCE_CONSTANTS = READ
        PRIMITIVE_AXIS = %s
        """ % (m.dim, ' '.join(m.elements),
               bpath, toString(m.premitive.flatten()))
        band = band.replace(r'^\s+', '')
        write(band, 'band.conf')