From 56e4d683680424fd24ded4aa4e5a14228e1a4122 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 9 Apr 2015 00:30:29 -0500 Subject: [PATCH 01/18] fix error in developers.txt --- developers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developers.txt b/developers.txt index e032a7a..1fab131 100644 --- a/developers.txt +++ b/developers.txt @@ -80,11 +80,11 @@ Starting from the `code` directory, execute these commands to copy the html file Now, if 0.8 didn't exist yet, we need to add it to the front page index. Open `openbandparams-gh-pages/index.html` and find the following line: -
  • 0.8
  • +
  • 0.7
  • Copy and paste this line just above it: -
  • 0.8
  • +
  • 0.8
  • Now, commit the changes and push them to github: From 1bc3209b27396a95a439e66099ec5ab843420f28 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 9 Apr 2015 02:48:13 -0500 Subject: [PATCH 02/18] improve `developers.txt` --- developers.txt | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/developers.txt b/developers.txt index 5c9822e..aea4240 100644 --- a/developers.txt +++ b/developers.txt @@ -56,14 +56,14 @@ When you want release a new version, follow these directions. First, create a release branch by branching off of the develop branch (substitute in the appropriate version number): - git checkout -b release-?.? develop + git checkout -b release-0.8 develop Next, bump the version number, if it hasn't already been bumped. From the root of the git repository run these commands (again, substituting the appropriate version number): - echo "__version__ = '?.?'" > src/openbandparams/version.py - git commit -am "Bumbed version number to ?.?" + echo "__version__ = '0.8'" > src/openbandparams/version.py + git commit -am "Bumbed version number to 0.8" Now is a good time to run the unit tests and examples, to make sure you haven't missed any bugs: @@ -131,15 +131,15 @@ Next, merge the changes from the release branch into the master branch, and tag the release: git checkout master - git merge --no-ff release-?.? - git tag -a v?.? + git merge --no-ff release-0.8 + git tag -a v0.8 git push origin Then run the following commands from the root of the git repository to build and upload the release to PyPI: python setup.py build sdist bdist_egg - python setup.py register upload + python setup.py register sdist bdist_egg upload Now go to the github page to "create a release" and upload the 'egg', 'zip', and 'tar.gz' files from the 'dist' directory. @@ -149,12 +149,16 @@ If any changes were made during the release branche, merge the release branch into the develop branch, and then delete the release branch: git checkout develop - git merge --no-ff release-?.? - git branch -d release-?.? - git push origin + git merge --no-ff release-0.8 + git branch -d release-0.8 + +You might want to make a doc-0.8 branch, in case you find errors in the +documentation you want to correct. + + git branch doc-0.8 develop You can also go ahead and bump the version number now, so that future builds of the documentation already have the correct version number: - echo "__version__ = '?.?'" > src/openbandparams/version.py - git commit -am "Bumbed version number to ?.?" \ No newline at end of file + echo "__version__ = '0.9'" > src/openbandparams/version.py + git commit -am "Bumbed version number to 0.9" \ No newline at end of file From 4275ee0d5f32fca19f2f5dd2c32e0d730121ba52 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 9 Apr 2015 02:55:38 -0500 Subject: [PATCH 03/18] fix MANIFEST.in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pypi was giving the following error: warning: no files found matching 'LICENSE/*’ --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 8341b81..d365070 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include README.txt include CHANGELOG.txt include doc/PYPI_DESCRIPTION.rst -include LICENSE/* \ No newline at end of file +include LICENSE.txt \ No newline at end of file From 661ea8023011647d3a81166cef51e28d888ac1fa Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 9 Apr 2015 19:26:50 -0500 Subject: [PATCH 04/18] added `dielectric` and `dielectric_high_frequency` --- .../iii_v_zinc_blende_binaries.py | 18 +++++++++++++++++- .../iii_v_zinc_blende_mixed_alloy.py | 10 ++++++++++ src/openbandparams/parameter.py | 3 +++ src/openbandparams/references.py | 17 +++++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/openbandparams/iii_v_zinc_blende_binaries.py b/src/openbandparams/iii_v_zinc_blende_binaries.py index 3555f10..39bee46 100644 --- a/src/openbandparams/iii_v_zinc_blende_binaries.py +++ b/src/openbandparams/iii_v_zinc_blende_binaries.py @@ -19,7 +19,7 @@ ############################################################################# from math import tanh -from .references import vurgaftman_2001, adachi_1987 +from .references import vurgaftman_2001, adachi_1987, adachi_1982 from .parameter import ValueParameter, MethodParameter from .iii_v_zinc_blende_binary import IIIVZincBlendeBinary @@ -175,6 +175,8 @@ ValueParameter('c12', 620.3, 'GPa', references=[vurgaftman_2001]), ValueParameter('c44', 703.3, 'GPa', references=[vurgaftman_2001]), ValueParameter('d', -4.6, 'eV', references=[vurgaftman_2001]), + ValueParameter('dielectric', 11.0, 'dimensionless', references=[adachi_1982]), + ValueParameter('dielectric_high_frequency', 8.5, 'dimensionless', references=[adachi_1982]), ValueParameter('luttinger1', 4.05, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger2', 0.49, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger3', 2.93, 'dimensionless', references=[vurgaftman_2001]), @@ -227,6 +229,8 @@ def GaP_Eg_Gamma(self, **kwargs): ValueParameter('c12', 561., 'GPa', references=[vurgaftman_2001]), ValueParameter('c44', 456., 'GPa', references=[vurgaftman_2001]), ValueParameter('d', -5., 'eV', references=[vurgaftman_2001]), + ValueParameter('dielectric', 12.3, 'dimensionless', references=[adachi_1982]), + ValueParameter('dielectric_high_frequency', 9.6, 'dimensionless', references=[adachi_1982]), ValueParameter('luttinger1', 5.08, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger2', 1.6, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger3', 2.1, 'dimensionless', references=[vurgaftman_2001]), @@ -260,6 +264,8 @@ def GaP_Eg_Gamma(self, **kwargs): ValueParameter('c12', 534., 'GPa', references=[vurgaftman_2001]), ValueParameter('c44', 542., 'GPa', references=[vurgaftman_2001]), ValueParameter('d', -3.4, 'eV', references=[vurgaftman_2001]), + ValueParameter('dielectric', 10.0, 'dimensionless', references=[adachi_1982]), + ValueParameter('dielectric_high_frequency', 8.2, 'dimensionless', references=[adachi_1982]), ValueParameter('luttinger1', 3.76, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger2', 0.82, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger3', 1.42, 'dimensionless', references=[vurgaftman_2001]), @@ -295,6 +301,8 @@ def GaP_Eg_Gamma(self, **kwargs): ValueParameter('c12', 566., 'GPa', references=[vurgaftman_2001]), ValueParameter('c44', 600., 'GPa', references=[vurgaftman_2001]), ValueParameter('d', -4.8, 'eV', references=[vurgaftman_2001]), + ValueParameter('dielectric', 13.0, 'dimensionless', references=[adachi_1982]), + ValueParameter('dielectric_high_frequency', 11.15, 'dimensionless', references=[adachi_1982]), ValueParameter('luttinger1', 6.98, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger2', 2.06, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger3', 2.93, 'dimensionless', references=[vurgaftman_2001]), @@ -334,6 +342,8 @@ def GaP_Eg_Gamma(self, **kwargs): ValueParameter('c12', 452.6, 'GPa', references=[vurgaftman_2001]), ValueParameter('c44', 395.9, 'GPa', references=[vurgaftman_2001]), ValueParameter('d', -3.6, 'eV', references=[vurgaftman_2001]), + ValueParameter('dielectric', 14.5, 'dimensionless', references=[adachi_1982]), + ValueParameter('dielectric_high_frequency', 12.3, 'dimensionless', references=[adachi_1982]), ValueParameter('luttinger1', 20., 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger2', 8.5, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger3', 9.2, 'dimensionless', references=[vurgaftman_2001]), @@ -372,6 +382,8 @@ def GaP_Eg_Gamma(self, **kwargs): ValueParameter('c12', 434.1, 'GPa', references=[vurgaftman_2001]), ValueParameter('c44', 407.6, 'GPa', references=[vurgaftman_2001]), ValueParameter('d', -4.3, 'eV', references=[vurgaftman_2001]), + ValueParameter('dielectric', 11.5, 'dimensionless', references=[adachi_1982]), + ValueParameter('dielectric_high_frequency', 9.95, 'dimensionless', references=[adachi_1982]), ValueParameter('luttinger1', 5.18, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger2', 1.19, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger3', 1.97, 'dimensionless', references=[vurgaftman_2001]), @@ -407,6 +419,8 @@ def GaP_Eg_Gamma(self, **kwargs): ValueParameter('c12', 402.6, 'GPa', references=[vurgaftman_2001]), ValueParameter('c44', 432.2, 'GPa', references=[vurgaftman_2001]), ValueParameter('d', -4.7, 'eV', references=[vurgaftman_2001]), + ValueParameter('dielectric', 15.7, 'dimensionless', references=[adachi_1982]), + ValueParameter('dielectric_high_frequency', 14.5, 'dimensionless', references=[adachi_1982]), ValueParameter('luttinger1', 13.4, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger2', 4.7, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger3', 6., 'dimensionless', references=[vurgaftman_2001]), @@ -442,6 +456,8 @@ def GaP_Eg_Gamma(self, **kwargs): ValueParameter('c12', 373.5, 'GPa', references=[vurgaftman_2001]), ValueParameter('c44', 311.1, 'GPa', references=[vurgaftman_2001]), ValueParameter('d', -4.7, 'eV', references=[vurgaftman_2001]), + ValueParameter('dielectric', 17.8, 'dimensionless', references=[adachi_1982]), + ValueParameter('dielectric_high_frequency', 15.8, 'dimensionless', references=[adachi_1982]), ValueParameter('luttinger1', 34.8, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger2', 15.5, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('luttinger3', 16.5, 'dimensionless', references=[vurgaftman_2001]), diff --git a/src/openbandparams/iii_v_zinc_blende_mixed_alloy.py b/src/openbandparams/iii_v_zinc_blende_mixed_alloy.py index 2d7a89c..2f3759d 100644 --- a/src/openbandparams/iii_v_zinc_blende_mixed_alloy.py +++ b/src/openbandparams/iii_v_zinc_blende_mixed_alloy.py @@ -121,6 +121,16 @@ def c44(self, **kwargs): def d(self, **kwargs): return self._interpolate('d', kwargs) + @method_parameter(dependencies=['dielectric'], + units='dimensionless') + def dielectric(self, **kwargs): + return self._interpolate('dielectric', kwargs) + + @method_parameter(dependencies=['dielectric_high_frequency'], + units='dimensionless') + def dielectric_high_frequency(self, **kwargs): + return self._interpolate('dielectric_high_frequency', kwargs) + @method_parameter(dependencies=['meff_hh_100', 'meff_lh_100'], units='dimensionless') def luttinger1(self, **kwargs): diff --git a/src/openbandparams/parameter.py b/src/openbandparams/parameter.py index d2738fe..a2585e2 100644 --- a/src/openbandparams/parameter.py +++ b/src/openbandparams/parameter.py @@ -224,6 +224,9 @@ def decorator(method): 'c12' : 'c12 elastic constant', 'c44' : 'c44 elastic constant', 'd' : 'd shear deformation potential', + 'dielectric' : 'static relative dielectric permittivity (i.e. <~ 1 THz)', + 'dielectric_high_frequency' : 'high-frequency dielectric permittivity ' + '(i.e. >~ 100 THz)', 'electron_affinity' : 'electron affinity energy', 'luttinger1' : 'first Luttinger parameter', 'luttinger2' : 'second Luttinger parameter', diff --git a/src/openbandparams/references.py b/src/openbandparams/references.py index b609d68..ddb1c77 100644 --- a/src/openbandparams/references.py +++ b/src/openbandparams/references.py @@ -156,4 +156,21 @@ keywords = {Epitaxy, Exciton mediated interactions, Heterojunctions, Hydrostatics, Materials analysis}, pages = {1739--1747}, } +''') + +adachi_1982 = BibtexReference(''' +@article{adachi_1982, + title = {Material parameters of {InGaAsP} and related binaries}, + volume = {53}, + issn = {0021-8979, 1089-7550}, + url = {http://scitation.aip.org.ezproxy.lib.utexas.edu/content/aip/journal/jap/53/12/10.1063/1.330480}, + doi = {10.1063/1.330480}, + number = {12}, + urldate = {2015-03-14}, + journal = {Journal of Applied Physics}, + author = {Adachi, Sadao}, + month = dec, + year = {1982}, + pages = {8775--8792}, +} ''') \ No newline at end of file From f32abde2f0f880133f65773a3551acb3161a2f61 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 16 Apr 2015 18:04:18 -0500 Subject: [PATCH 05/18] change `Alloy.__init__` to use `set_parameter` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As a result, there’s no warning if a parameter that already exists is added on initialization. --- src/openbandparams/alloy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openbandparams/alloy.py b/src/openbandparams/alloy.py index 82f0f1a..d46919a 100644 --- a/src/openbandparams/alloy.py +++ b/src/openbandparams/alloy.py @@ -30,7 +30,7 @@ def __init__(self, name, elements, parameters=None): self._aliases = {} if parameters is not None: for parameter in parameters: - self.add_parameter(parameter) + self.set_parameter(parameter) def __eq__(self, other): return (type(self) == type(other) and From 85e8195f8072e0795135e22c5e92457c8c5dfcf0 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 16 Apr 2015 18:04:38 -0500 Subject: [PATCH 06/18] add `meff_e_L_DOS` and `meff_e_X_DOS` parameters --- src/openbandparams/iii_v_zinc_blende_alloy.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/openbandparams/iii_v_zinc_blende_alloy.py b/src/openbandparams/iii_v_zinc_blende_alloy.py index 53a2283..4c17498 100644 --- a/src/openbandparams/iii_v_zinc_blende_alloy.py +++ b/src/openbandparams/iii_v_zinc_blende_alloy.py @@ -190,6 +190,18 @@ def meff_e_Gamma(self, **kwargs): F = self.F(**kwargs) return 1./((1.+2.*F)+(Ep*(Eg+2.*Delta_SO/3.))/(Eg*(Eg+Delta_SO))) + @method_parameter(dependencies=['meff_e_L_long', 'meff_e_L_trans'], + units='m_e', references=[vurgaftman_2001]) + def meff_e_L_DOS(self, **kwargs): + return (self.meff_e_L_trans(**kwargs)**2 * + self.meff_e_L_long(**kwargs)**2)**(1./3.) + + @method_parameter(dependencies=['meff_e_X_long', 'meff_e_X_trans'], + units='m_e', references=[vurgaftman_2001]) + def meff_e_X_DOS(self, **kwargs): + return (self.meff_e_X_trans(**kwargs)**2 * + self.meff_e_X_long(**kwargs)**2)**(1./3.) + @method_parameter(dependencies=['luttinger1', 'luttinger2'], units='m_e') def meff_hh_100(self, **kwargs): ''' From c611ddd153517b67883adbe492bde617a71879b4 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 16 Apr 2015 18:04:53 -0500 Subject: [PATCH 07/18] fix lattice matching of type 3 quaternaries --- src/openbandparams/iii_v_zinc_blende_quaternary.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/openbandparams/iii_v_zinc_blende_quaternary.py b/src/openbandparams/iii_v_zinc_blende_quaternary.py index bc9c98d..3af86ea 100644 --- a/src/openbandparams/iii_v_zinc_blende_quaternary.py +++ b/src/openbandparams/iii_v_zinc_blende_quaternary.py @@ -242,7 +242,12 @@ def __call__(self, **kwargs): # make sure the lattice constant is available if self._has_x(kwargs): x = self._get_x(kwargs) - ymax = round(1. - x, 6) + if self._type in [1, 2]: + ymax = round(1. - x, 6) + elif self._type == 3: + ymax = 1. + else: + raise RuntimeError() z = None a0 = self(x=x, y=0.).a(T=T) a1 = self(x=x, y=ymax).a(T=T) @@ -256,7 +261,12 @@ def __call__(self, **kwargs): a=0, b=ymax) elif self._has_y(kwargs): y = self._get_y(kwargs) - xmax = round(1. - y, 6) + if self._type in [1, 2]: + xmax = round(1. - y, 6) + elif self._type == 3: + xmax = 1. + else: + raise RuntimeError() z = None a0 = self(x=0., y=y).a(T=T) a1 = self(x=xmax, y=y).a(T=T) From 15898faf39a69a282a6d988aa65a01e8a02542fe Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Tue, 21 Apr 2015 10:48:43 -0500 Subject: [PATCH 08/18] fix `nonparabolicity` --- src/openbandparams/iii_v_zinc_blende_alloy.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/openbandparams/iii_v_zinc_blende_alloy.py b/src/openbandparams/iii_v_zinc_blende_alloy.py index 4c17498..3b492e8 100644 --- a/src/openbandparams/iii_v_zinc_blende_alloy.py +++ b/src/openbandparams/iii_v_zinc_blende_alloy.py @@ -25,6 +25,11 @@ from .equations import varshni +__all__ = ['IIIVZincBlendeAlloy'] + +# Boltzmann constant +k = 8.6173324e-5 # eV K**-1 + class IIIVZincBlendeAlloy(IIIVAlloy): ''' The base class for all III-V zinc blende alloys. @@ -262,7 +267,8 @@ def nonparabolicity(self, **kwargs): ''' Eg = self.Eg_Gamma(**kwargs) meff = self.meff_e_Gamma(**kwargs) - return 1/Eg * (1 - meff)**2 + T = kwargs.get('T', 300.) + return k*T/Eg * (1 - meff)**2 # def _get_eps_xx(self, **kwargs): # if 'a0' in kwargs: From bce566792d4b1858afaf1cf1b826f8d5b9ef082b Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Tue, 21 Apr 2015 10:49:27 -0500 Subject: [PATCH 09/18] improve `Alloy` error message --- src/openbandparams/alloy.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/openbandparams/alloy.py b/src/openbandparams/alloy.py index d46919a..0718204 100644 --- a/src/openbandparams/alloy.py +++ b/src/openbandparams/alloy.py @@ -45,8 +45,13 @@ def __getattribute__(self, name): return self._parameters[name] elif name in self._aliases: return self._parameters[self._aliases[name]] - - item = super(Alloy, self).__getattribute__(name) + + try: + item = super(Alloy, self).__getattribute__(name) + except AttributeError as e: + msg = e.message.replace('object', + "object '{}'".format(self.name)) + raise AttributeError(msg) if isinstance(item, MethodParameter): # make sure MethodParameters defined with the class # are bound to this Alloy From 868fcd583217c37edead4ebc90633a11d7b7bcd2 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Tue, 21 Apr 2015 10:50:05 -0500 Subject: [PATCH 10/18] improve `from obpds import *` --- src/openbandparams/__init__.py | 8 ++++++++ src/openbandparams/alloy.py | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/openbandparams/__init__.py b/src/openbandparams/__init__.py index 310be32..7dc577f 100644 --- a/src/openbandparams/__init__.py +++ b/src/openbandparams/__init__.py @@ -26,6 +26,14 @@ __all__ += parameter.__all__ from .parameter import * +from . import alloy +__all__ += alloy.__all__ +from .alloy import * + +from . import iii_v_zinc_blende_alloy +__all__ += iii_v_zinc_blende_alloy.__all__ +from .iii_v_zinc_blende_alloy import * + from . import iii_v_zinc_blende_binary __all__ += iii_v_zinc_blende_binary.__all__ from .iii_v_zinc_blende_binary import * diff --git a/src/openbandparams/alloy.py b/src/openbandparams/alloy.py index 0718204..58e98f3 100644 --- a/src/openbandparams/alloy.py +++ b/src/openbandparams/alloy.py @@ -20,6 +20,8 @@ from .parameter import Parameter, MethodParameter +__all__ = ['Alloy'] + class Alloy(object): From c658a20645b4438f3ab7ff0ddadfa2f8e473608c Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Tue, 21 Apr 2015 10:50:48 -0500 Subject: [PATCH 11/18] Add an estimate of `InSb.meff_e_X_DOS` --- src/openbandparams/iii_v_zinc_blende_binaries.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openbandparams/iii_v_zinc_blende_binaries.py b/src/openbandparams/iii_v_zinc_blende_binaries.py index 39bee46..652becc 100644 --- a/src/openbandparams/iii_v_zinc_blende_binaries.py +++ b/src/openbandparams/iii_v_zinc_blende_binaries.py @@ -463,6 +463,7 @@ def GaP_Eg_Gamma(self, **kwargs): ValueParameter('luttinger3', 16.5, 'dimensionless', references=[vurgaftman_2001]), ValueParameter('meff_e_Gamma_0', 0.0135, 'm_e', references=[vurgaftman_2001]), ValueParameter('meff_e_L_DOS', 0.25, 'm_e', references=[vurgaftman_2001]), + ValueParameter('meff_e_X_DOS', 0.5, 'm_e'), # guess ValueParameter('thermal_expansion', 3.48e-5, 'angstrom/K', references=[vurgaftman_2001]), ]) From b7bd3dcc2a377ae6164da4b0b879171ec27d560d Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Tue, 21 Apr 2015 23:37:10 -0500 Subject: [PATCH 12/18] remove old commented-out code --- src/openbandparams/iii_v_zinc_blende_alloy.py | 262 ------------------ 1 file changed, 262 deletions(-) diff --git a/src/openbandparams/iii_v_zinc_blende_alloy.py b/src/openbandparams/iii_v_zinc_blende_alloy.py index 3b492e8..6f989f9 100644 --- a/src/openbandparams/iii_v_zinc_blende_alloy.py +++ b/src/openbandparams/iii_v_zinc_blende_alloy.py @@ -269,265 +269,3 @@ def nonparabolicity(self, **kwargs): meff = self.meff_e_Gamma(**kwargs) T = kwargs.get('T', 300.) return k*T/Eg * (1 - meff)**2 - -# def _get_eps_xx(self, **kwargs): -# if 'a0' in kwargs: -# if self is not None: -# self = self -# else: -# self = cls -# return self.biaxial_strained_eps_xx(**kwargs) -# elif 'eps_xx' in kwargs: -# return kwargs['eps_xx'] -# else: -# raise ValueError('Missing required keyword argument' -# ' `eps_xx` or `a0`') -# -# def biaxial_strained_eps_xx(self, **kwargs): -# ''' -# Returns the in-plane strain, `eps_xx`, induced by growing -# on a substrate with the given lattice constant, `a0`, assuming no -# lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# if 'a0' in kwargs: -# return 1 - self.a(**kwargs) / kwargs['a0'] -# else: -# raise ValueError('Missing required keyword argument `a0`') -# -# def biaxial_strained_a0(self, **kwargs): -# ''' -# Returns the substrate lattice constant, `a0`, required to induce the -# given in-plane strain, `eps_xx`, assuming no lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# eps_xx = self._get_eps_xx(**kwargs) -# return self.a(**kwargs) / (1 - eps_xx) -# -# def biaxial_strained_eps_zz(self, **kwargs): -# ''' -# Returns the out-of-plane strain induced by the given in-plane -# strain, `eps_xx`, or by growth on a substrate with the given lattice -# constant, `a0`, assuming no lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# eps_xx = self._get_eps_xx(**kwargs) -# return -2 * self.c_12(**kwargs) / self.c_11(**kwargs) * eps_xx -# -# def biaxial_strained_dE_c(self, **kwargs): -# ''' -# Returns the conduction band-edge shift, in eV, induced by the -# given in-plane strain, `eps_xx`, or by growth on a substrate with -# the given lattice constant, `a0`, assuming no lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# eps_xx = self._get_eps_xx(**kwargs) -# return self.a_c(**kwargs) * (2 * eps_xx + -# self.biaxial_strained_eps_zz(**kwargs)) -# -# def biaxial_strained_P_eps(self, **kwargs): -# ''' -# Returns the hydrostatic component of the valance band-edge shift, -# in eV, induced by the given in-plane strain, `eps_xx`, or by growth -# on a substrate with the given lattice constant, `a0`, assuming no -# lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# eps_xx = self._get_eps_xx(**kwargs) -# return self.a_v(**kwargs) * (2 * eps_xx + -# self.biaxial_strained_eps_zz(**kwargs)) -# -# def biaxial_strained_Q_eps(self, **kwargs): -# ''' -# Returns the uniaxial component of the valance band-edge shift, -# in eV, induced by the given in-plane strain, `eps_xx`, or by growth -# on a substrate with the given lattice constant, `a0`, assuming no -# lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# eps_xx = self._get_eps_xx(**kwargs) -# return self.b(**kwargs) * (self.biaxial_strained_eps_zz(**kwargs) -# - eps_xx) -# -# def biaxial_strained_dE_hh(self, **kwargs): -# ''' -# Returns the heavy-hole band-edge shift, in eV, induced by the given -# in-plane strain, `eps_xx`, or by growth on a substrate with the given -# lattice constant, `a0`, assuming no lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# return -(self.biaxial_strained_P_eps(**kwargs) -# + self.biaxial_strained_Q_eps(**kwargs)) -# -# def biaxial_strained_dE_lh(self, **kwargs): -# ''' -# Returns the light-hole band-edge shift, in eV, induced by the given -# in-plane strain, `eps_xx`, or by growth on a substrate with the given -# lattice constant, `a0`, assuming no lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# return (-self.biaxial_strained_P_eps(**kwargs) -# + self.biaxial_strained_Q_eps(**kwargs)) -# -# def biaxial_strained_E_c(self, **kwargs): -# ''' -# Returns the conduction band-edge offset, in eV, at the given -# in-plane strain, `eps_xx`, or for growth on a substrate with the given -# lattice constant, `a0`, assuming no lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# return (self.VBO(**kwargs) + self.Eg(**kwargs) -# + self.biaxial_strained_dE_c(**kwargs)) -# -# def biaxial_strained_E_hh(self, **kwargs): -# ''' -# Returns the heavy-hole band-edge offset, in eV, at the given -# in-plane strain, `eps_xx`, or for growth on a substrate with the given -# lattice constant, `a0`, assuming no lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# return (self.VBO(**kwargs) -# + self.biaxial_strained_dE_hh(**kwargs)) -# -# def biaxial_strained_E_lh(self, **kwargs): -# ''' -# Returns the light-hole band-edge offset, in eV, at the given -# in-plane strain, `eps_xx`, or for growth on a substrate with the given -# lattice constant, `a0`, assuming no lattice relaxation. -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# return (self.VBO(**kwargs) -# + self.biaxial_strained_dE_lh(**kwargs)) -# -# def biaxial_strained_E_c_hh(self, **kwargs): -# ''' -# Returns the separation between the conduction band-edge and the -# heavy-hole band-edge, in eV, at the given in-plane strain, `eps_xx`, -# or for growth on a substrate with the given lattice constant, `a0`, -# assuming no lattice relaxation, and at temperature, `T`, in -# Kelvin (default: 300 K). -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# return (self.Eg(**kwargs) -# + self.biaxial_strained_dE_c(**kwargs) -# - self.biaxial_strained_dE_hh(**kwargs)) -# -# def biaxial_strained_E_c_lh(self, **kwargs): -# ''' -# Returns the separation between the conduction band-edge and the -# light-hole band-edge, in eV, at the given in-plane strain, `eps_xx`, -# or for growth on a substrate with the given lattice constant, `a0`, -# assuming no lattice relaxation, and at temperature, `T`, in -# Kelvin (default: 300 K). -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# return (self.Eg(**kwargs) -# + self.biaxial_strained_dE_c(**kwargs) -# - self.biaxial_strained_dE_lh(**kwargs)) -# -# def biaxial_strained_Eg(self, **kwargs): -# ''' -# Returns the minimum separation between the conduction band-edge and the -# valance band-edge, in eV, at the given in-plane strain, `eps_xx`, -# or for growth on a substrate with the given lattice constant, `a0`, -# assuming no lattice relaxation, and at temperature, `T`, in -# Kelvin (default: 300 K). -# -# This assumes growth in the [100] direction. -# -# Note 1: Specifying `eps_xx` results in less overhead than -# specifying `a0`. -# -# Note 2: `eps_xx` should be negative for compressive in-plane strain, and -# positive for tensile in-plane strain. -# ''' -# return min(self.biaxial_strained_E_c_hh(**kwargs), -# self.biaxial_strained_E_c_lh(**kwargs)) \ No newline at end of file From 735f4c23fa7f9aafb3f9a6f8e1c77852055c4382 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 23 Apr 2015 20:36:53 -0500 Subject: [PATCH 13/18] fix `luttinger32` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’m not sure how I made such an egregious mistake, but at least I found it. --- src/openbandparams/iii_v_zinc_blende_alloy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openbandparams/iii_v_zinc_blende_alloy.py b/src/openbandparams/iii_v_zinc_blende_alloy.py index 6f989f9..b52151d 100644 --- a/src/openbandparams/iii_v_zinc_blende_alloy.py +++ b/src/openbandparams/iii_v_zinc_blende_alloy.py @@ -161,7 +161,7 @@ def luttinger32(self, **kwargs): Linear interpolation of luttinger32 is the recommended way to estimate the valance band warping in alloys. ''' - return 1. / (self.luttinger1(**kwargs) - 2 * self.luttinger2(**kwargs)) + return self.luttinger3(**kwargs) - self.luttinger2(**kwargs) @method_parameter(dependencies=['luttinger1', 'Eg_Gamma', 'Delta_SO', 'Ep'], units='m_e', references=[vurgaftman_2001]) From 45566824c0a7f579ef5cb47196b8b16b26c96dae Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Mon, 27 Apr 2015 19:16:03 -0500 Subject: [PATCH 14/18] fix `MethodParameter.get_references` endless loop --- src/openbandparams/parameter.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/openbandparams/parameter.py b/src/openbandparams/parameter.py index a2585e2..2a7718a 100644 --- a/src/openbandparams/parameter.py +++ b/src/openbandparams/parameter.py @@ -151,11 +151,13 @@ def get_references(self): if self.alloy is None: return self._references else: + params = [self] refs = [] refs.extend(self._references) for d in self.dependencies: p = self.alloy.get_parameter(d, default=None) - if p is not None and p is not self: + if p is not None and p not in params: + params.append(p) for ref in p.get_references(): if ref not in refs: refs.append(ref) @@ -163,7 +165,8 @@ def get_references(self): for alloy in getattr(self.alloy, 'binaries'): for d in self.dependencies: p = alloy.get_parameter(d, default=None) - if p is not None and p is not self: + if p is not None and p not in params: + params.append(p) for ref in p.get_references(): if ref not in refs: refs.append(ref) @@ -171,7 +174,8 @@ def get_references(self): for alloy in getattr(self.alloy, 'ternaries'): for d in self.dependencies: p = alloy.get_parameter(d, default=None) - if p is not None and p is not self: + params.append(p) + if p is not None and p not in params: for ref in p.get_references(): if ref not in refs: refs.append(ref) From ee5b03fb14ddf1b91ec29dcf59d7bfa990ad35d7 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 5 Nov 2015 17:41:31 -0600 Subject: [PATCH 15/18] improve meff_SO, meff_e_L_DOS, and meff_e_X_DOS --- src/openbandparams/iii_v_zinc_blende_alloy.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/openbandparams/iii_v_zinc_blende_alloy.py b/src/openbandparams/iii_v_zinc_blende_alloy.py index b52151d..0682e2a 100644 --- a/src/openbandparams/iii_v_zinc_blende_alloy.py +++ b/src/openbandparams/iii_v_zinc_blende_alloy.py @@ -167,11 +167,11 @@ def luttinger32(self, **kwargs): units='m_e', references=[vurgaftman_2001]) def meff_SO(self, **kwargs): ''' - Returns the electron effective mass in the Gamma-valley + Returns the split-off hole effective mass calculated from Eg_Gamma(T), Delta_SO, Ep and F. - Interpolation of Eg_Gamma(T), Delta_SO, Ep and F, and - then calculation of meff_e_Gamma is recommended for alloys. + Interpolation of Eg_Gamma(T), Delta_SO, Ep and luttinger1, and + then calculation of meff_SO is recommended for alloys. ''' Eg = self.Eg_Gamma(**kwargs) Delta_SO = self.Delta_SO(**kwargs) @@ -198,14 +198,16 @@ def meff_e_Gamma(self, **kwargs): @method_parameter(dependencies=['meff_e_L_long', 'meff_e_L_trans'], units='m_e', references=[vurgaftman_2001]) def meff_e_L_DOS(self, **kwargs): - return (self.meff_e_L_trans(**kwargs)**2 * - self.meff_e_L_long(**kwargs)**2)**(1./3.) + t = self.meff_e_L_trans(**kwargs) + l = self.meff_e_L_long(**kwargs) + return (t * t * l)**(1./3.) @method_parameter(dependencies=['meff_e_X_long', 'meff_e_X_trans'], units='m_e', references=[vurgaftman_2001]) def meff_e_X_DOS(self, **kwargs): - return (self.meff_e_X_trans(**kwargs)**2 * - self.meff_e_X_long(**kwargs)**2)**(1./3.) + t = self.meff_e_X_trans(**kwargs) + l = self.meff_e_X_long(**kwargs) + return (t * t * l)**(1./3.) @method_parameter(dependencies=['luttinger1', 'luttinger2'], units='m_e') def meff_hh_100(self, **kwargs): From a25f630f78e823d54d002da3899798bc6f128213 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 5 Nov 2015 17:44:34 -0600 Subject: [PATCH 16/18] Bump version to 0.9 --- developers.txt | 51 ++++++++++++++++++----------------- src/openbandparams/version.py | 2 +- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/developers.txt b/developers.txt index aea4240..9348dda 100644 --- a/developers.txt +++ b/developers.txt @@ -52,18 +52,19 @@ implement it. How To Release a New Version ============================ -When you want release a new version, follow these directions. First, create a -release branch by branching off of the develop branch (substitute in the -appropriate version number): +When you want release a new version, follow these directions. First, bump the +version number on the develop branch, if it hasn't already been bumped. From +the root of the git repository run these commands (substitute the +appropriate version number): - git checkout -b release-0.8 develop - -Next, bump the version number, if it hasn't already been bumped. From the root -of the git repository run these commands (again, substituting the appropriate -version number): + git checkout develop + echo "__version__ = '0.9'" > src/openbandparams/version.py + git commit -am "Bump version to 0.9" + +Next, create a release branch by branching off of the develop branch (again, +substituting the appropriate version number): - echo "__version__ = '0.8'" > src/openbandparams/version.py - git commit -am "Bumbed version number to 0.8" + git checkout -b release-0.9 develop Now is a good time to run the unit tests and examples, to make sure you haven't missed any bugs: @@ -106,33 +107,33 @@ might look something like this: `-- index.html Starting from the `code` directory, execute these commands to copy the html -files from `openbandparams` into `openbandparams-gh-pages/0.8`: +files from `openbandparams` into `openbandparams-gh-pages/0.9`: - rm -rf openbandparams-gh-pages/0.8 - cp -R openbandparams/doc/_build/html openbandparams-gh-pages/0.8 + rm -rf openbandparams-gh-pages/0.9 + cp -R openbandparams/doc/_build/html openbandparams-gh-pages/0.9 -Now, if 0.8 didn't exist yet, we need to add it to the front page index. +Now, if 0.9 didn't exist yet, we need to add it to the front page index. Open `openbandparams-gh-pages/index.html` and find the following line: -
  • 0.7
  • +
  • 0.8
  • Copy and paste this line just above it: -
  • 0.8
  • +
  • 0.9
  • Now, commit the changes and push them to github: cd openbandparams-gh-pages git add . - git commit -m "added v0.8 documentation" + git commit -m "added v0.9 documentation" git push origin gh-pages Next, merge the changes from the release branch into the master branch, and tag the release: git checkout master - git merge --no-ff release-0.8 - git tag -a v0.8 + git merge --no-ff release-0.9 + git tag -a v0.9 git push origin Then run the following commands from the root of the git repository to build @@ -149,16 +150,16 @@ If any changes were made during the release branche, merge the release branch into the develop branch, and then delete the release branch: git checkout develop - git merge --no-ff release-0.8 - git branch -d release-0.8 + git merge --no-ff release-0.9 + git branch -d release-0.9 -You might want to make a doc-0.8 branch, in case you find errors in the +You might want to make a doc-0.9 branch, in case you find errors in the documentation you want to correct. - git branch doc-0.8 develop + git branch doc-0.9 develop You can also go ahead and bump the version number now, so that future builds of the documentation already have the correct version number: - echo "__version__ = '0.9'" > src/openbandparams/version.py - git commit -am "Bumbed version number to 0.9" \ No newline at end of file + echo "__version__ = '0.10'" > src/openbandparams/version.py + git commit -am "Bumbed version number to 0.10" \ No newline at end of file diff --git a/src/openbandparams/version.py b/src/openbandparams/version.py index 376df7c..e46aee1 100644 --- a/src/openbandparams/version.py +++ b/src/openbandparams/version.py @@ -1 +1 @@ -__version__ = '0.8' +__version__ = '0.9' From 74be9299ab565cd14d85b1ea2d89b5b7d5e5e81f Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 5 Nov 2015 18:11:38 -0600 Subject: [PATCH 17/18] update CHANGELOG --- CHANGELOG.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1ca1740..6a6679c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,13 @@ +Changes in 0.9: + +- added `dielectric` and `dielectric_high_frequency` parameters +- added `meff_e_L_DOS` and `meff_e_X_DOS` parameters +- improved error messages +- fixed `MethodParameter.get_references` endless loop +- fixed `nonparabolicity` parameter (temperature dependence was wrong) +- fixed `luttinger32` parameter +- fixed lattice matching of type 3 quaternatries + Changes in 0.8: - Near complete rewrite of internals From d92a24e88fd7673719f6b33ab22a1b57c76bfb36 Mon Sep 17 00:00:00 2001 From: Scott Maddox Date: Thu, 5 Nov 2015 18:16:30 -0600 Subject: [PATCH 18/18] fix `developers.txt` --- developers.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/developers.txt b/developers.txt index 9348dda..b615398 100644 --- a/developers.txt +++ b/developers.txt @@ -127,6 +127,7 @@ Now, commit the changes and push them to github: git add . git commit -m "added v0.9 documentation" git push origin gh-pages + cd ../openbandparams Next, merge the changes from the release branch into the master branch, and tag the release: