File: RunTest.sh

package info (click to toggle)
cpptraj 5.1.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 138,900 kB
  • sloc: cpp: 145,621; ansic: 34,635; sh: 11,365; f90: 971; makefile: 770; awk: 242
file content (57 lines) | stat: -rwxr-xr-x 1,550 bytes parent folder | download
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
#!/bin/bash

. ../MasterTest.sh

CleanFiles cluster.in CpptrajPairDist *.rmsd.dat *.summary.dat *.info.dat \
           *.half.dat *.nc.c? *.pdb *.agr *.out *.sil.*.dat

INPUT="-i cluster.in"
TESTNAME='Cluster with sieve tests'
Requires netcdf
Cluster() {
  PREFIX=$1
  if [ "$PREFIX" = 'random' ] ; then
    RNG='rng setdefault marsaglia'
  else
    RNG=''
  fi
  SIEVEARG=$2
  SAVEARG=$3
  cat > cluster.in <<EOF
parm ../tz2.parm7
trajin ../tz2.nc
#debug analysis 2
$RNG
cluster crd1 @CA clusters 5 rms out $PREFIX.out summary $PREFIX.summary.dat info $PREFIX.info.dat \
        clusterout $PREFIX.nc clusterfmt netcdf summaryhalf $PREFIX.half.dat cpopvtime $PREFIX.cpop.agr splitframe 24 \
        repout $PREFIX.rep.pdb repfmt pdb $SIEVEARG $SAVEARG sil $PREFIX.sil
EOF
  RunCpptraj "Cluster, $PREFIX $SAVEARG"
  DoTest $PREFIX.info.dat.save $PREFIX.info.dat
  DoTest $PREFIX.half.dat.save $PREFIX.half.dat
  DoTest $PREFIX.sil.cluster.dat.save $PREFIX.sil.cluster.dat
}

SIEVEARGS="sieve 5 bestrep cumulative includesieveincalc"

# Test sieving
Cluster nosieve
Cluster sieve5 "$SIEVEARGS"

# Test loading/saving of pairdist file with/without sieve
Cluster nosieve " " savepairdist
Cluster nosieve " " loadpairdist
Cluster sieve5 "$SIEVEARGS" savepairdist
NcTest sieve5.nc.c0.save sieve5.nc.c0
Cluster sieve5 "$SIEVEARGS" loadpairdist

# Test pairwise no memory
Cluster nosieve " "       "pairwisecache none"
Cluster sieve5  "$SIEVEARGS" "pairwisecache none"

# Test random sieving
Cluster random "$SIEVEARGS random sieveseed 1"

EndTest

exit 0