/usr/share/doc/viewmol/html/node33.html is in viewmol 2.4.1-24+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--****************************************************************************
* *
* Viewmol *
* *
* N O D E 3 3 . H T M L *
* *
* Copyright (c) Joerg-R. Hill, October 2003 *
* *
********************************************************************************
*-->
<html>
<head>
<title>15 Programming Your Own Output Filter</title>
<META NAME="description" CONTENT="15 Programming Your Own Output Filter">
<META NAME="keywords" CONTENT="viewmol">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="STYLESHEET" href="viewmol.css">
<link rel="first" href="viewmol.html">
</head>
<body>
<H1><A NAME="SECTION0001500000000000000000">
15 Programming Your Own Output Filter</A>
</H1>
V<SMALL>IEWMOL</SMALL> can be easily adapted to write files in any format. All you have
to do is to write a new output filter which formats the data provided by
V<SMALL>IEWMOL</SMALL>. These output filters are stand-alone programs and can be written
in every programming language you want. Examples in awk are included.
<P>
The output filter has to accept the following data from its standard input and
write them to a file whose name is given as a command line parameter to the
filter. V<SMALL>IEWMOL</SMALL> passes the following data groups to the output filter:
<UL>
<LI>the unit cell (if present) is sent in the following format (a, b, and
c in atomic units, the angle in degrees)
<dl><dd><pre class="verbatim">
$unitcell a b c alpha beta gamma
</pre></dl>
</LI>
<LI>the cartesian coordinates are sent in the following format (in atomic
units)
<dl><dd><pre class="verbatim">
$coord
x1 y1 z1 symbol1
x2 y2 z2 symbol2
...
</pre></dl>
</LI>
<LI>the bond information is sent in the following format
<dl><dd><pre class="verbatim">
$bonds
atom1 atom2 bond_order
...
</pre></dl>
where <code>atom1</code> and <code>atom2</code> are the numbers of the atoms
according to the list in <code>$coord</code> which form the bond.
<code>bond_order</code> is the actual order of the bond, -2 if the
bond is part of a conjugated system, or -1 if it is a hydrogen
bond.
</LI>
</UL>
<code>$end</code> is passed to the output filter as last line.
<P>
<p><hr>
<ADDRESS>
<a href="mailto:joehill@users.sourceforge.net"><i>Jörg-Rüdiger Hill</i></a> Fri Oct 31 14:19:21 CET 2003
</ADDRESS>
</BODY>
</HTML>
|