FLEUR code plugin


Use the plugin to support inputs of the Fleur code i.e. the fleur and fleur_MPI executables.

Supported codes

  • Tested for Fleur v0.27 (MAX release 2.0). It is NOT back compatible to version v0.26 and earlier, because the I/O has changed completely and the plugin relies on the xml I/O.

Not supported code features

  • sparring multiple fleur calculation with on execution of fleur in a certain subdir structure (on can parse the commandline switches, but it will fail, because the subdirs have to be prepared on the machine.)
  • 1D, not supported by the plugin, but currently also not tested in Fleur 0.27 (in principal possible, some plugin functionalities have to be updated.)

Partially supported

  • J_ij and D_ij calculations will be available soon.
  • LDA+U, hybrid functionals and Wannier 90 not tested, in principal possible, but user ha to take care of copying the extra files, not all information is parsed.

Sketch of nodes



  • fleurinp: FleurinpData, optional - Data structure which represents the inp.xml file and everything a Fleur calculation needs. For more information see FleurinpData.
  • parent_folder: RemoteData, optional - If specified, certain files in the previous Fleur calculation folder are copied in the new calculation folder.


fleurinp and parent_folder are both optional. Depending on the setup of the inputs, one of five scenarios will happen:

  1. fleurinp: files belonging to fleurinp will be used as input for FLEUR calculation.
  2. fleurinp + parent_folder (FLEUR): files, given in fleurinp will be used as input for FLEUR calculation. Moreover, initial charge density will be copied from the folder of the parent calculation.
  3. parent_folder (FLEUR): Copies inp.xml file and initial charge density from the folder of the parent FLEUR calculation.
  4. parent_folder (input generator): Copies inp.xml file from the folder of the parent inpgen calculation.
  5. parent_folder (input generator) + fleurinp: files belonging to fleurinp will be used as input for FLEUR calculation. Remote folder is ignored.


All the outputs can be found in calculation.outputs.

  • fleurinp: FleurinpData - See FleurinpData. This output contains inp.xml that was actually used in the calculation. It is not always the same as an input FleurinpData.
  • output_parameters: Dict - Contains all kinds of information of the calculation and some physical quantities of the last iteration.

An example output node:

(aiidapy)% verdi data dict show 425
    "CalcJob_uuid": "a6511a00-7759-484a-839d-c100dafd6118",
    "bandgap": 0.0029975592,
    "bandgap_units": "eV",
    "charge_den_xc_den_integral": -3105.2785777045,
    "charge_density1": 3.55653e-05,
    "charge_density2": 6.70788e-05,
    "creator_name": "fleur 27",
    "creator_target_architecture": "GEN",
    "creator_target_structure": " ",
    "density_convergence_units": "me/bohr^3",
    "end_date": {
        "date": "2019/07/17",
        "time": "12:50:27"
    "energy": -4405621.1469633,
    "energy_core_electrons": -99592.985569309,
    "energy_hartree": -161903.59225823,
    "energy_hartree_units": "Htr",
    "energy_units": "eV",
    "energy_valence_electrons": -158.7015525598,
    "fermi_energy": -0.2017877885,
    "fermi_energy_units": "Htr",
    "force_largest": 0.0,
    "magnetic_moment_units": "muBohr",
    "magnetic_moments": [
    "magnetic_spin_down_charges": [
    "magnetic_spin_up_charges": [
    "number_of_atom_types": 10,
    "number_of_atoms": 10,
    "number_of_iterations": 49,
    "number_of_iterations_total": 49,
    "number_of_kpoints": 240,
    "number_of_species": 1,
    "number_of_spin_components": 2,
    "number_of_symmetries": 2,
    "orbital_magnetic_moment_units": "muBohr",
    "orbital_magnetic_moments": [],
    "orbital_magnetic_spin_down_charges": [],
    "orbital_magnetic_spin_up_charges": [],
    "output_file_version": "0.27",
    "overall_charge_density": 7.25099e-05,
    "parser_info": "AiiDA Fleur Parser v0.2beta",
    "parser_warnings": [],
    "spin_density": 7.91911e-05,
    "start_date": {
        "date": "2019/07/17",
        "time": "10:38:24"
    "sum_of_eigenvalues": -99751.687121869,
    "title": "A Fleur input generator calulation with aiida",
    "unparsed": [],
    "walltime": 7923,
    "walltime_units": "seconds",
    "warnings": {
        "debug": {},
        "error": {},
        "info": {},
        "warning": {}


The ‘simple’ output node will evolve. A draft of a second complex output node which contains informations of all iterations and atomtypes exists, but a dictionary is not the optimal structure for this. For now this is postponed. In any case if you want to parse something from the out.xml checkout the methods in xml_util.


Errors of the parsing are reported in the log of the calculation (accessible with the verdi process report command). Everything that Fleur writes into stderr is also shown here, i.e all JuDFT error messages. Example:

(aiidapy)% verdi process report 513
*** 513 [scf: fleur run 1]: None
*** (empty scheduler output file)
*** (empty scheduler errors file)
+-> ERROR at 2019-07-17 14:57:01.108964+00:00
| parser returned exit code<107>: FLEUR calculation failed.
+-> ERROR at 2019-07-17 14:57:01.097337+00:00
| FLEUR calculation did not finishsuccessfully.
+-> WARNING at 2019-07-17 14:57:01.056220+00:00
| The following was written into std error and piped to out.error :
|  I/O warning : failed to load external entity "relax.xml"
| rm: cannot remove ‘cdn_last.hdf’: No such file or directory
| **************juDFT-Error*****************
| Error message:e>vz0
| Error occurred in subroutine:vacuz
| Hint:Vacuum energy parameter too high
| Error from PE:0/24

Moreover, all warnings and errors written by Fleur in the out.xml file are stored in the ParameterData under the key warnings, and are accessible with Calculation.res.warnings.

More serious FLEUR calculation failures generate a non-zero exit code. If the exit code is zero, that means FLEUR calculation finished successfully:

(aiidapy)$ verdi process list -a -p 1
   PK  Created    State             Process label             Process status
 ----  ---------  ----------------  ------------------------  ----------------------------------
   60  3m ago     ⏹ Finished [0]    FleurCalculation
   68  3m ago     ⏹ Finished [105]  FleurCalculation

means that the first calculation was successful and the second one failed because it could not open one of the output files for some reason. Each exit code has it’s own reason:

Exit code Reason
105 One of output files can not be opened
106 No retrieved folder found
107 FLEUR calculation failed
108 XML output file was not found
109 Some required files were not retrieved
110 Parsing of XML output file failed
111 Parsing of relax XML output file failed

Additional advanced features

In general see the FLEUR documentation.

While the input link with name fleurinpdata is used for the content of the inp.xml, additional parameters for changing the plugin behavior, can be specified in the settings input, also of type Dict.

Below we summarise some of the options that you can specify, and their effect. In each case, after having defined the content of settings_dict, you can use it as input of a calculation calc by doing:


Adding command-line options

If you want to add command-line options to the executable (particularly relevant e.g. ‘-hdf’ use hdf, or ‘-magma’ use different libraries, magma in this case), you can pass each option as a string in a list, as follows:

settings_dict = {
    'cmdline': ['-hdf', '-magma'],

The default command-line of a fleur execution of the plugin looks like this for the torque scheduler:

'mpirun' '-np' 'XX' 'path_to_fleur_executable' '-wtime' 'XXX' < 'inp.xml' > 'shell.out' 2> 'out.error'

If the code node description contains ‘hdf5’ in some form, the plugin will use per default hdf5, it will only copy the last hdf5 density back, not the full cdn.hdf file. The Fleur execution line becomes in this case:

'mpirun' '-np' 'XX' 'path_to_fleur_executable' '-last_extra' '-wtime' 'XXX' < 'inp.xml' > 'shell.out' 2> 'out.error'

Retrieving more files

AiiDA-FLEUR does not copy all output files generated by a FLEUR calculation. By default, the plugin copies only out.xml, out, cdn1 and inp.xml. Depending on certain switches in used inp.xml, a plugin is capable of automatically adding additional files to the copy list:

  • if band=T : bands.1, bands.2
  • if dos=T : DOS.1, DOS.2
  • if pot8=T : pot*
  • if l_f=T : relax.xml

If you know that your calculation is producing additional files that you want to retrieve (and preserve in the AiiDA repository in the long term), you can add those files as a list as follows (here in the case of a file named testfile.txt):

settings_dict = {
  'additional_retrieve_list': ['testfile.txt'],

Retrieving less files

If you know that you do not want to retrieve certain files(and preserve in the AiiDA repository in the long term). i.e. the cdn1 file is to large and it is stored somewhere else anyway, you can add those files as a list as follows (here in the case of a file named testfile.txt):

settings_dict = {
  'remove_from_retrieve_list': ['testfile.txt'],

Copy more files remotely

The plugin copies by default the broyd* files if a parent_folder is given in the input.

If you know that for your calculation you need some other files on the remote machine, you can add those files as a list as follows (here in the case of a file named testfile.txt):

settings_dict = {
  'additional_remotecopy_list': ['testfile.txt'],

Copy less files remotely

If you know that for your calculation do not need some files which are copied per default by the plugin you can add those files as a list as follows (here in the case of a file named testfile.txt):

settings_dict = {
  'remove_from_remotecopy_list': ['testfile.txt'],