> Thanks, but I still failed to get this new pdb.
> 
> File -- Save molecular -->
> 
> I wish the present coordinate will be saved as a new pdb after rotation.

I guess with present coordinate you mean what you see on screen. To get 
this you need to transform the atom coordinates by current camera 
orientation before saving to file.

This python code will do that:

def transform_by_camera_rotation():
     view = list(cmd.get_view())
     M = view[0:3] + [-view[12]] + \
         view[3:6] + [-view[13]] + \
         view[6:9] + [-view[14]] + \
         view[12:15] + [1.]
     cmd.transform_selection('(all)', M, transpose=1)
     cmd.set_view([1,0,0,0,1,0,0,0,1] + view[9:])
cmd.extend('transform_by_camera_rotation', transform_by_camera_rotation)

Example:

fetch 2xwu
orient
transform_by_camera_rotation
save /tmp/withneworientation.pdb

Cheers,
   Thomas

--
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen

------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
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

Reply via email to