Authors: Doug du Boulay, Materials and Structures Laboratory, Tokyo Institute of Technology, Nagatsuta, Midori-Ku, Yokohama Japan.
MAPXCH currently imports a abinitio (DFT) 3D electron density map from the open source ABINIT project or from Wien2k lapw5-3D into an Xtal archive file.
To compare theoretical and experimental charge densities it is useful to know that all densities are on the same scale, with the same contour intervals and the same map orientations, so that topographic features can be reliably compared. To this end MAPXCH was written to import the electron density maps of the completely unrelated and unaffiliated external density functional theory programs Wien2k and ABINIT into Xtal, to exploit the relatively reliable contouring machinary that already exists herein (amongst other things).
At last checking, the Wien2k DFT code included one program, lapw5, intended for determining the electron density on a planar grid of values for contouring in external software. Florent Boucher kindly made available (to existing Wien2k users) a modified version of lapw5, heretofore named lapw53D, with which it was possible to compute the electron density on a 3D grid of values, in much the same manner as an existng planar lapw5 calculation.
The program lapw53D requires a default filename mapping file - lapw53D.def with the contents:
5 ,'case.in53D', 'old', 'formatted',0 6 ,'case.output5', 'unknown','formatted',0 8 ,'case.struct', 'old', 'formatted',0 9 ,'case.clmval', 'old', 'formatted',0 10,'case.3dmap', 'unknown','unformatted',0 11,'case.clmvaldn', 'unknown','formatted',0 12,'case.sigma', 'unknown','formatted',0 20,'case.rho_onedim','unknown','formatted',0 21,'case.rho', 'unknown','formatted',0 |
0 0 0 10000000 10000000 0 0 10000000 0 10000000 0 10000000 0 0 10000000 10000000 3 2 3 97 97 49 DIFFADD ANG VAL NODEBUG NONORTHO |
So, having run your Wien2k DFT SCF calculations to convergence, run lapw53D to calculate the 3D grid data points which are stored in the raw binary case.3dmap file.
Then, run Xtal with the command MAPXCH w2k2map inpfile case to read both the case.struct file to obtain unit cell, symmetry and atom information and, also the case.3dmap to transform the 3D gridded Wien2k density map into the Xtal map file as a full cell map. After the Xtal archive is created STARTX and ADDATM are run in update mode to check the symmetry and atom site information, then the archive is coppied to the .map file.
To obtain a valence density output from the program ABINIT it is sufficient to add the command
to your ABINIT control file. Then at succesful completion of the job all cell, symmetry and atom site information is written, along with the resultant valence density, to the file case_DEN. In contrast to Xtal, ABINIT plays hard and fast with the symmetry and cell in order to minimize cell volumes and optimize computation times. As a result some deductive logic is required to transform the 3D map data and cell to a more standard crystallographic setting. This can be lossy and the MAPXCH code is experimental.One problem with the ABINIT case_DEN file is that the entire electron density map is written as a single Fortran90 record of double precision data. Reading it within Xtal stresses the memory limitations, severely limiting the size of map that can be accomodated.
As with the Wien2k data input method, after creating the Xtal archive it is passed to STARTX and ADDATM to check the symmetry and atom sites, before being coppied to a .map file for contouring within xtal.
Optionally read ABINIT case_DEN file
Optionally read Wien2k case.struct and case.3dmap files
Initializes an xtal archive bdf and creates an xtal map file.
Read a Wien2k 3D map file, presumably a difference electron density map, straight into an xtal .map file
MAPXCH abi2map noterm abifile sin_o_DEN : read ABINIT map UOV 0.22 : spawns STARTX and ADDATM ADDATM upd: : reoveride builtin value UOV 0.00 ADDREF ffac : generate dummy reflection data reduce nocon limits *9 yes : whole sphere hklgen hkl frel sigf SORTRF aver 1 frel : remove redundant reflections RFOURR : pr 100 : reverse fourier transform valence density MODHKL : purge unphased reflections purge -4.+19 $1 1 1801 FC frt noex nod list : Determine Frel as Sqrt((Acore+Aval)^2+(Bcore+Bval)^2) CRYLSQ ov cy 10 wu : optimize overall temp noref skf noref Si noref N FOURR : Calculate a difference map grid 60 60 24 |
MAPXCH abi2map noterm abifile sin_o_DEN : read ABINIT map UOV 0.00 ADDATM upd UOV 0.000 STARTX upd : Add valence density form factors celcon Si celcon N setid formfx Si 0. 4. Si 0.00836484041 3.99153447 : ... truncated for brevity. Valence form factors from SCATOM N 1.98792839 4.64325094 setid exper 1 0.9 : change the wavelength end ADDREF ffac : generate dummy reflection data reduce nocon limits *4 1.0 *9 yes : whole sphere hklgen hkl frel sigf SORTRF aver 1 frel : remove redundant reflections RFOURR th 0.000001 : pr 100 : reverse fourier transform valence density idnums $1 304 801 802 700 : MODHKL : purge unphased reflections purge -4.+19 $1 1 1801 FC noex nod list : calculate Fc for pure valence electrons FOURR : Calculate a valence density difference map grid 60 60 24 |
[1] | Don't do this. It assumes the missing core electron density is something resembling an inert gas atom which is a very bad approximation. |