From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jun 13 2006 - 15:51:24 CDT

Hi,
  Try this instead:

import Molecule as mol
import AtomSel as sel
import vmdnumpy
import graphics as gl
import molecule
import trans

m = mol.Molecule()
m.load('1di9', filetype='webpdb')
mid = int(m)

i=0
cas = sel.AtomSel('name CA', mid)
cas.frame(i)
cas.write('frame' + str(i) + '.pdb', 'pdb');

On Sat, Jun 10, 2006 at 01:19:11PM +0200, Per Jr. Greisen wrote:
> Hey,
>
> I am trying to use the python interface to write each frame from a
> simulation to a pdb file using the function write in AtomSel likes this:
>
> ca = AtomSel(frame=i)
> ca.write(self,'frame'+str(i),'pdb')
>
> but gets the error self not a name?
>
> How to fix this
>
> Thanks in advance
>
>
> --
> Best Regards
>
> Per Jr. Greisen
> +4528648657

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078