Exit Command Failure

From: Sarah Sweger (swegers_at_duq.edu)
Date: Thu Jun 23 2016 - 08:01:09 CDT

Dear NAMD Users:

I have written a simple tcl code to implement into NAMD through NAMD tclForces to track the length of time a simulation runs based off of distance between two proteins. The code below takes atom coordinates from two proteins and sets them to groupId1 and groupId2 ( I have replaced the numbers for simplicity, the actual system has over 6000 atoms). The calcforces loads the coordinates from each group and calculates a distance between each group. I want to stop the simulation based off of certain distance parameters. The exit command should exit cleanly and write the output files when one of the parameters of the if statement is met. However, it stops running the NAMD simulation but does not actually exit or write the output files. I cannot figure out why this is occurring or any other way to achieve the goal.

Thanks,

Sarah

set groupId1 { [ 1 2 3 4 5 6 7 8 9 10 ] }

set groupId2 { [ 11 12 13 14 15 16 17 18 19 20 } ]

proc calcforces { } {
global groupId1 groupId2

loadcoords p

set dist [ getbond $p($groupId1) $p($groupId2) ]
print $dist

if { $dist <= 42.5 || $dist >= 50 } {
print "exiting"
print $dist
exit
}
}

This archive was generated by hypermail 2.1.6 : Sun Dec 31 2017 - 23:20:34 CST