@ -48,11 +48,7 @@ except:
tqdm_imported = False
tqdm_imported = False
from . core import *
from grogupy import *
from . globals import *
from . io import *
from . magnetism import *
from . utilities import *
def parse_command_line ( ) :
def parse_command_line ( ) :
@ -166,7 +162,7 @@ def main(simulation_parameters, magnetic_entities, pairs):
if simulation_parameters [ " ebot " ] is None :
if simulation_parameters [ " ebot " ] is None :
try :
try :
eigfile = simulation_parameters [ " infile " ] [ : - 3 ] + " EIG "
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
simulation_parameters [ " automatic_ebot " ] = True
except :
except :
print ( " Could not determine ebot. " )
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 ' ] } "
f " Total number of matrix inversions: { kset . shape [ 0 ] * len ( hamiltonians ) * simulation_parameters [ ' eset ' ] } "
)
)
print (
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
# https://stackoverflow.com/questions/70746660/how-to-predict-memory-requirement-for-np-linalg-inv
# memory is O(64 n**2) for complex matrices
# 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 matrix inversion: { memory_size * 32 } KB " )
print (
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 (
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 "
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 ] ) ) ,
dict ( ai = 1 , aj = 2 , Ruc = np . array ( [ - 3 , 0 , 0 ] ) ) ,
]
]
simulation_parameters = dict ( )
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 [ " outfile " ] = " ./ "
simulation_parameters [ " scf_xcf_orientation " ] = np . array ( [ 0 , 0 , 1 ] )
simulation_parameters [ " scf_xcf_orientation " ] = np . array ( [ 0 , 0 , 1 ] )
simulation_parameters [ " ref_xcf_orientations " ] = [
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 , 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 ] ) ] ) ,
dict ( o = np . array ( [ 0 , 0 , 1 ] ) , vw = [ np . array ( [ 1 , 0 , 0 ] ) , np . array ( [ 0 , 1 , 0 ] ) ] ) ,
]
]
simulation_parameters [ " kset " ] = 0
simulation_parameters [ " kset " ] = 1 0
simulation_parameters [ " kdirs " ] = " "
simulation_parameters [ " kdirs " ] = " xy "
simulation_parameters [ " ebot " ] = None
simulation_parameters [ " ebot " ] = None
simulation_parameters [ " eset " ] = 0
simulation_parameters [ " eset " ] = 60 0
simulation_parameters [ " esetp " ] = 0
simulation_parameters [ " esetp " ] = 100 0
simulation_parameters [ " parallel_solver_for_Gk " ] = False
simulation_parameters [ " parallel_solver_for_Gk " ] = False
simulation_parameters [ " padawan_mode " ] = True
simulation_parameters [ " padawan_mode " ] = True
####################################################################################################
####################################################################################################