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
|
#!/bin/bash
. ../MasterTest.sh
CleanFiles cpptraj.in temperature.dat rmsd.dat ene.dat offset.*.dat
TESTNAME='TNG read test'
Requires tng maxthreads 10
INPUT='-i cpptraj.in'
TestTng() {
UNITNAME=$TESTNAME
trajin_args=$1
refcmd=''
rmsref='first'
xmin=0
xstep=10
tout='temperature.dat'
rout='rmsd.dat'
eout='ene.dat'
skiptest=0
if [ ! -z "$trajin_args" ] ; then
UNITNAME="$TESTNAME (with offset)"
refcmd='reference md_1_1.tng 1'
rmsref='reference'
xmin=10
xstep=20
tout='offset.temperature.dat'
rout='offset.rmsd.dat'
eout='offset.ene.dat'
CheckFor maxthreads 4
skiptest=$?
fi
if [ $skiptest -eq 0 ] ; then
cat > cpptraj.in <<EOF
parm topol.parm7
noprogress
$refcmd
trajin md_1_1.tng $trajin_args
# Temperature calc tests velocity read
temperature MyTemp ntc 2 out $tout xmin $xmin xstep $xstep prec 12.7
# Energy (specifically kinetic VV) tests velocity/force read.
# It is probably not correct since this really requires the half
# step velocities, but is good enough for a regression test.
energy MyEne ^1 out $eout xmin $xmin xstep $xstep prec 12.7 \
kinetic ketype vv dt 0.002
# RMSD tests coordinates read
rms MyRms $rmsref ^1&@C,CA,N
run
# Convert RMSD to nm
MyRmsNm = MyRms / 10.0
writedata $rout xmin $xmin xstep $xstep MyRmsNm prec 12.7
EOF
RunCpptraj "$UNITNAME"
if [ -z "$trajin_args" ] ; then
DoTest temperature.dat.save temperature.dat
DoTest rmsd.dat.save rmsd.dat
DoTest ene.dat.save ene.dat
else
DoTest offset.temperature.dat.save offset.temperature.dat
DoTest offset.rmsd.dat.save offset.rmsd.dat
DoTest offset.ene.dat.save offset.ene.dat
fi
fi
}
TestTng
TestTng "2 8 2"
EndTest
exit 0
|