| 1 | # -----------------------------------------------------------------------------
|
|---|
| 2 | # Print the camera location and angular field of view to the horizontal edges
|
|---|
| 3 | # of the window for each position saved with "savepos". Output is in the
|
|---|
| 4 | # Reply Log (Favorites menu).
|
|---|
| 5 | #
|
|---|
| 6 | # The Camera always points in the negative z direction in the Chimera global
|
|---|
| 7 | # coordinate system and the models are moved to see different orientations.
|
|---|
| 8 | #
|
|---|
| 9 | # This cycles through the positions with the "reset" command so the view
|
|---|
| 10 | # is changed after running the script.
|
|---|
| 11 | #
|
|---|
| 12 | from chimera import viewer, runCommand
|
|---|
| 13 | cam = viewer.camera
|
|---|
| 14 |
|
|---|
| 15 | from Midas import positions
|
|---|
| 16 | pnames = positions.keys()
|
|---|
| 17 | pnames.sort()
|
|---|
| 18 |
|
|---|
| 19 | for pname in pnames:
|
|---|
| 20 | runCommand('reset ' + pname)
|
|---|
| 21 | cx,cy,cz = cam.center
|
|---|
| 22 | fov = cam.fieldOfView
|
|---|
| 23 | print '%15s %9.6g %9.6g %9.6g %9.6g' % (pname, cx, cy, cz, fov)
|
|---|