Subject: G92 : Archives

From: Frederick Bennett <[email-masked]>
Date: Mon, 22 Aug 1994 16:46:10 +0200

Hi all,
       does anybody no of some program or utility that can take a gaussian
archive entry and turn it into something easy to read. Especially for
frequency calculations were the archive can be quite long and meaningless to
the naked eye (or mine at least).

Regards

Fred

======================================================
Papernet Address :  Frederick R. Bennett
                    Institute for Physical Chemistry
                    Klingelbergstrasse 80
                    CH-4056 Basel
                    Switzerland

Mouthnet Address :  [41]-(61)-267-3821

Internet Address :  [email-masked]

======================================================

---

From: Dongchul Lim <[email-masked]>
Date: Mon, 22 Aug 94 14:09:18 EDT

> the naked eye (or mine at least).

I use the following 'awk' script to extract zmatrix from 
gaussian archive or output. Cut out the script, name it 'extract' or
whatever and make it executable (chmod +x extract).
Examples of its usage are

% extract file.log > file.com
% extract file.arch > file.com
% zcat file.log.Z | extract > file.com

where file.log is a gaussian output and file.arch is a gaussian
archive file. Creating an archive from gaussian output is real easy.
The following one-line awk script will do the job.
E.g.,
% archive file.log > file.arch

--------- CUT HERE (archive) ---------
#!/usr/bin/nawk -f
/(1\\1\\)/ {while (getline > 0) {print; if (match($0,/@/)) exit;}}
--------- CUT HERE (archive) ---------

-Dongchul Lim
 Dept. of Chem., Yale Univ., [email-masked]

---------- CUT HERE (extract) ------------------------------------------
#! /usr/bin/nawk -f
# @(#) extract - extract Gaussian zmatrix from an archive file

!/(1\\1\\)/	{next;}	# beginning of the archive
!/#/	{while (getline > 0) if (match($0, /#/)) break;}
{
	prev = substr($0, index($0, "#"));
	gsub(/\\/, "\n", prev);
	while (getline > 0) {
		if (match($0,/\@/)) break;
		sub(/^[ \t]+/, "", $0);
		gsub(/\\/, "\n", $0);
		card = sprintf("%s%s", prev, $0);
		n = index(card, "Version");	# mark the end
		if (n > 0) {	# done
			printf("%s", substr(card, 1, n-1));
			break;
		}
		printf("%s", prev);
		prev = $0;
	}
	exit;
}