Пример #1
0
            mode='lcao',
            basis='sz',
            usesymm=False)

# Lead calculation
lead = atoms.copy()
del lead[4:]
cell_lead = cell.copy()
cell_lead[2, 2] = a * len(lead)
lead.set_cell(cell_lead)
calc.set(kpts=(1, 1, 14))
lead.set_calculator(calc)
e1 = lead.get_potential_energy()
niter1 = calc.get_number_of_iterations()
calc.write('lead.gpw')
dump_lead_hs(calc, 'lead')

# Tip calculation
tip = atoms.copy()
tip.positions[:] += (atoms.cell / 2.0)[0, :] + (atoms.cell / 2.0)[1, :]
del tip[:4]
tip.translate([0, 0, 10])
tip.cell[2, 2] += 10
calc.set(kpts=(1, 1, 1))
tip.set_calculator(calc)
e2 = tip.get_potential_energy()
niter2 = calc.get_number_of_iterations()
calc.write('tip.gpw')
dump_hs(calc, 'tip', region='tip', cvl=2)

# Surface calculation
Пример #2
0
tip.positions[:, 2] = [i * a for i in range(12)]
tip.positions[:] += (tip.cell / 2.0)[0, :] + (tip.cell / 2.0)[1, :]
tip.translate([0, 0, 6])

tip.set_calculator(calc)
tip.get_potential_energy()
calc.write('tip')
dump_hs(calc, 'tip', region='tip',
        cvl=4)  # dump overlap and hamiltonian matrix

calc.set(
    kpts=(1, 1,
          7))  # for the lead calculations we use kpoints in the z-direction

# surface principal layer calculation
srf_p = fcc100('Al', size=(2, 2, 4))
srf_p.pbc = (1, 1, 1)

srf_p.set_calculator(calc)
srf_p.get_potential_energy()
dump_lead_hs(calc, 'srf_p')  # dump overlap and hamiltonian matrix

# tip principal layer calculation
tip_p = Atoms('H4', pbc=(1, 1, 1), cell=[5, 5, 4 * a])
tip_p.positions[:, 2] = [i * a for i in range(4)]
tip_p.positions[:] += (tip_p.cell / 2.0)[0, :] + (tip_p.cell / 2.0)[1, :]

tip_p.set_calculator(calc)
tip_p.get_potential_energy()
dump_lead_hs(calc, 'tip_p')  # dump overlap and hamiltonian matrix
Пример #3
0
            mode='lcao',
            basis='sz',
            usesymm=False)

# Lead calculation
lead = atoms.copy()
del lead[4:]
cell_lead = cell.copy()
cell_lead[2, 2] = a * len(lead)
lead.set_cell(cell_lead)
calc.set(kpts=(1, 1, 14))
lead.set_calculator(calc)
e1 = lead.get_potential_energy()
niter1 = calc.get_number_of_iterations()
calc.write('lead.gpw')
dump_lead_hs(calc, 'lead')

# Tip calculation
tip = atoms.copy()
tip.positions[:] += (atoms.cell / 2.0)[0, :] + (atoms.cell / 2.0)[1, :]
del tip[:4]
tip.translate([0, 0, 10])
tip.cell[2, 2] += 10
calc.set(kpts=(1, 1, 1))
tip.set_calculator(calc)
e2 = tip.get_potential_energy()
niter2 = calc.get_number_of_iterations()
calc.write('tip.gpw')
dump_hs(calc, 'tip', region='tip', cvl=2)

# Surface calculation
Пример #4
0
atoms.positions[:, 2] = [i * a for i in range(12)]

calc = GPAW(h=0.2, occupations=FermiDirac(width=0.1), mode="lcao", basis="sz", usesymm=False)

# Lead calculation
lead = atoms.copy()
del lead[4:]
cell_lead = cell.copy()
cell_lead[2, 2] = a * len(lead)
lead.set_cell(cell_lead)
calc.set(kpts=(1, 1, 14))
lead.set_calculator(calc)
e1 = lead.get_potential_energy()
niter1 = calc.get_number_of_iterations()
calc.write("lead.gpw")
dump_lead_hs(calc, "lead")

# Tip calculation
tip = atoms.copy()
tip.positions[:] += (atoms.cell / 2.0)[0, :] + (atoms.cell / 2.0)[1, :]
del tip[:4]
tip.translate([0, 0, 10])
tip.cell[2, 2] += 10
calc.set(kpts=(1, 1, 1))
tip.set_calculator(calc)
e2 = tip.get_potential_energy()
niter2 = calc.get_number_of_iterations()
calc.write("tip.gpw")
dump_hs(calc, "tip", region="tip", cvl=2)

# Surface calculation
Пример #5
0
tip = Atoms('H12', pbc=(1, 1, 0), cell=[5, 5, 12 * a + 7])
tip.positions[:,2] = [i * a for i in range(12)]
tip.positions[:] += (tip.cell / 2.0)[0, :] + (tip.cell / 2.0)[1, :]
tip.translate([0, 0, 6])

tip.set_calculator(calc)
tip.get_potential_energy()
calc.write('tip')
dump_hs(calc, 'tip', region='tip', cvl=4) # dump overlap and hamiltonian matrix


calc.set(kpts=(1, 1, 7)) # for the lead calculations we use kpoints in the z-direction

# surface principal layer calculation
srf_p = fcc100('Al', size=(2, 2, 4)) 
srf_p.pbc = (1, 1, 1)

srf_p.set_calculator(calc)
srf_p.get_potential_energy()
dump_lead_hs(calc, 'srf_p') # dump overlap and hamiltonian matrix

# tip principal layer calculation
tip_p = Atoms('H4', pbc=(1,1,1), cell=[5, 5, 4*a])
tip_p.positions[:,2] = [i * a for i in range(4)]
tip_p.positions[:] += (tip_p.cell / 2.0)[0, :] + (tip_p.cell / 2.0)[1, :]

tip_p.set_calculator(calc)
tip_p.get_potential_energy()
dump_lead_hs(calc, 'tip_p') # dump overlap and hamiltonian matrix