File: xc-reset-regression

package info (click to toggle)
libxc 5.2.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196,988 kB
  • sloc: ansic: 31,506; f90: 3,369; perl: 1,392; python: 966; makefile: 425; sh: 318
file content (51 lines) | stat: -rwxr-xr-x 1,256 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/env bash

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

if [ -z "$srcdir" ]; then
  srcdir="./"
fi

if [ -z "$builddir" ]; then
  builddir="./"
fi

systems="H Li BrOH BrOH+"
funcs=$*
if [[ "$funcs" = "" ]]; then
  funcs=$(awk '{print $2}' ${builddir}../src/xc_funcs.h)
fi

for func in $funcs; do
  # Make sure name is in correct format
  func=$(echo $func | awk '{print tolower($0)}' | sed 's/^xc_//g')

  echo "processing $func"

  dir=${func%%_*}
  tmp=${func//${dir}_/}
  if [ "x$dir" = "xhyb" ]; then
    dir=${dir}_${tmp%%_*}
    tmp=${func//${dir}_/}
  fi
  dir=${dir}_${tmp%%_*}

  for system in $systems; do
    for spin in pol unpol; do
      if [ "x$spin" = "xunpol" ]; then
        nspin=1
      else
        nspin=2
      fi
      for order in 0 1; do # change to 0 1 2 to get also fxc
        refname=$func.$system.$spin.$order

        $builddir/xc-regression $func $nspin $order $srcdir/input/$system $srcdir/regression/$dir/$refname > /dev/null
        rm -f $srcdir/regression/$dir/$refname.bz2
        bzip2 $srcdir/regression/$dir/$refname
      done
    done
  done
done