From: Jason V. <jas...@sc...> - 2010-04-29 13:39:13
|
Hi Cun, That's a good start. Just a couple things needs to be changed. First, frames don't track coordinates, states do. Frames are for movies; states are for coordinates. Next, instead of using center, use the origin command with the state parameter specified. Here's example code for 1NMR a multi-state protein, adjust his for your application: python cmd.fetch("1nmr", async=0) coord=[] for i in range(1,cmd.count_states()+1): cmd.origin("i. 1-24", state=i) coord.append(cmd.get_position()) print coord python end Cheers, -- Jason On Thu, Apr 29, 2010 at 8:58 AM, Cun Zhang <apz...@gm...> wrote: > hi, > I have a pdb file with serveral frames, I hope to get the trajectory > of the center of a selected group of atoms. > I use the following commands, but return the same coord. > > cmd.load("a.pdb") > coord=[] > for i in range(cmd.count_frames()): > cmd.frame(i+1) > cmd.center('id 1-24') > coord.append(cmd.get_position()) > > > What should I do? > > Thank you! > > Zhang Cun > > -- > Blog: http://www.edwardpku.com/cun > > ------------------------------------------------------------------------------ > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) Jas...@sc... (o) +1 (603) 374-7120 |