Esempio n. 1
0
 def testPointDefectConstruction(self):
     identifiers=[(2, (0, 0)), (3, (0, 0)), ]
     surface = Ge001
     defect = SurfacePointDefect(
             surface=surface,
             identifiers=identifiers)
     pos1 = defect.removedAtoms(coordinates='orth_surface').get_positions().mean(0)
     pos = [pos1]
     name = 'Test'
     added_atoms = Atoms('Ag', pos)
     test = Diamond001PointDefect(
             name=name,
             symbol='Ge',
             identifiers=identifiers,
             added_atoms=added_atoms,
             )
     self.assertEqual(test.name(), name)
Esempio n. 2
0
    def __init__(self,
                 probe_symbol,
                 surface_symbol,
                 ):
        self.__probe_symbol = probe_symbol
        surface = BodyCenteredCubic111(surface_symbol)

        l = vectorLength(surface.cell()[1])/3
        x, y = self.probePlacement(l)
        positions = [(x,y,2.210),
                     (x, y + l, 0.92),
                     (x + l*np.cos(np.pi/6), y-l*np.sin(np.pi/6), 0.92),
                     (x - l*np.cos(np.pi/6),y-l*np.sin(np.pi/6), 0.92),
                     ]
        added_atoms = Atoms(probe_symbol*len(positions), positions)

        SurfacePointDefect.__init__(
                self,
                surface=surface,
                added_atoms=added_atoms,
                )