Skip to content

Commit

Permalink
Merge pull request #3 from nanotech-empa/release/1.4.0
Browse files Browse the repository at this point in the history
Release/1.4.0
  • Loading branch information
eimrek authored Mar 13, 2021
2 parents 2204933 + 7a522dc commit ee1389f
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 14 deletions.
28 changes: 25 additions & 3 deletions afm/submit_afm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"from aiida_cp2k.calculations import Cp2kCalculation\n",
"\n",
"from aiida.orm import ArrayData\n",
Expand Down Expand Up @@ -67,6 +66,9 @@
" \n",
" #slab_analyzed = find_mol.analyze_slab(atoms)\n",
" viewer_widget.setup(atoms)\n",
" \n",
" if structure.creator is not None:\n",
" text_calc_description.value = structure.creator.description\n",
"\n",
" \n",
"struct_browser = StructureBrowserWidget()\n",
Expand Down Expand Up @@ -264,6 +266,25 @@
" return paramdata"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Submission"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Description for the calculation (try to read from the structure creator)\n",
"\n",
"text_calc_description = ipw.Text(description='Description:', layout={'width': '45%'})\n",
"display(text_calc_description)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -299,7 +320,7 @@
" except:\n",
" wfn_file_path = \"\"\n",
" if wfn_file_path == \"\":\n",
" print(\"Didn't find any accessible .wfn file.\")\n",
" print(\"Info: didn't find any accessible .wfn file.\")\n",
" \n",
" node = submit(\n",
" AfmWorkChain,\n",
Expand All @@ -311,7 +332,8 @@
" afm_pp_code=drop_pp.value,\n",
" afm_pp_params=afm_pp_params,\n",
" afm_2pp_code=drop_2pp.value,\n",
" afm_2pp_params=afm_2pp_params\n",
" afm_2pp_params=afm_2pp_params,\n",
" metadata={'description': text_calc_description.value}\n",
" )\n",
" \n",
" # set calculation version; also used to determine post-processing\n",
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"description": "App to run scanning probe microscopy simulations.",
"title": "Empa nanotech@surfaces Laboratory - Scanning Probe Microscopy",
"version": "1.3",
"version": "1.4.0",
"logo": "miscellaneous/logos/empa.png",
"authors": "nanotech@surfaces laboratory, Empa",
"state": "stable"
Expand Down
28 changes: 25 additions & 3 deletions orb/submit_orb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"from aiida_cp2k.calculations import Cp2kCalculation\n",
"\n",
"from aiida.orm import Code, Computer\n",
Expand Down Expand Up @@ -74,7 +73,10 @@
" viewer_widget.setup(atoms, slab_analyzed)\n",
" \n",
" #cell_text.value = \" \".join([str(c) for c in np.diag(atoms.cell)])\n",
"\n",
" \n",
" if structure.creator is not None:\n",
" text_calc_description.value = structure.creator.description\n",
" \n",
" \n",
"struct_browser = StructureBrowserWidget()\n",
"struct_browser.results.observe(on_struct_change, names='value')\n",
Expand Down Expand Up @@ -283,6 +285,25 @@
"display(n_homo_inttext, n_lumo_inttext, heights_text, isovals_text, fwhms_text, extrap_plane_floattext)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Submission"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Description for the calculation (try to read from the structure creator)\n",
"\n",
"text_calc_description = ipw.Text(description='Description:', layout={'width': '45%'})\n",
"display(text_calc_description)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -366,7 +387,8 @@
" wfn_file_path=Str(wfn_file_path),\n",
" dft_params=dft_params,\n",
" stm_code=stm_code,\n",
" stm_params=stm_params\n",
" stm_params=stm_params,\n",
" metadata={'description': text_calc_description.value}\n",
" )\n",
" \n",
" # set calculation version; also used to determine post-processing\n",
Expand Down
29 changes: 27 additions & 2 deletions pdos/submit_pdos.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
" guess_molecule()\n",
" update_view()\n",
" \n",
" structure = struct_browser.results.value\n",
" if structure:\n",
" if structure.creator is not None:\n",
" text_calc_description.value = structure.creator.description\n",
" \n",
" \n",
"struct_browser = StructureBrowserWidget()\n",
"struct_browser.results.observe(on_struct_change, names='value')\n",
Expand Down Expand Up @@ -347,6 +352,25 @@
"display(num_homo_inttext, num_lumo_inttext, emin_floattext, emax_floattext)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Submission"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Description for the calculation (try to read from the structure creator)\n",
"\n",
"text_calc_description = ipw.Text(description='Description:', layout={'width': '45%'})\n",
"display(text_calc_description)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -398,7 +422,7 @@
" except:\n",
" wfn_file_path = \"\"\n",
" if wfn_file_path == \"\":\n",
" print(\"Didn't find any accessible .wfn file.\")\n",
" print(\"Info: didn't find any accessible .wfn file.\")\n",
" \n",
" mol_structure = StructureData(ase=get_mol_ase())\n",
" mol_structure.description = \"mol from slab PK%d\" % struct.pk\n",
Expand All @@ -416,7 +440,8 @@
" wfn_file_path=Str(wfn_file_path),\n",
" elpa_switch=Bool(elpa_check.value),\n",
" overlap_code=overlap_code,\n",
" overlap_params=overlap_params\n",
" overlap_params=overlap_params,\n",
" metadata={'description': text_calc_description.value}\n",
" )\n",
" \n",
" # set calculation version; also used to determine post-processing\n",
Expand Down
26 changes: 21 additions & 5 deletions stm/submit_stm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,29 @@
" viewer_widget.setup(atoms, slab_analyzed)\n",
" \n",
" #cell_text.value = \" \".join([str(c) for c in np.diag(atoms.cell)])\n",
" \n",
" if structure.creator is not None:\n",
" text_calc_description.value = structure.creator.description\n",
"\n",
" \n",
"struct_browser = StructureBrowserWidget()\n",
"struct_browser.results.observe(on_struct_change, names='value')\n",
"\n",
"viewer_widget = ViewerDetails()\n",
"\n",
"display(ipw.VBox([struct_browser, viewer_widget]))\n"
"display(ipw.VBox([struct_browser, viewer_widget]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Description for the calculation (try to read from the structure creator)\n",
"\n",
"text_calc_description = ipw.Text(description='Description:', layout={'width': '45%'})\n",
"display(text_calc_description)"
]
},
{
Expand All @@ -97,8 +112,8 @@
"def on_computer_change(c):\n",
" global cp2k_codes, stm_codes\n",
" if computer_drop.selected_computer is not None:\n",
" cp2k_codes = common.comp_plugin_codes(computer_drop.selected_computer.name, 'cp2k')\n",
" stm_codes = common.comp_plugin_codes(computer_drop.selected_computer.name, 'spm.stm')\n",
" cp2k_codes = common.comp_plugin_codes(computer_drop.selected_computer.label, 'cp2k')\n",
" stm_codes = common.comp_plugin_codes(computer_drop.selected_computer.label, 'spm.stm')\n",
"\n",
" drop_cp2k.options = [c.label for c in cp2k_codes]\n",
" drop_stm.options = [c.label for c in stm_codes]\n",
Expand Down Expand Up @@ -305,7 +320,7 @@
" except:\n",
" wfn_file_path = \"\"\n",
" if wfn_file_path == \"\":\n",
" print(\"Didn't find any accessible .wfn file.\")\n",
" print(\"Info: didn't find any accessible .wfn file.\")\n",
" \n",
" node = submit(\n",
" STMWorkChain,\n",
Expand All @@ -314,7 +329,8 @@
" wfn_file_path=Str(wfn_file_path),\n",
" dft_params=dft_params,\n",
" stm_code=stm_code,\n",
" stm_params=stm_params\n",
" stm_params=stm_params,\n",
" metadata={'description': text_calc_description.value}\n",
" )\n",
" \n",
" # set calculation version; also used to determine post-processing\n",
Expand Down

0 comments on commit ee1389f

Please sign in to comment.