~ubuntu-branches/ubuntu/precise/psicode/precise

« back to all changes in this revision

Viewing changes to tests/cc15/cc15.test.pl

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/perl  
2
 
 
3
 
while ($ARGV = shift) {
4
 
  if   ("$ARGV" eq "-q") { $QUIET = 1; }
5
 
  elsif("$ARGV" eq "-i") { $SRC_PATH = shift; }
6
 
  elsif("$ARGV" eq "-x") { $EXEC_PATH = shift; }
7
 
}
8
 
 
9
 
if($SRC_PATH ne "") {
10
 
  require($SRC_PATH . "/../psitest.pl");
11
 
}
12
 
else {
13
 
  require("../psitest.pl");
14
 
}
15
 
 
16
 
# build the command for the psi3 driver
17
 
$PSICMD = build_psi_cmd($QUIET, $SRC_PATH, $EXEC_PATH);
18
 
 
19
 
$TOL = 10**-8;
20
 
if($SRC_PATH ne "") {
21
 
  $REF_FILE = "$SRC_PATH/output.ref";
22
 
}
23
 
else {
24
 
  $REF_FILE = "output.ref";
25
 
}
26
 
$TEST_FILE = "output.dat";
27
 
$RESULT = "cc15.test";
28
 
 
29
 
system ("$PSICMD");
30
 
 
31
 
$FAIL = 0;
32
 
 
33
 
open(RE, ">$RESULT") || die "cannot open $RESULT $!"; 
34
 
select (RE);
35
 
printf "CC15:\n";
36
 
 
37
 
if (abs (seek_scf($REF_FILE) - seek_scf($TEST_FILE)) > $TOL) {
38
 
  fail_test("SCF Energy"); $FAIL = 1;
39
 
}
40
 
else {
41
 
  pass_test("SCF Energy");
42
 
}
43
 
 
44
 
if (abs (seek_bccd($REF_FILE) - seek_bccd($TEST_FILE)) > $TOL) {
45
 
  fail_test("B-CCD Energy"); $FAIL = 1;
46
 
}
47
 
else {
48
 
  pass_test("B-CCD Energy");
49
 
}
50
 
 
51
 
if (abs (seek_ccsd_t($REF_FILE) - seek_ccsd_t($TEST_FILE)) > $TOL) {
52
 
  fail_test("B-CCD(T) Energy"); $FAIL = 1;
53
 
}
54
 
else {
55
 
  pass_test("B-CCD(T) Energy");
56
 
}
57
 
close (RE);
58
 
 
59
 
system("cat $RESULT");
60
 
 
61
 
exit($FAIL);