QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: jdgayles16 on July 8, 2010, 08:17

Title: initialize a job
Post by: jdgayles16 on July 8, 2010, 08:17
I had trouble initializing for a bias calculation. I get this error

Quote
Contour Integration Error  : 0.018386


from this code
Code
###############################################################
# Initial State
###############################################################
device_configuration = nlread('analysis.nc', object_id="gID0")[0]

###############################################################
# Calculator
###############################################################
#----------------------------------------
# Numerical Accuracy Settings
#----------------------------------------
left_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=(1, 1, 100),
    )

right_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=(1, 1, 100),
    )

device_numerical_accuracy_parameters = NumericalAccuracyParameters(
    grid_mesh_cutoff=100.0*Rydberg,
    )

#----------------------------------------
# Electrode Calculators
#----------------------------------------
left_electrode_calculator = LCAOCalculator(
    numerical_accuracy_parameters=left_electrode_numerical_accuracy_parameters,
    )

right_electrode_calculator = LCAOCalculator(
    numerical_accuracy_parameters=right_electrode_numerical_accuracy_parameters,
    )

#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceLCAOCalculator(
    numerical_accuracy_parameters=device_numerical_accuracy_parameters,
    electrode_calculators=
        [left_electrode_calculator, right_electrode_calculator],
    electrode_voltages=( 0.1*Volt, 0.0*Volt)
    )

device_configuration.setCalculator(calculator,
    initial_state=device_configuration,
)

device_configuration.update()
nlsave('analysis1.nc', device_configuration)
nlprint(device_configuration)

Title: Re: initialize a job
Post by: Anders Blom on July 8, 2010, 09:41
Error or warning? Does the calculation stop?
Title: Re: initialize a job
Post by: jdgayles16 on July 8, 2010, 10:09
the calculation doesn't stop I just get similar error after every density matrix calc
Title: Re: initialize a job
Post by: Anders Blom on July 8, 2010, 10:19
That's what I thought :) So basically this means that the contour integration isn't as precise as it wants to be. This is just a warning message, not an error message, it's an error estimate, we should perhaps reformulate the message a bit :)

We often see errors of 0.01, and that's no real problem, yours is a little bit higher, but probably it's not too serious.

You can experiment with increasing the number of points on the contour, and/or on the linear part (real_axis_point_density), see http://quantumwise.com/documents/manuals/latest/ReferenceManual/XHTML/ref.doublecontourintegralparameters.html for details.
Title: Re: initialize a job
Post by: Anders Blom on July 8, 2010, 10:51
I did some digging in the source code, and actually this message is always printed, in each iteration, under finite bias. It's really just an information message with an unfortunate formulation, it should just say "Contour integration accuracy". 0.018 is a fine accuracy, nothing to worry about. (You can still improve it, by fiddling with the real space point density, but it's not really necessary at all.)
Title: Re: initialize a job
Post by: jdgayles16 on July 8, 2010, 16:34
Nice!! thanks :), I should send you the voltage drop I got with the new, let me know if your not to busy.
Title: Re: initialize a job
Post by: Anders Blom on July 8, 2010, 18:16
Send it, I'm curious to see! :)