It should be quite easy to do. Let's see, step by step.
1. Insert the line
right after the two import statements at the top of your script. The reason we do this early in the script is because if it fails (for some reason), we will know immediately. The file needs to be in the same directory as your script.
2. Remove all code in your script after and including the line
# Perform self-consistent field calculation
3. Insert this code at the end of the script instead:
voltages=[0.0,0.1,0.2,0.3]*Volt
ivcurve.runIVcurve (
twoprobe_configuration,
two_probe_method,
runtime_parameters,
voltages,
vnl_filename='FeMgOFe_iv.vnl', sample_name='FeMgOFe',
current_k_point_sampling = (10,10),
current_number_of_points = 100
)
4. Change the voltages to whatever range you prefer, as well as the file and sample name.
Notes:In your original script, the
k-point sampling for the current calculation was 1x1. A characteristic feature of the FeMgOFe system is that you need very, very many k-points to get an accurate current for the minority transmission in the parallel electrode confiuration. I have used 10x10 in the example code above, but you should really check this number, and find out how many you need. Just do it for the zero bias case, that should be fine.
However, and this is crucial: the way you have set up the system, it is
not spin-polarized. For this you must add an initial spin to the electron density parameters. For more information, see the
tutorial on FeMgO.
Another point is that this calculation will be
extremely time-consuming. However, by running it on a cluster you can probably save a factor of 10 or more in time. In that case, you may have to take some special care about the path and import statements etc. However, I note that you are using Windows, and currently there is not parallel Windows version of ATK. So, I really hope you have opportunity to access a parallel Linux machine, or you may have to wait a week or so for the results of this calculation!