ES Analysis Command Line Usage

General remarks

The ES Analysis is a special mode of QuantumPatch, a generic tool for quantum mechanical computation of molecules embedded in thin films. For the full functionality of QuantumPatch and its command line usage, please refer to the respective QuantumPatch command line documentation. As the DOS calculation is a carefully calibrated protocol, we recommend to stick to the provided settings template and only modify certain settings as indicated below.

Settings

Template settings file

The settings templates are available in the public WaNo repository:

As the computation with and without absolute energy levels requires a different sequence of calculations in QuantumPatch, the settings files differ. Please always refer to the corresponding template.

General settings

Define your input morphology and enable or disable the computation of electronic couplings:

QuantumPatch:
  ...
  morphology: morphology.cml
  ...
  calculateJs: true
  ...

Adapt the filename for morphology accordingly. Note that the calculation of Js is comparably cheap, so we recommend leaving this enabled by default.

Special settings for ES Analysis with absolute levels of IP and EA

Shell definitions

Regarding the shell setup there are two settings to adapt to your needs:

  1. The choice of molecules on which to compute absolute levels.
  2. The number of molecules used for disorder and couplings computation.

For the core shell, adapt the settings type and number according to your needs:

System:
  Core:
    type: number #number_by_type, list
    number: 8
    list: 4;7;9-12

type should be one of the following:

  • type: number: this requires the additional property number: X where X is the number of molecules closest to the center of the morphology on which absolute energy levels are computed.
  • type: number_by_type: this requires the additional property number: X where X is the number of molecules of each type of molecules closest to the center of the morphology on which absolute energy levels are computed. I.e. if your morphology contains three different species and you set number: 8, IP and EA are computed on a total of 24 molecules.
  • type: list: Defines the core shell by molecule IDs, especially useful in case of single molecules (e.g. emitters) embedded in thin films or other specialized studies. Requires the additional setting list: X where X is a list of Molecule IDs provided separated by semicolon, or as range using a hyphen, or a combination of both, as in the example above.

If you wish to compute disorder and couplings with enough statistical sampling to ensure accurate results, modify the Shell 1 to include the following lines:

System:
  Shells:
    '1':
      shellsize_by: number_or_cutoff
      number: 200

This computes the disorder and couplings on 200 molecules in addition to the molecules specified in the core shell above.

Engine definitions

Some engines need to be adapted according to the computational resources you have available. All engines listed below are found in the settings file in the subdictionary DFTEngine: user: {}:

  • In the polFF engine, set threads to the maximum number of cores available per node minus one thread for the master. E.g., if you allocated 64 cores per node, set threads to 63:

    polFF:
      threads: cpu_per_node - 1
    
  • In the PySCF env engine, set mem_per_cpu similar to the engines PySCF 1 and PySCF 2.

  • In the PySCF engines PySCF 1 and PySCF 2, set mem_per_cpu to the amount of memory you have available per CPU, in MB. E.g. if you have a total of 256GB on a 64 core machine, set this value to 4000. In both engines set threads to auto.min.X where X is

     int((cpu_per_node-1) // math.ceil(number_core_mols / tot_nodes))
    

    With cpu_per_node the number of cores per node, number_core_mols the number of core molecules specified in the core shell and tot_nodes the number of nodes allocated for the job. Finally, make sure polFF_env is disables in PySCF 2.

    An example of the engine definitions is:

        PySCF 1:
          engine: PySCF
          basis: def2-SVPD
          functional: PBE0
          charge_model: ESP
          gridsize: fast
          mem_per_cpu: 1500
          threads: auto.min.12
          polFF_env: true
        PySCF 2:
          engine: PySCF
          basis: def2-SVPD
          functional: PBE0
          charge_model: ESP
          gridsize: fast
          mem_per_cpu: 1500
          threads: auto.min.12
          polFF_env: false
    
    
  • For the GW step, decide whether to use Turbomole (if installed and license available) or PySCF. If in doubt, go with PySCF and adapt threads to number of cpus minus one (Master thread) and memory to

     int(mem_per_cpu * (cpu_per_node-1) * 0.75)
    

    where mem_per_cpu is the memory available per CPU in MB (see above) and cpu_per_node is the number of cores per node. An example of the GW engine is then:

    DFTEngine:
      user:
        PySCF Evalstep:
          threads:
    

    In the settings, make sure this engine is used in the SpecialSteps section:

    SpecialSteps:
      EvalStep:
        engine: "PySCF Evalstep"
        mollist: core
        environment_source: LastMolStates
    

Adapt settings for ES Analysis with only disorder and couplings

Shell definitions

In this case, the molecules used for computing disorder and couplings are divided between two shells:

  • A subset is processed as the core shell, and
  • The remaining molecules are treated in the first outer shell, using slightly different settings for performance optimization.

For disorder calculations, we recommend using more than 200 molecules in total, with approximately 100 assigned to the core shell. Adjust these numbers as necessary. Please note, for technical reasons, at least two molecules must be included in the first outer shell.

Engine definitions

Only two engine settings (make sure to locate these engines at DFTEngine: user: ...) need to be modified:

  • PySCF env: mem_per_cpu: Set to the available memory per cpu, as described above
  • polFF: threads: Set to number of cpus per node minus one master thread.

Running a simulation

As the DOS Calculator is a special mode of QuantumPatch, you can start the calculation as described here

The results of the search are