could not read hamiltonian, tested for a bunch of sisl versions

class-solution
Daniel Pozsar 3 months ago
parent cf0d57d93d
commit 8b2afbb555

@ -1,70 +0,0 @@
========================================
Cell Angstroms
3.7910 0.0000 0.0000
-1.8955 3.2831 0.0000
0.0000 0.0000 20.5700
========================================
Atom Angstrom
# Label, x y z Sx Sy Sz #Q Lx Ly Lz Jx Jy Jz
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Te1 1.8955 1.0943 13.1698 -0.0000 0.0000 -0.1543 # 5.9345 -0.0000 0.0000 -0.0537 -0.0000 0.0000 -0.2080
Te2 1.8955 1.0943 7.4002 0.0000 -0.0000 -0.1543 # 5.9345 0.0000 -0.0000 -0.0537 0.0000 -0.0000 -0.2080
Ge3 -0.0000 2.1887 10.2850 0.0000 0.0000 -0.1605 # 3.1927 -0.0000 0.0000 0.0012 0.0000 0.0000 -0.1593
Fe4 -0.0000 0.0000 11.6576 0.0001 -0.0001 2.0466 # 8.3044 0.0000 -0.0000 0.1606 0.0001 -0.0001 2.2072
Fe5 -0.0000 0.0000 8.9124 -0.0001 0.0001 2.0466 # 8.3044 -0.0000 0.0000 0.1606 -0.0001 0.0001 2.2072
Fe6 1.8955 1.0944 10.2850 0.0000 0.0000 1.5824 # 8.3296 -0.0000 -0.0000 0.0520 -0.0000 0.0000 1.6344
==================================================================================================================================
Exchange meV
--------------------------------------------------------------------------------
# at1 at2 i j k # d (Ang)
--------------------------------------------------------------------------------
Fe4 Fe5 0 0 0 # 2.7452
Isotropic -82.0854
DMI 0.12557 -0.00082199 6.9668e-08
Symmetric-anisotropy -0.60237 -0.83842 -0.00032278 -1.2166e-05 -3.3923e-05
--------------------------------------------------------------------------------
Fe4 Fe6 0 0 0 # 2.5835
Isotropic -41.9627
DMI 1.1205 -1.9532 0.0018386
Symmetric-anisotropy 0.26007 -0.00013243 0.12977 -0.069979 -0.042066
--------------------------------------------------------------------------------
Fe4 Fe4 1 0 0 # 3.791
Isotropic 11.3817
DMI -0.027065 5.0079 1.2495
Symmetric-anisotropy 0.25899 0.61356 0.00018352 -8.2489e-06 -0.059116
--------------------------------------------------------------------------------
Fe4 Fe5 1 0 0 # 4.6806
Isotropic -2.9464
DMI 1.7 0.0069825 6.4657
Symmetric-anisotropy 0.44323 0.056997 1.7739e-05 0.14942 1.077e-05
--------------------------------------------------------------------------------
Fe4 Fe6 1 0 0 # 5.9513
Isotropic -1.9722
DMI -0.044414 0.34777 0.55124
Symmetric-anisotropy 0.19364 -0.10179 -0.057654 0.023297 0.033722
--------------------------------------------------------------------------------
Fe4 Fe4 2 0 0 # 7.582
Isotropic -2.5085
DMI 0.015126 0.020638 -0.26104
Symmetric-anisotropy -0.145 -0.021424 6.948e-05 3.0356e-05 -0.18409
================================================================================
On-site meV
----------------------------------------
Fe4
0.16339 0.16068 0 0 0 0
========================================
# ----------------------GROGU INFORMATION----------------------
# Grogu calculation was performed with a k-grid equal to 100 100 1
# On-site Projection is performed over l = 2
# Original DFT calculation with quantization axis along the z direction
Notation
Double-counting true
Spin-normalized true
Exchange-factor 0.5
On-site-factor 1
========================================

@ -20,8 +20,8 @@ kewords = [
requires-python = ">=3.9"
dependencies = [
"numpy==1.24.4",
"scipy",
"sisl==0.14.3",
"scipy==1.10.1",
"sisl==0.13",
"netcdf4==1.6.2",
"openmpi",
"mpi4py",

@ -1,7 +1,7 @@
# Package dependencies
numpy==1.24.4
scipy==1.10.1
sisl==0.14.1
sisl==0.13
netcdf4==1.6.2
openmpi
mpi4py

@ -1,120 +0,0 @@
Number of nodes in the parallel cluster: 4
k loop: 0% 0/100 [00:00<?, ?it/s] k loop: 0% 0/100 [00:00<?, ?it/s] k loop: 0% 0/100 [00:00<?, ?it/s] k loop: 0% 0/100 [00:00<?, ?it/s]Number of magnetic entities being calculated: 3
We have to calculate the Greens function for three reference direction and we are going to calculate 15 energy integrals per site.
The shape of the Hamiltonian and the Greens function is 84x84.
k loop: 1% 1/100 [00:00<01:34, 1.05it/s] k loop: 2% 2/100 [00:01<00:57, 1.71it/s] k loop: 3% 3/100 [00:01<00:44, 2.17it/s] k loop: 4% 4/100 [00:01<00:38, 2.51it/s] k loop: 5% 5/100 [00:02<00:35, 2.71it/s] k loop: 6% 6/100 [00:02<00:33, 2.83it/s] k loop: 7% 7/100 [00:02<00:31, 2.92it/s] k loop: 8% 8/100 [00:03<00:30, 2.98it/s] k loop: 9% 9/100 [00:03<00:29, 3.07it/s] k loop: 10% 10/100 [00:03<00:28, 3.12it/s] k loop: 11% 11/100 [00:04<00:28, 3.17it/s] k loop: 12% 12/100 [00:04<00:27, 3.21it/s] k loop: 13% 13/100 [00:04<00:27, 3.22it/s] k loop: 14% 14/100 [00:05<00:26, 3.24it/s] k loop: 15% 15/100 [00:05<00:28, 2.99it/s] k loop: 16% 16/100 [00:05<00:32, 2.59it/s] k loop: 17% 17/100 [00:06<00:31, 2.63it/s] k loop: 18% 18/100 [00:06<00:31, 2.62it/s] k loop: 19% 19/100 [00:07<00:30, 2.67it/s] k loop: 20% 20/100 [00:07<00:29, 2.75it/s] k loop: 21% 21/100 [00:07<00:29, 2.72it/s] k loop: 22% 22/100 [00:08<00:28, 2.75it/s] k loop: 23% 23/100 [00:08<00:26, 2.86it/s] k loop: 24% 24/100 [00:08<00:26, 2.92it/s] k loop: 25% 25/100 [00:09<00:25, 2.97it/s] k loop: 26% 26/100 [00:09<00:24, 3.01it/s] k loop: 27% 27/100 [00:09<00:24, 3.04it/s] k loop: 28% 28/100 [00:10<00:23, 3.07it/s] k loop: 29% 29/100 [00:10<00:22, 3.10it/s] k loop: 30% 30/100 [00:10<00:22, 3.13it/s] k loop: 31% 31/100 [00:10<00:22, 3.12it/s] k loop: 32% 32/100 [00:11<00:21, 3.10it/s] k loop: 33% 33/100 [00:11<00:21, 3.11it/s] k loop: 34% 34/100 [00:11<00:21, 3.11it/s] k loop: 35% 35/100 [00:12<00:20, 3.12it/s] k loop: 36% 36/100 [00:12<00:20, 3.11it/s] k loop: 37% 37/100 [00:12<00:20, 3.11it/s] k loop: 38% 38/100 [00:13<00:20, 3.10it/s] k loop: 39% 39/100 [00:13<00:19, 3.11it/s] k loop: 40% 40/100 [00:13<00:19, 3.10it/s] k loop: 41% 41/100 [00:14<00:19, 3.09it/s] k loop: 42% 42/100 [00:14<00:18, 3.07it/s] k loop: 43% 43/100 [00:14<00:18, 3.06it/s] k loop: 44% 44/100 [00:15<00:21, 2.62it/s] k loop: 45% 45/100 [00:16<00:29, 1.85it/s] k loop: 46% 46/100 [00:16<00:28, 1.87it/s] k loop: 47% 47/100 [00:17<00:26, 2.04it/s] k loop: 48% 48/100 [00:17<00:24, 2.11it/s] k loop: 49% 49/100 [00:18<00:23, 2.14it/s] k loop: 50% 50/100 [00:18<00:23, 2.15it/s] k loop: 51% 51/100 [00:18<00:22, 2.17it/s] k loop: 52% 52/100 [00:19<00:20, 2.29it/s] k loop: 53% 53/100 [00:19<00:19, 2.37it/s] k loop: 54% 54/100 [00:20<00:19, 2.36it/s] k loop: 55% 55/100 [00:20<00:18, 2.42it/s] k loop: 56% 56/100 [00:20<00:17, 2.46it/s] k loop: 57% 57/100 [00:21<00:16, 2.60it/s] k loop: 58% 58/100 [00:21<00:15, 2.70it/s] k loop: 59% 59/100 [00:21<00:14, 2.77it/s] k loop: 60% 60/100 [00:22<00:14, 2.82it/s] k loop: 61% 61/100 [00:22<00:13, 2.86it/s] k loop: 62% 62/100 [00:23<00:13, 2.85it/s] k loop: 63% 63/100 [00:23<00:13, 2.83it/s] k loop: 64% 64/100 [00:23<00:12, 2.82it/s] k loop: 65% 65/100 [00:24<00:12, 2.85it/s] k loop: 66% 66/100 [00:24<00:11, 2.84it/s] k loop: 67% 67/100 [00:24<00:11, 2.85it/s] k loop: 68% 68/100 [00:25<00:11, 2.83it/s] k loop: 69% 69/100 [00:25<00:10, 2.87it/s] k loop: 70% 70/100 [00:25<00:10, 2.84it/s] k loop: 71% 71/100 [00:26<00:10, 2.69it/s] k loop: 72% 72/100 [00:26<00:10, 2.69it/s] k loop: 73% 73/100 [00:26<00:09, 2.74it/s] k loop: 74% 74/100 [00:27<00:09, 2.80it/s] k loop: 75% 75/100 [00:27<00:08, 2.83it/s] k loop: 76% 76/100 [00:27<00:08, 2.83it/s] k loop: 77% 77/100 [00:28<00:08, 2.80it/s] k loop: 78% 78/100 [00:28<00:07, 2.76it/s] k loop: 79% 79/100 [00:29<00:07, 2.79it/s] k loop: 80% 80/100 [00:29<00:07, 2.76it/s] k loop: 81% 81/100 [00:29<00:06, 2.79it/s] k loop: 82% 82/100 [00:30<00:06, 2.80it/s] k loop: 83% 83/100 [00:30<00:06, 2.68it/s] k loop: 84% 84/100 [00:30<00:05, 2.75it/s] k loop: 85% 85/100 [00:31<00:05, 2.81it/s] k loop: 86% 86/100 [00:31<00:04, 2.82it/s] k loop: 87% 87/100 [00:31<00:04, 2.78it/s] k loop: 88% 88/100 [00:32<00:04, 2.77it/s] k loop: 89% 89/100 [00:32<00:04, 2.64it/s] k loop: 90% 90/100 [00:33<00:04, 2.41it/s] k loop: 91% 91/100 [00:33<00:03, 2.45it/s] k loop: 92% 92/100 [00:34<00:03, 2.45it/s] k loop: 93% 93/100 [00:34<00:02, 2.53it/s] k loop: 94% 94/100 [00:34<00:02, 2.50it/s] k loop: 95% 95/100 [00:35<00:02, 2.46it/s] k loop: 96% 96/100 [00:35<00:01, 2.50it/s] k loop: 97% 97/100 [00:36<00:01, 2.52it/s] k loop: 98% 98/100 [00:36<00:00, 2.55it/s] k loop: 99% 99/100 [00:36<00:00, 2.59it/s] k loop: 100% 100/100 [00:37<00:00, 2.65it/s] k loop: 100% 100/100 [00:37<00:00, 2.69it/s]
############################### GROGU OUTPUT ###################################
================================================================================
Input file:
Not yet specified.
Number of nodes in the parallel cluster: 4
================================================================================
Cell [Ang]:
[[ 3.79100000e+00 0.00000000e+00 0.00000000e+00]
[-1.89550000e+00 3.28310231e+00 0.00000000e+00]
[ 1.25954923e-15 2.18160327e-15 2.05700000e+01]]
================================================================================
DFT axis:
[0 0 1]
Quantization axis and perpendicular rotation directions:
[1 0 0] --» [array([0, 1, 0]), array([0, 0, 1])]
[0 1 0] --» [array([1, 0, 0]), array([0, 0, 1])]
[0 0 1] --» [array([1, 0, 0]), array([0, 1, 0])]
================================================================================
number of k points: 20
k point directions: xy
================================================================================
Parameters for the contour integral:
Ebot: -30
Eset: 50
Esetp: 1000
================================================================================
Atomic informations:
Not yet specified.
================================================================================
Exchange [meV]
--------------------------------------------------------------------------------
Atom1 Atom2 [i j k] d [Ang]
--------------------------------------------------------------------------------
[3]Fe(2) [4]Fe(2) [0 0 0] d [Ang] Not yet.
Isotropic: -59.460784608983374
DMI: [-7.73155890e+00 1.05962615e+01 2.21680365e-03 -8.54205178e-04
1.44527058e-04]
Symmetric-anisotropy: [-9.33132578e-01 -1.02533215e-03 -3.10751832e-06]
[3]Fe(2) [5]Fe(2) [0 0 0] d [Ang] Not yet.
Isotropic: -60.569416473077176
DMI: [-0.38257071 0.66548096 0.07063389 -6.22368411 -0.04236017]
Symmetric-anisotropy: [ 3.78638786 -6.13074804 0.00644632]
[4]Fe(2) [5]Fe(2) [0 0 0] d [Ang] Not yet.
Isotropic: -60.55753389874924
DMI: [-0.36873857 0.65357935 0.07063401 6.23608252 0.03586405]
Symmetric-anisotropy: [-3.79781231 6.14756367 0.0064464 ]
[3]Fe(2) [4]Fe(2) [-1 0 0] d [Ang] Not yet.
Isotropic: -2.8126561936571113
DMI: [-2.13036930e+00 2.12113650e+00 -1.15876881e-03 1.21597832e-03
-3.82889721e-04]
Symmetric-anisotropy: [ 6.06216550e-01 1.65863149e-04 -7.08970077e-06]
[3]Fe(2) [5]Fe(2) [-1 0 0] d [Ang] Not yet.
Isotropic: -6.632424073374205
DMI: [-0.67789101 0.73512516 -0.03120852 7.69153574 0.03112759]
Symmetric-anisotropy: [5.94798961 7.6408739 6.50853286]
[3]Fe(2) [4]Fe(2) [1 0 0] d [Ang] Not yet.
Isotropic: -4.7207835764097394
DMI: [-2.11695855e-01 -1.88028223e+00 1.05835226e-05 -1.03316787e-03
8.36865493e-04]
Symmetric-anisotropy: [ 7.63450180e-01 -3.81117143e-04 5.86749095e-06]
[3]Fe(2) [5]Fe(2) [1 0 0] d [Ang] Not yet.
Isotropic: -6.214233340151194
DMI: [ 4.11507584e-01 -3.77553764e-03 -2.48385400e-02 -4.29528744e+00
1.08981268e-01]
Symmetric-anisotropy: [-6.15499102 -4.29890748 -6.16472834]
[3]Fe(2) [4]Fe(2) [ 0 -1 0] d [Ang] Not yet.
Isotropic: -3.4636353917354374
DMI: [ 0.1019479 2.85695253 -0.03948534 0.3670612 0.04783194]
Symmetric-anisotropy: [-1.37861735e-02 3.40298270e-01 6.43031013e-06]
[3]Fe(2) [5]Fe(2) [ 0 -1 0] d [Ang] Not yet.
Isotropic: -0.16440230179059723
DMI: [0.03598949 0.18262092 0.00868944 0.35936314 0.00610426]
Symmetric-anisotropy: [-0.34092127 0.35586356 0.00589118]
[3]Fe(2) [4]Fe(2) [0 1 0] d [Ang] Not yet.
Isotropic: -5.582632299818422
DMI: [ 2.18039489 -1.25058397 0.13106217 0.45989655 -0.05702247]
Symmetric-anisotropy: [-9.37614656e-02 4.95671083e-01 -5.31876420e-06]
[3]Fe(2) [5]Fe(2) [0 1 0] d [Ang] Not yet.
Isotropic: -0.2565503383305444
DMI: [ 0.23312087 -0.42413096 -0.02052235 0.2509258 -0.02076644]
Symmetric-anisotropy: [-0.32690519 0.27669077 -0.00562126]
[4]Fe(2) [5]Fe(2) [-1 0 0] d [Ang] Not yet.
Isotropic: -6.128256753571549
DMI: [ 0.31014172 0.23111069 -0.03120608 4.2460402 -0.09698692]
Symmetric-anisotropy: [6.19497698 4.23351577 6.50855465]
================================================================================
Runtime information:
Total runtime: 38.489369708
--------------------------------------------------------------------------------
Initial setup: 0.141595916
Hamiltonian conversion and XC field extraction: 0.812 s
Pair and site datastructure creatrions: 0.016 s
k set cration and distribution: 0.023 s
Rotating XC potential: 0.509 s
Greens function inversion: 36.922 s
Calculate energies and magnetic components: 0.065 s
k loop: 0% 0/100 [00:37<?, ?it/s]
k loop: 0% 0/100 [00:37<?, ?it/s]
k loop: 0% 0/100 [00:37<?, ?it/s]

@ -2,9 +2,27 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[Mac:83105] shmem: mmap: an error occurred while determining whether or not /var/folders/yh/dx7xl94n3g52ts3td8qcxjcc0000gn/T//ompi.Mac.501/jf.0/3811770368/sm_segment.Mac.501.e3330000.0 could be created.\n"
]
},
{
"data": {
"text/plain": [
"'0.13.0'"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import os\n",
"from sys import stdout\n",
@ -26,14 +44,49 @@
"\n",
"# runtime information\n",
"times = dict()\n",
"times[\"start_time\"] = timer()"
"times[\"start_time\"] = timer()\n",
"########################\n",
"# doesnt work with sisl\n",
"#\n",
"#\n",
"#\n",
"#'0.13.0'\n",
"#'0.14.1'\n",
"#'0.14.2'\n",
"#'0.14.3'\n",
"#'0.15.0'\n",
"#'0.15.1'\n",
"########################\n",
"sisl.__version__"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Number of nodes in the parallel cluster: 1\n"
]
},
{
"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 104\u001b[0m\n\u001b[1;32m 90\u001b[0m simulation_parameters \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mdict\u001b[39m(\n\u001b[1;32m 91\u001b[0m path\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mNot yet specified.\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 92\u001b[0m scf_xcf_orientation\u001b[38;5;241m=\u001b[39mscf_xcf_orientation,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 99\u001b[0m parallel_size\u001b[38;5;241m=\u001b[39msize,\n\u001b[1;32m 100\u001b[0m )\n\u001b[1;32m 102\u001b[0m \u001b[38;5;66;03m# digestion of the input\u001b[39;00m\n\u001b[1;32m 103\u001b[0m \u001b[38;5;66;03m# read in hamiltonian\u001b[39;00m\n\u001b[0;32m--> 104\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 105\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 106\u001b[0m simulation_parameters[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mgeom\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m fdf\u001b[38;5;241m.\u001b[39mread_geometry()\n",
"File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.9/site-packages/sisl/io/siesta/fdf.py:2062\u001b[0m, in \u001b[0;36mfdfSileSiesta.read_hamiltonian\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 2060\u001b[0m order \u001b[38;5;241m=\u001b[39m _listify_str(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;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 2061\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m f \u001b[38;5;129;01min\u001b[39;00m order:\n\u001b[0;32m-> 2062\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 2063\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 2064\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:2094\u001b[0m, in \u001b[0;36mfdfSileSiesta._r_hamiltonian_hsx\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 2092\u001b[0m H \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 2093\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m f\u001b[38;5;241m.\u001b[39mis_file():\n\u001b[0;32m-> 2094\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 2095\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 2096\u001b[0m \u001b[38;5;66;03m# to ensure we get the correct orbital count\u001b[39;00m\n\u001b[1;32m 2097\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, order\u001b[38;5;241m=\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;124mfdf\u001b[39m\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/binaries.py:663\u001b[0m, in \u001b[0;36mhsxSileSiesta.version\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 660\u001b[0m \u001b[38;5;129m@property\u001b[39m\n\u001b[1;32m 661\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 662\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--> 663\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)"
]
}
],
"source": [
"# this cell mimicks an input file\n",
"fdf = sisl.get_sile(\"./lat3_791/Fe3GeTe2.fdf\") # ./Jij_for_Marci_6p45ang/CrBr.fdf\n",
@ -61,6 +114,23 @@
"pairs = [\n",
" # isotropic should be -82 meV\n",
" dict(ai=0, aj=1, Ruc=np.array([0, 0, 0])),\n",
" dict(ai=0, aj=1, Ruc=np.array([1, 0, 0])),\n",
" dict(ai=0, aj=1, Ruc=np.array([-1, 0, 0])),\n",
" dict(ai=0, aj=1, Ruc=np.array([2, 0, 0])),\n",
" dict(ai=0, aj=1, Ruc=np.array([-2, 0, 0])),\n",
" dict(ai=0, aj=1, Ruc=np.array([0, 1, 0])),\n",
" dict(ai=0, aj=1, Ruc=np.array([0, -1, 0])),\n",
" dict(ai=0, aj=1, Ruc=np.array([0, 2, 0])),\n",
" dict(ai=0, aj=1, Ruc=np.array([0, -2, 0])),\n",
" dict(ai=1, aj=0, Ruc=np.array([0, 0, 0])),\n",
" dict(ai=1, aj=0, Ruc=np.array([1, 0, 0])),\n",
" dict(ai=1, aj=0, Ruc=np.array([-1, 0, 0])),\n",
" dict(ai=1, aj=0, Ruc=np.array([2, 0, 0])),\n",
" dict(ai=1, aj=0, Ruc=np.array([-2, 0, 0])),\n",
" dict(ai=1, aj=0, Ruc=np.array([0, 1, 0])),\n",
" dict(ai=1, aj=0, Ruc=np.array([0, -1, 0])),\n",
" dict(ai=1, aj=0, Ruc=np.array([0, 2, 0])),\n",
" dict(ai=1, aj=0, Ruc=np.array([0, -2, 0])),\n",
" # these should all be around -41.9 in the isotropic part\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",
@ -137,7 +207,19 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'dh' 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[4], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m NO \u001b[38;5;241m=\u001b[39m \u001b[43mdh\u001b[49m\u001b[38;5;241m.\u001b[39mno \u001b[38;5;66;03m# shorthand for number of orbitals in the unit cell\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;66;03m# preprocessing Hamiltonian and overlap matrix elements\u001b[39;00m\n\u001b[1;32m 4\u001b[0m h11 \u001b[38;5;241m=\u001b[39m dh\u001b[38;5;241m.\u001b[39mtocsr(dh\u001b[38;5;241m.\u001b[39mM11r)\n",
"\u001b[0;31mNameError\u001b[0m: name 'dh' is not defined"
]
}
],
"source": [
"NO = dh.no # shorthand for number of orbitals in the unit cell\n",
"\n",
@ -230,7 +312,19 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'dh' 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[5], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# for every site we have to store 3 Greens function (and the associated _tmp-s) in the 3 reference directions\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m i, mag_ent \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28menumerate\u001b[39m(magnetic_entities):\n\u001b[0;32m----> 3\u001b[0m parsed \u001b[38;5;241m=\u001b[39m parse_magnetic_entity(\u001b[43mdh\u001b[49m, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mmag_ent) \u001b[38;5;66;03m# parse orbital indexes\u001b[39;00m\n\u001b[1;32m 4\u001b[0m magnetic_entities[i][\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124morbital_indeces\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m parsed\n\u001b[1;32m 5\u001b[0m \u001b[38;5;66;03m# calculate spin box indexes\u001b[39;00m\n",
"\u001b[0;31mNameError\u001b[0m: name 'dh' is not defined"
]
}
],
"source": [
"# for every site we have to store 3 Greens function (and the associated _tmp-s) in the 3 reference directions\n",
"for i, mag_ent in enumerate(magnetic_entities):\n",
@ -684,7 +778,19 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'dh' 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[1], line 3\u001b[0m\n\u001b[1;32m 1\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 coords \u001b[38;5;241m=\u001b[39m \u001b[43mdh\u001b[49m\u001b[38;5;241m.\u001b[39mxyz[\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m3\u001b[39m:]\n\u001b[1;32m 6\u001b[0m plt\u001b[38;5;241m.\u001b[39mfigure(figsize\u001b[38;5;241m=\u001b[39m(\u001b[38;5;241m15\u001b[39m, \u001b[38;5;241m5\u001b[39m))\n\u001b[1;32m 7\u001b[0m plt\u001b[38;5;241m.\u001b[39msubplot(\u001b[38;5;241m131\u001b[39m)\n",
"\u001b[0;31mNameError\u001b[0m: name 'dh' is not defined"
]
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"\n",

Loading…
Cancel
Save