コード例 #1
0
def test4():
    gold = GoldGenerator()
    print('gold: {}'.format(gold))
    print('gold.unit_cell: {}'.format(gold.unit_cell))
    supercell = SuperCell(gold.unit_cell, scaling_matrix=2)
    print('supercell: {}'.format(supercell))
    print('gold.unit_cell.volume: {}'.format(gold.unit_cell.volume))
    print('supercell.volume: {}'.format(supercell.volume))
    assert_true(np.allclose(2**3 * gold.unit_cell.volume, supercell.volume))
コード例 #2
0
 def test4(self):
     gold = GoldGenerator(scaling_matrix=[2, 2, 2])
     gold.save()
     self.tmpdata.append(gold.fname)
     assert_equal(gold.atoms.Natoms, Gold().basis.Natoms * 2 ** 3)
コード例 #3
0
 def test3(self):
     gold = GoldGenerator()
     gold.save()
     self.tmpdata.append(gold.fname)
     assert_equal(gold.atoms.Natoms, Gold().basis.Natoms)
コード例 #4
0
 def test4(self):
     gold = GoldGenerator(scaling_matrix=[2, 2, 2])
     gold.save()
     self.tmpdata.append(gold.fname)
     assert_equal(gold.atoms.Natoms, Gold().basis.Natoms * 2**3)
コード例 #5
0
 def test3(self):
     gold = GoldGenerator()
     gold.save()
     self.tmpdata.append(gold.fname)
     assert_equal(gold.atoms.Natoms, Gold().basis.Natoms)
コード例 #6
0
 def test13(self):
     assert_equal(GoldGenerator().atoms, FCCStructureGenerator('Au').atoms)