Home Teaching About Contact

Polyfan-KBr Optimisation

Objective: computationally determine the most energetically viable permutations of the Fantrip unit cell, such that there exists a Fantrip supercell which is commensurate with a KBr supercell.

This work, which was completed at the University of Lincoln as a collaboration between Prof. Matt Watkins, Dr Christian Loppacher at IM2NP and myself, concerned Fantrip polymeric networks deposited onto alkali halide bulk insulator surfaces. As shown in the AFM image, the lattice forms a roughly rectangular lattice, which is unexpected given the Fantrip gas phase unit cell of approximately 55 degrees. The task at Lincoln was to determine which Fantrip unit cell permutations were both geometrically and energetically feasible to give similar results as the provided AFM images.

This work was largely completed in Python, using the ASE package, which has excellent I/O capabilities to interface with other programs (in this case the ab-initio code CP2K), and has plotting capabilities for efficient error-checking.

The routine to set up the .pdb files for DFT is comprised of 3 distinct programs:

  • Program 1: using 'scipy.optimise.minimise', a list of a and b vectors which form commensurate supercells with KBr is produced. The code scans within an inputted range, allowing one to reduce the likelihood of suggesting non-physical systems.

  • Program 2: using the list of a and b vectors produced by program 1, the corresponding Fantrip surfaces are produced. This is done by adjusting the angle and bond lengths slowly (i.e. 1/20 x change in cell angle/length), and optimising geometry each step (using CP2K as a calculator in ASE) to ensure physicality. xTB methods were used here for speed, however final geometries were optimised using full DFT. From this program, a .pdb file of each Fantrip monolayer permutation is produced.

  • Program 3: using the .pdb files produced by program 2, this script combines the KBr substrate and Fantrip monolayer in the correct orientation. To do this, a reference .cif file of KBr is given and is then screened to give a sufficient number of layers (3 were used in this case). From there, a supercell of KBr is constructed to fit under the Fantrip supercell. One notable finding of this was rotating the substrate produced far better results, compared to rotating the monolayer (which feels possibly more intuitive to do). In doing this and visualising, any defects in the rotation are noticable immediately. After this, the monolayer is combined with the substrate, and any atoms lying outside the Fantrip supercell are removed. At this point, a simple test is carried out to ensure the completed .pdb file is periodic in the x-z plane.
This routine produced a .pdb file of each Fantrip supercell permutation deposited onto the KBr substrate. From here, CP2K was used to optimise geometry, and then calculate both the binding and formation energies. These calculations were run on ARCHER2, using between 4 and 8 nodes (depending on the system size). This allowed us to determine which permutation was most likely.

As a final visual check, the Python packaged ppafm was used to simulate AFM images. Once correctly set up, the identified permutation bore a visual similarity to the provided AFM images.

Future work: in the future, I would like to package these scripts up into a single script to construct layered systems and determine binding energies, as this job is somewhat fiddly to do for many permutations.