Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add charge input to the submission notebook. #50

Merged
merged 3 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions nanoribbon/viewers/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,17 +410,18 @@ def search(self, do_all=False):
html += '<table border=1 id="aiida_results" style="margin:10px;"><tr>'
html += '<th></th>'
html += '<th>PK</th>'
html += '<th>Creation Time</th>'
html += '<th>Created</th>'
html += '<th>Formula</th>'
html += '<th>CalcName</th>'
html += '<th>HOMO (eV)</th>'
html += '<th>LUMO (eV)</th>'
html += '<th>GAP (eV)</th>'
html += '<th>Fermi Energy (eV)</th>'
html += '<th>Fermi (eV)</th>'
html += '<th>Energy (eV)</th>'
html += '<th>Cell x (&#8491;)</th>'
html += '<th>Total Mag./&#x212B;</th>'
html += '<th>Abs Mag./&#x212B;</th>'
html += '<th>Charge</th>'
html += '<th>Structure</th>'
html += '<th></th>'
html += '</tr>'
Expand Down Expand Up @@ -479,6 +480,7 @@ def add_range_filter(bounds, label):
html += '<td>%5.2f</td>' % node.get_extra('cellx')
html += '<td>%4.2f</td>' % node.get_extra('total_magnetization_per_angstr')
html += '<td>%4.2f</td>' % node.get_extra('absolute_magnetization_per_angstr')
html += '<td>%3.1f</td>' % (node.inputs['tot_charge'] if 'tot_charge' in node.inputs else 0.0)
html += '<td><a target="_blank" href="./export_structure.ipynb?uuid={}">'.format(opt_structure_uuid)
html += '<img src="data:image/png;base64,{}" title="{}"></a></td>'.format(thumbnail, opt_structure_pk)
html += '<td><a target="_blank" href="./show.ipynb?id={}">Show</a><br>'.format(node.id)
Expand Down
10 changes: 9 additions & 1 deletion submit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@
"spin_d = ipw.Text(placeholder='1..10 15',\n",
" description='IDs atoms spin D',\n",
" style=style, layout={'width': '60%'})\n",
"tot_charge = ipw.FloatText(\n",
" value=0.0,\n",
" step=0.1,\n",
" description='Total charge:',\n",
" disabled=False\n",
")\n",
"\n",
"cell_opt = ipw.Checkbox(\n",
" value=True,\n",
" description='Opt. cell',\n",
Expand All @@ -121,7 +128,7 @@
" style={'description_width': 'initial'}, \n",
" disabled=False\n",
") \n",
"display(ipw.VBox([cell_opt,spin_u, spin_d, text_calc_description, pw_code_dropdown, pp_code_dropdown, projwfc_code_dropdown, max_nodes, mem_node]))"
"display(ipw.VBox([cell_opt,spin_u, spin_d, tot_charge, text_calc_description, pw_code_dropdown, pp_code_dropdown, projwfc_code_dropdown, max_nodes, mem_node]))"
]
},
{
Expand Down Expand Up @@ -276,6 +283,7 @@
" if not cell_opt.value:\n",
" builder.optimize_cell = Bool(False)\n",
" builder.structure = node_to_submit\n",
" builder.tot_charge = Float(tot_charge.value)\n",
" builder.precision = Float(1.0) #Float(slider_precision.value)\n",
" builder.pseudo_family = Str('SSSP_modified') # Str('SSSP_precision_v1.0')\n",
" builder.metadata = {\n",
Expand Down