removeDoping¶
- removeDoping(configuration, tag)¶
Remove doping from the tagged atoms of the configuration.
- Parameters:
configuration (AtomicConfiguration) – The configuration to affect.
tag (str) – The tag of the doped atoms.
Usage Examples¶
Remove doping on the selection of atoms tagged ‘doping_0’.
# --- Setup a configuration ---
# Set up lattice
vector_a = [5.4306, 0.0, 0.0]*Angstrom
vector_b = [0.0, 5.4306, 0.0]*Angstrom
vector_c = [0.0, 0.0, 16.291800000000002]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
elements = [Silicon, Silicon, Silicon, Silicon, Silicon, Silicon, Silicon,
Silicon, Silicon, Silicon, Silicon, Silicon, Silicon, Silicon,
Silicon, Silicon, Silicon, Silicon, Silicon, Silicon, Silicon,
Silicon, Silicon, Silicon]
# Define coordinates
fractional_coordinates = [[ 0. , 0. , 0. ],
[ 0. , 0. , 0.333333333333],
[ 0. , 0. , 0.666666666667],
[ 0.25 , 0.25 , 0.083333333333],
[ 0.25 , 0.25 , 0.416666666667],
[ 0.25 , 0.25 , 0.75 ],
[ 0.5 , 0.5 , 0. ],
[ 0.5 , 0.5 , 0.333333333333],
[ 0.5 , 0.5 , 0.666666666667],
[ 0.75 , 0.75 , 0.083333333333],
[ 0.75 , 0.75 , 0.416666666667],
[ 0.75 , 0.75 , 0.75 ],
[ 0.5 , 0. , 0.166666666667],
[ 0.5 , 0. , 0.5 ],
[ 0.5 , 0. , 0.833333333333],
[ 0.75 , 0.25 , 0.25 ],
[ 0.75 , 0.25 , 0.583333333333],
[ 0.75 , 0.25 , 0.916666666667],
[ 0. , 0.5 , 0.166666666667],
[ 0. , 0.5 , 0.5 ],
[ 0. , 0.5 , 0.833333333333],
[ 0.25 , 0.75 , 0.25 ],
[ 0.25 , 0.75 , 0.583333333333],
[ 0.25 , 0.75 , 0.916666666667]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# Add external potential
external_potential = AtomicCompensationCharge()
bulk_configuration.setExternalPotential(external_potential)
# Make a selection of atoms to add doping to
selected_indices = numpy.array([2, 5, 8, 11, 14, 17, 20, 23])
# Add doping
addDoping(
configuration=bulk_configuration,
indices=selected_indices,
charge=0.000200195107106,
doping_type=N_type,
tag='doping_0'
)
# --- Remove doping
removeDoping(
configuration=bulk_configuration,
tag=['doping_0']
)
See also Notes on Doping.