|
|
@ -76,10 +76,14 @@
|
|
|
|
"metadata": {},
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"ename": "TypeError",
|
|
|
|
"output_type": "stream",
|
|
|
|
"evalue": "'NoneType' object is not iterable",
|
|
|
|
"text": [
|
|
|
|
"output_type": "error",
|
|
|
|
"[{'ai': 0, 'aj': 1, 'Ruc': array([0, 0, 0])}, {'ai': 0, 'aj': 2, 'Ruc': array([0, 0, 0])}, {'ai': 1, 'aj': 2, 'Ruc': array([0, 0, 0])}, {'ai': 0, 'aj': 2, 'Ruc': array([-1, -1, 0])}, {'ai': 1, 'aj': 2, 'Ruc': array([-1, -1, 0])}, {'ai': 0, 'aj': 2, 'Ruc': array([-1, 0, 0])}, {'ai': 1, 'aj': 2, 'Ruc': array([-1, 0, 0])}, {'ai': 1, 'aj': 2, 'Ruc': array([-2, 0, 0])}, {'ai': 1, 'aj': 2, 'Ruc': array([-3, 0, 0])}]\n"
|
|
|
|
"traceback": [
|
|
|
|
|
|
|
|
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
|
|
|
|
|
|
|
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
|
|
|
|
|
|
|
|
"Cell \u001b[0;32mIn[58], line 28\u001b[0m\n\u001b[1;32m 26\u001b[0m magnetic_entities \u001b[38;5;241m=\u001b[39m fdf\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMagneticEntities\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 27\u001b[0m fdf_magnetic_entities \u001b[38;5;241m=\u001b[39m []\n\u001b[0;32m---> 28\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m mag_ent \u001b[38;5;129;01min\u001b[39;00m magnetic_entities:\n\u001b[1;32m 29\u001b[0m row \u001b[38;5;241m=\u001b[39m mag_ent\u001b[38;5;241m.\u001b[39msplit()\n\u001b[1;32m 30\u001b[0m dat \u001b[38;5;241m=\u001b[39m []\n",
|
|
|
|
|
|
|
|
"\u001b[0;31mTypeError\u001b[0m: 'NoneType' object is not iterable"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -93,9 +97,12 @@
|
|
|
|
"fdf_parameters[\"scf_xcf_orientation\"] = np.array(fdf.get(\"ScfXcfOrientation\"))\n",
|
|
|
|
"fdf_parameters[\"scf_xcf_orientation\"] = np.array(fdf.get(\"ScfXcfOrientation\"))\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"rotations = fdf.get(\"XCF_Rotation\")\n",
|
|
|
|
"rotations = fdf.get(\"XCF_Rotation\")\n",
|
|
|
|
|
|
|
|
"if rotations is None:\n",
|
|
|
|
|
|
|
|
" pass\n",
|
|
|
|
|
|
|
|
"else:\n",
|
|
|
|
" fdf_rot = []\n",
|
|
|
|
" fdf_rot = []\n",
|
|
|
|
" for rot in rotations:\n",
|
|
|
|
" for rot in rotations:\n",
|
|
|
|
" dat = np.array(rot.split(), dtype=float)\n",
|
|
|
|
" dat = np.array(rot.split()[:9], dtype=float)\n",
|
|
|
|
" o = dat[:3]\n",
|
|
|
|
" o = dat[:3]\n",
|
|
|
|
" vw = dat[3:]\n",
|
|
|
|
" vw = dat[3:]\n",
|
|
|
|
" vw = vw.reshape(2, 3)\n",
|
|
|
|
" vw = vw.reshape(2, 3)\n",
|
|
|
@ -103,14 +110,41 @@
|
|
|
|
" fdf_parameters[\"ref_xcf_orientations\"] = fdf_rot\n",
|
|
|
|
" fdf_parameters[\"ref_xcf_orientations\"] = fdf_rot\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"pairs = fdf.get(\"Pairs\")\n",
|
|
|
|
"pairs = fdf.get(\"Pairs\")\n",
|
|
|
|
|
|
|
|
"if pairs in None:\n",
|
|
|
|
|
|
|
|
" pass\n",
|
|
|
|
|
|
|
|
"else:\n",
|
|
|
|
" fdf_pairs = []\n",
|
|
|
|
" fdf_pairs = []\n",
|
|
|
|
" for fdf_pair in pairs:\n",
|
|
|
|
" for fdf_pair in pairs:\n",
|
|
|
|
" dat = np.array(fdf_pair.split(), dtype=int)\n",
|
|
|
|
" dat = np.array(fdf_pair.split()[:5], dtype=int)\n",
|
|
|
|
" my_pair = dict(ai=dat[0], aj=dat[1], Ruc=np.array(dat[2:]))\n",
|
|
|
|
" my_pair = dict(ai=dat[0], aj=dat[1], Ruc=np.array(dat[2:]))\n",
|
|
|
|
" fdf_pairs.append(fdf_pair)\n",
|
|
|
|
" fdf_pairs.append(my_pair)\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"pairs = fdf.get(\"Pairs\")\n",
|
|
|
|
"magnetic_entities = fdf.get(\"MagneticEntities\")\n",
|
|
|
|
|
|
|
|
"if magnetic_entities is None:\n",
|
|
|
|
|
|
|
|
" pass\n",
|
|
|
|
|
|
|
|
"else:\n",
|
|
|
|
" fdf_magnetic_entities = []\n",
|
|
|
|
" fdf_magnetic_entities = []\n",
|
|
|
|
|
|
|
|
" for mag_ent in magnetic_entities:\n",
|
|
|
|
|
|
|
|
" row = mag_ent.split()\n",
|
|
|
|
|
|
|
|
" dat = []\n",
|
|
|
|
|
|
|
|
" for string in row:\n",
|
|
|
|
|
|
|
|
" if string.find(\"#\") != -1:\n",
|
|
|
|
|
|
|
|
" break\n",
|
|
|
|
|
|
|
|
" dat.append(string)\n",
|
|
|
|
|
|
|
|
" if dat[0] == \"Cluster\" or \"cluster\":\n",
|
|
|
|
|
|
|
|
" fdf_magnetic_entities.append(dict(atom=dat[1:]))\n",
|
|
|
|
|
|
|
|
" continue\n",
|
|
|
|
|
|
|
|
" elif dat[0] == \"AtomShell\" or \"Atomshell\" or \"atomShell\" or \"atomshell\":\n",
|
|
|
|
|
|
|
|
" fdf_magnetic_entities.append(dict(atom=dat[1], l=dat[2:]))\n",
|
|
|
|
|
|
|
|
" continue\n",
|
|
|
|
|
|
|
|
" elif dat[0] == \"AtomOrbital\" or \"Atomorbital\" or \"tomOrbital\" or \"atomorbital\":\n",
|
|
|
|
|
|
|
|
" continue\n",
|
|
|
|
|
|
|
|
" elif dat[0] == \"Orbitals\" or \"orbitals\":\n",
|
|
|
|
|
|
|
|
" continue\n",
|
|
|
|
|
|
|
|
" else:\n",
|
|
|
|
|
|
|
|
" print(\"Unrecognizable magnetic entity in fdf\")\n",
|
|
|
|
|
|
|
|
" break\n",
|
|
|
|
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"fdf_parameters[\"kset\"] = fdf.get(\"INTEGRAL.Kset\")\n",
|
|
|
|
"fdf_parameters[\"kset\"] = fdf.get(\"INTEGRAL.Kset\")\n",
|
|
|
|
"fdf_parameters[\"kdirs\"] = fdf.get(\"INTEGRAL.Kdirs\")\n",
|
|
|
|
"fdf_parameters[\"kdirs\"] = fdf.get(\"INTEGRAL.Kdirs\")\n",
|
|
|
@ -121,6 +155,13 @@
|
|
|
|
"fdf_parameters[\"padawan_mode\"] = fdf.get(\"PadawanMode\")"
|
|
|
|
"fdf_parameters[\"padawan_mode\"] = fdf.get(\"PadawanMode\")"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
|
|
|
"execution_count": null,
|
|
|
|
|
|
|
|
"metadata": {},
|
|
|
|
|
|
|
|
"outputs": [],
|
|
|
|
|
|
|
|
"source": []
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 4,
|
|
|
|
"execution_count": 4,
|
|
|
|