HOMO_LUMO Generator (HL generators)
Introduction
The QuantumPatch output can be used for specific LightForge runs, in which you need an expanded morphology with accurate (non Gaussian distributed) energy levels. Thus, this script creates files in which the center of mass or nearest atom distances of molecules are correlated with their HOMO/LUMO energies. Furthermore, it predicts the HOMO/LUMO energies of the extended system with respect to the point charges of the known starting system. In the following, we will illustrate an use case, in which this script is applied and additionally used to scale the point charges and the correlated dipole moment to see their impact at the LightForge calculation.
Including HL generator in a QuantumPatch Run
Add the following block to the "Analysis" section of the QP settings:
Analysis:
...
homo_lumo_generator:
enabled: true
non_PBC_morphology: structure.cml
periodic_copies: [2, 2, 1]
swap_x_z_axis: true
coulomb_cutoff: 25
esp_avrg_options:
z-extend: false
mode: by_distance
bins_per_nm: 1.7
- enabled: enables or disables the HL generator analysis
- non_PBC_morphology: name of the non-PBC morphology (usually structure.cml) from the same Deposit run used to generate the QP input (usually structurePBC.cml)
- periodic_copies: numbers of periodic copies in x,y and z-direction
- swap_x_z_axis: This will rotate the final morophology after the expansion and exchange z- and x-direction. This is required if you wish to align the deposition axis (z-axis in Deposit) with the charge transport axis (x-axis) in LightForge, e.g. for a slab interface. If you wish to analyze transport along the x-axis, so perpendicular to the deposition axis but with neat periodic boundaries, keep this option unchecked.
- esp_avrg_options:
- z-extend (Include copies for environment in z-direction): If enabled, z-periodicity is enforced (even for Periodic copies in z-direction=1) to generate environment for molecules at the top and bottom of the morphology for HOMO/LUMO prediction. This makes sense for homogeneously mixted systems and should be disabled for interface morphologies.
- mode (Distance binning): "by_distance" enables this option. Especially at interfaces, molecules far from the interface may be polarized differently than when close to the interface. This option maps electrostatics of molecules of a specific species in respect to their distance from the other species.
- bins_per_nm: Determines how fine the distance binning is.
Standalone usage
The HOMO LUMO generator can be called as standalone module from the command line.
Required input
- A morphology e.g. from Deposit
- A successfull QuantumPatch run (Analysis folder)
- The settings file used in the respective QuantumPatch run
Commands and flags
QuantumPatch/MolecularTools/homolumo_generator.py -d './' -c 25 -esp -pbc 3 3 2
- -d directory of QP calculation to read output from ('./' for the folder in which the command is used)
- -c coulomb cutoff in angstroem
- -esp the method which is used: for this case it extend microscopic morphology using averaged esps
- -pbc the expansion of the system in x,y,z-direction
If you want to reuse this run and the created files, with respect to the QuantumPatch results (Analysis folder), you can use the -g flag:
- -g reloades generators.yml from the created HL_expansion_runtime_data_esp folder
QuantumPatch/MolecularTools/homolumo_generator.py -d './' -c 25 -esp -esps 1.2 1.0 -g
If you want to re-scale the point charges use the -esps flag:
- -esps and to float values, e.g. 1.0 1.5 when you have two different molecules in the morphology and you want to scale the charges of one by a factor of 1.5
- -g is used, thus, you need to generate in a first step the geneators.yml. Then, you can re-scale the charges and see the impact at the HOMO/LUMO energies.
The last step is the option to also rescale the HOMO/LUMO enegies by a factor given by the -ss flag:
- -ss scaling the HOMO/LUMO energies in the final IP_EA_ext.dat
QuantumPatch/MolecularTools/homolumo_generator.py -d './' -c 25 -esp -esps 1.2 1.0 -ss 1.1 -g
The second last step is a pre run in which you see the impact between the energy and the scaling of the charges Taken all together, the last step delivers the final results, however, the other two are required to get a physical impression of the scaling range and the correlation.
The results of the search are