Helium dimer dissociation curve¶
import numpy as np
# Calcualte bond energy of He dimers for a series of bond
# distances using ADF
# type of atoms
atom1 = 'He'
atom2 = 'He'
# interatomic distance values
dmin = 2.2
dmax = 4.2
step = 0.2
# create a list with interatomic distances
distances = np.arange(dmin,dmax,step)
# calculation parameters (single point, TZP/PBE+GrimmeD3)
sett = Settings()
sett.input.ams.task = 'SinglePoint'
sett.input.adf.basis.type = 'TZP'
sett.input.adf.xc.gga = 'PBE'
sett.input.adf.xc.dispersion = 'Grimme3'
energies = []
for d in distances:
mol = Molecule()
mol.add_atom(Atom(symbol=atom1, coords=(0.0, 0.0, 0.0)))
mol.add_atom(Atom(symbol=atom2, coords=( d, 0.0, 0.0)))
job = AMSJob(molecule=mol, settings=sett, name=f'dist_{d:.2f}')
job.run()
energies.append(job.results.get_energy(unit='kcal/mol'))
# print
print('== Results ==')
print('d[A] E[kcal/mol]')
for d,e in zip(distances, energies):
print(f'{d:.2f} {e:.3f}')
Note
To execute this PLAMS script:
Download He2DissociationCurve.py
$ADFBIN/plams He2DissociationCurve.py
Output
[10:45:48] PLAMS working folder: scratch/rundir.plams.He2DissociationCurve/plams_workdir
[10:45:48] JOB dist_2.20 STARTED
[10:45:48] JOB dist_2.20 RUNNING
[10:45:49] JOB dist_2.20 FINISHED
[10:45:49] JOB dist_2.20 SUCCESSFUL
...
[10:45:57] JOB dist_4.00 STARTED
[10:45:57] JOB dist_4.00 RUNNING
[10:45:58] JOB dist_4.00 FINISHED
[10:45:58] JOB dist_4.00 SUCCESSFUL
== Results ==
d[A] E[kcal/mol]
2.20 0.230
2.40 -0.054
2.60 -0.127
2.80 -0.122
3.00 -0.094
3.20 -0.066
3.40 -0.045
3.60 -0.030
3.80 -0.020
4.00 -0.013
[10:45:58] PLAMS run finished. Goodbye
Test duration in seconds: 10