QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: davalenciah on March 10, 2011, 00:22

Title: Include two gate voltage
Post by: davalenciah on March 10, 2011, 00:22
hello

I want to add two voltage gate  to my configuration one button and another at top . I did that independently,  when add both I cannot get them together.
 

Can anyone help me.


Thanks  :D


# Add metallic region
metallic_region_0 = BoxRegion(
    0*Volt,
    xmin = 0*Angstrom, xmax = 37.8315*Angstrom,
    ymin = 15.5864*Angstrom, ymax = 16.0864*Angstrom,
    zmin = 1.527387e+01*Angstrom, zmax = 2.657743e+01*Angstrom
)

metallic_regions0 = [metallic_region_0]
central_region.setMetallicRegions(metallic_regions0)

# Add metallic region
metallic_region_1 = BoxRegion(
    5*Volt,
    xmin = 0*Angstrom, xmax = 37.8315*Angstrom,
    ymin = 25.5864*Angstrom, ymax = 26.0864*Angstrom,
    zmin = 1.527387e+01*Angstrom, zmax = 2.657743e+01*Angstrom
)
metallic_regions1 = [metallic_region_1]
central_region.setMetallicRegions(metallic_regions1)


device_configuration = DeviceConfiguration(
    central_region,
    [left_electrode, right_electrode]
    )
Title: Re: Include two gate voltage
Post by: Anders Blom on March 10, 2011, 11:23
The method is called "setMetallicRegions", not "addMetallicRegions" ;)

So when you "set" region 1, you remove region 0. What you need is, to once do

Code: python
metallic_regions = [metallic_region_0,metallic_region_1]
central_region.setMetallicRegions(metallic_regions)

instead of setting the regions twice.