VMD-L Mailing List
From: Adrian Jasiński (jasinski.adrian_at_gmail.com)
Date: Fri Dec 21 2012 - 04:52:41 CST
- Next message: Jack Bulat: "Re: python simple script"
- Previous message: maria goranovic: "Re: VMD not displaying represenations by line"
- Next in thread: Jack Bulat: "Re: python simple script"
- Reply: Jack Bulat: "Re: python simple script"
- Reply: Jack Bulat: "Re: python simple script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
mol1=Molecule()
mol1.load('/home/user/protein.pdb')
mol1.load('/home/user/protein.psf')
mol1.load('/home/user/protein.dcd')
prot=AtomSel('protein')
for i in range(0, 24001, 1000):
mol1.save('/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 vmd_python.py and I get the error: Traceback (most recent call last): File "VMD", line 23, in <module> File "/usr/local/lib/vmd/scripts/python/Molecule.py", line 139, in save nframes = molecule.write(self.id, filetype, filename, first, last, step, waitfor, selection=sel) TypeError: expected atomsel but script is working when I put sel=None
- Next message: Jack Bulat: "Re: python simple script"
- Previous message: maria goranovic: "Re: VMD not displaying represenations by line"
- Next in thread: Jack Bulat: "Re: python simple script"
- Reply: Jack Bulat: "Re: python simple script"
- Reply: Jack Bulat: "Re: python simple script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]