File: Lines

package info (click to toggle)
espresso 6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,068 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,503; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (116 lines) | stat: -rwxr-xr-x 3,085 bytes parent folder | download | duplicates (6)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# 1. q-points are in units of 2*\pi/a
# 2. If you use cartesian for q-points then leave basis vectors unchanged
# 3. q-points for FCC and BCC lattices are well-known in Cartesian and 
#    there is no need to use basis vectors (so leave basis vectors unchanged)
# 4. Otherwise you should provide correct basis vectors and 
#    q-vectors wrt basis vectors (as "crystal" in scf-file)
# 
# Basis vectors and vortex coordianates are due to Bradley, Cracknell Textbook 
# Except Simple cubic, Face Centered Cubic, Body Centered Cubic which are Cartesian

cell=`head -1 $FC_name.fc | cut -c 9-11 `
echo $cell

if [ $cell == 0 ]; then

    if [ ! -f Generic]; then
    echo 'You should define basis vectors and high symmetry points manually'
    echo 'If you choose  coordinates of these points in Cartesian '
    echo 'then you can choose a diagonal unitary matrix'
    exit
    fi

    cp  $PLOT_DIR/Include/Generic K_points
    echo 'Manually given basis vectors and high symmetry k-points coordinates'

 elif [ $cell == 1 ]; then
    cp  $PLOT_DIR/Include/Cubic_SC K_points
    echo 'Simple cubic'

 elif [ $cell == 2 ]; then
    cp  $PLOT_DIR/Include/Cubic_FCC K_points
    echo 'Face Centered Cubic'

 elif [ $cell == 3 ]; then 
    cp  $PLOT_DIR/Include/Cubic_BCC K_points
    echo 'Body Centered Cubic'

 elif [ $cell == 4 ]; then 
    c2a=`head -1 $FC_name.fc | cut -c 34-44   `
    c2a1=`echo "scale=8; 1./$c2a" | bc -l `
    cp  $PLOT_DIR/Include/Hexagonal Kpts_tmp
    sed 's/XX/'$c2a1'/g' Kpts_tmp > ./K_points 
    mv Kpts_tmp
    echo 'Hexagonal or Trigonal P'

 elif [ $cell == 5 ]; then 

    echo 'Rhombohedrical, Trigonal R is not implemented yet'
    exit
    
 elif [ $cell == 6 ]; then 

    c2a=`head -1 $FC_name.fc | cut -c 34-44   `
    c2a1=`echo "scale=8; 1./$c2a" | bc -l `
    cp  $PLOT_DIR/Include/Tetragonal_Simple Kpts_tmp
    echo $c2a
    sed 's/XX/'$c2a1'/g' Kpts_tmp > ./K_points 
    mv Kpts_tmp
    echo 'Simple Tetragonal'

 elif [ $cell == 7 ]; then 

    echo 'Body Centered Tetragonal is not implemented yet'
    exit

 elif [ $cell == 8 ]; then

    b2a=`head -1 $FC_name.fc | cut -c 23-33 `
    c2a=`head -1 $FC_name.fc | cut -c 34-44 `
    b2a1=`echo "scale=8; 1./$b2a" | bc -l `
    c2a1=`echo "scale=8; 1./$c2a" | bc -l `

    cp  $PLOT_DIR/Include/Orthorhombic_Simple Kpts_tmp
    echo $b2a
    echo $c2a

    sed 's/XX/'$b2a1'/g' Kpts_tmp > ./Kpts_tmp1 
    sed 's/YY/'$c2a1'/g' Kpts_tmp1 > ./K_points 
    rm -f Kpts_tmp Kpts_tmp1

    echo 'Simple Orthorhombic'

 elif [ $cell == 9 ]; then
 
    echo 'Base  Centered Orthorhombic is not implemented yet'
    exit
    
 elif [ $cell == 10 ]; then

    echo 'Face Centered Orthorhombic is not implemented yet'
    exit 

 elif [ $cell == 11 ]; then

    echo 'Orthorhomic Body Centered is not implemented yet'
    exit
    
 elif [ $cell == 12 ]; then

 echo 'Monoclinic system is not implemented yet'
 exit

 elif [ $cell == 13 ]; then

 echo 'Monoclilic Base Centered  is not implemented yet'
 exit

 elif [ $cell == 14 ]; then

 echo 'Triclinic system is not implemented yet'
 exit

fi