Charge transfer integrals with ADF¶
# Add new results extraction method
@add_to_class(ADFFragmentResults)
def get_transfer_integrals(self):
return self.job.full.results.read_rkf_section('TransferIntegrals', file='adf')
# Common settings for all 3 jobs
# In the interest of computational speed we use a minimal basis
# set. For more quantitatively meaningful results, you should use
# a larger basis.
common = Settings()
common.input.ams.Task = 'SinglePoint'
common.input.adf.Basis.Type = 'SZ'
common.input.adf.Basis.Core = 'None'
common.input.adf.Symmetry = 'NoSym'
# Specific settings for full system job
full = Settings()
full.input.adf.transferintegrals = True
# Load XYZ file and separate it into 2 fragments
mol = Molecule('BenzeneDimer.xyz')
mol.guess_bonds()
fragments = mol.separate()
if len(fragments) != 2:
log('ERROR: Molecule {} was split into {} fragments'.format(mol.properties.name, len(fragments)))
import sys; sys.exit(1)
else:
mol1, mol2 = fragments
# Alternatively one could simply load fragments from separate xyz files:
# mol1 = Molecule('fragment1.xyz')
# mol2 = Molecule('fragment2.xyz')
job = ADFFragmentJob(name='ADFTI',fragment1=mol1,fragment2=mol2,settings=common,full_settings=full)
results = job.run()
# TI is a dictionary with the whole TransferIntegrals section from adf.rkf
print('== Results ==')
TI = results.get_transfer_integrals()
for key, value in sorted(TI.items()):
print('{:<28}: {:>12.6f}'.format(key, value))
Note
To execute this PLAMS script:
Download ChargeTransferIntegralsADF.py
Download BenzeneDimer.xyz
$ADFBIN/plams ChargeTransferIntegralsADF.py
Output
[10:20:01] PLAMS working folder: /scratch/rundir.plams.ChargeTransferIntegralsADF/plams_workdir
[10:20:01] JOB ADFTI STARTED
[10:20:01] JOB ADFTI RUNNING
[10:20:01] JOB ADFTI/frag1 STARTED
[10:20:01] JOB ADFTI/frag1 RUNNING
[10:20:07] JOB ADFTI/frag1 FINISHED
[10:20:07] JOB ADFTI/frag1 SUCCESSFUL
[10:20:07] JOB ADFTI/frag2 STARTED
[10:20:07] JOB ADFTI/frag2 RUNNING
[10:20:10] JOB ADFTI/frag2 FINISHED
[10:20:10] JOB ADFTI/frag2 SUCCESSFUL
[10:20:10] JOB ADFTI/full STARTED
[10:20:10] JOB ADFTI/full RUNNING
[10:20:22] JOB ADFTI/full FINISHED
[10:20:22] JOB ADFTI/full SUCCESSFUL
[10:20:22] JOB ADFTI FINISHED
[10:20:22] JOB ADFTI SUCCESSFUL
== Results ==
J(charge recombination 12) : -0.010748
J(charge recombination 21) : -0.010747
J(electron) : -0.012049
J(hole) : 0.034996
S(charge recombination 12) : 0.016227
S(charge recombination 21) : 0.016226
S(electron) : 0.018761
S(hole) : -0.049852
V(charge recombination 12) : -0.009868
V(charge recombination 21) : -0.009868
V(electron) : -0.013127
V(hole) : 0.026792
Vtot(charge recombination 12): 0.013197
Vtot(charge recombination 21): 0.013197
Vtot(electron) : 0.021460
Vtot(hole) : 0.034181
e1(electron) : 0.057207
e1(hole) : -0.165894
e2(electron) : 0.057209
e2(hole) : -0.165896
[10:20:22] PLAMS run finished. Goodbye
Test duration in seconds: 22