Author Topic: Re: what's happen when I compute the voltage drop?  (Read 12782 times)

0 Members and 1 Guest are viewing this topic.

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: what's happen when I compute the voltage drop?
« on: April 16, 2010, 15:40 »
I don't know why I can't reply that topic ?

By the way ,The upload folder of the forum is full ,please check it !

This time I make the sufficent screen layers ,but the same thing happen, waht's wrong?

I have been checked the http://quantumwise.com/forum/index.php?topic=21.0 carefully, and I also notice the setup of electrode_constraint = ElectrodeConstraints.RealSpaceDensity, but the same thing happen , what 's wrong ?

Could you check my scripts and run them to see what's happen?





from ATK.TwoProbe import *
from ATK.MPI import processIsMaster

# Generate time stamp
if processIsMaster():
    import platform, time
    print '#',time.ctime()
    print '#',platform.node(),platform.platform()+'\n'

# Opening vnlfile
if processIsMaster(): file = VNLFile('D:/voltage/new2/sufficent.vnl')

# Scattering elements and coordinates
scattering_elements = [Lithium,  Lithium,  Lithium,  Lithium, 
                       Lithium,  Lithium,  Lithium,  Lithium, 
                       Lithium,  Lithium,  Hydrogen, Hydrogen,
                       Lithium,  Lithium,  Lithium,  Lithium, 
                       Lithium,  Lithium,  Lithium,  Lithium, 
                       Lithium,  Lithium]
scattering_coordinates = [[  4.80000019,   4.80000019,   5.76000023],
                          [  4.80000019,   4.80000019,   8.64000034],
                          [  4.80000019,   4.80000019,  11.52000046],
                          [  4.80000019,   4.80000019,  14.40000057],
                          [  4.80000019,   4.80000019,  17.28000069],
                          [  4.80000019,   4.80000019,  20.15999985],
                          [  4.80000019,   4.80000019,  23.04000092],
                          [  4.80000019,   4.80000019,  25.92000008],
                          [  4.80000019,   4.80000019,  28.79999996],
                          [  4.80000019,   4.80000019,  31.68000008],
                          [  4.80000019,   4.80000019,  34.83999992],
                          [  4.80000019,   4.80000019,  33.85999943],
                          [  4.80000019,   4.80000019,  37.02000023],
                          [  4.80000019,   4.80000019,  39.90000034],
                          [  4.80000019,   4.80000019,  60.06000264],
                          [  4.80000019,   4.80000019,  62.94000299],
                          [  4.80000019,   4.80000019,  54.30000241],
                          [  4.80000019,   4.80000019,  57.18000252],
                          [  4.80000019,   4.80000019,  48.54000218],
                          [  4.80000019,   4.80000019,  51.42000325],
                          [  4.80000019,   4.80000019,  42.78000195],
                          [  4.80000019,   4.80000019,  45.66000302]]*Angstrom
       

electrode_elements = [Lithium, Lithium]
electrode_coordinates = [[ 4.80000019,  4.80000019,  0.        ],
                         [ 4.80000019,  4.80000019,  2.88000011]]*Angstrom

electrode_cell = [[ 9.6 ,  0.  ,  0.  ],
                  [ 0.  ,  9.6 ,  0.  ],
                  [ 0.  ,  0.  ,  5.76]]*Angstrom

# Set up electrodes
electrode_configuration = PeriodicAtomConfiguration(
    electrode_cell,
    electrode_elements,
    electrode_coordinates
    )

# Set up two-probe configuration
twoprobe_configuration = TwoProbeConfiguration(
    (electrode_configuration,electrode_configuration),
    scattering_elements,
    scattering_coordinates,
    electrode_repetitions=[[1,1],[1,1]],
    equivalent_atoms=([0,0],[1,15])
    )
if processIsMaster(): nlPrint(twoprobe_configuration)
if processIsMaster(): file.addToSample(twoprobe_configuration, 'twoprobe_configuration')

######################################################################
# Central region parameters
######################################################################
exchange_correlation_type = LDA.PZ

iteration_mixing_parameters = iterationMixingParameters(
    algorithm = IterationMixing.Pulay,
    diagonal_mixing_parameter = 0.1,
    quantity = IterationMixing.Hamiltonian,
    history_steps = 6
)

electron_density_parameters = electronDensityParameters(
    mesh_cutoff = 150.0*Rydberg
)

basis_set_parameters = basisSetParameters(
    type = SingleZetaPolarized,
    radial_sampling_dr = 0.001*Bohr,
    energy_shift = 0.01*Rydberg,
    delta_rinn = 0.8,
    v0 = 40.0*Rydberg,
    charge = 0.0,
    split_norm = 0.15
)

iteration_control_parameters = iterationControlParameters(
    tolerance = 1e-005,
    criterion = IterationControl.TotalEnergy,
    max_steps = 100
)

electrode_voltages = (1.0,0.0)*Volt

two_probe_algorithm_parameters = twoProbeAlgorithmParameters(
    electrode_constraint = ElectrodeConstraints.RealSpaceDensity,
    initial_density_type = InitialDensityType.EquivalentBulk
)

energy_contour_integral_parameters = energyContourIntegralParameters(
    circle_points = 30,
    integral_lower_bound = 3*Rydberg,
    fermi_line_points = 10,
    fermi_function_poles = 4,
    real_axis_infinitesimal = 0.01*electronVolt,
    real_axis_point_density = 0.02*electronVolt
)

two_center_integral_parameters = twoCenterIntegralParameters(
    cutoff = 2500.0*Rydberg,
    points = 1024
)

######################################################################
# Left electrode parameters
######################################################################
left_electrode_electron_density_parameters = electronDensityParameters(
    mesh_cutoff = 150.0*Rydberg
)

left_electrode_iteration_control_parameters = iterationControlParameters(
    tolerance = 1e-005,
    criterion = IterationControl.TotalEnergy,
    max_steps = 100
)

left_electrode_brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters(
    monkhorst_pack_parameters = (1, 1, 200)
)

left_electrode_iteration_mixing_parameters = iterationMixingParameters(
    algorithm = IterationMixing.Pulay,
    diagonal_mixing_parameter = 0.1,
    quantity = IterationMixing.Hamiltonian,
    history_steps = 6
)

left_electrode_eigenstate_occupation_parameters = eigenstateOccupationParameters(
    temperature = 300.0*Kelvin
)

######################################################################
# Collect left electrode parameters
######################################################################
left_electrode_parameters = ElectrodeParameters(
    brillouin_zone_integration_parameters = left_electrode_brillouin_zone_integration_parameters,
    electron_density_parameters = left_electrode_electron_density_parameters,
    eigenstate_occupation_parameters = left_electrode_eigenstate_occupation_parameters,
    iteration_mixing_parameters = left_electrode_iteration_mixing_parameters,
    iteration_control_parameters = left_electrode_iteration_control_parameters
)

######################################################################
# Right electrode parameters
######################################################################
right_electrode_electron_density_parameters = electronDensityParameters(
    mesh_cutoff = 150.0*Rydberg
)

right_electrode_iteration_control_parameters = iterationControlParameters(
    tolerance = 1e-005,
    criterion = IterationControl.TotalEnergy,
    max_steps = 100
)

right_electrode_brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters(
    monkhorst_pack_parameters = (1, 1, 200)
)

right_electrode_iteration_mixing_parameters = iterationMixingParameters(
    algorithm = IterationMixing.Pulay,
    diagonal_mixing_parameter = 0.1,
    quantity = IterationMixing.Hamiltonian,
    history_steps = 6
)

right_electrode_eigenstate_occupation_parameters = eigenstateOccupationParameters(
    temperature = 300.0*Kelvin
)

######################################################################
# Collect right electrode parameters
######################################################################
right_electrode_parameters = ElectrodeParameters(
    brillouin_zone_integration_parameters = right_electrode_brillouin_zone_integration_parameters,
    electron_density_parameters = right_electrode_electron_density_parameters,
    eigenstate_occupation_parameters = right_electrode_eigenstate_occupation_parameters,
    iteration_mixing_parameters = right_electrode_iteration_mixing_parameters,
    iteration_control_parameters = right_electrode_iteration_control_parameters
)

######################################################################
# Initialize self-consistent field calculation
######################################################################
two_probe_method = TwoProbeMethod(
    electrode_parameters = (left_electrode_parameters,right_electrode_parameters),
    exchange_correlation_type = exchange_correlation_type,
    iteration_mixing_parameters = iteration_mixing_parameters,
    electron_density_parameters = electron_density_parameters,
    basis_set_parameters = basis_set_parameters,
    iteration_control_parameters = iteration_control_parameters,
    energy_contour_integral_parameters = energy_contour_integral_parameters,
    two_center_integral_parameters = two_center_integral_parameters,
    electrode_voltages = electrode_voltages,
    algorithm_parameters = two_probe_algorithm_parameters
)
if processIsMaster(): nlPrint(two_probe_method)

# Restore self consistent calculation from check point file
scf = restoreSelfConsistentCalculation(
    filename = 'D:/voltage/new2/0.nc'
)

runtime_parameters = runtimeParameters(
    verbosity_level = 10,
    checkpoint_filename = 'D:/voltage/new2/1.nc'
)

# Using initial density from self consistent calculation
scf = executeSelfConsistentCalculation(
    twoprobe_configuration,
    two_probe_method,
    initial_calculation = scf,
    runtime_parameters = runtime_parameters
)

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: what's happen when I compute the voltage drop?
« Reply #1 on: April 16, 2010, 16:47 »
Your coordinates are still funny. They should be without a lot of decimals, just 20.16, not 20.159999995. Try to set up the geometry via a script instead.

Also, in this setup the electrode is too short.



Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #2 on: April 17, 2010, 05:08 »
 :( :( :(

I also try other two-probe systemes, but I still get the strange voltage-drop(1v-0v) image as append images !

My scripts are all build with vnl, the coordinates and the decimals are all auto obtained, I also pay attention to the notice,but ....
and I wonder two questiones:

1, Are you sure the voltage-drop is so sensitive to the coordinates? If it is ,after we optimize the two-probe systemes,
   can we get the correct results?

2, And do you try my scripts to compute the voltage-drop?  If my scripts are all not correct, could you offer some right scripts and the right
     voltage-drop image?

By the way , my computation and other's we perfomed are all in vnl 2008.10 ,this error is common,and I ask this question because I can't corretly answer others same questiones.
« Last Edit: April 17, 2010, 09:21 by zdhlover »

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #3 on: April 17, 2010, 07:46 »
The numerical values for the coordinates in the script file seem reasonable. The problem observed for the voltage drop does not matter to the numerical values of coordinates. The two-probe system just consists of atomic chain.  It will be meaningful to show the contour plot of voltage drop in a plane containing  the atomic chain.  Or try a case with more screening surface layers. 

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #4 on: April 17, 2010, 09:35 »
 :( :( :(

I have to mentioned: I ask this question because I can't corretly answer others people's same questiones! My scripts are all build with vnl, the coordinates and the decimals are all auto obtained, I also pay attention to the notice(for example: more screening surface layers ,long electrode and others ), and I also try many situationes ,but the same thing happen!

and I wonder two questiones:

1, Are you sure the voltage-drop is so sensitive to the coordinates? If it is ,after we optimize the two-probe systemes,
   can we get the correct results?

2, And do you try my scripts to compute the voltage-drop?  If my scripts are all not correct, could you offer some right scripts and the right
     voltage-drop image for us running to check ?

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #5 on: April 17, 2010, 11:05 »
The above are all performed in VNL 2008.10, and I also test the same script above ( lisufficen1v.py lisufficen0v.py) in VNL 2008.02

and I get the difference image and output as below!?


And I wonder  it is correct? and I also wonder the correct voltage-drop (1v-0v) is 1.0 0.1 0.08 0.07 0.06 ……………0.01 0.0(in ASCII  ;D ;D   may be not so homogeneous)?
« Last Edit: April 17, 2010, 14:18 by zdhlover »

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #6 on: April 17, 2010, 14:45 »
 :) :) :)

To test where is the question, I also use the two .nc  files which generate by VNL 2008.10 to compute the  voltage-drop in VNL 2008.02, and the same image by use the two .nc files which generate by VNL 2008.02. Does  the question hide in the function of calculateEffectivePotentialin VNL 2008.10?


And I also want to know  the correct voltage-drop (1v-0v) is like 1.0 0.1 0.02 0.07 0.04 ……………0.01 0.0(in ASCII )?
                                                                                                                   =1.0

The append files are the voltage-drop image compute in VNL 2008.10 and VNL2008.02 by use the same two .nc  filles which generate by VNL 2008.10 .
« Last Edit: April 17, 2010, 14:51 by zdhlover »

Offline nori

  • QuantumATK Guru
  • ****
  • Posts: 122
  • Reputation: 12
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #7 on: April 17, 2010, 16:01 »
Quote
The above are all performed in VNL 2008.10, and I also test the same script above ( lisufficen1v.py lisufficen0v.py) in VNL 2008.02

and I get the difference image and output as below!?
There is the bug in VNL 2008.02 which some physical properties such as Effective potential don't be calculated properly when you use a density matrix stored in NetCDF file.

As regards your latest example, the electrode size is too small as Anders mentioned above and you have to use the electrode that includes more than 4 atoms in the unit cell.
Besides it, if you use "ElectrodeConstraints.RealSpaceDensity", the coordinates of electrodes should be centered.

I guess that "ElectrodeConstraints.DensityMatrix" is the best choice for you system and recommend you to try it.

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #8 on: April 17, 2010, 16:35 »
Quote
The above are all performed in VNL 2008.10, and I also test the same script above ( lisufficen1v.py lisufficen0v.py) in VNL 2008.02

and I get the difference image and output as below!?
There is the bug in VNL 2008.02 which some physical properties such as Effective potential don't be calculated properly when you use a density matrix stored in NetCDF file.

As regards your latest example, the electrode size is too small as Anders mentioned above and you have to use the electrode that includes more than 4 atoms in the unit cell.
Besides it, if you use "ElectrodeConstraints.RealSpaceDensity", the coordinates of electrodes should be centered.

I guess that "ElectrodeConstraints.DensityMatrix" is the best choice for you system and recommend you to try it.

But I also ues VNL 2008.02 and 2008.10 compute the average potential along the Z axis,  the two which is correct?

Offline nori

  • QuantumATK Guru
  • ****
  • Posts: 122
  • Reputation: 12
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #9 on: April 17, 2010, 17:01 »
The bug is fixed in 2008.10 so you should always use 2008.10.
But unfortunately, "VNL2008.10.png" is also strange because voltage drop should occur mainly around H2...
Have you changed the ElectrodeConstraint?
It seems that "ElectrodeConstraints.RealSpaceDensity" is still selected in "VNL2008.10.png"...
« Last Edit: April 17, 2010, 17:12 by nori »

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #10 on: April 17, 2010, 17:12 »
The bug is fixed in 2008.10 so you should always use 2008.10.
Have you changed the ElectrodeConstraint?
It seems that "ElectrodeConstraints.RealSpaceDensity" is still selected in "VNL2008.10.png"...

yes, my computation  all performed with "ElectrodeConstraints.RealSpaceDensity".

and I am so sorry that I can't find the best choice you said " "ElectrodeConstraints.DensityMatrix"

Offline nori

  • QuantumATK Guru
  • ****
  • Posts: 122
  • Reputation: 12
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #11 on: April 17, 2010, 17:19 »
Quote
and I am so sorry that I can't find the best choice you said " "ElectrodeConstraints.DensityMatrix"
You can't select "ElectrodeConstraints.DensityMatrix" in NanoLanguage Scripter and you have to modify the script by hand.

Offline nori

  • QuantumATK Guru
  • ****
  • Posts: 122
  • Reputation: 12
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #12 on: April 17, 2010, 17:38 »
Another possible reason is that you choose multi-grid solver.
If my memory is right, strange voltage drop is obtained with multi-grid solver of 2008.10 in some 2probe systems.

Could you try the scripts attached in this post?
With these scripts, calculations with "ElectrodeConstraints.DensityMatrix" and FFT solver are executed.

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #13 on: April 18, 2010, 04:54 »
Another possible reason is that you choose multi-grid solver.
If my memory is right, strange voltage drop is obtained with multi-grid solver of 2008.10 in some 2probe systems.

Could you try the scripts attached in this post?
With these scripts, calculations with "ElectrodeConstraints.DensityMatrix" and FFT solver are executed.

I understand what you mean.  I use your scripts compute in VNL 2008.10, and I get the result as the append files.
And I wonder are there correct?  How can we judge the image of voltage-drop and the data of the the average potential along Z axiz is correct?

Offline nori

  • QuantumATK Guru
  • ****
  • Posts: 122
  • Reputation: 12
    • View Profile
Re: what's happen when I compute the voltage drop?
« Reply #14 on: April 20, 2010, 08:15 »
Please note that it is very difficult to judge whether a calculated voltage drop is CORRECT.
But I feel your latest one is the most reasonable because there is no dip at the interface between central region and right electrode and no dipole-like potential is induced.

I guess any more improvement can't be achieved with 2008.10 unless the bias voltage is decreased.
Possibly the new algorithm of 2010.02 can make it better.