Thank you.
What is the difference between defining charge on the scripter and the method mentioned in the following tutorial?
http://quantumwise.com/publications/tutorials/item/820-ni-silicide-si-interfaces# -------------------------------------------------------------
# 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)]))
In both methods, we add charge in different ways.