def checkMinimize(self):
        import yaml
        data = yaml.load(open('disp.yaml').read())
        disps = [map(float, a['direction']) for a in data['displacements']]
        maindir = pwd()
        dirs = ls('dirs/dir_*')
        ii = 0
        L = np.linalg.norm
        # d,p,d1,p1=self.m.rot
        out = open('ccos.txt', 'w')
        for dir in dirs:
            cd(dir)
            f = open('dump.force')
            for i in range(9):
                f.next()
            for b in range(ii):
                f.next()
            line = f.next()
            line = line.split()
            force = np.array(map(float, line[1:4]))
            # force=RotateVector(force,d1,-p1)
            # force=RotateVector(force,d,-p)
            d = disps[i]
            ccos = force.dot(d) / L(force) / L(d)
            ii += 1
            print >> out, "%d\t%f" % (ii, ccos)
            cd(maindir)