Compare commits

...

3 Commits

Binary file not shown.

@ -18,6 +18,8 @@ More on the theoretical background can be seen on [arXiv](https://arxiv.org/abs/
- Add more tests!!
- io stuff
- logging
- fdf atom input
- orbital indexing must be correct
# Building wheel
See detailed documentation on [PYPI](https://packaging.python.org/en/latest/tutorials/packaging-projects/).

File diff suppressed because it is too large Load Diff

@ -12,6 +12,7 @@ ScfXcfOrientation [ 0 0 1 ] # comment test
%block MagneticEntities # comment test
Cluster 4 5 # this is a list of atoms
Atom 3 # this MUST BE one atom else error
AtomShell 3 2 # this is one atom and shell index
AtomShell 4 2 3 # this is one atom and shell index
AtomShell 5 2 # this is one atom and shell index

@ -20,3 +20,9 @@
"""Docstring in init.
"""
from grogupy.core import *
from grogupy.globals import *
from grogupy.io import *
from grogupy.magnetism import *
from grogupy.utilities import *

@ -48,11 +48,7 @@ except:
tqdm_imported = False
from .core import *
from .globals import *
from .io import *
from .magnetism import *
from .utilities import *
from grogupy import *
def parse_command_line():
@ -166,7 +162,7 @@ def main(simulation_parameters, magnetic_entities, pairs):
if simulation_parameters["ebot"] is None:
try:
eigfile = simulation_parameters["infile"][:-3] + "EIG"
simulation_parameters["ebot"] = read_siesta_emin(eigfile) - 1
simulation_parameters["ebot"] = read_siesta_emin(eigfile) - 0.1
simulation_parameters["automatic_ebot"] = True
except:
print("Could not determine ebot.")
@ -347,7 +343,7 @@ def main(simulation_parameters, magnetic_entities, pairs):
f"Total number of matrix inversions: {kset.shape[0] * len(hamiltonians) * simulation_parameters['eset']}"
)
print(
f"The shape of the Hamiltonian and the Greens function is {NO}x{NO}={NO*NO}"
f"The shape of the Hamiltonian and the Greens function is {2*NO}x{2*NO}={4*NO*NO}"
)
# https://stackoverflow.com/questions/70746660/how-to-predict-memory-requirement-for-np-linalg-inv
# memory is O(64 n**2) for complex matrices
@ -357,7 +353,7 @@ def main(simulation_parameters, magnetic_entities, pairs):
)
print(f"Expected memory usage per matrix inversion: {memory_size * 32} KB")
print(
f"Expected memory usage per k point for parallel inversion: {memory_size * len(hamiltonians) * simulation_parameters['eset'] * 32} KB"
f"Expected memory usage per k point for parallel inversion: {memory_size * 32 * len(hamiltonians) * simulation_parameters['eset']} KB"
)
print(
f"Expected memory usage on root node: {len(np.array_split(kset, size)[0]) * memory_size * len(hamiltonians) * simulation_parameters['eset'] * 32 / 1024} MB"
@ -549,7 +545,9 @@ if __name__ == "__main__":
dict(ai=1, aj=2, Ruc=np.array([-3, 0, 0])),
]
simulation_parameters = dict()
simulation_parameters["infile"] = ""
simulation_parameters["infile"] = (
"/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf"
)
simulation_parameters["outfile"] = "./"
simulation_parameters["scf_xcf_orientation"] = np.array([0, 0, 1])
simulation_parameters["ref_xcf_orientations"] = [
@ -557,11 +555,11 @@ if __name__ == "__main__":
dict(o=np.array([0, 1, 0]), vw=[np.array([1, 0, 0]), np.array([0, 0, 1])]),
dict(o=np.array([0, 0, 1]), vw=[np.array([1, 0, 0]), np.array([0, 1, 0])]),
]
simulation_parameters["kset"] = 0
simulation_parameters["kdirs"] = ""
simulation_parameters["kset"] = 10
simulation_parameters["kdirs"] = "xy"
simulation_parameters["ebot"] = None
simulation_parameters["eset"] = 0
simulation_parameters["esetp"] = 0
simulation_parameters["eset"] = 600
simulation_parameters["esetp"] = 1000
simulation_parameters["parallel_solver_for_Gk"] = False
simulation_parameters["padawan_mode"] = True
####################################################################################################

@ -209,8 +209,8 @@ def load_pickle(infile):
"""
# open and read file
with open(infile, "wb") as input_file:
data = load(data, input_file)
with open(infile, "rb") as input_file:
data = load(input_file)
return data

@ -16,7 +16,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [
{
@ -24,14 +24,14 @@
"output_type": "stream",
"text": [
"0.14.3\n",
"1.24.4\n"
"numpy version unknown.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[Mac:30692] shmem: mmap: an error occurred while determining whether or not /var/folders/yh/dx7xl94n3g52ts3td8qcxjcc0000gn/T//ompi.Mac.501/jf.0/6815744/sm_segment.Mac.501.680000.0 could be created.\n"
"[Daniels-MacBook-Air.local:40959] shmem: mmap: an error occurred while determining whether or not /var/folders/yh/dx7xl94n3g52ts3td8qcxjcc0000gn/T//ompi.Daniels-MacBook-Air.501/jf.0/3756457984/sm_segment.Daniels-MacBook-Air.501.dfe70000.0 could be created.\n"
]
}
],

Loading…
Cancel
Save