2.6.16. postprocessor{ }

A group allowing to run post-processing automatically after the simulation is done.

Properties:
  • optional: \(\mathrm{yes}\)

  • object: \(\mathrm{group}\)

  • items: maximum 1

Dependencies:

Keywords

datafile

If datafile is defined, then a file datafile is created in the output directory. The content of the !DATA section, if it exists, will be written into this file. Possible content in the !DATA section could be, e.g., comments, copyright or user info, or scripts in Python, Julia, Bash, Cmd, etc.

Properties:
  • optional: \(\mathrm{yes}\)

  • object: \(\mathrm{attribute}\)

  • type: character string

goto_output

If goto_output = yes then the shell command defined by call will be launched from within the output directory. Otherwise, the directory from where nextnano++ has been launched will be used.

Properties:
  • optional: \(\mathrm{yes}\)

  • object: \(\mathrm{attribute}\)

  • type: choice

  • values: \(\mathrm{yes}\) or \(\mathrm{no}\)

  • default: \(\mathrm{yes}\)

call

If call is defined, then it is used as a shell command line, typically cmd on Windows and bash on Linux, which will be launched. This command line can, but does not have to, refer to a file defined by datafile.

Attention

Calling GUI based programs such as ParaView is also possible but may interfere with operation of job control software such as nextnanomat or nextnanopy, as the job will only be considered finished once also all the post-processing tasks are finished.

Properties:
  • optional: \(\mathrm{yes}\)

  • object: \(\mathrm{attribute}\)

  • type: character string

Examples

Input file properties

postprocessor{
    datafile = "query.bat"
    call = "query.bat"
    goto_output = yes
}

!DATA

@echo off

@echo:

FOR %%? IN (*.*) DO (
    ECHO File Name Only       : %%~n?
    ECHO Name in 8.3 notation : %%~sn?
    ECHO File Extension       : %%~x?
    ECHO File Attributes      : %%~a?
    ECHO Located on Drive     : %%~d?
    ECHO File Size            : %%~z?
    ECHO Last-Modified Date   : %%~t?
    ECHO Parent Folder        : %%~dp?
    ECHO Fully Qualified Path : %%~f?
    ECHO FQP in 8.3 notation  : %%~sf?
    @echo:
)

@echo:

Deleting excess output files

The script below moves the bias_00000Quantumamplitudes_quantum_region_Gamma.dat outside of the bias_00000Quantum directory (to bias_00000) and deletes the:guilabel:bias_00000Quantum directory with the entire content.

Note

The removing command (rmdir) is called in the quiet mode (/q) such that no prompts occur and the script can be executed automatically.

postprocessor{
    datafile = "query.bat"
    call = "query.bat"
    goto_output = yes
}

!DATA

move "bias_00000\Quantum\amplitudes_quantum_region_Gamma.dat" "bias_00000\amplitudes_quantum_region_Gamma.dat"
rmdir /s /q "bias_00000\Quantum"