diff --git a/test.ipynb b/test.ipynb index 13cd8fe..8500f99 100644 --- a/test.ipynb +++ b/test.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 24, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -11,23 +11,16 @@ "'0.14.3'" ] }, - "execution_count": 24, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "import os\n", "from tqdm import tqdm\n", "from sys import getsizeof\n", "from timeit import default_timer as timer\n", "\n", - "os.environ[\"OMP_NUM_THREADS\"] = \"1\" # export OMP_NUM_THREADS=4\n", - "os.environ[\"OPENBLAS_NUM_THREADS\"] = \"1\" # export OPENBLAS_NUM_THREADS=4\n", - "os.environ[\"MKL_NUM_THREADS\"] = \"1\" # export MKL_NUM_THREADS=6\n", - "os.environ[\"VECLIB_MAXIMUM_THREADS\"] = \"1\" # export VECLIB_MAXIMUM_THREADS=4\n", - "os.environ[\"NUMEXPR_NUM_THREADS\"] = \"1\" # export NUMEXPR_NUM_THREADS=6\n", - "\n", "import numpy as np\n", "import sisl\n", "from src.grogu_magn.useful import *\n", @@ -47,18 +40,7 @@ }, { "cell_type": "code", - "execution_count": 25, - "metadata": {}, - "outputs": [], - "source": [ - "dat = sisl.io.siesta.eigSileSiesta(\n", - " \"/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.EIG\"\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 26, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -67,18 +49,21 @@ "-12.806878959999999" ] }, - "execution_count": 26, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ + "dat = sisl.io.siesta.eigSileSiesta(\n", + " \"/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.EIG\"\n", + ")\n", "dat.read_data().min()" ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -87,9 +72,9 @@ "text": [ "================================================================================================================================================================\n", "Input file: \n", - "Not yet specified.\n", + "/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf\n", "Output file: \n", - "test.pickle\n", + "Fe3GeTe2.pickle\n", "Number of nodes in the parallel cluster: 1\n", "================================================================================================================================================================\n", "Cell [Ang]: \n", @@ -105,26 +90,26 @@ "[0 0 1] --» [array([1, 0, 0]), array([0, 1, 0])]\n", "================================================================================================================================================================\n", "Parameters for the contour integral:\n", - "Number of k points: 20\n", + "Number of k points: 100\n", "k point directions: xy\n", "Ebot: -13\n", - "Eset: 600\n", + "Eset: 60\n", "Esetp: 10000\n", "================================================================================================================================================================\n", - "Setup done. Elapsed time: 198.668371833 s\n", + "Setup done. Elapsed time: 291.062782833 s\n", "================================================================================================================================================================\n" ] } ], "source": [ - "# this cell mimicks an input file\n", - "fdf = sisl.get_sile(\n", + "################################################################################\n", + "#################################### INPUT #####################################\n", + "################################################################################\n", + "path = (\n", " \"/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf\"\n", - ") # ./Jij_for_Marci_6p45ang/CrBr.fdf\n", + ")\n", + "outfile = \"Fe3GeTe2\"\n", "\n", - "outfile = \"test\"\n", - "if not outfile.endswith(\".pickle\"):\n", - " outfile += \".pickle\"\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", @@ -136,52 +121,38 @@ " dict(o=np.array([0, 1, 0]), vw=[np.array([1, 0, 0]), np.array([0, 0, 1])]),\n", " dict(o=np.array([0, 0, 1]), vw=[np.array([1, 0, 0]), np.array([0, 1, 0])]),\n", "]\n", - "\n", - "\n", - "# human readable definition of magnetic entities ./lat3_791/Fe3GeTe2.fdf\n", "magnetic_entities = [\n", " dict(atom=3, l=2),\n", " dict(atom=4, l=2),\n", " dict(atom=5, l=2),\n", "]\n", - "# pair information ./lat3_791/Fe3GeTe2.fdf\n", - "pairs = [\n", - " # isotropic should be -82 meV\n", - " dict(ai=0, aj=1, Ruc=np.array([0, 0, 0])),\n", - " dict(ai=0, aj=2, Ruc=np.array([0, 0, 0])),\n", - " dict(ai=1, aj=2, Ruc=np.array([0, 0, 0])),\n", - "]\n", - "\n", - "\"\"\"\n", - "# human readable definition of magnetic entities ./Jij_for_Marci_6p45ang/CrBr.fdf\n", - "magnetic_entities = [\n", - " dict(atom=0, l=2),\n", - " dict(atom=1, l=2),\n", - " dict(atom=2, l=2),\n", - "]\n", - "# pair information ./Jij_for_Marci_6p45ang/CrBr.fdf\n", "pairs = [\n", " dict(ai=0, aj=1, Ruc=np.array([0, 0, 0])),\n", " dict(ai=0, aj=2, Ruc=np.array([0, 0, 0])),\n", " dict(ai=1, aj=2, Ruc=np.array([0, 0, 0])),\n", " dict(ai=0, aj=1, Ruc=np.array([1, 0, 0])),\n", " dict(ai=0, aj=2, Ruc=np.array([1, 0, 0])),\n", + " dict(ai=1, aj=2, Ruc=np.array([1, 0, 0])),\n", " dict(ai=0, aj=1, Ruc=np.array([-1, 0, 0])),\n", " dict(ai=0, aj=2, Ruc=np.array([-1, 0, 0])),\n", + " dict(ai=1, aj=2, Ruc=np.array([-1, 0, 0])),\n", " dict(ai=0, aj=1, Ruc=np.array([0, 1, 0])),\n", " dict(ai=0, aj=2, Ruc=np.array([0, 1, 0])),\n", - " dict(ai=0, aj=1, Ruc=np.array([0, 1, 0])),\n", - " dict(ai=0, aj=2, Ruc=np.array([0, 1, 0])),\n", + " dict(ai=1, aj=2, Ruc=np.array([0, 1, 0])),\n", + " dict(ai=0, aj=1, Ruc=np.array([0, -1, 0])),\n", + " dict(ai=0, aj=2, Ruc=np.array([0, -1, 0])),\n", + " dict(ai=1, aj=2, Ruc=np.array([0, -1, 0])),\n", "]\n", - "\"\"\"\n", "\n", "# Brilloun zone sampling and Green function contour integral\n", - "kset = 20\n", + "kset = 10\n", "kdirs = \"xy\"\n", "ebot = -13\n", - "eset = 600\n", + "eset = 60\n", "esetp = 10000\n", - "\n", + "################################################################################\n", + "#################################### INPUT #####################################\n", + "################################################################################\n", "\n", "# MPI parameters\n", "comm = MPI.COMM_WORLD\n", @@ -189,8 +160,12 @@ "rank = comm.Get_rank()\n", "root_node = 0\n", "\n", + "# rename outfile\n", + "if not outfile.endswith(\".pickle\"):\n", + " outfile += \".pickle\"\n", + "\n", "simulation_parameters = dict(\n", - " path=\"Not yet specified.\",\n", + " path=path,\n", " outpath=outfile,\n", " scf_xcf_orientation=scf_xcf_orientation,\n", " ref_xcf_orientations=ref_xcf_orientations,\n", @@ -203,6 +178,8 @@ ")\n", "\n", "# digestion of the input\n", + "# read sile\n", + "fdf = sisl.get_sile(path)\n", "# read in hamiltonian\n", "dh = fdf.read_hamiltonian()\n", "simulation_parameters[\"cell\"] = fdf.read_geometry().cell\n", @@ -221,7 +198,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 23, "metadata": {}, "outputs": [ { @@ -294,14 +271,14 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 24, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Hamiltonian and exchange field rotated. Elapsed time: 199.591100666 s\n", + "Hamiltonian and exchange field rotated. Elapsed time: 292.32726 s\n", "================================================================================================================================================================\n" ] } @@ -403,14 +380,14 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Site and pair dictionaries created. Elapsed time: 199.638437125 s\n", + "Site and pair dictionaries created. Elapsed time: 292.347581791 s\n", "================================================================================================================================================================\n" ] } @@ -518,21 +495,22 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 26, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "k loop: 0%| | 0/400 [00:00