~ubuntu-branches/ubuntu/karmic/psicode/karmic

« back to all changes in this revision

Viewing changes to tests/mp2r12-sp1/mp2r12-sp1.test.pl

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2009-02-23 00:12:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223001202-rutldoy3dimfpesc
Tags: 3.4.0-1
* New upstream release.

[ Michael Banck ]
* debian/patches/01_DESTDIR.dpatch: Refreshed.
* debian/patches/02_FHS.dpatch: Removed, applied upstream.
* debian/patches/03_debian_docdir: Likewise.
* debian/patches/04_man.dpatch: Likewise.
* debian/patches/06_466828_fix_gcc_43_ftbfs.dpatch: Likewise.
* debian/patches/07_464867_move_executables: Fixed and refreshed.
* debian/patches/00list: Adjusted.
* debian/control: Improved description.
* debian/patches-held: Removed.
* debian/rules (install/psi3): Do not ship the ruby bindings for now.

[ Daniel Leidert ]
* debian/rules: Fix txtdir via DEB_MAKE_INSTALL_TARGET.
* debian/patches/01_DESTDIR.dpatch: Refreshed.

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 = "mp2r12-sp1.test";
28
 
 
29
 
system ("$PSICMD");
30
 
 
31
 
$FAIL = 0;
32
 
 
33
 
open(RE, ">$RESULT") || die "cannot open $RESULT: $!";
34
 
select (RE);
35
 
printf "MP2R12-SP1:\n";
36
 
 
37
 
if (abs(seek_nuc($REF_FILE) - seek_nuc($TEST_FILE)) > $TOL) {
38
 
  fail_test("Nuclear Repulsion Energy"); $FAIL = 1;
39
 
}
40
 
else {
41
 
  pass_test("Nuclear Repulsion Energy");
42
 
}
43
 
 
44
 
if (abs(seek_scf($REF_FILE) - seek_scf($TEST_FILE)) > $TOL) {
45
 
  fail_test("RHF Energy"); $FAIL = 1;
46
 
}
47
 
else { 
48
 
  pass_test("RHF Energy");
49
 
}
50
 
 
51
 
if (abs(seek_mp2r12_mp2($REF_FILE) - seek_mp2r12_mp2($TEST_FILE)) > $TOL) {
52
 
  fail_test("MP2 Energy"); $FAIL = 1;
53
 
}
54
 
else { 
55
 
  pass_test("MP2 Energy");
56
 
}
57
 
 
58
 
if (abs(seek_mp2r12($REF_FILE) - seek_mp2r12($TEST_FILE)) > $TOL) {
59
 
  fail_test("MP2-R12 Energy"); $FAIL = 1;
60
 
}
61
 
else {
62
 
  pass_test("MP2-R12 Energy");
63
 
}
64
 
 
65
 
close (RE);
66
 
 
67
 
system("cat $RESULT");
68
 
 
69
 
exit($FAIL);
70