build_adsorbates.py - Trebonius91/utils4VASP GitHub Wiki
This script enables the placement of arbitrary adsorbate molecules or atoms on arbitrary structures (surfaces seen as standard case). In order to execute it, at least two files need to be present in the current folder:
POSCAR_surf
The geometry of the surface (or more general: the substrate) on which the adsorbates shall be placed. Cartesian coordinates must be given! Use the (modify_poscar.py script)[add link] if the current file has direct coordinates.adsorb_list.dat
A command file, containing information about the species and the positions (center of masses relative to the surface and the Euler angles defining their orientations).
Besides being in cartesian coordinates, the surface slab in POSCAR_surf
is assumed to be orthogonal to the z (or c) axis and be located in the lower half of the unit cell!
A typical adsorb_list.dat
file looks like this:
sb 3.20 6.46 2.5 0.0 0.0 0.0
c-o 12.4 0.5 2.0 90.0 90.0 0.0
local1 5.0 3.12 1.8 90.0 124.0 34.2
The general syntax is (arbitrary many lines/different species possible):
species x-position y-position z-position precession-angle nutation-angle rotation-angle
In the example case, a single Sb atom is placed at x=3.20 Ang. and y=6.46 Ang. with respect to the cartesian coordinate system defined by POSCAR_surf
. The z-coordinate (2.5 Ang.) defines the position with respect to the highest atom in the surface slab, such that the Sb atom is placed 2.5 Ang. above the surface, if its upper layer is a flat plane with the z-axis being its normal vector.
The three zeros are the Euler angles, which in case of a point-particle are of course not used.
The second adsorbate is a cabon monoxide molecule (CO), located 2.0 Ang. above the surface (the distance between its lowest atom and the highest atom in the surface). The 90°,90°,0 Euler angles let the molecule be oriented upwards (parallel to the z-axis) and with the C atom below the O atom.
Finally, a user-defined molecule is introduced via the local1
specifier. In this case, the structure is read from the file POSCAR_ads1
(in cartesian or direct coordinates). Arbitrary molecules can be taken! All rules concerning placement are the same as for the CO molecule.
The script is able to place three kinds of structures on adsorbates (all specifiers need to be written in lower case!):
- A: adsorbate molecules Larger molecules, whose structures were preoptimized with VASP and are stored directly into the script or are read from user-given
POSCAR_ads
files. The list of prestored molecules is always written from the script when it is executed, and the list will be continuously updated by us. - B: Atoms Atoms of all elements up to Rn (omitting Lanthanides) can be placed, by writing their element symbols in lower case. All Euler angles can be set to zero in this case!
- C: Diatomic molecules Molecules with two atoms, homolytic and heterolytic ones. The bond distances were taken from the (respective NIST database)[https://cccbdb.nist.gov/diatomicexpbondx.asp]. The most common (and also some more exotic) diatomics were included into the list stored into the script. The element symbols of the bonding partners need to be written in lower case, the bond indicated by a - sign: e.g.,
h-h
orc-o
. The ordering of the elements is arbitrary.
After executing, the combined structure is written to POSCAR
.
Further, a list of more advanced commands is available for special needs:
-select_dist
Selective dynamics will be activated for the combined systems and only atoms of the substrate near enough to any adsorbate atom will be activated (T T T
), all others will be frozen (F F F
). Since the VASP geometry optimization gets more complicated the more atoms (or degrees of freedom) are activated, it might be useful to activate this option for large systems.-random
If more or less random adsorption structures shall be generated, this option might be useful. Theadsorb_list.dat
file must be given in the usual way, but the angles will now be set totally by chance, and the given x,y and z coordinates will be increased or decreased by up to 0.5 Ang. ("position uncertainty").-cutout
If adsorbates shall be dug into the surface partially or fully, this option should be added (else, atoms will merge with that of the substrate!).-dist_act = [value]
If-select_dist
is activated, this keyword specifies the exact distance below which an atom of the substrate will be activated (if any adsorbate atom is located nearer than this distance). The default value is 7.0 Ang.-dist_cut = [value]
If-cutout
is activated, this keyword defines the distance below which a substrate atom will be deleted (if located nearer to any of the adsorbate atoms).