As a self-check, attempt to replicate a published plot using the same program. A SnWO4 compound from Inorg. Chem. 46, 3839 (2007) is a simple example. Atomic positions and unit cell parameters are found in the supplementary information provided and can be used to create a CTRL file by running lminit.run. NOTE Parameters are given in Angstroms, so be sure to select Angstroms as units.
Once you have the initial CTRL file, you can continue using the same steps described above in the NiSe2 tutorial. Issues that arise that are not addressed in the NiSe2 example are documented and solved below.
NOTE It would be very wise to save your initial CTRL file under a different name before continuing. That way if you need to start over, you don't need to input the atomic positions again. You also need the initial CTRL file to generate the structure file (see below).
You will notice that after running lmes.run and lmovl.run that a number of warnings appear about the oxygen sphere radius. These can be ignored - following the error messages' instructions to fix the oxygen spheres will only lead to more complications. Problems arise when attempting to calculate the structure constants (running lmstr.run). This can be fixed by increasing Token RMAXS in Category STR to 6.
Following the steps above for producing an ELF plot, a 2D slice is generated (choosing f when asked to produce a 3D surface). This results in a contour plot with black contour lines. To generate a colored plot with averaged values between the contour lines, the file CHARGE.GNU must be altered before running gnuplot. When viewing images, kghostview reads the postscript file generated by gnuplot, which in turn reads in information from the file CHARGE.GNU. By altering the settings in CHARGE.GNU, we can manipulate the plot. Tutorials on how gnuplot works are listed below:
In short, edit the file CHARGE.GNU to look like this:
set terminal postscript eps enhanced color 'Times-Roman' 18
set output 'charge.eps'
set cntrparam levels incremental 0,0.02,1
set data style lines
set view 0, 0, 1.5
set size 0.6520000 , 1
set title ' '
set pm3d at b
splot 'CHARGE.DAT' using 3
Run gnuplot again and view charge.ps is kghostview. You should now see a purple/yellow schemed plot that looks like a blurry version of the plot in the paper. The problem is there are too few gridpoints in the data set…to fix this, run the calculations over again to obtain more data points. This is done in the CTRL file in Category PLOT in Tokens NDELR1, NDELR2, and NDELR3. Notice that each of these values = 13. To make a more detailed plot, increase these values (= 100) (SCF5.out). Calculations will take considerably longer, however, once the calculations are done and you follow the steps again, you end with a beautiful plot that matches the figure in the paper (without the structure or isosurface), only using a different color scheme.
To replicate the image found in the journal, use another program to visualize the data, Data Explorer (dx). This program has a built in tutorial that seems relatively user friendly. However, it will not be able to read the same input file. You will have to rerun the calculations, changing Token FORMAT to =3 in Category PLOT in the CTRL file. Note: this will replace your existing ELF and RHO files, so if you want to keep them, resave them under a different name! (ELF1, charge1.ps, CHARGE1.GNU for 13x13x13, ELF2, charge2.ps, CHARGE2.GNU for 100x100x100).
Just type dx in the terminal, and the program will open (you may need to use the H205 machines locally). A menu should pop, with Run Tutorial being one of the options.
The tutorials are relatively user friendly, but the way DataExplorer works is rather unique. You essentially "write" a visual program that imports, interprets, and modifies your data files. When you execute the program, your figure is produced. These "program" files are saved as .net files. The lmto package contains a template program that produces the figure found in the paper, called rhoelf.net. Copy this file into a new directory (remake100). Also copy the ELF plot data file. To copy files:
1) Go to the directory that contains the file you want to copy (/packages/lmto/lmt047/DataExplorer).
2) type the command: cp [filename] ~[path]
You will need one more file…the structure file, called cstruc.dx. Create a brand new directory - you will want to start from scratch. Copy your initial CTRL file into this directory (and rename it to CTRL). You don't want the empty interstitial spheres to show up in your structure, so use a CTRL file without the empty spheres. Don't worry about the Blow Up error message…calculations aren't being run here, so the CTRL file does not need to converge. Once you run lmhart.run, change VERBOS = 50 and run lmctl.run. Change FORMAT = 3 in Category PLOT (to produce dx files), IACTIVE = T in Category IO, and WRIBAS = T in Category OPTOINS. Once those changes were made, run lmctl.run again, which will then let you create the structure (in the file cstruc.dx) interactively. You assign atom colors based on atomic number or class (distinguish between O and O1), then assign colors, then draw bonds based on the maximum distances allowed between different atoms (you can take the default options for these distances for the SnWO4 plot). Copy the generated cstruc.dx file into the directory with your ELF data file and rhoelf.net (remake100).
Open the rhoelf.net file in DataExplorer. TIP: type the command in the directory from which you are working. This way, when you open DataExplorer and try to open a file, DataExplorer is already looking in the correct directory. To open rhoelf.net, click Edit Program once DataExplorer opens, then click rhoelf.net. To generate your image, click the tab Execute, then choose Execute Once (shortcut = Ctrl + O). You will notice some error messages come up…the program couldn't import the files. This is because the path designated in the rhoelf.net file is not going to the correct directory. Open rhoelf.net using a text editing program and manually put in the correct path…whatever directory your files are saved (/homes/kchang/SnWO45/remake100/[filename]). Close DataExplorer, open rhoelf.net using your desired text editor. If you look around line 30, you see where DataExplorer is looking for cstruc.dx file. Edit it to the correct path (/homes/kchang/SnWO45/remake100/cstruc.dx). Continue to scroll down…there are two more paths to fix. One ends with the file ELFV.dx, further down is another one that ends in RHOV.dx. Change the paths on both of these to your ELF data file (/homes/kchang/SnWO45/remake100/ELF2). You may want to save this new rhoelf.net file under a new name (rhoelf1.net).
NOTE Instead of changing the path in rhoelf.net via a text editor, you could change the path in DataExplorer. Double click on each of the the three File Selector boxes and you can type the correct path in the resulting window that pops up.
Now, reopen DataExplorer and open your edited rhoelf.net file and execute the program. You will notice a lot of blue in your figure…the isosurface value that is shown is 0.065. To visualize the lone pairs, change the shown isosurface value to 0.95. To do this, go to the program editor. Towards the middle, there is a box labeled Scalar that links to a box called Isosurface. Double click the Scalar box. Another window should pop up with a text box with a value of 0.06500. This is the value of the ELF isosurface. Enter 0.9500 and execute the program again. You should now see a beautiful plot that looks more or less identical to the figure in the SnWO4 reference.