Skip to content

Commit

Permalink
Update the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dou-du committed Mar 9, 2020
1 parent 603f5d7 commit 2bfdc31
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 92 deletions.
Binary file added OSSCAR-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@

# widget-periodictable

[![Build Status](https://travis-ci.org/osscar-org/widget-periodictable.svg?branch=master)](https://travis-ci.org/osscar-org/widget_periodictable)
[![codecov](https://codecov.io/gh/osscar-org/widget-periodictable/branch/master/graph/badge.svg)](https://codecov.io/gh/osscar-org/widget-periodictable)


A jupyter widget to select chemical elements from the periodic table.

![periodic table](./periodictable.png)

## Installation

You can install using `pip`:
Expand All @@ -19,11 +16,18 @@ Or if you use jupyterlab:

```bash
pip install widget_periodictable
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter lab build
```

If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
the nbextension:

```bash
jupyter nbextension enable --py [--sys-prefix|--user|--system] widget_periodictable
```
# Acknowlegements

We acknowledge support from:
* EPFL Open Science Fund

<img src='./OSSCAR-logo.png' width='300'>
97 changes: 11 additions & 86 deletions examples/introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -19,24 +19,9 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8f63d7a55d1d4cd2b2b3c3f8cae6cbc7",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"PTableWidget()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"# Show the widget\n",
"widget = PTableWidget()\n",
Expand All @@ -59,24 +44,9 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "48788e1c42414f42b24a1aef2dbea529",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(Button(button_style='success', description='Get the currently selected values', layout=Layout(w…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"output = widgets.Output()\n",
"\n",
Expand Down Expand Up @@ -106,24 +76,9 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5b4247f84a3b46e2a784cb12951b05dc",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Checkbox(value=False, description='Disable oxygen')"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"toggle_disabled = widgets.Checkbox(\n",
" value=\"O\" in widget.disabled_elements,\n",
Expand Down Expand Up @@ -159,24 +114,9 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "19555bf8512342cb974838d16c806eea",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Button(button_style='success', description='Select only Li and H (from python)', layout=Layout(width='300px'),…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"def on_set_from_ptyhon(event):\n",
" # NOTE! If you put an element which does not exist, it will stay forever in the list, but it's ignored\n",
Expand All @@ -201,24 +141,9 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7bc9c3a8545544519729a10742acdbd2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Button(button_style='success', description='Make noble gases bold', layout=Layout(width='300px'), style=Button…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"def get_noble_gases_state():\n",
" label_deactivate = \"Make noble gases bold\"\n",
Expand Down
Binary file added periodictable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2bfdc31

Please sign in to comment.