1 set code [ catch {exec which charmm } ]
2 if { $code != 0 } {
3 set msg "Unsupported test: CHARMM executable not found in path"
4 puts stdout $msg
5 return $msg
6 }
7 #
8 # start charmm
9 #
10 # If you get 'Operation not permitted' errors from mknod you may need to move
11 # the CHARMM work directory onto a local (rather than NFS-mounted)
12 # file system - see the commented version of the line as an example.
13 #
14 charmm.preinit charmm_script=alamm.inp coords=charmm.c
15 #charmm.preinit charmm_script=alamm.inp coords=charmm.c work_directory=/tmp
16 #
17 energy theory=charmm coords=charmm.c energy=e
19 # end charmm
20 charmm.shutdown
22 set final_energy [ get_matrix_element matrix=e indices= {0 0 } ]
24 # -------- Check result ----------
25 set etest -0.05362787
26 if { abs( $final_energy - $etest ) > 1.0e-6 } {
27 chemerr "Failed .. E= $final_energy, should be $etest"
28 } else {
29 return OK
30 }

