diff --git a/orb/submit_orb.ipynb b/orb/submit_orb.ipynb index 6c23bd8..8ef62b4 100644 --- a/orb/submit_orb.ipynb +++ b/orb/submit_orb.ipynb @@ -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)" ] }, { @@ -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", @@ -422,7 +430,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, diff --git a/orb/view_orb.ipynb b/orb/view_orb.ipynb index 91f76b1..126c403 100644 --- a/orb/view_orb.ipynb +++ b/orb/view_orb.ipynb @@ -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", @@ -322,7 +326,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, diff --git a/setup.cfg b/setup.cfg index 177b69f..edf61b2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/stm/stm_workchain.py b/stm/stm_workchain.py index 59bc582..21079b7 100644 --- a/stm/stm_workchain.py +++ b/stm/stm_workchain.py @@ -284,6 +284,9 @@ 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({ @@ -291,10 +294,11 @@ def get_force_eval_qs_dft(cls, dft_params, cell_abc, wfn_file, added_mos, atoms) '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 \ No newline at end of file + return force_eval diff --git a/stm/submit_stm.ipynb b/stm/submit_stm.ipynb index 278c60a..8a50156 100644 --- a/stm/submit_stm.ipynb +++ b/stm/submit_stm.ipynb @@ -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)" ] }, { @@ -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", diff --git a/stm/view_stm.ipynb b/stm/view_stm.ipynb index a36445e..f29e333 100644 --- a/stm/view_stm.ipynb +++ b/stm/view_stm.ipynb @@ -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",