diff --git a/Fe3GeTe2_notebook.pickle b/Fe3GeTe2_notebook.pickle index 4ef939f..6e413b1 100644 Binary files a/Fe3GeTe2_notebook.pickle and b/Fe3GeTe2_notebook.pickle differ diff --git a/src/grogu_magn/utils.py b/src/grogu_magn/utils.py index 0b94e06..c719ef3 100644 --- a/src/grogu_magn/utils.py +++ b/src/grogu_magn/utils.py @@ -306,7 +306,7 @@ def blow_up_orbindx(orb_indices): return np.array([[2 * o, 2 * o + 1] for o in orb_indices]).flatten() -def calculate_anisotropy_tensor(mag_ent, eps=1e-10): +def calculate_anisotropy_tensor(mag_ent): """_summary_ Args: @@ -323,7 +323,7 @@ def calculate_anisotropy_tensor(mag_ent, eps=1e-10): calculated_diff = Kyy - Kxx expected_diff = energies[2, 0] - energies[2, 1] - consistency_check = abs(calculated_diff - expected_diff) < eps + consistency_check = abs(calculated_diff - expected_diff) return Kxx, Kyy, Kzz, consistency_check @@ -466,7 +466,7 @@ def print_atoms_and_pairs(magnetic_entities, pairs): for tag, xyz in zip(mag_ent["tags"], mag_ent["xyz"]): # coordinates and tag print(f"{tag} {xyz[0]} {xyz[1]} {xyz[2]}") - print("Consistency check passed: ", mag_ent["K_consistency"]) + print("Consistency check: ", mag_ent["K_consistency"]) print("Anisotropy diag: ", mag_ent["K"]) print("") diff --git a/test.ipynb b/test.ipynb index e1ef519..3ee66cb 100644 --- a/test.ipynb +++ b/test.ipynb @@ -9,7 +9,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "[Daniels-MacBook-Air.local:69249] shmem: mmap: an error occurred while determining whether or not /var/folders/yh/dx7xl94n3g52ts3td8qcxjcc0000gn/T//ompi.Daniels-MacBook-Air.501/jf.0/4095016960/sm_segment.Daniels-MacBook-Air.501.f4150000.0 could be created.\n" + "[Mac:75276] shmem: mmap: an error occurred while determining whether or not /var/folders/yh/dx7xl94n3g52ts3td8qcxjcc0000gn/T//ompi.Mac.501/jf.0/1847132160/sm_segment.Mac.501.6e190000.0 could be created.\n" ] }, { @@ -31,7 +31,7 @@ "import numpy as np\n", "import sisl\n", "import sisl.viz\n", - "from src.grogu_magn.useful import *\n", + "from src.grogu_magn.utils import *\n", "from mpi4py import MPI\n", "import pickle\n", "from numpy.linalg import inv\n", @@ -64,236 +64,8 @@ ] }, { - "cell_type": "code", - "execution_count": 8, + "cell_type": "markdown", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'parameters': {'path': '/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf',\n", - " 'outpath': './Fe3GeTe2_benchmark_on_15k_300eset.pickle',\n", - " 'scf_xcf_orientation': array([0, 0, 1]),\n", - " 'ref_xcf_orientations': [{'o': array([1, 0, 0]),\n", - " 'vw': [array([0, 1, 0]), array([0, 0, 1])]},\n", - " {'o': array([0, 1, 0]), 'vw': [array([1, 0, 0]), array([0, 0, 1])]},\n", - " {'o': array([0, 0, 1]), 'vw': [array([1, 0, 0]), array([0, 1, 0])]}],\n", - " 'kset': 15,\n", - " 'kdirs': 'xy',\n", - " 'ebot': -13,\n", - " 'eset': 300,\n", - " 'esetp': 1000,\n", - " 'parallel_size': 1,\n", - " 'cell': array([[ 3.79100000e+00, 0.00000000e+00, 0.00000000e+00],\n", - " [-1.89550000e+00, 3.28310231e+00, 0.00000000e+00],\n", - " [ 1.25954923e-15, 2.18160327e-15, 2.05700000e+01]])},\n", - " 'magnetic_entities': [{'atom': 3,\n", - " 'l': 2,\n", - " 'orbital_indeces': array([41, 42, 43, 44, 45, 46, 47, 48, 49, 50], dtype=int32),\n", - " 'spin_box_indeces': array([ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,\n", - " 95, 96, 97, 98, 99, 100, 101]),\n", - " 'tags': ['[3]Fe(2)'],\n", - " 'xyz': [array([-7.33915874e-06, 4.14927851e-06, 1.16575858e+01])],\n", - " 'energies': array([[3.7401678 , 3.74017175],\n", - " [3.74220127, 3.74213439],\n", - " [3.73476964, 3.73476766]])},\n", - " {'atom': 4,\n", - " 'l': 2,\n", - " 'orbital_indeces': array([56, 57, 58, 59, 60, 61, 62, 63, 64, 65], dtype=int32),\n", - " 'spin_box_indeces': array([112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,\n", - " 125, 126, 127, 128, 129, 130, 131]),\n", - " 'tags': ['[4]Fe(2)'],\n", - " 'xyz': [array([-7.32698766e-06, 4.15827452e-06, 8.91242254e+00])],\n", - " 'energies': array([[3.74019159, 3.74019195],\n", - " [3.74219584, 3.74215943],\n", - " [3.73479045, 3.7347924 ]])},\n", - " {'atom': 5,\n", - " 'l': 2,\n", - " 'orbital_indeces': array([71, 72, 73, 74, 75, 76, 77, 78, 79, 80], dtype=int32),\n", - " 'spin_box_indeces': array([142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,\n", - " 155, 156, 157, 158, 159, 160, 161]),\n", - " 'tags': ['[5]Fe(2)'],\n", - " 'xyz': [array([ 1.89546671, 1.09439132, 10.2850027 ])],\n", - " 'energies': array([[2.17502663, 2.17528404],\n", - " [2.17552502, 2.17546899],\n", - " [2.16824905, 2.16824905]])}],\n", - " 'pairs': [{'ai': 0,\n", - " 'aj': 1,\n", - " 'Ruc': array([0, 0, 0]),\n", - " 'dist': 2.745163300331324,\n", - " 'tags': ['[3]Fe(2)', '[4]Fe(2)'],\n", - " 'energies': array([[-3.52462334e-02, 5.22790048e-06, -5.22902762e-06,\n", - " -3.50238913e-02],\n", - " [-3.72242252e-02, 1.25410885e-08, -1.25222693e-08,\n", - " -3.69712117e-02],\n", - " [-4.75204846e-02, -4.03632805e-09, 1.21323601e-09,\n", - " -4.75204833e-02]]),\n", - " 'J_iso': -39.91775489990159,\n", - " 'J_S': array([-2.32809260e+00, 1.41154602e-06, -9.40957764e-09, 1.41154602e-06,\n", - " -1.35443302e+00, 5.63570534e-07, -9.40957764e-09, 5.63570534e-07,\n", - " 3.68252563e+00]),\n", - " 'D': array([ 5.22846405e-03, -1.25316789e-05, -2.62478203e-06]),\n", - " 'J': array([[-4.22458475e+01, 1.41154602e-06, -9.40957764e-09],\n", - " [ 1.41154602e-06, -4.12721879e+01, 5.63570534e-07],\n", - " [-9.40957764e-09, 5.63570534e-07, -3.62352293e+01]])},\n", - " {'ai': 0,\n", - " 'aj': 2,\n", - " 'Ruc': array([0, 0, 0]),\n", - " 'dist': 2.5835033632437767,\n", - " 'tags': ['[3]Fe(2)', '[5]Fe(2)'],\n", - " 'energies': array([[-6.59077017e-02, 3.37863278e-03, -3.30542979e-03,\n", - " -6.63454261e-02],\n", - " [-6.53414853e-02, 5.87819515e-03, -5.72736940e-03,\n", - " -6.56325743e-02],\n", - " [-6.10282408e-02, -5.29979330e-05, -5.41931672e-05,\n", - " -6.09661079e-02]]),\n", - " 'J_iso': -64.2035893374817,\n", - " 'J_S': array([ 0.90424825, 0.05359555, -0.07541288, 0.05359555, 0.5167559 ,\n", - " -0.0366015 , -0.07541288, -0.0366015 , -1.42100415]),\n", - " 'D': array([ 3.34203129e+00, -5.80278227e+00, 5.97617073e-04]),\n", - " 'J': array([[-6.32993411e+01, 5.35955501e-02, -7.54128755e-02],\n", - " [ 5.35955501e-02, -6.36868334e+01, -3.66014961e-02],\n", - " [-7.54128755e-02, -3.66014961e-02, -6.56245935e+01]])},\n", - " {'ai': 1,\n", - " 'aj': 2,\n", - " 'Ruc': array([0, 0, 0]),\n", - " 'dist': 2.583501767937866,\n", - " 'tags': ['[4]Fe(2)', '[5]Fe(2)'],\n", - " 'energies': array([[-6.58989484e-02, -3.39791181e-03, 3.33318257e-03,\n", - " -6.63392511e-02],\n", - " [-6.53345476e-02, -5.88748024e-03, 5.74610477e-03,\n", - " -6.56271418e-02],\n", - " [-6.10283154e-02, -5.29935811e-05, -5.41914581e-05,\n", - " -6.09661874e-02]]),\n", - " 'J_iso': -64.1990652847126,\n", - " 'J_S': array([ 0.9024007 , 0.05359252, 0.07068773, 0.05359252, 0.51528204,\n", - " 0.03236462, 0.07068773, 0.03236462, -1.41768273]),\n", - " 'D': array([-3.36554719e+00, 5.81679250e+00, 5.98938514e-04]),\n", - " 'J': array([[-6.32966646e+01, 5.35925196e-02, 7.06877343e-02],\n", - " [ 5.35925196e-02, -6.36837832e+01, 3.23646213e-02],\n", - " [ 7.06877343e-02, 3.23646213e-02, -6.56167480e+01]])},\n", - " {'ai': 0,\n", - " 'aj': 2,\n", - " 'Ruc': array([-1, -1, 0]),\n", - " 'dist': 2.5834973202859075,\n", - " 'tags': ['[3]Fe(2)', '[5]Fe(2)'],\n", - " 'energies': array([[-6.51429577e-02, -6.76632987e-03, 6.57042041e-03,\n", - " -6.54030227e-02],\n", - " [-6.67108762e-02, -4.56940315e-07, 2.56674082e-07,\n", - " -6.71912559e-02],\n", - " [-6.09363975e-02, -4.25058611e-07, 6.24865400e-07,\n", - " -6.10603021e-02]]),\n", - " 'J_iso': -64.40746869580421,\n", - " 'J_S': array([ 2.81689694e-01, -9.99033947e-05, 1.00133116e-04, -9.99033947e-05,\n", - " 1.23775856e+00, 9.79547273e-02, 1.00133116e-04, 9.79547273e-02,\n", - " -1.51944825e+00]),\n", - " 'D': array([-6.66837514e+00, 3.56807199e-04, -5.24962006e-04]),\n", - " 'J': array([[-6.41257790e+01, -9.99033947e-05, 1.00133116e-04],\n", - " [-9.99033947e-05, -6.31697101e+01, 9.79547273e-02],\n", - " [ 1.00133116e-04, 9.79547273e-02, -6.59269169e+01]])},\n", - " {'ai': 1,\n", - " 'aj': 2,\n", - " 'Ruc': array([-1, -1, 0]),\n", - " 'dist': 2.583495745338251,\n", - " 'tags': ['[4]Fe(2)', '[5]Fe(2)'],\n", - " 'energies': array([[-6.51430169e-02, 6.76649535e-03, -6.57056420e-03,\n", - " -6.54030961e-02],\n", - " [-6.67170573e-02, 6.60963771e-07, -8.06624581e-07,\n", - " -6.71939352e-02],\n", - " [-6.09365168e-02, -4.22426970e-07, 6.21599885e-07,\n", - " -6.10604139e-02]]),\n", - " 'J_iso': -64.40900602860754,\n", - " 'J_S': array([ 2.81831507e-01, -9.95864576e-05, 7.28304048e-05, -9.95864576e-05,\n", - " 1.23919957e+00, -9.79655745e-02, 7.28304048e-05, -9.79655745e-02,\n", - " -1.52103108e+00]),\n", - " 'D': array([ 6.66852978e+00, -7.33794176e-04, -5.22013428e-04]),\n", - " 'J': array([[-6.41271745e+01, -9.95864576e-05, 7.28304048e-05],\n", - " [-9.95864576e-05, -6.31698065e+01, -9.79655745e-02],\n", - " [ 7.28304048e-05, -9.79655745e-02, -6.59300371e+01]])},\n", - " {'ai': 0,\n", - " 'aj': 2,\n", - " 'Ruc': array([-1, 0, 0]),\n", - " 'dist': 2.583541444641373,\n", - " 'tags': ['[3]Fe(2)', '[5]Fe(2)'],\n", - " 'energies': array([[-6.58846583e-02, 3.39716065e-03, -3.33236087e-03,\n", - " -6.63246913e-02],\n", - " [-6.53283870e-02, -5.87805205e-03, 5.72733140e-03,\n", - " -6.56193992e-02],\n", - " [-6.10130098e-02, 5.33726660e-05, 5.35283836e-05,\n", - " -6.09512751e-02]]),\n", - " 'J_iso': -64.18690345424889,\n", - " 'J_S': array([ 0.9015663 , -0.05345052, 0.07536033, -0.05345052, 0.51805291,\n", - " -0.03239989, 0.07536033, -0.03239989, -1.41961921]),\n", - " 'D': array([ 3.36476076e+00, 5.80269172e+00, -7.78587899e-05]),\n", - " 'J': array([[-6.32853372e+01, -5.34505248e-02, 7.53603270e-02],\n", - " [-5.34505248e-02, -6.36688505e+01, -3.23998894e-02],\n", - " [ 7.53603270e-02, -3.23998894e-02, -6.56065227e+01]])},\n", - " {'ai': 1,\n", - " 'aj': 2,\n", - " 'Ruc': array([-1, 0, 0]),\n", - " 'dist': 2.5835398672184064,\n", - " 'tags': ['[4]Fe(2)', '[5]Fe(2)'],\n", - " 'energies': array([[-6.58936437e-02, -3.37805282e-03, 3.30480739e-03,\n", - " -6.63310120e-02],\n", - " [-6.53215421e-02, 5.88691588e-03, -5.74535321e-03,\n", - " -6.56142142e-02],\n", - " [-6.10131569e-02, 5.33672949e-05, 5.35282678e-05,\n", - " -6.09514260e-02]]),\n", - " 'J_iso': -64.18749916411404,\n", - " 'J_S': array([ 0.90467906, -0.05344778, -0.07078134, -0.05344778, 0.5154147 ,\n", - " 0.03662271, -0.07078134, 0.03662271, -1.42009377]),\n", - " 'D': array([-3.34143011e+00, -5.81613454e+00, -8.04864431e-05]),\n", - " 'J': array([[-6.32828201e+01, -5.34477814e-02, -7.07813383e-02],\n", - " [-5.34477814e-02, -6.36720845e+01, 3.66227144e-02],\n", - " [-7.07813383e-02, 3.66227144e-02, -6.56075929e+01]])},\n", - " {'ai': 1,\n", - " 'aj': 2,\n", - " 'Ruc': array([-2, 0, 0]),\n", - " 'dist': 5.951322298958084,\n", - " 'tags': ['[4]Fe(2)', '[5]Fe(2)'],\n", - " 'energies': array([[ 0.00472963, 0.00046075, -0.0003119 , 0.00466184],\n", - " [ 0.00364709, -0.00085554, 0.00093509, 0.0036577 ],\n", - " [ 0.00540057, -0.00061296, 0.00070181, 0.00550046]]),\n", - " 'J_iso': 4.59955059881751,\n", - " 'J_S': array([-0.02046716, -0.0444248 , -0.03977157, -0.0444248 , 0.43165605,\n", - " -0.07442493, -0.03977157, -0.07442493, -0.41118888]),\n", - " 'D': array([ 0.3863217 , 0.8953163 , -0.65738037]),\n", - " 'J': array([[ 4.57908344, -0.0444248 , -0.03977157],\n", - " [-0.0444248 , 5.03120664, -0.07442493],\n", - " [-0.03977157, -0.07442493, 4.18836172]])},\n", - " {'ai': 1,\n", - " 'aj': 2,\n", - " 'Ruc': array([-3, 0, 0]),\n", - " 'dist': 9.638732176310562,\n", - " 'tags': ['[4]Fe(2)', '[5]Fe(2)'],\n", - " 'energies': array([[ 9.75938878e-06, 1.25731290e-04, -5.67323532e-05,\n", - " -1.49392424e-04],\n", - " [-1.47825232e-04, -3.25058913e-04, 3.35824948e-04,\n", - " -2.23552488e-04],\n", - " [-4.63060805e-04, -3.68335462e-04, 3.64462081e-04,\n", - " -4.12155989e-04]]),\n", - " 'J_iso': -0.23103792475126567,\n", - " 'J_S': array([-0.08681631, 0.00193669, -0.00538302, 0.00193669, -0.07518869,\n", - " -0.03449947, -0.00538302, -0.03449947, 0.162005 ]),\n", - " 'D': array([ 0.09123182, 0.33044193, -0.36639877]),\n", - " 'J': array([[-0.31785424, 0.00193669, -0.00538302],\n", - " [ 0.00193669, -0.30622661, -0.03449947],\n", - " [-0.00538302, -0.03449947, -0.06903292]])}],\n", - " 'runtime': {'start_time': 0.988331583,\n", - " 'setup_time': 1.0880625,\n", - " 'H_and_XCF_time': 1.55488075,\n", - " 'site_and_pair_dictionaries_time': 1.603311625,\n", - " 'k_set_time': 1.618691125,\n", - " 'reference_rotations_time': 1.848489583,\n", - " 'green_function_inversion_time': 295.988709083,\n", - " 'end_time': 296.320685333}}" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ "file = open(\"Fe3GeTe2_benchmark_on_15k_300eset.pickle\", \"rb\")\n", "object_file = pickle.load(file)\n", @@ -325,17 +97,37 @@ "metadata": {}, "outputs": [ { - "ename": "TypeError", - "evalue": "function takes exactly 5 arguments (1 given)", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[2], line 73\u001b[0m\n\u001b[1;32m 71\u001b[0m fdf \u001b[38;5;241m=\u001b[39m sisl\u001b[38;5;241m.\u001b[39mget_sile(path)\n\u001b[1;32m 72\u001b[0m \u001b[38;5;66;03m# read in hamiltonian\u001b[39;00m\n\u001b[0;32m---> 73\u001b[0m dh \u001b[38;5;241m=\u001b[39m \u001b[43mfdf\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_hamiltonian\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 74\u001b[0m simulation_parameters[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcell\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m fdf\u001b[38;5;241m.\u001b[39mread_geometry()\u001b[38;5;241m.\u001b[39mcell\n\u001b[1;32m 76\u001b[0m \u001b[38;5;66;03m# unit cell index\u001b[39;00m\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.9/site-packages/sisl/io/siesta/fdf.py:2239\u001b[0m, in \u001b[0;36mfdfSileSiesta.read_hamiltonian\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 2235\u001b[0m order \u001b[38;5;241m=\u001b[39m _parse_output_order(\n\u001b[1;32m 2236\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), \u001b[38;5;28;01mTrue\u001b[39;00m, [\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;124mHSX\u001b[39m\u001b[38;5;124m\"\u001b[39m], []\n\u001b[1;32m 2237\u001b[0m )\n\u001b[1;32m 2238\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m f \u001b[38;5;129;01min\u001b[39;00m order:\n\u001b[0;32m-> 2239\u001b[0m H \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_hamiltonian_\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 2240\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m H \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 2241\u001b[0m _track(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mread_hamiltonian, \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfound file \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mf\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.9/site-packages/sisl/io/siesta/fdf.py:2271\u001b[0m, in \u001b[0;36mfdfSileSiesta._r_hamiltonian_hsx\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 2269\u001b[0m H \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 2270\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m f\u001b[38;5;241m.\u001b[39mis_file():\n\u001b[0;32m-> 2271\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[43mhsxSileSiesta\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mversion\u001b[49m \u001b[38;5;241m==\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m 2272\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mgeometry\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m kwargs:\n\u001b[1;32m 2273\u001b[0m \u001b[38;5;66;03m# to ensure we get the correct orbital count\u001b[39;00m\n\u001b[1;32m 2274\u001b[0m kwargs[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mgeometry\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mread_geometry(\u001b[38;5;28;01mTrue\u001b[39;00m)\n", - "File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.9/site-packages/sisl/io/siesta/binaries.py:737\u001b[0m, in \u001b[0;36mhsxSileSiesta.version\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 734\u001b[0m \u001b[38;5;129m@property\u001b[39m\n\u001b[1;32m 735\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mversion\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28mint\u001b[39m:\n\u001b[1;32m 736\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"The version of the file\"\"\"\u001b[39;00m\n\u001b[0;32m--> 737\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_siesta\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_hsx_version\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfile\u001b[49m\u001b[43m)\u001b[49m\n", - "\u001b[0;31mTypeError\u001b[0m: function takes exactly 5 arguments (1 given)" + "name": "stdout", + "output_type": "stream", + "text": [ + "================================================================================================================================================================\n", + "Input file: \n", + "/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf\n", + "Output file: \n", + "./Fe3GeTe2_notebook.pickle\n", + "Number of nodes in the parallel cluster: 1\n", + "================================================================================================================================================================\n", + "Cell [Ang]: \n", + "[[ 3.79100000e+00 0.00000000e+00 0.00000000e+00]\n", + " [-1.89550000e+00 3.28310231e+00 0.00000000e+00]\n", + " [ 1.25954923e-15 2.18160327e-15 2.05700000e+01]]\n", + "================================================================================================================================================================\n", + "DFT axis: \n", + "[0 0 1]\n", + "Quantization axis and perpendicular rotation directions:\n", + "[1 0 0] --» [array([0, 1, 0]), array([0, 0, 1])]\n", + "[0 1 0] --» [array([1, 0, 0]), array([0, 0, 1])]\n", + "[0 0 1] --» [array([1, 0, 0]), array([0, 1, 0])]\n", + "================================================================================================================================================================\n", + "Parameters for the contour integral:\n", + "Number of k points: 10\n", + "k point directions: xy\n", + "Ebot: -13\n", + "Eset: 300\n", + "Esetp: 1000\n", + "================================================================================================================================================================\n", + "Setup done. Elapsed time: 4.909605666 s\n", + "================================================================================================================================================================\n" ] } ], @@ -343,7 +135,9 @@ "################################################################################\n", "#################################### INPUT #####################################\n", "################################################################################\n", - "path = \"/Users/danielpozsar/Documents/oktatás/elte/phd/grogu_project/data/lat3_791/Fe3GeTe2.fdf\"\n", + "path = (\n", + " \"/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf\"\n", + ")\n", "outfile = \"./Fe3GeTe2_notebook\"\n", "\n", "# this information needs to be given at the input!!\n", @@ -374,7 +168,7 @@ " dict(ai=1, aj=2, Ruc=np.array([-3, 0, 0])),\n", "]\n", "# Brilloun zone sampling and Green function contour integral\n", - "kset = 15\n", + "kset = 10\n", "kdirs = \"xy\"\n", "ebot = -13\n", "eset = 300\n", @@ -490,7 +284,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Hamiltonian and exchange field rotated. Elapsed time: 11.290487791 s\n", + "Hamiltonian and exchange field rotated. Elapsed time: 5.473272791 s\n", "================================================================================================================================================================\n" ] } @@ -581,7 +375,7 @@ "\n", "\n", "# Check if exchange field has scalar part\n", - "max_xcfs = abs(np.array(np.array([f[\"c\"] for f in traced]))).max()\n", + "max_xcfs = abs(np.array(np.array([f[\"c\"] / 2 for f in traced]))).max()\n", "if max_xcfs > 1e-12:\n", " warnings.warn(\n", " f\"Exchange field has non negligible scalar part. Largest value is {max_xcfs}\"\n", @@ -650,7 +444,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Site and pair dictionaries created. Elapsed time: 11.50304025 s\n", + "Site and pair dictionaries created. Elapsed time: 5.680114458 s\n", "================================================================================================================================================================\n" ] } @@ -774,14 +568,14 @@ "name": "stderr", "output_type": "stream", "text": [ - "k loop: 0%| | 0/225 [00:00