def generate_vqconf(self, q):
        # generate q.conf
        m = self.m

        mesh = """DIM = %s
        ATOM_NAME = %s
        FORCE_CONSTANTS = READ
        GROUP_VELOCITY=.TRUE.
        QPOINTS=.TRUE.
        PRIMITIVE_AXIS = %s
        """ % (m.dim, ' '.join(m.elements), toString(m.premitive.flatten()))
        mesh = mesh.replace(r'^\s+', '')
        write(mesh, 'q.conf')
        s = "%s\n" % len(q)
        for qq in q:
            s += "%s\n" % toString(qq)
        write(s, 'QPOINTS')