File: RunTest.sh

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

. ../MasterTest.sh

CleanFiles charmm.in test.ala3.pdb.? test.ala3.pdb.10 first.ala3.crd \
           test.psf test.ala3.dcd second.ala3.crd strip.chamber.parm7 \
           run0.res_0.mol2 cpptraj.psf cpptraj.cor

TESTNAME='Charmm DCD tests'
Requires maxthreads 10

INPUT="-i charmm.in"
cat > charmm.in <<EOF
parm ala3.psf
trajin ala3.dcd 1 10
trajout test.ala3.pdb pdb multi chainid X
EOF
RunCpptraj "CHARMM PSF/DCD test"
DoTest test.ala3.pdb.save test.ala3.pdb.1

# Second test: Read in 10 frames of a dcd traj, write
# both an Amber coord and dcd traj. Then read the written
# dcd traj and convert to second amber traj. Compare the
# written amber trajs
cat > charmm.in <<EOF
parm ala3.psf
trajin ala3.dcd 1 10
trajout first.ala3.crd
trajout test.ala3.dcd dcd
EOF
RunCpptraj "CHARMM DCD Write, step 1."

cat > charmm.in <<EOF
parm ala3.psf
trajin test.ala3.dcd
trajout second.ala3.crd
EOF
RunCpptraj "CHARMM DCD Write, step 2."
DoTest first.ala3.crd second.ala3.crd

# Third test; psf -> psf
cat > charmm.in <<EOF
parm ala3.psf
parminfo
parmwrite out test.psf
EOF
#RunCpptraj "CHARMM PSF Write test."

# CHAMBER strip test
cat > charmm.in <<EOF
parm chamber.ala3.parm7
parmstrip :2-3
parmwrite out strip.chamber.parm7
quit
EOF
RunCpptraj "CHAMBER topology read/strip test."
DoTest strip.chamber.parm7.save strip.chamber.parm7 -I %VERSION

UNITNAME='Read CHARMM restart'
CheckFor maxthreads 1
if [ $? -eq 0 ] ; then
  cat > charmm.in <<EOF
parm ala3.psf
trajin run0.res_0
trajout run0.res_0.mol2
EOF
  RunCpptraj "$UNITNAME"
  DoTest run0.res_0.mol2.save run0.res_0.mol2
fi

UNITNAME='CHARMM PSF write'
cat > charmm.in <<EOF
parm ala3.psf
parmwrite out cpptraj.psf
EOF
RunCpptraj "$UNITNAME"
DoTest cpptraj.psf.save cpptraj.psf

UNITNAME='CHARMM COORdinates test'
CheckFor maxthreads 1
if [ $? -eq 0 ] ; then
  cat > charmm.in <<EOF
parm ala3.psf
trajin ala3.min.cor
trajout cpptraj.cor segid ALA3
EOF
  RunCpptraj "$UNITNAME"
  DoTest cpptraj.cor.save cpptraj.cor
fi

EndTest

exit 0