Hello,
I'm trying to understand what seems like an inconsistency between PyMOL
commandline and python scripts. I have the following commandline script:
delete all
load ../4lzt_quasi.pdb, full
cmd.create("anew", "full", 1, 1)
cmd.alter_state(1,"anew" , "x,y,z = x+nm[(ID-1)*3],
y+nm[(ID-1)*3+1], z+nm[(ID-1)*3+2]")
iterate_state 1, full & id 1, print x, y,z
iterate_state 1, anew & id 1, print x, y,z
Which I then run:
PyMOL>@pymoltest1.txt
...
PyMOL>iterate_state 1, full & id 1, print x, y,z
2.6908474 4.5853815 13.698093
IterateState: iterated over 1 atom coordinate states.
PyMOL>iterate_state 1, anew & id 1, print x, y,z
2.41267466545 5.63420581818 12.6615524292
IterateState: iterated over 1 atom coordinate states.
Now I have this python script:
cmd.delete( all)
cmd.load( "../4lzt_quasi.pdb", "full")
cmd.create("anew", "full", 1, 1)
cmd.alter_state(1,"anew" , "x,y,z = x+nm[(ID-1)*3],
y+nm[(ID-1)*3+1], z+nm[(ID-1)*3+2]")
xyz1=[]
cmd.iterate_state(1, 'full & id 1', 'xyz1.append([x,y,z])')
xyz2=[]
cmd.iterate_state(1, 'anew & id 1', 'xyz2.append([x,y,z])')
print xyz1
print xyz2
Which I run:
PyMOL>run pymoltest1.py
[[2.69084741211, 4.58538146973, 13.69809265137]]
[[2.5646746158599854, 4.600205898284912, 13.6191040039]]
Why am I getting different coordinates for the second atom? The second
set of coordinates from the first script are actually the coordinates of
the 5th atom in my structure (CA of a LYS). I'm guessing that the
alter_state command is somehow doing something different in one and the
other case but it's hard to understand why.
Thanks for the help,
Pawel
--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net