Ejemplo n.º 1
0
 def test___init__copy(self):
     '''check Atom copy constructor.
     '''
     self.a.xyz_cartn = (1, 2, 3)
     a1 = Atom(self.a)
     self.assertEqual(self.a, a1)
     self.assertNotEqual(self.a, Atom())
     return
 def test_equality(self):
     '''check Atom equal and not equal operators.
     '''
     self.assertEqual(self.a, Atom())
     self.assertFalse(self.a != Atom())
     a1 = Atom()
     a1.atomtype = 'Na'
     self.assertNotEqual(self.a, a1)
     return
Ejemplo n.º 3
0
 def test_equality(self):
     '''check Atom equal and not equal operators.
     '''
     self.assertEqual(self.a, Atom())
     self.assertFalse(self.a != Atom())
     a1 = Atom()
     a1.atomtype = 'Na'
     self.assertNotEqual(self.a, a1)
     return
Ejemplo n.º 4
0
 def test_expandLatticeAtom(self):
     """Check CrystalStructureAdapter.expandLatticeAtom."""
     cdse = loadCrystalStructureAdapter('CdSe_cadmoselite.cif')
     a = Atom()
     a.xyz_cartn = (0.1, 0.13, 0.17)
     asymsites = cdse.expandLatticeAtom(a)
     self.assertTrue(type(asymsites) is list)
     self.assertEqual(12, len(asymsites))
     self.assertEqual(12, cdse.countSymOps())
     return
Ejemplo n.º 5
0
 def test_expandLatticeAtom(self):
     """Check CrystalStructureAdapter.expandLatticeAtom."""
     cdse = loadCrystalStructureAdapter('CdSe_cadmoselite.cif')
     a = Atom()
     a.xyz_cartn = (0.1, 0.13, 0.17)
     asymsites = cdse.expandLatticeAtom(a)
     self.assertTrue(type(asymsites) is list)
     self.assertEqual(12, len(asymsites))
     self.assertEqual(12, cdse.countSymOps())
     return
Ejemplo n.º 6
0
 def setUp(self):
     self.a = Atom()
     return