Exemplo n.º 1
0
 def test_cs(self):
     coords1 = make4(2.5)
     axes = geom._make_axes(coords1[1] - coords1[0], coords1[2])
     coords1 = numpy.dot(coords1, axes.T)
     coords2 = make12(1.2)
     axes = geom._make_axes(coords2[1] - coords2[0], coords2[2])
     coords2 = numpy.dot(coords2, axes.T)
     atoms = [['C', c] for c in numpy.vstack((coords1, coords2))]
     gpname, orig, axes = geom.detect_symm(atoms)
     self.assertEqual(gpname, 'Cs')
Exemplo n.º 2
0
 def test_cs(self):
     coords1 = make4(2.5)
     axes = geom._make_axes(coords1[1]-coords1[0], coords1[2])
     coords1 = numpy.dot(coords1, axes.T)
     coords2 = make12(1.2)
     axes = geom._make_axes(coords2[1]-coords2[0], coords2[2])
     coords2 = numpy.dot(coords2, axes.T)
     atoms = [['C', c] for c in numpy.vstack((coords1,coords2))]
     gpname, orig, axes = geom.detect_symm(atoms)
     self.assertEqual(gpname, 'Cs')
Exemplo n.º 3
0
    def test_cs(self):
        coords1 = make4(2.5)
        axes = geom._make_axes(coords1[1] - coords1[0], coords1[2])
        coords1 = numpy.dot(coords1, axes.T)
        coords2 = make12(1.2)
        axes = geom._make_axes(coords2[1] - coords2[0], coords2[2])
        coords2 = numpy.dot(coords2, axes.T)
        atoms = [['C', c] for c in numpy.vstack((coords1, coords2))]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'Cs')

        numpy.random.seed(1)
        c0 = numpy.random.random((4, 3))
        c0[:, 1] *= .5
        c1 = c0.copy()
        c1[:, 1] *= -1
        atoms = [['C', c] for c in numpy.vstack((c0, c1))]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'Cs')
Exemplo n.º 4
0
    def test_cs(self):
        coords1 = make4(2.5)
        axes = geom._make_axes(coords1[1]-coords1[0], coords1[2])
        coords1 = numpy.dot(coords1, axes.T)
        coords2 = make12(1.2)
        axes = geom._make_axes(coords2[1]-coords2[0], coords2[2])
        coords2 = numpy.dot(coords2, axes.T)
        atoms = [['C', c] for c in numpy.vstack((coords1,coords2))]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'Cs')

        numpy.random.seed(1)
        c0 = numpy.random.random((4,3))
        c0[:,1] *= .5
        c1 = c0.copy()
        c1[:,1] *= -1
        atoms = [['C', c] for c in numpy.vstack((c0,c1))]
        gpname, orig, axes = geom.detect_symm(atoms)
        self.assertEqual(gpname, 'Cs')