GTS output file format


As of povscript+ 2.12, its possible to *save* the output from any surface, so you can read it in to any other program, if so desired. (They can also be read back in to povscript+ using the "readsurf" command, as of povscript+ 2.13) In order to do so, simply add an output option to any contour/drawsurf command:

contour 2fofc at 1.0 covering require in residue 100 output "2fofc.gts";
which will draw the map "2fofc" at 1.0 sigma around residue 100, but will also output the resulting surface to a file "2fofc.gts" in the current directory. Thats it!

Here's another example:

drawsurf surf output "surf.gts";
which would simply draw the surface "surf" (with no residue selection, so the entire surface will be drawn) and output it to the file "surf.gts".

The file format of the output file follows that of any GTS surface, as described here:

All the lines beginning with GTS_COMMENTS (typically # or !) are ignored. The first line contains three unsigned integers separated by spaces. The first integer is the number of vertices, nv, the second is the number of edges, ne and the third is the number of faces, nf.

Follows nv lines containing the x, y and z coordinates of the vertices. Follows ne lines containing the two indices (starting from one) of the vertices of each edge. Follows nf lines containing the three ordered indices (also starting from one) of the edges of each face.
with the exception in the povscript+ case that each vertex actually takes up 3 lines, in order to allow for a normal and color vertex descriptor. Each vertex, then, appears like so:
0.420899 -2.2258 -0.970155
-0.210272 0.802604 -0.558223
0.6 0.6 0.6
where the first 3 values represent the vertex x,y,z, the second line represents the normal vector at this vertex, and the third line is the color (RGB space, in the range of 0-1.0 for each) of that particular vertex.


Go back to the povscript+ home page