def get_coord(atoms): surf_Au = 0 i = nl('i', atoms, { ('Au', 'Au'): 3.3, ('Au', 'Pd'): 3.3, ('Pd', 'Pd'): 3.3 }) coord = numpy.bincount(i) index_Au = [atom.index for atom in atoms if atom.symbol == 'Au'] for i in range(len(coord)): if i in index_Au: if coord[i] < 10: surf_Au += 1 return surf_Au
def get_coord(atoms): surf_Au = 0 i = nl('i', atoms, {('Au','Au'):3.2, ('Au','Pd'):3.2, ('Pd','Pd'):3.2 }) coord = numpy.bincount(i) index_Au = [ atom.index for atom in atoms if atom.symbol=='Au'] Au_coord=0 for i in range(len(coord)): if i in index_Au: Au_coord += coord[i] if coord[i] < 11: surf_Au += 1 return float(Au_coord)/float(len(index_Au)),surf_Au
def find_adatom(atoms): surf_Au = 0 i = nl('i', atoms, { ('Au', 'Au'): 3.2, ('Au', 'Pd'): 3.2, ('Pd', 'Pd'): 3.2 }) coord = numpy.bincount(i) index_Au = [atom.index for atom in atoms if atom.symbol == 'Au'] Au_coord = 0 adatom = [] for i in range(len(coord)): if i in index_Au: Au_coord += coord[i] if coord[i] < 6: adatom.append(i) return adatom