Re: "KeyError" message in different material

16 views
Skip to first unread message

h.h...@yahoo.fr

unread,
Jul 10, 2020, 12:16:01 PM7/10/20
to Andreas Liudi Mulyo, aestim...@googlegroups.com, h.hebal via Aestimo-devel
Hi Andreas,
Thank you for using Aestimo, regarding your example, you can use aestimo_eh.py instead of aestimo.py for Wurtzite materials, an example of your structure is simulated and attached here.
copy the file into the examples folder and perform your simulation.
best regards
hamza
Le vendredi 10 juillet 2020 à 15:33:14 UTC+2, Rob Steed <robs...@gmail.com> a écrit :


Hi Andreas,

We're always happy to see someone using Aestimo and I will try to help you with your issues.

So the 'F' parameter is an empirical material property for Kane's nonparabolicity parameter for the conduction band which is basically an empirical correction to the energy-momentum dispersion relation in the conduction band. The material properties are defined in the files 'database.py' or 'database1.py', there are two files because we are in the process of switching over from one to the other. It looks like the aestimo.py simulator still uses the database.py file and the 'F' parameter isn't defined for GaN. So an immediate fix might be to change the computation_scheme or the meff_method parameters. The meff_method decided which effective mass function to use when modelling non-parabolicity. The computation_scheme allows you to turn off the non-parabolicity calculations amongst other options. This might allow you to get the script to finish.

However, GaN is probably not best modelled with this simulator. There are 2 simulators in aestimo (which is a bit confusing and we're probably going to split them up to simplify understanding), the first - 'aestimo.py' is a conduction band simulator and the other is 'aestimo_eh.py' which is a more advanced simulator that includes valence band effects. The jupyter notebook tutorials were written for aestimo.py but aestimo_eh.py is better for modelling Wurtzite crystal structures (such as GaN). There are various examples in the 'examples' directory. Unfortunately, I'm not an expert at this simulator (I worked on aestimo.py), if you have more questions then maybe Hamzel Hebal can help you who was the main developer for aestimo_eh.py

regards,

Robert

On Fri, Jul 10, 2020 at 2:56 PM Andreas Liudi Mulyo <andre...@yahoo.co.id> wrote:
Hello,

(Previously sent to aestim...@googlegroups.com, but bounced back)

I stumbled upon Aestimo recently (download the version from GitHub), and managed to run the tutorial#1 (https://nbviewer.jupyter.org/github/aestimosolver/aestimo/blob/master/tutorials/Aestimo_Tutorial.ipynb).

In that example, AlGaAs is the barriers while the GaAs is the well layer. Below how it looks like:

s.material =[[ 10.0, 'AlGaAs', 0.3, 0.0, 'n'],
            [ 5.0, 'AlGaAs', 0.3, 5e17, 'n'],
            [ 5.0, 'AlGaAs', 0.3, 0.0, 'n'],
            [ 11.0, 'GaAs', 0, 0, 'n'],
            [ 5.0, 'AlGaAs', 0.3, 0.0, 'n'],
            [ 5.0, 'AlGaAs', 0.3, 5e17, 'n'],
            [ 10.0, 'AlGaAs', 0.3, 0.0, 'n']]

The results were similar with the tutorial.

For testing, I decided to replace AlGaAs with AlGaN and GaAs with GaN for the barriers and well layer, respectively. I decided to keep other parameters the same (for further detail, please find the Python script in the attachment).

s.material =[[ 10.0, 'AlGaN', 0.3, 0.0, 'n'],
            [ 5.0, 'AlGaN', 0.3, 5e17, 'n'],
            [ 5.0, 'AlGaN', 0.3, 0.0, 'n'],
            [ 11.0, 'GaN', 0, 0, 'n'],
            [ 5.0, 'AlGaN', 0.3, 0.0, 'n'],
            [ 5.0, 'AlGaN', 0.3, 5e17, 'n'],
            [ 10.0, 'AlGaN', 0.3, 0.0, 'n']]

For this material system, the calculation was not successful. Below is the error message I got:

File "C:\Users\Andreas\Anaconda3\lib\aestimo\aestimo.py", line 459, in create_structure_arrays
    F[startindex:finishindex] = x * mat1["F"] + (1 - x) * mat2["F"]

KeyError: 'F'

Google led me to few solutions, but in the end I failed in incorporating the suggested solutions ( e.g. get() ) into the "aestimo.py".

That is strange error. I tried randomly with other material families, like GaP/InP and the script ran without any problem.

Thank you for your assistance. 


Andreas

Figure_1.png
Figure_2.png
sample_qw_barrierdope_n_AlGaN.py

h.h...@yahoo.fr

unread,
Aug 11, 2020, 2:25:03 PM8/11/20
to andre...@yahoo.co.id, Aestimo-users
Hi Andreas,
Tutorials are made with aestimo.py where strain and piezoelectric effect is not considered, thus the difference between aestimo_eh.py and tutorials.
For the last error just import database as adatabase (your example file located in aestimo folder).
After this change the simulation worked.
Best regards
Hamza




On Tue, Aug 11, 2020 at 2:40, Andreas Liudi Mulyo
Hi Robert and Hebal,

Sorry for the late reply. Finally, last weekend I had a chance to implement what you suggested.
One thing I don't understand: why can't I simply substitute aestimo with aestimo_eh in the script? Example: "import aestimo.config as ac" with "import aestimo_eh.config as ac" (In [2], from https://nbviewer.jupyter.org/github/aestimosolver/aestimo/blob/master/tutorials/Aestimo_Tutorial.ipynb).
I apologize for apparently dumb question as I am new in Python and novice in programming.

Anyway, I did slightly different in the script as I am only interested to obtain only QW simulation at equilibrium condition and the first three energy states in the conduction band (please find the script in the attachment). I have checked the available examples, but as far as I aware, none of them gives the energy state values as described in https://nbviewer.jupyter.org/github/aestimosolver/aestimo/blob/master/tutorials/Aestimo_Tutorial.ipynb (In [12]).

Upon running the program, it did not give me any error message, but rather generated weird result. I got 0 values for its energy, population and effective mass.

Did I mess up somewhere?
I thought the problem lies in here: "import aestimo.database as adatabase" (line 3) as it does not call aestimo_eh. However, when "import aestimo_eh.database as adatabase" was used, it gave me an error message, "ModuleNotFoundError: No module named 'aestimo_eh.database'; 'aestimo_eh' is not a package".

Thank you for your kind help.

Andreas
Reply all
Reply to author
Forward
0 new messages