VMD-L Mailing List
From: Josh Vermaas (vermaas2_at_illinois.edu)
Date: Mon Jan 28 2013 - 14:12:43 CST
- Next message: Caio S. Souza: "Re: NameError: name 'AtomSel' is not defined"
- Previous message: Albert: "NameError: name 'AtomSel' is not defined"
- In reply to: Albert: "NameError: name 'AtomSel' is not defined"
- Next in thread: Albert: "Re: NameError: name 'AtomSel' is not defined"
- Reply: Albert: "Re: NameError: name 'AtomSel' is not defined"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Looks like you might be missing an import statement? I'm not sure what
else is in the script, but at the top of script.py you'll need a line like:
from AtomSel import *
See the RMS example in the User Guide
(http://www.ks.uiuc.edu/Research/vmd/vmd-1.9.1/ug/node166.html) to see
how VMD's python interface expects it's imports to take place.
-Josh Vermaas
On 01/28/2013 11:38 AM, Albert wrote:
> Hello:
>
> I am trying to run a python script by command:
>
> vmd input.mae 011.dtr -python -dispdev text -e script.py
>
> but it said:
>
> Info) Text interpreter now Python
> Traceback (most recent call last):
> File "VMD", line 12, in <module>
> NameError: name 'AtomSel' is not defined
>
> here is the line claimed:
>
> x=AtomSel("resname T3P and within 6 of protein",frame=i) # change
> selection here
>
> Does anybody have any idea?
>
> thank you very much
> best
> Albert
- Next message: Caio S. Souza: "Re: NameError: name 'AtomSel' is not defined"
- Previous message: Albert: "NameError: name 'AtomSel' is not defined"
- In reply to: Albert: "NameError: name 'AtomSel' is not defined"
- Next in thread: Albert: "Re: NameError: name 'AtomSel' is not defined"
- Reply: Albert: "Re: NameError: name 'AtomSel' is not defined"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]