iostream

edrixs.iostream.dump_poles(obj, file_name='poles')[source]

Dump the objects of poles returned from XAS or RIXS calculations to file for later plotting.

Parameters
obj: Python object

Object of poles, a dict or a list of dicts.

file_name: string

File name.

edrixs.iostream.load_poles(file_name='poles')[source]

Load the objects of poles from file.

Parameters
file_name: string
Returns
obj: Python objects

Poles object.

edrixs.iostream.read_poles_from_file(file_list)[source]

Read informations in files xas_poles.n or rixs_poles.n to a dict.

Parameters
file_list: list of strings

Names of pole files.

pole_dict: dict

A dict containing information of poles.

edrixs.iostream.write_config(directory='.', ed_solver=1, num_val_orbs=2, num_core_orbs=2, neval=1, nvector=1, ncv=1, idump=True, num_gs=1, maxiter=500, linsys_max=1000, min_ndim=1000, nkryl=500, eigval_tol=1e-08, linsys_tol=1e-10, omega_in=0.0, gamma_in=0.1)[source]

Write control parameters in config.in file for ed_fsolver.

edrixs.iostream.write_emat(emat, fname, tol=1e-12, fmt_int='{:10d}', fmt_float='{:.15f}')[source]

Write the nonzeros of the rank-2 hopping matrices to file. The first line is the number of nonzeros, and the following lines are the nonzero elements. This file will be read by ed.x, xas.x or rixs.x.

Parameters
emat: 2d complex array

The array to be written.

fname: str

File name.

tol: float

Precision.

fmt_int: str (default: ‘{:10d}’)

Format for printing integer numbers.

fmt_float: str (default: ‘{:.15f}’)

Format for printing float numbers.

edrixs.iostream.write_tensor(tensor, fname, only_nonzeros=False, tol=1e-10, fmt_int='{:10d}', fmt_float='{:.15f}')[source]

Write \(n\) -dimension numpy array to file, currently, \(n\) can be 1, 2, 3, 4, 5.

Parameters
tensor:math:n d float or complex array

The array needs to be written.

fname: str

File name.

only_nonzeros: logical (default: False)

Only write nonzero elements.

tol: float (default: 1E-10)

Only write the elements when their absolute value are larger than tol and only_nonzeros=True.

fmt_int: str (default: ‘{:10d}’)

The format for printing integer numbers.

fmt_float: str (default: ‘{:.15f}’)

The format for printing float numbers.

edrixs.iostream.write_umat(umat, fname, tol=1e-12, fmt_int='{:10d}', fmt_float='{:.15f}')[source]

Write the nonzeros of the rank-4 Coulomb U tensor to file. The first line is the number of nonzeros, and the following lines are the nonzero elements. This file will be read by ed.x, xas.x or rixs.x.

Parameters
umat: 4d complex array

The array to be written.

fname: str

File name.

tol: float (default: 1E-12)

Precision.

fmt_int: str (default: ‘{:10d}’)

Format for printing integer numbers.

fmt_float: str (default: ‘{:.15f}’)

Format for printing float numbers.