From c6aafccfef899d88c94c1a18683a4231067b22f8 Mon Sep 17 00:00:00 2001 From: Shyue Ping Ong Date: Fri, 28 Jun 2024 11:39:50 -0700 Subject: [PATCH] Fix pybel import. --- notebooks/2013-01-01-Basic functionality.ipynb | 4 ++-- ... Reaction Energies with the Materials API.ipynb | 6 +++--- notebooks/2013-01-01-Molecule.ipynb | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/notebooks/2013-01-01-Basic functionality.ipynb b/notebooks/2013-01-01-Basic functionality.ipynb index 49891aa..bfc5125 100644 --- a/notebooks/2013-01-01-Basic functionality.ipynb +++ b/notebooks/2013-01-01-Basic functionality.ipynb @@ -490,9 +490,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11.8" } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 } diff --git a/notebooks/2013-01-01-Calculating Reaction Energies with the Materials API.ipynb b/notebooks/2013-01-01-Calculating Reaction Energies with the Materials API.ipynb index 34fb3e6..9fe40cd 100644 --- a/notebooks/2013-01-01-Calculating Reaction Energies with the Materials API.ipynb +++ b/notebooks/2013-01-01-Calculating Reaction Energies with the Materials API.ipynb @@ -91,7 +91,7 @@ "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python 3.10.5 64-bit", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -105,7 +105,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.5" + "version": "3.11.8" }, "vscode": { "interpreter": { @@ -114,5 +114,5 @@ } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 } diff --git a/notebooks/2013-01-01-Molecule.ipynb b/notebooks/2013-01-01-Molecule.ipynb index b973be7..753a65b 100644 --- a/notebooks/2013-01-01-Molecule.ipynb +++ b/notebooks/2013-01-01-Molecule.ipynb @@ -215,23 +215,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [ { "ename": "ModuleNotFoundError", - "evalue": "No module named 'pybel'", + "evalue": "No module named 'openbabel'", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mpymatgen\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbabel\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mBabelMolAdaptor\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mpybel\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpb\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0ma\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mBabelMolAdaptor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmol\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;31m# Create a pybel.Molecule, which simplifies a lot of access\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mpm\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mMolecule\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopenbabel_mol\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'pybel'" + "Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mopenbabel\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m pybel \u001b[38;5;28;01mas\u001b[39;00m pb\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpymatgen\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mio\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mbabel\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m BabelMolAdaptor\n\u001b[1;32m 4\u001b[0m a \u001b[38;5;241m=\u001b[39m BabelMolAdaptor(mol)\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'openbabel'" ] } ], "source": [ - "import pybel as pb\n", + "from openbabel import pybel as pb\n", "from pymatgen.io.babel import BabelMolAdaptor\n", "\n", "a = BabelMolAdaptor(mol)\n", @@ -363,9 +363,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11.8" } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 }