Subject: Re: MOPAC7 port to an RS/6000

From: [email-masked] (System Admin (Mike Peterson))
Date: Tue, 23 Nov 93 08:55:56 -0500

I finally got MOPAC 93 (the licensed version of MOPAC 7) to work
on our HP-UX (9.01) and Domain/OS (SR10.4) systems, but many changes
were required. Here is the text summary of what I did; I will send
the complete context diff patches to anyone who asks. I am somewhat
surprised that these changes have not propagated back to QCPE
by now since I sent them in 2 months ago.

		CHANGES TO MOPAC 93
		===================

Version: 1993/09/18.

The following changes were made to MOPAC 93 (version 93.00)
to allow it to run corectly on HP 7xx series systems running
HP-UX 9.01 and HP/Apollo Domain/OS DN10000 systems.

Even with these changes, the 'mopac_examples/testall.dat' data
set still fails test cases 1-3 and 6 (they are labelled as
"Ethylene" but are in fact HCNH+).

Special notes:

*_source/Makefile:
	It is essential that MOPAC be compiled with static data
	storage (so that all subroutine local variables are SAVEd
	between calls), as opposed to using the "stack" (or dynamic
	data storage). Doing this also automatically zeroes all
	undefined variables on the HP, and this is recommended for
	all systems. Many routines have SAVE statements in them,
	but MOPAC does not work properly with just those statements.
	Some Makefile's have features in them which do not work
	with the version of make distributed with many systems;
	the fancy stuff has been replaced with regular commands.
	Recursive Makefiles changed to allow environment
	variables to be recovered (change ' to " in the 'make'
	command).

bz_source/orient.f:
	It is illegal to read CHARACTER data with '*' format
	unless the character strings are surrounded by ' characters
	in the input file. The program was changed to scan for
	the TITLE after reading the INTEGER/REAL values with '*'.

bz_source/tkhard.f, density_source/tkhard.f:
	This routine creates a Tektronix 4010 graphics file,
	which can either be displayed on a PC running MS-KERMIT,
	or printed directly on a Imagen laser printer, or converted
	to PostScript with 'tek2ps'.

mopac_source/ef.f, mopac_source/flepo.f, mopac_source/nllsq.f,
mopac_source/powsq.f, mopac_source/wrtkey.f:
	Changed timing data formats since machines are so fast
	that timing resolution down to ten of milliseconds is
	required to run many of the test cases.

mopac_source/calpar.f:
	The DO 40 loop doesn't go over element 102 (Cb), so the correction
	made to the source code may be incorrect (at least it now
	produces the same output as the original Sun version).

mopac_source/drc.f:
	'*' format for long strings is not consistent across platforms,
	and results in 2 lines of titles on some systems.

mopac_source/esp.for:
	Routine ELESP does two OPENs on the ESP data output file;
	the second one fails since it tries to open a scratch file
	as "NEW" which is illegal.

mopac_source/repp.f:
	This routine divides by zero for capped bonds, which aborts
	the job on some systems and does lots of arithmetic with
	NaN/INF values on others; the code was modified to return
	all zeroes when this case was detected, but this may not
	be the correct action to take.

mopac_source/second.f:
	Attempts to REWIND unit 4 before OPEN; the REWIND was moved
	inside the OPEN/CLOSE.

mopac_source/wrtkey.f:
	The values for "T=" and "DUMP=" are not reset to a default
	value at the start of a new calculation, but are set to the
	time left from the last calculation, and the last specified
	DUMP value respectively; this is not documented in the manual,
	and nothing has been done by me to correct the situation, if
	it should be corrected since this seems to be the historical
	behaviour.
	The code to remove DEBUG keywords has been modified since
	the DEBUG keywords are not printed in the output file if
	this is done, and the removal was done in a way where either
	all of the keywords would be removed, or just until the first
	one was found, with the difference due to the vendor's FORTRAN
	implementation and optimization level used.

mopac_examples/port.dat, mopac_examples/testall.dat:
	Many timing changes made for "restart" jobs to work properly;
	MOPAC desparately needs a facility to kill the job after
	a specific number of iterations, so that test jobs can
	be made machine-independent.

Mike.