From: Takuro UDAGAWA (
Date: Mon Dec 05 2011 - 04:37:40 CST


I'm now carrying out membrane proteins tutorial with VMD1.9 and NAMD 2.8.
And I have several questions and problems in using keep_water_out.tcl

Firstly, there is "watexcept" variable in keep_water_out.tcl script.
I can't understand why I have to set this variable and how to find which
atoms are exception.
Could anyone please tell me that?

Next, the problem is I couldn't execute NAMD with keep_water_out.tcl
script on.
When I ran "Minimization and Equilibration with Protein Constrained", I
got following error.

    FATAL ERROR: atom not found
         while executing
    "atomid $segname $resid $atom"
         ("foreach" body line 4)
         invoked from within
    "foreach atomrecord $waters_list {
         foreach {segname resid atom} $atomrecord { break }
         set atomindex [atomid $segname $re..."
         (file "keep_water_out.tcl" line 124)

I printed $waters_list and $atomrecord, like

    print $waters_list
    foreach atomrecord $waters_list {
         print $atomrecord
         foreach {segname resid atom} $atomrecord { break }
         set atomindex [atomid $segname $resid $atom]
         set flag 0
         foreach excep $watexcept {
             if ($atomindex==$excep) {
                 set flag 1
         if ($flag==0) {
             lappend waters $atomindex
             addatom $atomindex

Then I found that $waters_list did contain a lot of atoms and
$atomrecord was properly set partway.
But suddenly atom not found error occurred.
This error always occurs in the same place.
I uploaded the log file that contain the result of print variables, namd
configuration file and keep_water_out.tcl because the log file seems too
large to send via mailing list.
You can download the files at

Could anyone please give me a comment about this problem?

Note that when I used the "example-output" data of the tutorial, NAMD
successfully ran.


Takuro Udagawa

** Visit for more info on majordomo