From: Adrian Jasiński (
Date: Fri Dec 21 2012 - 04:52:41 CST

hi all

I just want to write simple python script
I want to read psf pdb and dcd
make a selection of protein structure and write it to file for some of
frames (each frame to indyvidual file).
but I have some error with selection and I don't know why
can you help me?
my script look like that:
from Molecule import *
from AtomSel import AtomSel


for i in range(0, 24001, 1000):'/home/user/frames/frame%s.pdb' % i, 'pdb', first = i, last =
i, step = 1, sel=prot)*

I run this script by command:
vmd -python -e
and I get the error:
Traceback (most recent call last):
  File "VMD", line 23, in <module>
  File "/usr/local/lib/vmd/scripts/python/", line 139, in save
    nframes = molecule.write(, filetype, filename, first, last,
step, waitfor, selection=sel)
TypeError: expected atomsel
but script is working when I put sel=None