YamboInput

Class to create and manipulate the yambo input files. The class is partially inspired from the YamboIn class of YamboPy. In this implementation the input object inherit from dict, so all the standard methods for python dictionaries can be used to modify the attribute of the input.

class mppi.InputFiles.YamboInput.YamboInput(args='', folder='.', filename='yambo.in')[source]

Bases: dict

activate_RIM_W()[source]

Activate the RIM_W option to perform to the random integration method on the effective potential.

convert_string()[source]

Convert the input object into a string

deactivate_RIM_W()[source]

Remove the RIM_W option from the runlevel list.

parseInputFile(file)[source]

Read the arguments and variables from the input file

read_file(file)[source]

Open filename and run parseInputFile to parse the input into the dictionary

removeTimeReversal()[source]

Remove the time reversal symmetry

set_array_variables(units='', **kwargs)[source]

Add to the variables key of the input dictionary the elements kwargs[key] = [kwargs[value],units] for all the elements of the kwargs provided as input.

Parameters:
  • units (string) – the units associated to (all the) variables

  • kwargs – variable(s) added in the form name = value. All the variables must have the same units

set_bandRange(first_band, last_band)[source]

Set the the band interval in the variable QPkpoint.

set_extendOut()[source]

Activate the ExtendOut option to print all the variable in the output file.

set_kRange(first_k, last_k)[source]

Set the the kpoint interval in the variable QPkpoint.

set_rt_bands(bands=None, scissor=0.0, stretch_con=1.0, stretch_val=1.0, damping_valence=0.05, damping_conduction=0.05)[source]

Set the bands, the scissor and the damping parameters for the RT analysis

set_rt_cpu(k=1, b=1, q=1, qp=1)[source]

Set the parallelization roles of the run

set_rt_field(index=1, int=1000.0, int_units='kWLm2', fwhm=100.0, fwhm_units='fs', freq=1.5, freq_units='eV', kind='QSSIN', polarization='linear', direction=[1.0, 0.0, 0.0], direction_circ=[0.0, 1.0, 0.0], tstart=0.0, tstart_units='fs')[source]

Set the parameters of the field. The index parameter is an integer that defines the name of the Field$index. Useful to set more than one field

set_rt_simulationTimes(time_step=10, step_units='as', sim_time=1000.0, time_units='fs', io_time=[1.0, 5.0, 1.0], io_cache_time=[1.0, 1.0], io_units='fs')[source]

Set the time parameters of the simulation

set_scalar_variables(**kwargs)[source]

Add to the variables key of the input dictionary the elements kwargs[key] = kwargs[value] for all the elements of the kwargs provided as input.

Parameters:

kwargs – variable(s) added in the form name = value

set_ypp_extFields(Efield1=[1.0, 0.0, 0.0], Efield2=None)[source]

Set the direction of the external electric field(s). The second field (useful for the circular polarization) is added only is the value is not None.

write(folder, filename, reformat=True)[source]

Write the yambo input on file. If the args of the object is not empty and the reformat variable is True run yambo to recover the original format of the yambo input.