def test_zmat(self): coord = numpy.array(( (0.200000000000, -1.889726124565, 0.000000000000), (1.300000000000, -1.889726124565, 0.000000000000), (2.400000000000, -1.889726124565, 0.000000000000), (3.500000000000, -1.889726124565, 0.000000000000), (0.000000000000, 0.000000000000, -1.889726124565), (0.000000000000, 1.889726124565, 0.000000000000), (0.200000000000, -0.800000000000, 0.000000000000), (1.889726124565, 0.000000000000, 1.133835674739))) zstr0 = gto.cart2zmat(coord) zstr = '\n'.join(['H '+x for x in zstr0.splitlines()]) atoms = gto.zmat2cart(zstr) zstr1 = gto.cart2zmat([x[1] for x in atoms]) self.assertTrue(zstr0 == zstr1) numpy.random.seed(1) coord = numpy.random.random((6,3)) zstr0 = gto.cart2zmat(coord) zstr = '\n'.join(['H '+x for x in zstr0.splitlines()]) atoms = gto.zmat2cart(zstr) zstr1 = gto.cart2zmat([x[1] for x in atoms]) self.assertTrue(zstr0 == zstr1)