CRYSTAL09 - How to install The package CRYSTAL09 consists of two programs: - crystal compute the energy, analytical gradient and wave function for a given geometry, which can also be fully optimized, compute frequencies at Gamma. - properties compute one electron properties (electrostatic potential, charge density, ...) analyse the wave function in direct and reciprocal space transform the Bloch functions (BF) into Wannier functions (localization of BF) "crystal" can run in three different modes: crystal sequential execution Pcrystal replicated data parallel execution MPPcrystal distributed data parallel execution The following instructions refer to crystal, sequential execution. Specific instructions (see http://www.crystal.unito.it => documentation) are devoted to install Pcrystal and MPPcrystal. ========================== The two programs, crystal and properties, interact via files stored on disk. Unformatted wave function information is written by crystal in file fort.9; formatted wave function (wf) information is written by crystal in file fort.98. properties can read wf information computed by crystal unformatted (file fort.9) or formatted (file fort.98). Formatted data written in file fort.98 can be moved from one platform to another (e.g.: from Opteron to Itanium). Conventions used in the following: "ARCH" string to identify the operating system and/or the compiler (Linux-pgf, Linux-ifort, MacOsx) "VERSION" string to identify the crystal version (now v2.0.1) d12 extension of file meant to be input to crystal d3 extension of file meant to be input to properties INSTALLATION ON UNIX/LINUX SYSTEMS Installation instructions are given for UNIX/Linux operating systems. Examples are in C shell. 0. log in as a generic user, and cd to your home directory 1. make the crystal root directory - it is called $CRY2K9_ROOT in the following 2. change directory to $CRY2K9_ROOT 3. After having got the user and passwd, point your browser to: http://www.crystal.unito.it/download09 Login and then download the executable suitable for your architecture (the name of the files may change, crystal09_v2_0_x, if minor modifications are introduced) Examples: crystal09_v2_0_1_Linux-ifort_XE_openmpi-1.6_amd64.exe.tar.gz crystal09_v2_0_1_MacOsx-ifort_XE_intel64_exe.tar.gz 4. decompress the files: gunzip crystal09_v2_0_1_Linux-ifort_XE_openmpi-1.6_amd64.exe.tar.gz gunzip crystal09_v2_0_1_MacOsx-ifort_XE_intel64_exe.tar.gz should now have: crystal09_v2_0_1_Linux-ifort_XE_openmpi-1.6_amd64.exe.tar crystal09_v2_0_1_MacOsx-ifort_XE_intel64_exe.tar 5. untar the files (a complete subtree will be created having the CRYSTAL09 directory as a root): tar -xvf crystal09_v2_0_1_Linux_XE_openmpi-1.6_amd64.exe.tar tar -xvf crystal09_v2_0_1_MacOsx-ifort_XE_intel64_exe.tar 6. The directory bin contains a sub-directory for each type of executable, identified by a string (ARCH), and for each release (the first one being v2.0.0). Type the command: ls -l -R. The result should be: ./bin: total 8 drwxr-xr-x 3 cry98 crygrp 4096 Mar 11 15:39 Linux-ifort_XE_openmpi-1.6_amd64/ drwxr-xr-x 3 cry98 crygrp 4096 Mar 11 15:40 MacOsx-ifort_XE_intel64/ ./bin/Linux-ifort_XE_openmpi-1.6_amd64: total 4 drwxr-xr-x 2 cry98 crygrp 4096 Mar 9 16:50 v2_0_1/ ./bin/Linux-ifort_XE_openmpi-1.6_amd64/v2_0_1: total 26192 -rwxr-xr-x 1 cry98 crygrp 9744178 Mar 9 16:45 crystal* -rwxr-xr-x 1 cry98 crygrp 10896205 Mar 9 16:50 Pcrystal* -rwxr-xr-x 1 cry98 crygrp 6129715 Mar 9 16:46 properties* ./bin/MacOsx-ifort_XE_intel64: total 4 drwxr-xr-x 2 cry98 crygrp 4096 Mar 11 12:57 v2_0_1/ ./bin/MacOsx-ifort_XE_intel64/v2_0_1: total 15440 -rwxr-xr-x 1 cry98 crygrp 9745360 Mar 11 12:56 crystal* -rwxr-xr-x 1 cry98 crygrp 6031424 Mar 11 12:57 properties* 7. Installation of the package CRGRA2006 (Not necessary to install and run CRYSTAL09) The package for visualization of bands, doss, maps, from the data written in file fort.25 by the program properties can be downloaded from http://www.crystal.unito.it/crgra2006/crgra2006.html No modifications to read CRYSTAL09 data. A standard postscript visualizer, called by the command gv, is assumed to be installed on the machine. 8. type the commands: gunzip Crgra2006.tar.gz tar -xvf Crgra2006.tar ls -l -R Crgra2006 The result of the last command is: band06* script to draw bands band.con* example of control file to draw bands doss06* script to draw density of states (doss) doss.con* example of control file to draw doss maps06* script to draw contourline maps maps.con* example of control file to draw maps mptparam.dat data to draw atoms on the maps defps.dat* data to draw atoms on the maps multi.maps* example of control file to draw difference maps multi.con example of control file to draw difference maps bin/Linux-pgf directory - contain executables doc/ directory - contain Crgra2006.pdf, User' manual src/ directory - contain fortran source files SETTING OF ENVIRONMENTAL VARIABLE AND SHELL SCRIPTS Testing instructions are given for UNIX/Linux operating systems. Examples are in C shell. 1. Point your browser to : http://www.crystal.unito.it/utils09.tar.gz and download the file into the CRYSTAL root directory, $CRY2K9_ROOT 2. decompress and untar the file: gunzip utils09.tar.gz tar -xvf utils09.tar type the command: ls utils09 the result is the list of shell: runcry09 C shell script to run crystal [and properties] runmpi09 template to prepare a script to run Pcrystal runprop09 C shell script to run properties runcryscor09 C shell script to run cryscor cry2k9.cshrc C shell to define CRYSTAL09 environmental variables cry2k9.bashrc bash to define CRYSTAL09 environmental variables cd to utils09 directory 3. From now on, the example is for C shell. If bash is your default shell please refer to cry2k9.bashrc file Backup the cry2k9.cshrc file by copying as cry2k9.old.cshrc Edit the cry2k9.cshrc shell to define the local value of the environmental variables: variable name meaning name used in the example CRY2K9_ROOT CRYSTAL09 root directory CRYSTAL09 CRY2K9_ARCH ARCH string to identify the executable Linux-pgf CRY2K9_SCRDIR temporary directory for scratch files $HOME 4. [copy the file cry2k9.cshrc to the user home directory], and type the command: source cry2k9.cshrc 5. for a permanent setting of CRYSTAL09 environmental variables and path, insert in .cshrc (or .bashrc) the line: source cry2k9.cshrc (or source cry2k9.bashrc) TESTING OF CRYSTAL09 ON UNIX/LINUX SYSTEMS In order to run crystal and properties all previous steps should have been taken successfully. 1. From the root directory of CRYSTAL09, $CRY2K9_ROOT, type the command: ls to check your installation. The result should be: bin/ directory with executables utils09/ direcyory with utilities Crgra2006/ directory with graphic package 2. make the directory test_cases and move into it 3. download input test cases from: http://www.crystal.unito.it/test_cases/inputs_wf.tar.gz For tests on geometry optimization and vibrational frequencies calculation see the CRYSTAL tutorials home page: http://www.crystal.unito.it/tutorials/index.html or move to http://www.crystal.unito.it ==> documentation ==> test cases and download input files. 4. decompress and untar the files: gunzip *.gz tar -xvf inputs.......tar. From the directory $CRY2K9_ROOT/test_cases type the command: ls -F you should find the following directories: inputs/ directory with CRYSTAL09 inputs to crystal (*.d12) and properties (*.d3) 5. Starting from the root directory of the crystal program, the suggested directory tree, used in the execution scripts runcry09 and runprop09 has the following structure: crystal_root -----bin---ARCH1----VERSION1----crystal[,Pcrystal] | | properties | ARCH2----VERSION1----crystal[,Pcrystal] | properties test_cases---inputs--- test01.d12 | | test02.d12 | | ......... | |---outputs---ARCH1----VERSION1---test01.out | | | | test02.out | | | | . . . . . | | | VERSION2 --test01.out | | | test02.out | | | . . . . . | | |---ARCH2---VERSION1---test01.out | | | | test02.out | | | | . . . . . | | | VERSION2---test01.out | | | test02.out | | | . . . . . | | |--- . . . . | | |test_opt |---inputs ---test1.d12 | | | |---outputs ---ARCH1----VERSION1---test01.out | | | | test02.out | | | | . . . . . | | |---ARCH2----VERSION1---test01.out | | | |test_freq|---inputs . . . . | | | |---outputs . . . . | | | |test_xxxx|---inputs . . . . | | | |---outputs . . . . . . . . . . .. . . . utils09---- cry2k9.cshrc | cry2k9.bashrc | runcry09 | runmpi09 | runprop09 | runcryscor09 Crgra2006---- 6. to test the program with the test cases input supplied, make from $CRY2K9_ROOT the directory test: mkdir test_first In order for crystal and properties to read input file from the test dataset you should set these two variables: setenv CRY2K9_INP "$CRY2K9_ROOT/test_cases/inputs" setenv CRY2K9_PROP "$CRY2K9_ROOT/test_cases/inputs" or (bash) export CRY2K9_INP=$CRY2K9_ROOT/test_cases/inputs export CRY2K9_PROP=$CRY2K9_ROOT/test_cases/inputs If you do not set the two variables, input and output are supposed to be into the current directory. Test11 is MgO bulk, and provides also data for the properties program. Bands, Density of states, charge density maps are also computed and visualize, assuming there is a postscript visualizer "gv" to run test11, bulk MgO, type: runcry09 test11 The program crystal and properties are executed. In the current directory the following files will be written: test11.out standard output (crystal+properties) test11.f9 unformatted wf data (written by crystal) test11.f98 formatted wf data (written by crystal) [ if Crgra2006 was installed: test11.band06.ps postscript file - bands test11.doss06.ps postscript file - doss test11.maps06.ps postscript file - charge density map] To check the execution, issue the command to find the string "GY(HF" (see CRYSTAL09 User's Manual, Appendix, "Relevant Strings"): grep "GY(HF" test11.out the correct answer should be: TOTAL ENERGY(HF)(AU)( 7) -2.7466415305590E+02 DE 3.7E-08 tst 3.2E-09 PX 4.1E-04 That string contains the total energy/cell of bulk MgO.