From: Ashar Malik (asharjm_at_gmail.com)
Date: Sun Dec 27 2015 - 12:57:33 CST

If this is the only code you are using --- the error is very obvious ...
the first mention of the variable "all" is here:

[$all get chain]

however --- I can not see in the code where you have "set" this variable.
Regarding your comment --- "what is problem with this code"

there is no problem with this code -- you are trying to use it by just copy
pasting out of the tutorial (I am guessing).

Workaround:

You are not initializing the variable. Understand the tutorial --- as in
what is it that you are trying to do. I am guessing if you go back a few
commands in the tutorial you will find a reference to the variable "all".
Include that and it should work.

On Mon, Dec 28, 2015 at 7:01 AM, Mohsen Farshad <mohsen.farshad_at_maine.edu>
wrote:

> Hi all,
>
> In "Modeling Nanopores for Sequencing DNA" tutotial section 3-1-4-
> Generate PSF file I could not run make-psf.tcl code. (error: can't read
> "all": no such variable). I put the TCL code below, please let me know what
> is problem with this code.
>
> package require psfgen
> resetpsf
> topology top_all27_na.rtf
> makingforeach chain [lsort -unique [$all get chain]] {
> set sel [atomselect top "chain $chain and name C1'"]
> set seg DNA$chain
> segment $seg {
> first 5TER
> last 3TER
> pdb dsdna_$chain.pdb
> }
> foreach resid [$sel get resid] resname [$sel get resname] {
> if { $resname eq "THY" || $resname eq "CYT" } {
> patch DEO1 $seg:$resid
> } elseif { $resname eq "ADE" || $resname eq "GUA" } {
> patch DEO2 $seg:$resid
> }
> }
> coordpdb dsdna_$chain.pdb $seg
> }
> guesscoord
> writepsf dsdna.psf
> writepdb dsdna.pdb
>

-- 
Best,
/A