There's a little jiffy program in OMAC called GS2MOLSC (the source is file://rose.bmc.uu.se/pub/gerard/gs2molsc.f), written by Rams here in Uppsala.
You save your view matrix in O as follows:
O > write .gs_real nice_view.o ;
This file looks as follows:
.GS_REAL R 20 (8(x,f8.4)) 0.5535 21.8430 1.2260 4.0530 0.0209 -0.1431 0.1057 0.0000 0.1761 0.0017 -0.0326 0.0000 0.0251 0.1077 0.1409 0.0000 -0.7748 2.6863 -2.8390 1.0000
Then you run GS2MOLSC:
% 649 gerard rigel 22:39:08 pg/o > omac/GS2MOLSC Name of "O" gs_real file : nice_view.o Name of MOLSCRIPT include file : nice_view.molsc
The result is a small file which you must include in your MOLSCRIPT input file:
by rotation 0.02090
0.17610
0.02510
-0.14310
0.00170
0.10770
0.10570
-0.03260
0.14090 ;
Note added on 931202: Janet Smith has written a better program called O2MOL. Fortran source code and SGI executable are also in the OMAC directory. In O, do:
write .gs-real gsreal.odb (3f15.10)
then do:
omac/O2MOL < gsreal.odb
and cut and paste the output into your MolScript input file. Janet wrote:
"I have [uploaded] a program for converting the O display matrix into MolScript commands. It is called o2mol.f and should be compatible with any Fortran compiler.
o2mol takes a .gs_real datablock, extracts the scale factor, orthogonalizes the matrix (in a subroutine by Morten Kjelgaard), and produces three outputs:
This transformation, when applied to stored atomic coordinates, will produce new coordinates in Angstroms with the current screen center as the origin."