QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Heinz on December 15, 2014, 15:03

Title: GNR p and n doping how???
Post by: Heinz on December 15, 2014, 15:03
I replicated the pn junction of silicon tutorial, it's awesome thanks.

Then I tried to do the similar p-n junction simulation of the attached GNR section. Please could you help how I can dope the attached GNR as p-n junction?

Best regards,
Heinz
Title: Re: GNR p and n doping how???
Post by: Umberto Martinez on December 17, 2014, 09:19
Same way as in the p-n junction tutorial :)

you may also check this recent discussion http://quantumwise.com/forum/index.php?topic=3168.msg14596#msg14596
Title: Re: GNR p and n doping how???
Post by: Heinz on December 17, 2014, 12:07
Thanks for the reply. But when I do the same way as in pn junction, it gives "negative total number of electrons" error. So it doesn't work :(
Title: Re: GNR p and n doping how???
Post by: Umberto Martinez on December 17, 2014, 12:36
please provide more details. post your script and the entire error message.
Title: Re: GNR p and n doping how???
Post by: Heinz on December 17, 2014, 13:15
Hi,

Thanks for your answer. I attached my script. I could manage to correct the error message when I decreased the doping concentration from 10^24 to 2*10^19. However my problem is in the doping part of the code. It is as below. In the GNR obviously there are both C and H atoms in the structure so how can I dope the right and left electrodes? When I write
Code
left_electrode.setExternalPotential(
      AtomicCompensationCharge([(Carbon, -1*doping)]))
only C atoms in the electrode are doped, right? So what can I do for doping both C and H atoms? Thanks.

Whole doping part:

Code
# -------------------------------------------------------------
# Add Doping
# -------------------------------------------------------------
doping_density = 2e+19
# Calculate the volume  and convert it to cm^-3
# Note: right and left electrodes have the same volume,
volume = right_electrode_lattice.unitCellVolume()
volume = float(volume/(0.01*Meter)**3)
# Calculate charge per atom
doping = doping_density * volume / len(right_electrode_elements)
# Add p- and n-type doping to the central region
external_potential = AtomicCompensationCharge([
        ('p_doping', -1*doping), ('n_doping',doping)
        ])
central_region.setExternalPotential(external_potential)
# Add doping to left and right electrodes
left_electrode.setExternalPotential(
      AtomicCompensationCharge([(Carbon, -1*doping)]))
right_electrode.setExternalPotential(
      AtomicCompensationCharge([(Carbon, doping)]))
Title: Re: GNR p and n doping how???
Post by: Anders Blom on December 17, 2014, 18:23
Why would you dope hydrogen? The only reason they are in the calculation in the first place is to avoid surface states. You active atoms are the carbon ones, and that's also where any physical doping would go.
Title: Re: GNR p and n doping how???
Post by: Heinz on December 18, 2014, 12:29
Thanks Mr. Anders. I did as you said in the attached script but then obtained a perfectly linear I-V characteristics also as attached. What would you recommend to do in the script to get a diode characteristics from this GNR sample? Thanks very much. (Note: I know the sampling is very little but just to see when I can get a nonlinear I-V characteristics.)
Title: Re: GNR p and n doping how???
Post by: Umberto Martinez on December 19, 2014, 10:41
It is wrong to calculate the charge per atom considering the volume below.

volume = right_electrode_lattice.unitCellVolume()
volume = float(volume/(0.01*Meter)**3)
doping = doping_density * volume / len(right_electrode_elements)

this is true for bulk systems where the atoms occupy the entire volume of the cell.
This is probably the reason you get "negative electrons" before.

Please, add the proper doping.
we probably need to add this to the tutorial :)
Title: Re: GNR p and n doping how???
Post by: yasar on December 20, 2014, 09:15
So, how to add the "proper doping"? I also tried the structure and cannot get the current characteristics of a diode?
Title: Re: GNR p and n doping how???
Post by: Heinz on December 21, 2014, 12:09
Thanks but how to do it, can you please give a correct code of this?

Best
Heinz
Title: Re: GNR p and n doping how???
Post by: Anders Blom on December 23, 2014, 00:13
The code is technically correct. The issue here is scientific, not numeric. If you intend to dope a 2D structure, you should use a 2D doping concentration and normalize it by an active area, to compute the corresponding compensation charges. So your doping should be expressed in cm^-2 and you should compute the area of the your ribbon (either manually, by just measuring it, or by some simple code based on the coordinates (largest minus smallest gives width and length).
Title: Re: GNR p and n doping how???
Post by: Anders Blom on January 12, 2015, 11:01
Simple math.
Title: Re: GNR p and n doping how???
Post by: sathyajit on June 22, 2015, 13:02
Hi,

In the script posted here

# -------------------------------------------------------------
# Add Doping
# -------------------------------------------------------------
doping_density = 1e+20
# Calculate the volume  and convert it to cm^-3
volume = right_electrode_lattice.unitCellVolume()
volume = float(volume/(0.01*Meter)**3)
# Calculate charge per atom
n_doping = doping_density * volume / len(right_electrode_elements)
# Add external potential to the central region
external_potential = AtomicCompensationCharge([
        ('doping_central_region', n_doping)
        ])
 
central_region.setExternalPotential(external_potential)
# Dope the right electrode
right_electrode.setExternalPotential(
      AtomicCompensationCharge([(Silicon, n_doping)]))

Is
len(right_electrode_elements)  = total number of atoms on the electrode or only the atoms which need to be doped ?
Ex. if we need to dope MoTe2 do we need to put the number of Mo atoms or total number (Mo+Te)

Title: Re: GNR p and n doping how???
Post by: Jess Wellendorff on June 22, 2015, 14:33
len(right_electrode_elements) = the number of atoms in the right electrode.
Title: Re: GNR p and n doping how???
Post by: sathyajit on July 4, 2015, 13:33
Hi,

If we want to dope only the tagged atoms we need to manually count the number of tagged atoms and put it instead of len(right_electrode_elements) right ?

Regards
Sathyajit
Title: Re: GNR p and n doping how???
Post by: Umberto Martinez on July 6, 2015, 09:52
Nope. to dope tagged atoms use:

Code: python
 external_potential = AtomicCompensationCharge([
                         ('tag1_name', -0.25),
                          ('tag2_name', -0.002),
                        ])
bulk_configuration.setExternalPotential(external_potential)

to add 0.25 and 0.002 electrons to each atom tagged by "tag1_name" and "tag2_name", respectively.
Title: Re: GNR p and n doping how???
Post by: sathyajit on July 6, 2015, 11:56
In the code below, len(left_electrode_elements) can include un-tagged elements.

So I need to replace len(left_electrode_elements) by number of tagged atoms ?

Code
# Calculate charge per atom
doping_left = doping_density * volume_left / len(left_electrode_elements)


Code
# -------------------------------------------------------------
# Add Doping
# -------------------------------------------------------------
doping_density = 1e+19

# Calculate the volume  and convert it to cm^-3
# Note: right and left electrodes have the same volume,
volume_left = left_electrode_lattice.unitCellVolume()
volume_left = float(volume_left/(0.01*Meter)**3)

volume_right = right_electrode_lattice.unitCellVolume()
volume_right = float(volume_right/(0.01*Meter)**3)

# Calculate charge per atom
doping_left = doping_density * volume_left / len(left_electrode_elements)
doping_right = doping_density * volume_right / len(right_electrode_elements)

# Add p- and n-type doping to the central region
external_potential = AtomicCompensationCharge([
        ('p-side', -1*doping_left), ('n-side',doping_right)
        ])
central_region.setExternalPotential(external_potential)

# Add doping to left and right electrodes
left_electrode.setExternalPotential(
      AtomicCompensationCharge([(Phosphorus, -1*doping_left)]))
right_electrode.setExternalPotential(
      AtomicCompensationCharge([(Tungsten, doping_right)]))
Title: Re: GNR p and n doping how???
Post by: Umberto Martinez on July 6, 2015, 12:40
Oh I see, yes, you should normalize the doping concentration to the number of atoms you actually want to dope.

If you tagged your atoms in the left electrode with "doping_left", for example, you can use:

Code: python
doping_left = doping_density * volume_left / len(left_electrode.indicesFromTags('doping_left'))
Title: Re: GNR p and n doping how???
Post by: Anders Blom on July 6, 2015, 22:49
Just note, that the concept of doping is "macroscopic", so doping only some atoms, and leaving other ones close by undoped, may not make physical sense. Unless of course you mean e.g. to avoid doping passivating H atoms on an edge, or something like that.