Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zdhlover

Pages: 1 2 3 [4] 5 6 ... 8
46
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?

47
 :) :) :)

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 .

48
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)?

49
 :( :( :(

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 ?

50
 :( :( :(

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.

51
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
)

52
 :( :( :(

I also use the  lih2li.vnl in VNL 's example, it should be keep  the periodicity of the perfect Li chain. But the same thing happen, what's wrong??

53
 ;D ;D ;D
Hi,everyone

I use the three scripts compute the voltage drop,but  why I get two strange images?What's happen?Could someone help me ?

The voltage drop script is append  here:
"""
Script for calculating the voltage drop given a zero bias twoprobe calculation
and a finite bias calculation for the same system.

The script will write to the voltage drop to the file specified by vnl_filename,
and it will write to screen the xy-average effective potential.

Specifiy the zero bias calculation by giving the name of the file as zero_bias_filename.
Specifiy the finite bias calculation by giving the name of the file as finiate_bias_filename.
Specify the destination output VNL file for storage of the 3D dataset.

Example of usage:
    atk voltagedrop.py > my_voltage_drop.dat
"""

zero_bias_filename = 'D:/voltage/0.nc'
finiate_bias_filename = 'D:/voltage/1.nc'
vnl_filename = 'D:/voltage/voltage_drop.vnl'


""" ------------ No need to modify anything below this point --------------------- """
# Implementation of the voltage drop.
from ATK.TwoProbe import *; import numpy

# Zero bias calculation.
zero_bias = restoreSelfConsistentCalculation(zero_bias_filename)
# Finite bias calculation.
finite_bias = restoreSelfConsistentCalculation(finiate_bias_filename)
# Calculate the voltage drop.
voltage_drop = calculateEffectivePotential(finite_bias) - calculateEffectivePotential(zero_bias)

# Store the results in a VNL file.
file = VNLFile(vnl_filename)
file.addToSample(voltage_drop,'Voltage Drop','Voltage Drop')

# Get the raw number of the potential, and print the average potential to the screen.
raw_data = voltage_drop.toArray()
z_axis_length = voltage_drop._cell().c().z()
print '### Voltage drop ###'
print '# z(bohr) V(Ry)'
# Loop over all the data and calculate the average in the xy-plane.
for i in range(raw_data.shape[2]):
    print i*z_axis_length/float(raw_data.shape[2]), numpy.average(raw_data[:,:,i])

54
Thanks, I have been uploaded the long heterojunction of of cnt(4,4) and cnt(6,6), and  could you teach me how can I sort,align, mirror and join these two erroneously aligned halves?

55
Thanks ,I understand what you mean,but ....

I have no the structure coordinates, and I only have been use the free CoNTub software to create a heterojunction of of cnt(4,4) and cnt(6,6) and delete the superfluous atoms in the cnt(6,6),and the result like the append image.

But the structure I have been build is erroneously aligned and I also don't know how can I build the right half of the  two-probe system, and how can I join these two erroneously aligned halves?

56
Hi,everyone:

    Could someone tell me how can I bulid such two-probe system as the append files?
I have been read an atricle(PRB 81, 045425(2010)), and I try many ways want to build(4,4)CNT/20-UZCNT/CNT MTJ
as in FIG. 1 of PRB 81, 045425(2010) , but I couldn't get it . Could you have some ideas to help me build a two-probe system
as 4,4)CNT/20-UZCNT/CNT MTJ?
I have been use the free CoNTub software to create a heterojunction of of cnt(4,4) and cnt(6,6).,but  I wonder what I can do next step?

ps :the append files is schematic structure of (4,4)CNT/20-UZCNT/CNT MTJ.

Many thanks!

57
General Questions and Answers / Re: new molecule
« on: April 9, 2010, 16:35 »
you can  conveniently build molecular use the Molecular Builder in vnl 2008.10 through Geometry Manager and Periodic Tableor use the Cupboard as the template.

58
General Questions and Answers / Re: new molecule
« on: April 9, 2010, 10:00 »
 ;D ;D ;D

Which version do you use now,vnl 2010.  or vnl before 2008.10 ?

59
 ;D ;D ;D
Very good and splendid work !
Thanks!

60
General Questions and Answers / Re: Running error
« on: January 29, 2010, 02:41 »
"An internal error occured

exceptions. UnboundLocalError:
local variable 's' referenced before assignment“

Do you carefully check the script specially on the local variable 's' ?   Do the path of the results files  have an chinese name
or the name of the results files have some stranger letters?

Otherwise may be you should send the file here, or at least the script which made the file here.

Pages: 1 2 3 [4] 5 6 ... 8