Skip to content

Commit

Permalink
Merge pull request #22 from nanotech-empa/release/1.8.0
Browse files Browse the repository at this point in the history
Release/1.8.0
  • Loading branch information
eimrek authored Mar 9, 2022
2 parents d1538ae + 926a2bf commit df9285b
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 12 deletions.
14 changes: 11 additions & 3 deletions orb/submit_orb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,15 @@
" value=4.0,\n",
" style=style, layout=layout_small)\n",
"\n",
"ptip_floattext = ipw.BoundedFloatText(\n",
" description='p tip ratio',\n",
" min=0.0,\n",
" max=1.0,\n",
" step=0.01,\n",
" value=0.0,\n",
" style=style, layout=layout_small)\n",
"\n",
"display(n_homo_inttext, n_lumo_inttext, heights_text, isovals_text, fwhms_text, extrap_plane_floattext)"
"display(n_homo_inttext, n_lumo_inttext, heights_text, isovals_text, fwhms_text, extrap_plane_floattext, ptip_floattext)"
]
},
{
Expand Down Expand Up @@ -363,13 +370,14 @@
" '--orb_output_file': 'orb.npz',\n",
" '--eval_region': ['G', 'G', 'G', 'G', 'n-1.0_C', 'p%.1f'%extrap_plane],\n",
" '--dx': '0.15',\n",
" '--eval_cutoff': '14.0',\n",
" '--eval_cutoff': '16.0',\n",
" '--extrap_extent': str(extrap_extent),\n",
" '--n_homo': str(n_homo_inttext.value+2),\n",
" '--n_lumo': str(n_lumo_inttext.value+2),\n",
" '--orb_heights': heights_text.value.split(),\n",
" '--orb_isovalues': isovals_text.value.split(),\n",
" '--orb_fwhms': fwhms_text.value.split(),\n",
" '--p_tip_ratios': ptip_floattext.value,\n",
" })\n",
" \n",
" cp2k_code = cp2k_codes[drop_cp2k.index]\n",
Expand Down Expand Up @@ -422,7 +430,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
6 changes: 5 additions & 1 deletion orb/view_orb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
" print(\"Energy [au]: %.6f\" % (dft_out_params['energy']))\n",
" print(\"Energy [eV]: %.6f\" % (dft_out_params['energy'] * 27.211386245988))\n",
" \n",
" if '--p_tip_ratios' in dict(workcalc.inputs.stm_params):\n",
" p_tip_ratio = workcalc.inputs.stm_params['--p_tip_ratios']\n",
" print(\"Tip p-wave contrib: %.2f\" % p_tip_ratio)\n",
" \n",
" ### Ionization potential, if it's there\n",
" with orb_calc.outputs.retrieved.open('_scheduler-stdout.txt') as std_out_file:\n",
" std_out = std_out_file.read()\n",
Expand Down Expand Up @@ -322,7 +326,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title = Empa nanotech@surfaces Laboratory - Scanning Probe Microscopy

[metadata]
name = scanning_probe
version = 1.7.3
version = 1.8.0
author = nanotech@surfaces laboratory, Empa
description = App to run scanning probe microscopy simulations.
long_description = file: README.md
Expand Down
14 changes: 9 additions & 5 deletions stm/stm_workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,21 @@ def get_force_eval_qs_dft(cls, dft_params, cell_abc, wfn_file, added_mos, atoms)
spin_digit = i_s + 1
a_nel = 1 if i_s == 0 else -1
b_nel = -1 if i_s == 0 else 1

magn = 1.0 if i_s == 0 else -1.0

used_kinds = np.unique([atoms.get_chemical_symbols()[i_s] for i_s in spin_indexes])
for symbol in used_kinds:
force_eval['SUBSYS']['KIND'].append({
'_': symbol+str(spin_digit),
'ELEMENT': symbol,
'BASIS_SET': common.ATOMIC_KIND_INFO[symbol]['basis'],
'POTENTIAL': common.ATOMIC_KIND_INFO[symbol]['pseudo'],
'BS': {
'ALPHA': {'NEL': a_nel, 'L': 1, 'N': 2},
'BETA': {'NEL': b_nel, 'L': 1, 'N': 2},
},
#'BS': {
# 'ALPHA': {'NEL': a_nel, 'L': 1, 'N': 2},
# 'BETA': {'NEL': b_nel, 'L': 1, 'N': 2},
#},
'MAGNETIZATION': magn,
})

return force_eval
return force_eval
13 changes: 11 additions & 2 deletions stm/submit_stm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,15 @@
" value='1e-7',\n",
" style=style, layout=layout)\n",
"\n",
"display(elim_float_slider, de_floattext, fwhms_text, extrap_plane_floattext, const_height_text, const_current_text)"
"ptip_floattext = ipw.BoundedFloatText(\n",
" description='p tip ratio',\n",
" min=0.0,\n",
" max=1.0,\n",
" step=0.01,\n",
" value=0.0,\n",
" style=style, layout=layout_small)\n",
"\n",
"display(elim_float_slider, de_floattext, fwhms_text, extrap_plane_floattext, const_height_text, const_current_text, ptip_floattext)"
]
},
{
Expand Down Expand Up @@ -316,12 +324,13 @@
" '--output_file': 'stm.npz',\n",
" '--eval_region': ['G', 'G', 'G', 'G', z_min, z_max],\n",
" '--dx': '0.15',\n",
" '--eval_cutoff': '14.0',\n",
" '--eval_cutoff': '16.0',\n",
" '--extrap_extent': str(extrap_extent),\n",
" '--energy_range': energy_range_str.split(),\n",
" '--heights': const_height_text.value.split(),\n",
" '--isovalues': const_current_text.value.split(),\n",
" '--fwhms': fwhms_text.value.split(),\n",
" '--p_tip_ratios': ptip_floattext.value,\n",
" })\n",
" \n",
" cp2k_code = cp2k_codes[drop_cp2k.index]\n",
Expand Down
4 changes: 4 additions & 0 deletions stm/view_stm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
" \n",
" extrap_plane = float(workcalc.inputs.stm_params['--eval_region'][-1][1:])\n",
" print(\"Extrap. plane [ang]: %.1f\" % extrap_plane)\n",
" \n",
" if '--p_tip_ratios' in dict(workcalc.inputs.stm_params):\n",
" p_tip_ratio = workcalc.inputs.stm_params['--p_tip_ratios']\n",
" print(\"Tip p-wave contrib: %.2f\" % p_tip_ratio)\n",
" \n",
" ### ----------------------------------------------------\n",
" ### Load data\n",
Expand Down

0 comments on commit df9285b

Please sign in to comment.