Skip to content

Commit

Permalink
Add small fixes to di-water promolecule notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-2023 committed Oct 30, 2024
1 parent 43913f7 commit fa781ea
Showing 1 changed file with 127 additions and 17 deletions.
144 changes: 127 additions & 17 deletions website/examples/promolecule_nci.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,124 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting git+https://github.com/theochem/iodata.git\n",
" Cloning https://github.com/theochem/iodata.git to /tmp/pip-req-build-04vs7b75\n",
" Running command git clone --filter=blob:none --quiet https://github.com/theochem/iodata.git /tmp/pip-req-build-04vs7b75\n",
" Resolved https://github.com/theochem/iodata.git to commit f8af4e8aa4e3fa36d0a964176284af3e60814a63\n",
" Installing build dependencies ... \u001b[?25ldone\n",
"\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n",
"\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25hRequirement already satisfied: numpy>=1.22 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-iodata==1.0.0a5) (1.26.4)\n",
"Requirement already satisfied: scipy>=1.11.1 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-iodata==1.0.0a5) (1.12.0)\n",
"Requirement already satisfied: attrs>=21.3.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-iodata==1.0.0a5) (23.2.0)\n",
"Building wheels for collected packages: qc-iodata\n",
" Building wheel for qc-iodata (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25h Created wheel for qc-iodata: filename=qc_iodata-1.0.0a5-py3-none-any.whl size=3363272 sha256=3e39202dec825d325e553a0ddcfb6ad589380fa29fc106d74adc14c8fb8f0287\n",
" Stored in directory: /tmp/pip-ephem-wheel-cache-ftpztnqk/wheels/76/6b/7c/cba081b62e15fb642065b58a1b7cea1bff4fd30045d1823b9f\n",
"Successfully built qc-iodata\n",
"Installing collected packages: qc-iodata\n",
" Attempting uninstall: qc-iodata\n",
" Found existing installation: qc-iodata 0.0.0.post0\n",
" Uninstalling qc-iodata-0.0.0.post0:\n",
" Successfully uninstalled qc-iodata-0.0.0.post0\n",
"Successfully installed qc-iodata-1.0.0a5\n",
"Collecting git+https://github.com/theochem/grid.git\n",
" Cloning https://github.com/theochem/grid.git to /tmp/pip-req-build-hwpdm0by\n",
" Running command git clone --filter=blob:none --quiet https://github.com/theochem/grid.git /tmp/pip-req-build-hwpdm0by\n",
" Resolved https://github.com/theochem/grid.git to commit 9a60c3c15da79711356865694365bf399d759b78\n",
" Installing build dependencies ... \u001b[?25ldone\n",
"\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n",
"\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25hRequirement already satisfied: numpy>=1.16 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-grid==0.0.5a6.post654) (1.26.4)\n",
"Requirement already satisfied: pytest>=2.6 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-grid==0.0.5a6.post654) (8.0.1)\n",
"Requirement already satisfied: scipy>=1.4 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-grid==0.0.5a6.post654) (1.12.0)\n",
"Requirement already satisfied: importlib-resources in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-grid==0.0.5a6.post654) (3.0.0)\n",
"Requirement already satisfied: sympy in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-grid==0.0.5a6.post654) (1.12)\n",
"Requirement already satisfied: iniconfig in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from pytest>=2.6->qc-grid==0.0.5a6.post654) (2.0.0)\n",
"Requirement already satisfied: packaging in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from pytest>=2.6->qc-grid==0.0.5a6.post654) (23.2)\n",
"Requirement already satisfied: pluggy<2.0,>=1.3.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from pytest>=2.6->qc-grid==0.0.5a6.post654) (1.4.0)\n",
"Requirement already satisfied: mpmath>=0.19 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from sympy->qc-grid==0.0.5a6.post654) (1.3.0)\n",
"Building wheels for collected packages: qc-grid\n",
" Building wheel for qc-grid (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25h Created wheel for qc-grid: filename=qc_grid-0.0.5a6.post654-py3-none-any.whl size=66125857 sha256=ef7ebe8a00679ad87f067d048228ca3aa509e57b0247bab2f5c09584730cb8b1\n",
" Stored in directory: /tmp/pip-ephem-wheel-cache-e1b03lyc/wheels/82/33/28/8670ccb17c572b2c6d907ea2100cf09d2c06e6905a01e96ccc\n",
"Successfully built qc-grid\n",
"Installing collected packages: qc-grid\n",
" Attempting uninstall: qc-grid\n",
" Found existing installation: qc-grid 0.0.5a6.post651\n",
" Uninstalling qc-grid-0.0.5a6.post651:\n",
" Successfully uninstalled qc-grid-0.0.5a6.post651\n",
"Successfully installed qc-grid-0.0.5a6.post654\n",
"Collecting qc-AtomDB\n",
" Downloading qc_AtomDB-0.0.2.post5-py3-none-any.whl.metadata (7.0 kB)\n",
"Requirement already satisfied: numpy>=1.16 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB) (1.26.4)\n",
"Requirement already satisfied: scipy>=1.4 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB) (1.12.0)\n",
"Requirement already satisfied: msgpack>=1.0.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB) (1.0.0)\n",
"Requirement already satisfied: msgpack-numpy>=0.4.8 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB) (0.4.8)\n",
"Requirement already satisfied: h5py>=3.6.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB) (3.10.0)\n",
"Requirement already satisfied: importlib-resources>=3.0.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB) (3.0.0)\n",
"Requirement already satisfied: pooch>=1.8.1 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB) (1.8.1)\n",
"Requirement already satisfied: platformdirs>=2.5.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from pooch>=1.8.1->qc-AtomDB) (4.2.0)\n",
"Requirement already satisfied: packaging>=20.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from pooch>=1.8.1->qc-AtomDB) (23.2)\n",
"Requirement already satisfied: requests>=2.19.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from pooch>=1.8.1->qc-AtomDB) (2.31.0)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from requests>=2.19.0->pooch>=1.8.1->qc-AtomDB) (3.3.2)\n",
"Requirement already satisfied: idna<4,>=2.5 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from requests>=2.19.0->pooch>=1.8.1->qc-AtomDB) (3.7)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from requests>=2.19.0->pooch>=1.8.1->qc-AtomDB) (2.2.1)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from requests>=2.19.0->pooch>=1.8.1->qc-AtomDB) (2024.2.2)\n",
"Downloading qc_AtomDB-0.0.2.post5-py3-none-any.whl (62.0 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.0/62.0 MB\u001b[0m \u001b[31m25.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
"\u001b[?25hInstalling collected packages: qc-AtomDB\n",
"Successfully installed qc-AtomDB-0.0.2.post5\n",
"Collecting git+https://github.com/theochem/AtomDB.git\n",
" Cloning https://github.com/theochem/AtomDB.git to /tmp/pip-req-build-pfnjwa98\n",
" Running command git clone --filter=blob:none --quiet https://github.com/theochem/AtomDB.git /tmp/pip-req-build-pfnjwa98\n",
" Resolved https://github.com/theochem/AtomDB.git to commit 43913f70a8ba5c65093159029c028269d2bc1b1d\n",
" Installing build dependencies ... \u001b[?25ldone\n",
"\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n",
"\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25hRequirement already satisfied: numpy>=1.16 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB==0.0.2.post5) (1.26.4)\n",
"Requirement already satisfied: scipy>=1.4 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB==0.0.2.post5) (1.12.0)\n",
"Requirement already satisfied: msgpack>=1.0.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB==0.0.2.post5) (1.0.0)\n",
"Requirement already satisfied: msgpack-numpy>=0.4.8 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB==0.0.2.post5) (0.4.8)\n",
"Requirement already satisfied: h5py>=3.6.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB==0.0.2.post5) (3.10.0)\n",
"Requirement already satisfied: importlib-resources>=3.0.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB==0.0.2.post5) (3.0.0)\n",
"Requirement already satisfied: pooch>=1.8.1 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from qc-AtomDB==0.0.2.post5) (1.8.1)\n",
"Requirement already satisfied: platformdirs>=2.5.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from pooch>=1.8.1->qc-AtomDB==0.0.2.post5) (4.2.0)\n",
"Requirement already satisfied: packaging>=20.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from pooch>=1.8.1->qc-AtomDB==0.0.2.post5) (23.2)\n",
"Requirement already satisfied: requests>=2.19.0 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from pooch>=1.8.1->qc-AtomDB==0.0.2.post5) (2.31.0)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from requests>=2.19.0->pooch>=1.8.1->qc-AtomDB==0.0.2.post5) (3.3.2)\n",
"Requirement already satisfied: idna<4,>=2.5 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from requests>=2.19.0->pooch>=1.8.1->qc-AtomDB==0.0.2.post5) (3.7)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from requests>=2.19.0->pooch>=1.8.1->qc-AtomDB==0.0.2.post5) (2.2.1)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /home/marco/miniconda3/envs/atomdb_env/lib/python3.12/site-packages (from requests>=2.19.0->pooch>=1.8.1->qc-AtomDB==0.0.2.post5) (2024.2.2)\n"
]
},
{
"data": {
"text/plain": [
"('data/h2o_dimer.xyz', <http.client.HTTPMessage at 0x7fadc4042870>)"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# # Install packages in Google Colab.\n",
"# # Don't run this cell if packages/data is already in your environment\n",
"# ! pip install git+https://github.com/theochem/iodata.git\n",
"# ! pip install git+https://github.com/theochem/grid.git\n",
"## Install the AtomDB package\n",
"## prefer to use the release from PyPI\n",
"#! pip install qc-AtomDB\n",
"## alternatively, install the development version from GitHub\n",
"# # Install the AtomDB package\n",
"# # prefer to use the release from PyPI\n",
"# ! pip install qc-AtomDB\n",
"# # alternatively, install the development version from GitHub\n",
"# ! python -m pip install git+https://github.com/theochem/AtomDB.git\n",
"\n",
"# # Download the example files\n",
Expand Down Expand Up @@ -62,14 +168,13 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Package 'qc-AtomDB' is not installed.\n",
"Atomic numbers dimer:\n",
" [8. 8. 1. 1. 1. 1.]\n",
"Atomic coordinates dimer:\n",
Expand All @@ -91,11 +196,12 @@
"source": [
"import atomdb\n",
"import iodata\n",
"import os\n",
"import numpy as np\n",
"from importlib_resources import files\n",
"\n",
"# Load the H2O dimer from a .xyz file\n",
"data_file = files(atomdb).joinpath(\"../docs/notebooks/data/h2o_dimer.xyz\")\n",
"data_file = os.path.join(fpath,\"h2o_dimer.xyz\")\n",
"mol_data = iodata.load_one(data_file)\n",
"\n",
"atnums = mol_data.atcorenums\n",
Expand All @@ -122,7 +228,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -155,9 +261,18 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading data from 'https://raw.githubusercontent.com/theochem/AtomDBdata/main/slater/db/H_000_002_000.msg' to file '/mnt/Data/Work/Ayers/QC-Devs/AtomDB/atomdb/datasets/slater/db/H_000_002_000.msg'.\n",
"SHA256 hash of downloaded file: c8e61adf9296c53bab94118c7c2dc33bff360c11a2a3a1e8cdf67b6bd317f1ed\n",
"Use this value as the 'known_hash' argument of 'pooch.retrieve' to ensure that the file hasn't changed if it is downloaded again in the future.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
Expand Down Expand Up @@ -265,7 +380,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "atomdb_env",
"language": "python",
"name": "python3"
},
Expand All @@ -280,11 +395,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
},
"vscode": {
"interpreter": {
"hash": "4846203d052f4918654383d2fa4dc83e5f0e073317ccb4eea0fa3b82d0bd9d45"
}
}
},
"nbformat": 4,
Expand Down

0 comments on commit fa781ea

Please sign in to comment.