Beispiel #1
0
def create_from_chain(chain,conductor_size,contact_size_L=1,contact_size_R=1):
    conductor = _conductor.create_from_chain(chain,conductor_size)

    if param.LEAD_TYPE == 'wideband':
        lead = _lead.wideband(
            contact = where(chain.H_hop,1.0,0.0)*eV,
            factor=param.WIDEBAND_ENERGY/eV**2,
        )

    elif param.LEAD_TYPE == 'coating_wideband':
        if 'COATING_WIDEBAND_N_CONTACT' in param:
            contact = matrix(zeros((chain.N_atoms,)*2,'D'))
            for n in range(param.COATING_WIDEBAND_N_CONTACT):
                contact[n,n] = 1.0*eV
        else:
            contact = matrix(eye(chain.N_atoms))*1.0*eV
        lead = _lead.wideband(
            contact = contact,
            factor=param.WIDEBAND_ENERGY/eV**2,
        )
    elif param.LEAD_TYPE == 'lopez_sancho':
        tunneling = 1
        if "TUNNELING_FACTOR" in param:
            tunneling *= param.TUNNELING_FACTOR
        lead = _lead.lopez_sancho(
            chain,
            tunneling = tunneling,
        )

    return twoprobe(
        conductor,
        [lead]*contact_size_L,
        [lead]*contact_size_R,
    )
Beispiel #2
0
def create_from_aperiodic(aperiodic,contact_length_L,contact_length_R):
    conductor = _conductor.create_from_aperiodic_triozon(aperiodic)
    diameter = max([norm(a.pos[:2]) for a in aperiodic.cells[0].atoms])
    mindiam = diameter - param.GRAPHENE_CC_DISTANCE*0.5
    lead_L = []
    lead_R = []
    finished = False
    for n in range(len(aperiodic.cells)):
        atoms = aperiodic.cells[n].atoms
        contact = matrix(zeros((len(atoms),)*2,'D'))
        j = 0
        for i in range(len(atoms)):
            if atoms[i].pos[2] > contact_length_L:
                finished = True
            else:
                if norm(atoms[i].pos[:2]) >= mindiam:
                    contact[j,i] = 1.0*eV
                    j += 1
        lead_L.append(_lead.wideband(
            contact[:j,:],
            factor=param.WIDEBAND_ENERGY/eV**2,
        ))
        if finished:
            break

    for n in reversed(range(len(aperiodic.cells))):
        atoms = aperiodic.cells[n].atoms
        contact = matrix(zeros((len(atoms),)*2,'D'))
        j = 0
        for i in range(len(atoms)):
            if atoms[i].pos[2] < aperiodic.length - contact_length_R:
                finished = True
            else:
                if norm(atoms[i].pos[:2]) >= mindiam:
                    contact[i,j] = 1.0*eV
                    j += 1
        lead_R.append(_lead.wideband(
            contact[:,:j],
            factor=param.WIDEBAND_ENERGY/eV**2
        ))
        if finished:
            break
    lead_R.reverse()

    return twoprobe(
        conductor,
        lead_L,
        lead_R,
    )