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 77 78 79 80 81 82 83 84
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--****************************************************************************
* *
* Viewmol *
* *
* N O D E 3 1 . H T M L *
* *
* Copyright (c) Joerg-R. Hill, December 2000 *
* *
********************************************************************************
*-->
<!--Converted with LaTeX2HTML 99.2beta8 (1.46)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Programming Your Own Output Filter</TITLE>
<META NAME="description" CONTENT="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=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="viewmol.css">
</HEAD>
<BODY LANG="EN" BGCOLOR="#FFFFFF">
<H1><A NAME="SECTION000140000000000000000">
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)
<PRE>
$unitcell a b c alpha beta gamma
</PRE>
</LI>
<LI>the Cartesian coordinates are sent in the following format (in atomic
units)
<PRE>
$coord
x1 y1 z1 symbol1
x2 y2 z2 symbol2
...
</PRE>
</LI>
<LI>the bond information is sent in the following format
<PRE>
$bonds
atom1 atom2 bond_order
...
</PRE>
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>
<BR><HR>
<ADDRESS>
<A HREF="mailto:joehill@users.sourceforge.net"><I>Jrg-Rdiger Hill</I></A><BR>Sun Dec 10 17:38:35 MET 2000
</ADDRESS>
</BODY>
</HTML>
|