File: default_data_directory.patch

package info (click to toggle)
elkcode 10.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 10,672 kB
  • sloc: f90: 52,747; perl: 964; makefile: 352; sh: 296; python: 105; ansic: 67
file content (51 lines) | stat: -rw-r--r-- 2,537 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Index: elkcode/utilities/xps/xps_exc.pl
===================================================================
--- elkcode.orig/utilities/xps/xps_exc.pl
+++ elkcode/utilities/xps/xps_exc.pl
@@ -1,7 +1,6 @@
 #!/usr/bin/perl 
 print "Script for calculating VB-XPS spectra from  PDOS* files (with option dosmsum and lmi rep switched off) and crossection \n";
-print "for photoemission read from file CROSEC (containing s,p,d,f crossections). CROSEC should be placed in the same directory\n ";
-print "(you can change this in this script at line with comment - Here enter CROSEC). Some elements I used are already in CROSEC\n ";
+print "for photoemission read from file CROSEC (containing s,p,d,f crossections). Some elements I used are already in CROSEC\n ";
 print "(for E=1486eV, Al Kalpha) but in principle depending on the energy of XPS measurement you should use  your own CROSEC,\n";
 print " take the needed values e.q. from  J. J. Yeh and I. Lindau, Atomic Data and Nuclear Data Tables 32 1 (1985).\n";
 print "The PDOSES multiplied by crossection and summed are written to _CTDOS file. In order to compare the result with experimental VB-XPS spectra\n" ;
@@ -72,7 +71,7 @@ $atidx++;
 
 if ($SPOL ) { print "\nMagnetic case\n"; } else { print "\nNon-magnetic case\n";}
 #print $ATCNT;
-open(CRS,"./CROSEC")   or die "Can't open CROSEC";  # Here enter the position of CROSEC
+open(CRS,"./CROSEC") or open(CRS,"/usr/share/elk-lapw/CROSEC") or die "Can't open CROSEC";
 print "\nRead CROSEC";
 @crs=<CRS>;
 close(CRS);
Index: elkcode/src/readspecies.f90
===================================================================
--- elkcode.orig/src/readspecies.f90
+++ elkcode/src/readspecies.f90
@@ -15,11 +15,19 @@ do is=1,nspecies
   open(50,file=trim(sppath)//trim(spfname(is)),status='OLD',form='FORMATTED', &
    action='READ',iostat=ios)
   if (ios /= 0) then
-    write(*,*)
-    write(*,'("Error(readspecies): error opening species file ",A)') &
-     trim(sppath)//trim(spfname(is))
-    write(*,*)
-    stop
+    if (trim(sppath).eq.'') then
+      ! no sppath was set in elk.in, try system default
+      sppath='/usr/share/elk-lapw/species/'
+      open(50,file=trim(sppath)//trim(spfname(is)),action='READ', &
+       status='OLD', form='FORMATTED',iostat=ios)
+    endif
+    if (ios.ne.0) then
+      write(*,*)
+      write(*,'("Error(readspecies): error opening species file ",A)') &
+       trim(sppath)//trim(spfname(is))
+      write(*,*)
+      stop
+    end if
   end if
   read(50,*) spsymb(is)
   read(50,*) spname(is)