diff --git a/README.md b/README.md index e48c6b1..45b4f89 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ * Through simple sequence o forbitals in the unit cell * Through atom specification * Through atom and orbital specification -- Separation of TR and TRB components of the Hamiltonian, Identification of the exchange field. +- Separation of TR and TRB components of the Hamiltonian, Identification of the exchange field. - Definition of commutator expressions, old projection matrix elements - Efficient calculation of Green's functions - Calculation of energy and momentum resolved derivatives -- Parallel BZ and serial energy integral \ No newline at end of file +- Parallel BZ and serial energy integral diff --git a/pyproject.toml b/pyproject.toml index ef660d3..ce2a21a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ kewords = [ "physics", "grogu" ] -requires-python = ">=3.8" +requires-python = "==3.9" dependencies = [ "numpy", "scipy", @@ -29,8 +29,6 @@ classifiers = [ "Development Status :: 3 - Alpha", "Programming Language :: Python", "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Physics", "License :: OSI Approved :: MIT License", diff --git a/requirements.txt b/requirements.txt index 64f3332..6e19b41 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ # Package dependencies argparse -numpy>=1.13 -scipy>=0.18 -sisl -netcdf4 +numpy>=1.24.4 +scipy==1.10.1 +sisl==0.14.3 +netcdf4==1.6.2 openmpi -mpi4py +mpi4py \ No newline at end of file diff --git a/test.ipynb b/test.ipynb index b817f6c..c803d0a 100644 --- a/test.ipynb +++ b/test.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -16,30 +16,30 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "from scipy.linalg import eigh\n", "#import matplotlib.pyplot as plt\n", - "import warnings\n", "import sisl\n", + "import warnings\n", "from grogu.useful import *" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'0.15.1'" + "'0.14.3'" ] }, - "execution_count": 3, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -51,12 +51,12 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "# this cell mimicks an input file\n", - "fdf = sisl.get_sile('./Fe3GeTe2/Fe3GeTe2.fdf')\n", + "fdf = sisl.get_sile('/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf')\n", "# this information needs to be given at the input!!\n", "scf_xcf_orientation=np.array([0,0,1]) #z\n", "# list of reference directions for around which we calculate the derivatives\n", @@ -86,29 +86,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 14, "metadata": {}, - "outputs": [ - { - "ename": "FileNotFoundError", - "evalue": "[Errno 2] No such file or directory: 'Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[5], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# digestion of the input\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# read in geometry and hamiltonian\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m geo \u001b[38;5;241m=\u001b[39m \u001b[43mfdf\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_geometry\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 4\u001b[0m dh \u001b[38;5;241m=\u001b[39m fdf\u001b[38;5;241m.\u001b[39mread_hamiltonian()\n\u001b[1;32m 6\u001b[0m uc_in_sc_idx\u001b[38;5;241m=\u001b[39mdh\u001b[38;5;241m.\u001b[39mlattice\u001b[38;5;241m.\u001b[39msc_index([\u001b[38;5;241m0\u001b[39m,\u001b[38;5;241m0\u001b[39m,\u001b[38;5;241m0\u001b[39m])\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.12/site-packages/sisl/io/siesta/fdf.py:1440\u001b[0m, in \u001b[0;36mfdfSileSiesta.read_geometry\u001b[0;34m(self, output, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1434\u001b[0m order \u001b[38;5;241m=\u001b[39m _parse_order(\n\u001b[1;32m 1435\u001b[0m kwargs\u001b[38;5;241m.\u001b[39mpop(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124morder\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m),\n\u001b[1;32m 1436\u001b[0m {\u001b[38;5;28;01mTrue\u001b[39;00m: [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mXV\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnc\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mTSHS\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSTRUCT\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mHSX\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfdf\u001b[39m\u001b[38;5;124m\"\u001b[39m], \u001b[38;5;28;01mFalse\u001b[39;00m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfdf\u001b[39m\u001b[38;5;124m\"\u001b[39m},\n\u001b[1;32m 1437\u001b[0m output,\n\u001b[1;32m 1438\u001b[0m )\n\u001b[1;32m 1439\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m f \u001b[38;5;129;01min\u001b[39;00m order:\n\u001b[0;32m-> 1440\u001b[0m v \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mgetattr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43mf\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m_r_geometry_\u001b[39;49m\u001b[38;5;132;43;01m{\u001b[39;49;00m\u001b[43mf\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlower\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;132;43;01m}\u001b[39;49;00m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1441\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m v \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 1442\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m v\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.12/site-packages/sisl/io/siesta/fdf.py:1511\u001b[0m, in \u001b[0;36mfdfSileSiesta._r_geometry_fdf\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1506\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_r_geometry_fdf\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[1;32m 1507\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Returns Geometry object from the FDF file\u001b[39;00m\n\u001b[1;32m 1508\u001b[0m \n\u001b[1;32m 1509\u001b[0m \u001b[38;5;124;03m NOTE: Interaction range of the Atoms are currently not read.\u001b[39;00m\n\u001b[1;32m 1510\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m-> 1511\u001b[0m lattice \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_lattice\u001b[49m\u001b[43m(\u001b[49m\u001b[43morder\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mfdf\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1513\u001b[0m \u001b[38;5;66;03m# No fractional coordinates\u001b[39;00m\n\u001b[1;32m 1514\u001b[0m is_frac \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.12/site-packages/sisl/io/siesta/fdf.py:774\u001b[0m, in \u001b[0;36mfdfSileSiesta.read_lattice\u001b[0;34m(self, output, *args, **kwargs)\u001b[0m\n\u001b[1;32m 768\u001b[0m order \u001b[38;5;241m=\u001b[39m _parse_order(\n\u001b[1;32m 769\u001b[0m kwargs\u001b[38;5;241m.\u001b[39mpop(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124morder\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m),\n\u001b[1;32m 770\u001b[0m {\u001b[38;5;28;01mTrue\u001b[39;00m: [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mXV\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnc\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mTSHS\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSTRUCT\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mHSX\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfdf\u001b[39m\u001b[38;5;124m\"\u001b[39m], \u001b[38;5;28;01mFalse\u001b[39;00m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfdf\u001b[39m\u001b[38;5;124m\"\u001b[39m},\n\u001b[1;32m 771\u001b[0m output,\n\u001b[1;32m 772\u001b[0m )\n\u001b[1;32m 773\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m f \u001b[38;5;129;01min\u001b[39;00m order:\n\u001b[0;32m--> 774\u001b[0m v \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mgetattr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43mf\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m_r_lattice_\u001b[39;49m\u001b[38;5;132;43;01m{\u001b[39;49;00m\u001b[43mf\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlower\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;132;43;01m}\u001b[39;49;00m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 775\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m v \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 776\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m v\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.12/site-packages/sisl/io/siesta/fdf.py:781\u001b[0m, in \u001b[0;36mfdfSileSiesta._r_lattice_fdf\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 779\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_r_lattice_fdf\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[1;32m 780\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Returns `Lattice` object from the FDF file\"\"\"\u001b[39;00m\n\u001b[0;32m--> 781\u001b[0m s \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mLatticeConstant\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43munit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mAng\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 782\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m s \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 783\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m SileError(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCould not find LatticeConstant in file\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.12/site-packages/sisl/io/sile.py:707\u001b[0m, in \u001b[0;36msile_fh_open.._wrapper..pre_open\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 705\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfh\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m 706\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m func(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[0;32m--> 707\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mself\u001b[39m:\n\u001b[1;32m 708\u001b[0m reset(\u001b[38;5;28mself\u001b[39m)\n\u001b[1;32m 709\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m func(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.12/site-packages/sisl/io/sile.py:1107\u001b[0m, in \u001b[0;36mSile.__enter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1105\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__enter__\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m 1106\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Opens the output file and returns it self\"\"\"\u001b[39;00m\n\u001b[0;32m-> 1107\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_open\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1108\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.12/site-packages/sisl/io/sile.py:1098\u001b[0m, in \u001b[0;36mSile._open\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1096\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfh \u001b[38;5;241m=\u001b[39m gzip\u001b[38;5;241m.\u001b[39mopen(\u001b[38;5;28mstr\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfile), mode\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_mode)\n\u001b[1;32m 1097\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1098\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfh \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfile\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_mode\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1100\u001b[0m \u001b[38;5;66;03m# the file should restart the file-read (as per instructed)\u001b[39;00m\n\u001b[1;32m 1101\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_line \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m0\u001b[39m\n", - "File \u001b[0;32m/opt/homebrew/Cellar/python@3.12/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py:1013\u001b[0m, in \u001b[0;36mPath.open\u001b[0;34m(self, mode, buffering, encoding, errors, newline)\u001b[0m\n\u001b[1;32m 1011\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m mode:\n\u001b[1;32m 1012\u001b[0m encoding \u001b[38;5;241m=\u001b[39m io\u001b[38;5;241m.\u001b[39mtext_encoding(encoding)\n\u001b[0;32m-> 1013\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mio\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbuffering\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mnewline\u001b[49m\u001b[43m)\u001b[49m\n", - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf'" - ] - } - ], + "outputs": [], "source": [ "# digestion of the input\n", "# read in geometry and hamiltonian\n", @@ -126,19 +106,30 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "-5.82448514" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# WE WILL NOT NEED THIS!!\n", - "eigfile=sisl.io.siesta.eigSileSiesta('./Fe3GeTe2/Fe3GeTe2.EIG')\n", + "eigfile=sisl.io.siesta.eigSileSiesta('/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.EIG')\n", "EF=eigfile.read_fermi_level()\n", "EF" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -211,12 +202,12 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "# collecting information for all proposed rotations, this might generate a lot of unnceessary data\n", - "# information beeing collected: \n", + "# information being collected: \n", "# - matrices rotating the direction of the exchange field to the proposed reference direction\n", "# - rotated xc field \n", "# - single commutators of the unit cell localized exchange field for the two variations perpendicular to the reference direction\n", @@ -265,7 +256,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -275,9 +266,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'magn_ent_idices' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[19], line 20\u001b[0m\n\u001b[1;32m 17\u001b[0m GK\u001b[38;5;241m=\u001b[39mvecs\u001b[38;5;129m@np\u001b[39m\u001b[38;5;241m.\u001b[39mdiag(\u001b[38;5;241m1\u001b[39m\u001b[38;5;241m/\u001b[39m(ze\u001b[38;5;241m-\u001b[39mvals))\u001b[38;5;129m@vecs\u001b[39m\u001b[38;5;241m.\u001b[39mconj()\u001b[38;5;241m.\u001b[39mT\n\u001b[1;32m 19\u001b[0m \u001b[38;5;66;03m#phase=np.exp(1j*np.dot(np.dot(k,dh.rcell),offset))\u001b[39;00m\n\u001b[0;32m---> 20\u001b[0m Gii\u001b[38;5;241m=\u001b[39mGK[\u001b[43mmagn_ent_idices\u001b[49m[ai],:][:,magn_ent_idices[ai]]\n\u001b[1;32m 21\u001b[0m Gjj\u001b[38;5;241m=\u001b[39mGK[magn_ent_idices[ai],:][:,magn_ent_idices[ai]]\n\u001b[1;32m 22\u001b[0m Gij\u001b[38;5;241m=\u001b[39mGK[magn_ent_idices[ai],:][:,magn_ent_idices[ai]]\u001b[38;5;241m*\u001b[39mnp\u001b[38;5;241m.\u001b[39mexp(\u001b[38;5;241m-\u001b[39mk\u001b[38;5;129m@offset\u001b[39m\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m2\u001b[39m\u001b[38;5;241m*\u001b[39mnp\u001b[38;5;241m.\u001b[39mpi)\n", + "\u001b[0;31mNameError\u001b[0m: name 'magn_ent_idices' is not defined" + ] + } + ], "source": [ "#This goes inside the for loop for k \n", "k = np.array([0,0.1,0.0])\n", @@ -714,7 +717,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.7" + "version": "3.9.6" } }, "nbformat": 4, diff --git a/tests/test_useful.py b/tests/test_useful.py index ff3a2ab..0b44f8a 100644 --- a/tests/test_useful.py +++ b/tests/test_useful.py @@ -39,6 +39,42 @@ def test_comm(a, b, c): "dirs, NUMK, out", [ ("", 10, np.array([[0, 0, 0]])), + ( + "x", + 10, + np.array( + [ + [0.0, 0.0, 0.0], + [0.1, 0.0, 0.0], + [0.2, 0.0, 0.0], + [0.3, 0.0, 0.0], + [0.4, 0.0, 0.0], + [0.5, 0.0, 0.0], + [0.6, 0.0, 0.0], + [0.7, 0.0, 0.0], + [0.8, 0.0, 0.0], + [0.9, 0.0, 0.0], + ] + ) + ), + ( + "xy", + 3, + np.array( + [ + [0.0, 0.0, 0.0], + [0.33333333, 0.0, 0.0], + [0.66666667, 0.0, 0.0], + [0.0, 0.33333333, 0.0], + [0.0, 0.66666667, 0.0], + [0.33333333, 0.33333333, 0.0], + [0.33333333, 0.66666667, 0.0], + [0.66666667, 0.33333333, 0.0], + [0.66666667, 0.66666667, 0.0], + ] + ), + ), + ), ], ) def test_make_kset(dirs, NUMK, out):