From 7998a44bfd4a839c3602b6e718458be1f365681c Mon Sep 17 00:00:00 2001 From: Johanna <johanna@zijderveld.de> Date: Fri, 12 Apr 2024 14:26:10 +0200 Subject: [PATCH] put warning comments around deleted functions to help with later cleaning --- examples/1d_hubbard.ipynb | 4 ++++ examples/1d_hubbard_totalenergy.ipynb | 26 +++++++++++++++++++++++++- examples/tEnergyTest.ipynb | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/examples/1d_hubbard.ipynb b/examples/1d_hubbard.ipynb index 1e35574..0216b04 100644 --- a/examples/1d_hubbard.ipynb +++ b/examples/1d_hubbard.ipynb @@ -70,8 +70,10 @@ "source": [ "# Set number of k-points\n", "nk = 100\n", + "#model2hk is dead, use tb2khamvector instead\n", "hk = utils.model2hk(h_0=h_0)\n", "# Compute Hamiltonian on the corresponding k-point grid\n", + "#kgrid_hamiltonian is deprecated, use kfunc2kham instead\n", "hamiltonians_0, ks = utils.kgrid_hamiltonian(nk=nk, hk=hk, dim=1, return_ks=True)\n", "# Perform diagonalization\n", "vals, vecs = np.linalg.eigh(hamiltonians_0)\n", @@ -111,6 +113,8 @@ " optimizer_kwargs={'M':0, 'w0':0.1}\n", " )\n", " # Generate Hamiltonian on a denser k-point grid\n", + " #model2hk is dead, use tb2khamvector instead\n", + " #kgrid_hamiltonian is deprecated, use kfunc2kham instead\n", " mf_k = utils.kgrid_hamiltonian(\n", " nk=nk_dense, hk=utils.model2hk(h_0=mf_model), dim=model.dim\n", " )\n", diff --git a/examples/1d_hubbard_totalenergy.ipynb b/examples/1d_hubbard_totalenergy.ipynb index 09a7302..4190a80 100644 --- a/examples/1d_hubbard_totalenergy.ipynb +++ b/examples/1d_hubbard_totalenergy.ipynb @@ -7,7 +7,27 @@ "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.\n", + "Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.\n" + ] + }, + { + "ename": "ImportError", + "evalue": "cannot import name 'utils' from 'codes' (/Users/rzijderveld/kwant-scf/examples/codes/__init__.py)", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[1], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmatplotlib\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpyplot\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mplt\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcodes\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m utils, model, interface, solvers\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtqdm\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m tqdm\n", + "\u001b[0;31mImportError\u001b[0m: cannot import name 'utils' from 'codes' (/Users/rzijderveld/kwant-scf/examples/codes/__init__.py)" + ] + } + ], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", @@ -70,8 +90,10 @@ "source": [ "# Set number of k-points\n", "nk = 100\n", + "# model2hk is dead, use tb2khamvector instead\n", "hk = utils.model2hk(h_0=h_0)\n", "# Compute Hamiltonian on the corresponding k-point grid\n", + "#kgrid_hamiltonian is deprecated, use kfunc2kham instead\n", "hamiltonians_0, ks = utils.kgrid_hamiltonian(nk=nk, hk=hk, dim=1, return_ks=True)\n", "# Perform diagonalization\n", "vals, vecs = np.linalg.eigh(hamiltonians_0)\n", @@ -111,6 +133,8 @@ " optimizer_kwargs={'M':0, 'w0':0.1}\n", " )\n", " # Generate Hamiltonian on a denser k-point grid\n", + " #kgrid_hamiltonian is deprecated, use kfunc2kham instead\n", + " #model2hk is dead use tb2khamvector instead\n", " mf_k = utils.kgrid_hamiltonian(\n", " nk=nk_dense, hk=utils.model2hk(h_0=mf_model), dim=model.dim\n", " )\n", diff --git a/examples/tEnergyTest.ipynb b/examples/tEnergyTest.ipynb index 7e9a642..6cf315b 100644 --- a/examples/tEnergyTest.ipynb +++ b/examples/tEnergyTest.ipynb @@ -44,6 +44,8 @@ "metadata": {}, "outputs": [], "source": [ + "#kgrid_hamiltonian is deprecated, use kfunc2kham instead\n", + "#model2hk is dead, use tb2khamvector instead\n", "hamiltonians_0 = utils.kgrid_hamiltonian(\n", " nk=nk, hk=utils.model2hk(h_0=h_0), dim=1\n", ")\n", -- GitLab