@ -2,7 +2,58 @@
"cells": [
"cells": [
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 21,
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[{'architecture': 'armv8',\n",
" 'filepath': '/Users/danielpozsar/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.9/site-packages/numpy/.dylibs/libopenblas64_.0.dylib',\n",
" 'internal_api': 'openblas',\n",
" 'num_threads': 1,\n",
" 'prefix': 'libopenblas',\n",
" 'threading_layer': 'pthreads',\n",
" 'user_api': 'blas',\n",
" 'version': '0.3.21'},\n",
" {'architecture': 'neoversen1',\n",
" 'filepath': '/Users/danielpozsar/Documents/oktatás/elte/phd/grogu_project/.venv/lib/python3.9/site-packages/scipy/.dylibs/libopenblas.0.dylib',\n",
" 'internal_api': 'openblas',\n",
" 'num_threads': 1,\n",
" 'prefix': 'libopenblas',\n",
" 'threading_layer': 'pthreads',\n",
" 'user_api': 'blas',\n",
" 'version': '0.3.27'}]\n"
]
}
],
"source": [
"from threadpoolctl import threadpool_info\n",
"from pprint import pprint\n",
"import numpy\n",
"\n",
"pprint(threadpool_info())"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"os.environ[\"OMP_NUM_THREADS\"] = \"1\" # export OMP_NUM_THREADS=1\n",
"os.environ[\"OPENBLAS_NUM_THREADS\"] = \"1\" # export OPENBLAS_NUM_THREADS=1\n",
"os.environ[\"MKL_NUM_THREADS\"] = \"1\" # export MKL_NUM_THREADS=1\n",
"os.environ[\"VECLIB_MAXIMUM_THREADS\"] = \"1\" # export VECLIB_MAXIMUM_THREADS=1\n",
"os.environ[\"NUMEXPR_NUM_THREADS\"] = \"1\" # export NUMEXPR_NUM_THREADS=1"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -12,6 +63,13 @@
"0.14.3\n",
"0.14.3\n",
"1.24.4\n"
"1.24.4\n"
]
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[Daniels-Air:88431] shmem: mmap: an error occurred while determining whether or not /var/folders/yh/dx7xl94n3g52ts3td8qcxjcc0000gn/T//ompi.Daniels-Air.501/jf.0/455868416/sm_segment.Daniels-Air.501.1b2c0000.0 could be created.\n"
]
}
}
],
],
"source": [
"source": [
@ -45,16 +103,45 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 2 2,
"execution_count": 3 2,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"[{'o': array([1., 0., 0.]),\n",
" 'vw': array([[0., 1., 0.],\n",
" [0., 0., 1.]])},\n",
" {'o': array([0., 1., 0.]),\n",
" 'vw': array([[1., 0., 0.],\n",
" [0., 0., 1.]])},\n",
" {'o': array([0., 0., 1.]),\n",
" 'vw': array([[1., 0., 0.],\n",
" [0., 1., 0.]])}]"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"source": [
"sisl.io.Sile(\"input.fdf\").read(\"scfOrientation\")"
"fdf = sisl.io.fdfSileSiesta(\"input.fdf\")\n",
"rotations = fdf.get(\"XCF_Rotation\")\n",
"my_rot = []\n",
"for rot in rotations:\n",
" dat = np.array(rot.split(), dtype=float)\n",
" o = dat[:3]\n",
" vw = dat[3:]\n",
" vw = vw.reshape(2, 3)\n",
" my_rot.append(dict(o=o, vw=vw))\n",
"\n",
"my_rot"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 23,
"execution_count": 4 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -107,7 +194,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 24 ,
"execution_count": 5 ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -139,10 +226,20 @@
"Ebot: -13\n",
"Ebot: -13\n",
"Eset: 300\n",
"Eset: 300\n",
"Esetp: 1000\n",
"Esetp: 1000\n",
"================================================================================================================================================================\n",
"Setup done. Elapsed time: 2435.031293583 s\n",
"================================================================================================================================================================\n"
"================================================================================================================================================================\n"
]
]
},
{
"ename": "KeyError",
"evalue": "'calculate_charge'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[5], line 43\u001b[0m\n\u001b[1;32m 40\u001b[0m uc_in_sc_idx \u001b[38;5;241m=\u001b[39m dh\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\u001b[1;32m 42\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m rank \u001b[38;5;241m==\u001b[39m root_node:\n\u001b[0;32m---> 43\u001b[0m \u001b[43mprint_parameters\u001b[49m\u001b[43m(\u001b[49m\u001b[43msimulation_parameters\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 44\u001b[0m times[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124msetup_time\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m timer()\n\u001b[1;32m 45\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSetup done. Elapsed time: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mtimes[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msetup_time\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m s\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
"File \u001b[0;32m~/Documents/oktatás/elte/phd/grogu_project/src/grogu_magn/io.py:116\u001b[0m, in \u001b[0;36mprint_parameters\u001b[0;34m(simulation_parameters)\u001b[0m\n\u001b[1;32m 112\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mEsetp: \u001b[39m\u001b[38;5;124m\"\u001b[39m, simulation_parameters[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mesetp\u001b[39m\u001b[38;5;124m\"\u001b[39m])\n\u001b[1;32m 113\u001b[0m \u001b[38;5;28mprint\u001b[39m(\n\u001b[1;32m 114\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m================================================================================================================================================================\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 115\u001b[0m )\n\u001b[0;32m--> 116\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[43msimulation_parameters\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcalculate_charge\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m:\n\u001b[1;32m 117\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThe calculated charge of the Hamiltonian in the quantization axes: \u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 118\u001b[0m \u001b[38;5;28mprint\u001b[39m(simulation_parameters[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcharges\u001b[39m\u001b[38;5;124m\"\u001b[39m])\n",
"\u001b[0;31mKeyError\u001b[0m: 'calculate_charge'"
]
}
}
],
],
"source": [
"source": [
@ -198,7 +295,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 25 ,
"execution_count": null ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -259,7 +356,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 26 ,
"execution_count": null ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -288,7 +385,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 27 ,
"execution_count": null ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -327,7 +424,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 29 ,
"execution_count": null ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -395,7 +492,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 7 ,
"execution_count": null ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -537,7 +634,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 8 ,
"execution_count": null ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -866,7 +963,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 9 ,
"execution_count": null ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -905,7 +1002,14 @@
"Isotropic -41.9627\n",
"Isotropic -41.9627\n",
"DMI 1.1205 -1.9532 0.0018386\n",
"DMI 1.1205 -1.9532 0.0018386\n",
"Symmetric-anisotropy 0.26007 -0.00013243 0.12977 -0.069979 -0.042066\n",
"Symmetric-anisotropy 0.26007 -0.00013243 0.12977 -0.069979 -0.042066\n",
"--------------------------------------------------------------------------------\n"
"--------------------------------------------------------------------------------\n",
"\n",
"\n",
"On-site meV\n",
"----------------------------------------\n",
"Fe4\n",
"0.16339\t0.16068\t0\t0\t0\t0\n",
"========================================\n"
]
]
},
},
{
{