MOTECC-90: Modern Techniques in Computational Chemistry. Input/Output Documentation

22
LABORATOIRE DE CHIMIE THEORIQUE APPLIQUEE, FACULTES UNIVERSITAIRES NOTRE DAME DE LA PAIX, B-5000 NAMUR, BELGIUM DOCUMENTATION FOR THE AB INITIO POLYMER PROGRAM PLH These notes constitute the documentation of the ab initio polymer program PLH and mainly of its input. We would greatly appreciate any comments, suggestions and improvements which could be made. J.G.Fripiat E-mail: fripiat @scf.fundp.ac.be PHONE: 32-81-724551 J.M. André E-mail: andre @scf.fundp.ac.be PHONE: 32-81-724553 FAX: 32-81-724530

Transcript of MOTECC-90: Modern Techniques in Computational Chemistry. Input/Output Documentation

LABORATOIRE DE CHIMIE THEORIQUE APPLIQUEE, FACULTES UNIVERSITAIRES NOTRE DAME DE LA PAIX,

B-5000 NAMUR, BELGIUM

DOCUMENTATION FOR THE AB INITIO POLYMER PROGRAM PLH

These notes constitute the documentation of the ab initio polymer program PLH and mainly of

its input. We would greatly appreciate any comments, suggestions and improvements which could be made.

J.G.Fripiat E-mail: fripiat @scf.fundp.ac.be PHONE: 32-81-724551 J.M. André E-mail: andre @scf.fundp.ac.be PHONE: 32-81-724553 FAX: 32-81-724530

2

PLH-92 from MOTECC-92 PLH-92 from MOTECC-92

An Ab initio Polymer Program.

J.G. Fripiat, B. Champagne, D.H. Mosley, D. Vanderveken and J.M. André Laboratoire de Chimie Théorique Appliquée,

Facultés Universitaires Notre Dame de la Paix, B-5000 Namur, Belgium

1. Introduction

The P L H package computes the band structure of regular or helical polymers by an ab initio LCAO-SCF method taking into account the one dimensional translational symmetry. The theoretical aspects and equations from which the program is derived are reviewed in the "Modern Techniques for Computational Chemistry-MOTECC-92", E. Clementi Editor, ESCOM Publishing Co, Leiden 1990, Chapter xx.

This package consists of five consecutive program modules: 1. input of geometry and basis set (PLH0), 2. computation of one-electron integrals (PLH1), 3. test of possible linear dependence effects (PLLD), 4. calculation of two-electron integrals (PLH2), 5. SCF iterations, printing of energy bands and a short population analysis (PLH3)

A preliminary program (PLMDIS) is added to the package in order to test the input geometry. This program generates a file which can be used as an input for the KGNGRAF program.

The PLH system is interfaced to an highly interactive program (BANDDOS) for the ordering of band structure and display of the density of states, as well as its convolution. The program is written in Fortran and uses the IBM graPHIGS software based on the PHIGS standard. It optimally runs on IBM 5080 equipped with a 5085 or 5086 processor) a 6090 with a 6095 processor, or RS6000 workstations. All dialogues between the user and the graphics application are designed around the mouse, two menus, and LPFKeys. A panel describes the functionalities associated to the mouse and the LPFKeys. The graphic screen is designed to be divided in 3 views, the left part for the band structure, the middle one for the density of states, and the right part for the convolution of the density of states. The band structure is separated into three classes : core, valence, and unoccupied bands. All energy values are represented by a marker and a small rotating fixed length vector showing its local derivative.

3

The UNIX version distribution tape contains a main directory "plh" which is divided in six subdirectories and two files:

plh.doc ... The user manual of PLH program. profile_example ... An example of the ".profile" file where some variables

are defined. To install and to run plh programs, these variables must be defined.

The "src" subdirectory contains the Fortran and C source files: plhlib.f ... Library file. plhaix.f ... "System" library file for IBM AIX (RS6000) system. plhsun.f ... "System" library file for SUN UNIX system. plhfps.f ... "System" library file for FPS UNIX system. plh0.f ... Input and basis sets program. plh1.f ... One-electron integrals program. plh2.f ... Two-electron integrals program. plh3.f ... SCF iterations program. plld.f ... Test of possible linear dependence existence. plmdis.f ... Test of the molecular geometry. dtime.c ... Routine to compute the elapsed time. etime.c ... Routine to compute the elapsed time. loc_.c ... Routine to provide the address of a variable. loc.c ... Routine to provide the address of a variable. malloc_.c ... Routine to provide virtual storage. mallocf.c ... Routine to provide virtual storage (AIX). free_.c ... Routine to release virtual storage. freef.c ... Routine to release virtual storage (AIX). makefile ... the "makefile" to compile and link the plh system

The "aix" subdirectory contains the object files (AIX version). The "bin" subdirectory contains the script files and the "executable" files:

plh ... Script file to run the PLH program in the "background". It will call the "plh.exe" script file.

plh.exe ... Script file to run the PLH program.

The banddos subdirectory contains the BANDDOS system for band structures ordering and display of density of states:

banddos ... "executable" file banddos.f ... fortran source file banddos.install ... installation procedure script banddos.o ... object file bands ... fortran source codes to be included during the compilation

4

band ... fortran source codes to be included during the compilation

dos ... fortran source codes to be included during the compilation

globa ... fortran source codes to be included during the compilation grbands ... fortran source codes to be included during the

compilation grglobal ... fortran source codes to be included during the

compilation kemaix.o ... object file kemlib.o ... object file paramet ... fortran source codes to be included during the

compilation workst ... fortran source codes to be included during the

compilation li2.ord ... test data file.

Finally, there are several sample input files and the corresponding output in the "sample" subdirectory:

h2.data ... Sample input. li2.data ... Sample input. lihsto.data ... Sample input. polyt.data ... Sample input. polyt1.data ... Sample input. polyt2.data ... Sample input. lihsto.output ... Sample output polyt.output ... Sample output. polyt1.output ... Sample output. polyt2.output ... Sample output.

The present version of this package accepts only s and p atomic orbitals. The total number of atoms and shells in the unit cell are limited to 50 and 80, respectively. A maximum of 6 primitive Gaussians is allowed to represent an atomic orbital.

The total number of atomic orbitals per unit cell is fixed by the manner the two-electron integral labels are packed in one integer word. There are two types of labels: the first one contains the cell indices while the second one consists of the four atomic orbital suffixes. The distinction between the two types of labels is established by the sign of the integer word in which the labels are packed, i.e., a negative word contains cell indices. For this reason, in a 32 bit computer word, the labels are packed as seven bit quantities. This imposes a limit of 127 basis functions per unit cell.

5

2. Overview of PLH The program is the Fortran coding of different techniques developed during the last few years,

mainly, in the Namur group for the calculation of the electronic band structures of regular or helical polymers.

In particular, - it performs the general rotation of p-orbitals in the integral calculation:

A. Blumen, C. Merkel, Phys. Status Solidi, B83, 425 (1977). - it extends the multipole expansion to the helical case: L. Piela, J.M. André, J.L. Brédas, J. Delhalle, Int. J. Quantum Chem., S14, 405 (1980).

and makes use of other features like - the use of a compact Coulomb integrals formalism, which reduces drastically the

storage of the two-electron integrals of the Coulomb part: - J.M. André, D.P. Vercauteren, J.G. Fripiat, J. Comput. Chem., 5, 349 (1984).

J.M. André, V.P. Bodart, J .L. Brédas, J . Delhalle, J .G. Fripiat, in "Quantum Theory of Polymers, Solid State Aspects", (J. Ladik and J.M. André, Eds.), p 1, D.Reidel Publishing Company (1984).

J.M. André, D.P. Vercauteren, V.P. Bodart, J.G. Fripiat, J. Comput. Chem., 535, (1984).

- the numerically integrated density matrices using 12-points Gauss-Legendre quadrature which allows a numerically precise integration over the first Brillouin zone:

J.M. André, J. Delhalle, C. Demanet, M.E. Lambert-Gerard, Int. J. Quantum Chem., S10, 99 (1976).

- the Löwdin canonical orthogonalization procedure to treat the possible basis linear dependence problems:

P.O. Löwdin, Rev. Mod. Phys., 39, 259 (1967). - the direct calculation of the first derivative of the energy bands required for getting the

correct indexing and labeling of bands in the density of states (DOS) calculation: J.M. André, J. Delhalle, G.S. Kapsomenos, G. Leroy, Chem. Phys. Letters, 14, 485

(1972). J. Delhalle, S. Delhalle, Int. J. Quantum Chem, 11, 349 (1977).

After completion of the integral calculation over the atomic basis set, the integrals over Bloch functions are calculated. The complex eigenvalue problem is solved for 21 k-points in the first Brillouin zone. Energy bands and their derivatives are obtained.

Calculations are made in double precision. Our experience is that single precision would be tolerable when the number of basis functions in unit cell is small but it is not the case when this number gets large.

3. Input to PLH

6

The input file of PLH consists of "data groups" &GEOM and &BASIS and optional "keyword cards" &AU, &NOLONG, &ONEINT, &TWOINT, and &SCF.

Each data group begins by a card which has an & (Ampersand) or an $ (Dollar) sign as a first character followed by the data group name and then possibly some keywords. This name card (card 0 below) is followed by several input cards, the last one being a "blank" card or a card with the keywords &END or $END. Each data group can be anywhere in the input data file, but within each data group, the data must be introduced in the order as indicated.

A "keyword card" begins with a & (Ampersand) or a $ (Dollar) sign in the first column followed by the keyword card name and eventually some keywords. "Keyword cards" can be anywhere in the input data file (except inside a data group) and can be missing. The keywords are optional and the order is not important.

In the description of the input, the parameters included in < > are optional.

DATA GROUP GEOM: This section defines the cell parameters and the atoms in the unit cell. It is read in the PLH0

program.

CARD 0 : &GEOM <AU>

The optional keyword AU specifies that the coordinates and the cell length are expressed in Bohr. If this keyword is not specified, the values are in Ångström.

CARD 1 : TITLE FORMAT (10A8) CARD 2 : TITLE FORMAT (10A8) CARD 3 : TITLE FORMAT (10A8)

CARD 4 : NUMCEL,CEL,NCELH,IALPHA, ITURN (or FALPHA) Free format NUMCEL Number of cells to be used in the calculation. For example = 3 for nearest neighbor approximation = 5 for next nearest neighbor approximation. This number is the total number of cells used in the lattice summations

over j and l (see MOTECC-90, chap. 15) No default value is given in the program. Maximum allowed value = 21. CEL Length of the unit cell. The periodicity axis is assumed to be along the Z

axis. NCELH

7

Number of cells defining the short and intermediate regions in the calculation of long-range coulomb interactions (lattice summation over h). In these regions, the two-electron integrals are explicitly computed. Outside this region, the third-order multipole expansion technique is used. The default and minimal value is (4*N+1) where N=(NUMCEL-1)/2. A larger value (up to 99) can be given.

IALPHA, ITURN (or FALPHA) The helical point net is generated by successive rotations around the

helix axis by the angle: FALPHA = 2*π*ITURN/IALPHA where ITURN is the number of turns of the helix in the identity period

CEL. The simultaneous translational progress along the Z axis per step is: dz= CEL/IALPHA.

Example: in helical polyethylene, IALPHA=2, ITURN=1, FALPHA=π Note: The symbol for the helix in point net notation is L*M/T; it represents a

helix of the class L (helix with motifs of L chain atoms) which has M motifs (=IALPHA) and T turns (=ITURN) of the helix per translatory identity period c along the helix axis Z. (See Wunderlich: Macromolecular Physics, vol 1,Academic Press, 1973).

The default value for IALPHA is 1 (no turn). The default value for ITURN is 1. If dealing with incommensurable helices, IALPHA should be equal to

99 and FALPHA given in fraction of 360 degrees (or 2*π). examples: 360 degrees=1.0d0, 180=0.5d0, 55.5=0.15417d0

CARD 5 : LABEL,CX,CY,CZ Free format, one line per atom in the unit cell (maximum 50 lines). These cards define the coordinates of the atoms in the unit cell. LABEL Atomic symbol of the atom. It may be followed by a number (without

blank between them). Maximum: 4 characters. examples: C, C1, LI, LI1, LI2,... CX,CY,CZ Nuclear coordinates in Ångström or in atomic units if the keyword AU is

given in the card 0 or by the keyword card &AU (or $AU) in the data file. DO NOT FORGET: THE PERIODICITY AXIS IS THE Z AXIS

CARD 6 : Blank line or &END or $END keywords

This card ends the list of atoms.

8

DATA GROUP BASIS:

This data group defines the atomic basis set. It is read in the PLH0 program.

CARD 0 : &BASIS

CARD 1 : (ISHELL(I),I=1,80) FORMAT(80I1)

Number of Gaussian functions (degree of contraction) in each shell. The order of atomic centers must correspond to the order of center definitions in data group GEOM. The centers are delimited by a contraction of 0 and the list by a 9. The following example means: 5230523040404049 First center: First shell : 5 Gaussians to describe the atomic orbital(s) in the first

shell Second shell: 2 contracted Gaussians. Third shell : 3 contracted Gaussians. Second center: First shell : 5 contracted Gaussians. Second shell: 2 contracted Gaussians. Third shell : 3 contracted Gaussians. Third center, a single shell formed by 4 Gaussians . Fourth center, a single shell formed by 4 Gaussians. Fifth center, a single shell formed by 4 Gaussians. Sixth center, a single shell formed by 4 Gaussians . Number 9 ends the list.

CARD 2 : (ICENT(I),I=1,35) Free format Center assignments (zero-value ends the list). It gives the center serial numbers for which the following shell definitions are applied.

CARD 3 : IBASIS,IORB,ITYPE,NGAUSS,SC Free format Shell definitions for the centers specified in card 2. IBASIS 'STO': Use the standard STO basis sets. In this case, the cards 4

must be omitted.

9

' ': read the exponents and the contraction coefficients (see cards 4).

IORB Name used in printing and if IBASIS is set to 'STO', then IORB defines the routine from which the STO-nG functions are taken. The valid values for this field are:

'1S', '2S', '2P', '2SP', '3S, '3P', '3SP', '3D', '3SPD', 4S', '4P', '4SP', '4D', 'D4SP', '5S', '5P', '5D'.

ITYPE Type of shell. 'S' ... S-shell. 'P' ... P-shell. 'D'... D-shell (reserved for future extension). 'F' ... F-shell (reserved for future extension). 'SP'... SP-shell. 'SPD' ... SPD-shell (reserved for future extension). ITYPE defines the shell type and shell constraint. The 'SP' keyword

specifies that the same exponents are used for s and p orbitals. NGAUSS Number of Gaussians (degree of contraction) for the current shell. The

maximum is 6 Gaussians. This data must correspond to the data in card 1.

SC Scale factor for current shell. The scale factor is used to scale the Gaussian exponents (mainly for

STO-nG basis sets). used exponent = input exponent * SC**2

The following card (card 4) must be ignored if IBASIS is set to 'STO'.

CARD 4 : (E(I),CS(I),CP(I),CD(I),I=1,NGAUSS) Free format, one card per primitive function. This card must be repeated NGAUSS times. E(I) ... Exponent of the Ith Gaussian primitive. CS(I) ... S-coefficient of the Ith Gaussian primitive. CP(I) ... P-coefficient of the Ith Gaussian primitive. CD(I) ... D-coefficient (for future extension). The number of primitive function cards read in is determined by the degree of contraction specified in the preceding shell definition card. Each of cards 4

10

contains the exponent, the S-contraction coefficient and the P-contraction coefficient. CAUTION: In S-type basis, the P-coefficients must be explicitly set to

zero. In P-type basis, the S-coefficients must be explicitly set to zero.

Cards 3 and 4 are repeated for each different shells of the given centers. The shell definition block is terminated by following card:

CARD 5 : '****' in column 1-4.

The cards 2,3,4 and 5 are repeated for each different shell definition block corresponding to each type of atoms.

Go to to card 2 to introduce a new shell definition block or to card 6 to end the input of basis.

CARD 6 : blank card or $END or &END keyword. This card ends the input of the atomic basis set.

MISCELLANEOUS KEYWORD CARDS: &AU

The keyword card AU specifies that the coordinates and the cell length are expressed in Bohr. If you do not specify this keyword, the values are in Ångström. It is read in PLH0 program.

&NOLONG This keyword card requires to the program to neglect the long range corrections. It is only for test cases and is read in PLH0 program.

&ONEINT PRINT THRESHOLD n

This keyword card is to change some default values in the one-electron integrals program. It is read in PLH1 program. PRINT keyword asks for the printing of the one-electron integrals. (Default: No print) THRESHOLD n: Threshold in the computation of the one-electron integrals. (Default: 10-7). The one-electron integrals are retained if their absolute value is greater

than 10-n.

&TWOINT PRINT THRESHOLD n

11

This keyword card is to change some default values in the two-electron integrals program. It is read in PLH2 program. PRINT keyword asks for the printing of the two-electron integrals. (Default: No print) BEWARE!!! TREMENDOUS OUTPUT, TO BE AVOIDED EXCEPT

IN SPECIAL CASES. THRESHOLD n: Threshold in the computation of the two-electron integrals. (Default: 10-7). The two-electron integrals are retained if their absolute value is greater

than 10-n.

&SCF PRINT p THRESHOLD n ITERATIONS m NK k DEPTHR i FILON This keyword card is to change the default values in the SCF program. It is read in PLH3 program. PRINT keyword changes the default for the printing in SCF program. p= 1: Eigenvalues and MO coefficients are printed at the end of the

SCF; p= 2: Additionally to the previous case the density matrices are

printed; p= 3: Same as p =1 but for each iteration; p= 4: Same as p =2 but for each iteration. BEWARE !!! p = 3 OR 4 MEANS LARGE OUTPUT. THRESHOLD n: Threshold for the convergence of the density matrix. (Default: 10-5). The SCF is assumed to converge when density matrix elements do not

differ by a value greater than 10-n. ITERATIONS m: It defines the maximum number of iterations. (Default: 32) NKP k : The number (2**k+1) defines the number of equidistant k-points in

the first Brillouin zone used in the printing of the band structure. (Default: 21, allowed maximum for k is 7)

DEPTHR n : Threshold (10**(-n)) used in the test of possible near linear dependence in the basis set. (Default: 10**(-5)).

FILON : It tells to PLH to use the Filon quadrature to compute the density matix elements instead of the Gauss-Legendre quadrature.

EPS n: Threshold for the convergence of filon quadrature. (Default: 10**(-5)). The Filon quadrature is assumed to converge when the difference

12

between the values obtained when using 2**i points and 2**(i-1) points do not differ by a value greater than 10**(-n) at the i-th iteration.

ISUBMX: This parameter fixes the number of iterations in the Filon procedure. (Default:ISUBMX=7)

NORICHARDSON: Do not use the Richardson extrapolation procedure in the Filon procedure.

13

SAMPLE INPUT

Example 1: Polyethylene using the Clementi 7S-3P basis set and without taking into account the helical symmetry. The number of cells is fixed at 7 (-3 < j < +3) and the "short and intermediate region" is extended over 25 cells. The geometry and cell parameters are expressed in Bohr.

&GEOM AU POLYETHYLENE CLEMENTI 7S-3P BASIS SET TEST NEW VERSION OF POLYMER PROGRAM 7 4.75323668 25 0 0 C 0.83981389 0.0 -1.18830917 H 2.02864134 1.68215194 -1.18830917 H 2.02864134 -1.68215194 -1.18830917 C -0.83981389 0.0 1.18830917 H -2.02864134 1.68215194 1.18830917 H -2.02864134 -1.68215194 1.18830917 &END &BASIS 5230404052304049 1 4 1S S 5 1.0 1267.183972 0.005489 0.0 190.603978 0.040625 0.0 43.247698 0.181793 0.0 11.964903 0.4585582 0.0 3.663116 0.457314 0.0 2S S 2 1.0 0.539158 0.410472 0.0 0.16713 0.645265 0.0 2P P 3 1.0 4.187345 0.0 0.006724113922 0.854053 0.0 0.0280723465 0.19977 0.0 0.03722872582 **** 2 3 5 6 1S S 4 1.0 13.013372 0.019678 0.0 1.962496 0.137952 0.0 0.444569 0.478313 0.0 0.121953 0.501131 0.0 **** &END

14

Example 2: Polyethylene using the Clementi 7S-3P basis set and taking into account the helical symmetry. Printing of the one-electron integrals is requested. The number of cells is fixed at 13 (-6 < j < +6) and the "short and intermediate region" is extended over 49 cells. The geometry and cell parameters are expressed in Ångström.

$GEOM POLYETHYLENE CLEMENTI 7S-3P BASIS SET HELICE TEST NEW VERSION OF POLYMER PROGRAM 13 1.25765191 49 2 1 C 0.44441025 0.0 -0.62882595 H 1.07351046 0.89015622 -0.62882595 H 1.07351046 -0.89015622 -0.62882595 $END $BASIS 52304049 1 1S S 5 1.0 1267.183972 0.005489 0.0 190.603978 0.040625 0.0 43.247698 0.181793 0.0 11.964903 0.4585582 0.0 3.663116 0.457314 0.0 2S S 2 1.0 0.539158 0.410472 0.0 0 .16713 0.645265 0.0 2P P 3 1.0 4.187345 0.0 0.006724113922 0.854053 0.0 0.0280723465 0.19977 0.0 0.03722872582 **** 2 3 1S S 4 1.0 13.013372 0.019678 0.0 1.962496 0.137952 0.0 0.444569 0.478313 0.0 0.121953 0.501131 0.0 **** $END $ONEINT PRINT

15

Example 3: LIH chain using the predefined STO-3G basis set. The number of cells is fixed at 7 (-3< j < +3) and the "short and intermediate region" is extended over 25 cells. The geometry and cell parameters are expressed in Bohr.

$GEOM AU LIH TEST STO-3G basis set. 7 10.0 25 0 0 H 0.0 0.0 0.0 LI 0.0 0.0 4.0 $END $BASIS 30339 1 STO 1S S 3 1.24 **** 2 STO 1S S 3 5.67 STO 2SP SP 3 1.72 **** &END

16

4. How to run the BANDDOS program. The general command is simply : banddos. The program asks for the filename of the input file

(with filetype= 'ord' ). In the lower left corner, a first message asks to position the main menu. Its position is defined

by moving the mouse and pressing the first mouse button (upper left button). Initially, the bands are ordered by increasing energies; at that moment, the program waits any input from the mouse or the LPFKeys.

Mouse Buttons Each of the four mouse buttons has a specific attribute. Besides its use as locator to locate

menus and the panel on the screen, or to pick options into menus or the panel, the first button (upper left), "E(i)", is used to pick an energy value (marker).

The second button (upper right), "Swap", must be used only to swap two bands into the band structures view (see bands ordering section).

The third button (lower left), "Ener", and the fourth button (lower right), "Wind", are used for windowing the three views, band structures, density of states, and its convolution (see views and windowing section).

Menus Within the main "BandDos" menu, clicking the following options lead to the respective

actions: BandDos : hides the "BandDos" menu; Ordering : orders bands automatically (see bands ordering section); E(i) & Deriv : displays energies and their derivatives for the nearest points close to

the picked energy marker; DOS & CDOS : computes the density of states and its convolution for the current

band structures; Title & Axes : toggles on and off the second menu "Title & Axes"; Parameters : loads graPHIGS parameters (ft = 'PHIGSPAR') located in a personal

file; Save GDF : saves the content of the screen however without panel and menus in

an ADMGDF file for a plotter output; Exit : Closes the execution of the application.

Within the "Title & Axes" menu the options are : Title & axes : hides the "Title & Axes" menu; Add Notation : adds any string (input via the keyboard) anywhere on the screen

(position defined by the mouse); Del Notation : deletes a notation; Toggle Title : toggles on and off the general title of the application; Grid : toggles on and off a grid for easier notation position;

17

Auto Axes : defines the axes markings automatically; Manual Axes : enters new marking rules for both axes X and Y.

Band Ordering In the initial state, the bands are ordered by increasing energy values. The "Ordering" option

of the BANDDOS menu applies the algorithm proposed in chapter 15 of MOTTEC 90. To order the band structures manually, use the second mouse button (upper right = "Swap"). Just pick the energy markers you wish to swap using the second mouse button.

Views and Windowing Two ways are possible to change the mapping of the views. The first one consists in changing the energy range for the three views all together. Therefore,

with the third mouse button "Ener", ust define new minima and maxima energy positions on the screen.

The second one is more sophisticated but more powerful. First, select (Se) a view with the LPFK option, SeBS, SeDS, or SeCD, for band structures (BS), density of states (DS), or its convolution (CD), respectively. Then, define the new window range by clicking two extreme points with the fourth mouse button "Wind" (lower right and upper left, or upper right and lower left). After, define the new viewport for the view using the same previous technique. The screen is now updated.

Each of the views may be toggle (To) just by pushing the corresponding LPFKey : ToBS, ToDS, or ToCD.

LPFK The functionalities associated to the LPFKeys and mouse buttons are described in the panel :

Main Panel Reset ToBS ToDS ToCD ToDe ToMk SeBS SeDS SeCD Orde E(i) DOS Titl Para GDF AdNo DeNo ToTi Grid AuAx MaAx

Grid Exit Main : toggles the "BandDos" menu Panel : toggles the panel (Pane) describing the functions of LPFKeys and mouse

buttons Reset : resets (Rese) the view windows ToBS : toggles (To) the band structures (BS) view ToDS toggles (To) the density of states (DS) view ToCD : toggles (To) the convolution of density of states (CD) view ToDe : toggles (To) the rotating vector showing the energy derivative (De)

18

ToMk : toggles (To) the energy markers (Mk) SeBS : selects (Se) the band structure (BS) view for windowing SeDS : selects (Se) the density of states (DS) view for windowing SeCD : selects (Se) the convolution of density of states (CD) view for windowing Orde : orders (Orde) the band automatically E(i) : toggles energy (E(i)) and derivatives values DOS : computes the density of states (DOS) and its convolution Titl : toggles the "Title & Axes" (Titl) menu Para : loads a personal graPHIGS parameter (Para) file GDF : saves an ADMGDF (GDF) file for a plotter output AdNo : adds (Ad) a notation (No) DeNo : deletes (De) a notation (No) ToTi : toggles (To) the title (Ti) Grid : toggles the grid (Grid) AuAx : automatically (Au) defines the axes (Ax) markings MaAx : enters manually (Ma) new marking rules for both axes (Ax) X an Y Exit : closes the application

4. How to run the PLH program on UNIX system.

A version of the program exists for the AIX and SUN UNIX operating system. A script file called PLH (using the Bourn shell) controls the run of the programs and accepts

two options (test and save). The first step is to check if the following variables are defined in your shell (by using the set

command) : plhroot=/?/???/plh PLH_EXEDIR=/?/???/plh/bin"

If it is not the case, please insert these definitions in your ".profile" file (see an example in the profile_example file).

The second step is to create an input file with the filetype "data" (for example, polyt.data). The command to run the program is:

plh fn " option"

where: -fn is the generic filename of the files to be created or used. - option: two options are available, "save" and "test". - save: This option tells to the system to save the working files. By default, they are

erased if the job terminates successfully.

19

-test: This option allows the user to test the input data. In this case, the script file runs the PLMDIS, PLH0, PLH1, and PLLD programs. The PLMDIS program generates a file with the filetype "geometry" (for example, polyt.geometry) which can be used as input for the graphics program KGNGRAF wich displays the polymer.

(The " " characters indicate that the enclosed parameters are optional).

It is always possible to run one particular program by typing the name of the program followed by the "generic" filename. For example, the command to run the PLH3 program using the polyt files is:

plh3 polyt

Examples:

1. plh polyt In this example, polyt defines the "generic" filename for this run. The program will read

the input from a file with this name and the filetype data (polyt.data) and will create eleven files with the same filename but with different filetypes:

file ddname filename description 1 RWF polyt.rwf Random "read/write " file (unformatted) 4 GEOM polyt.geometry Input file for KGNGRAF program. 6 LOG polyt.log Log file ( Terminal). 7 PUN polyt.pun Punch file (not used in this version) 8 OUT polyt.listing Output listing file 9 DATA polyt.data Input data file 12 INT polyt.int Two-electron integrals file 24 CK polyt.ck C(k) and E(k) matrices file (unformatted) 54 ISK polyt.isk S(k) matrix file (unformatted) 55 ISKT polyt.iskt (S(k))**(-1/2) matrix file (unformatted) 58 IDK polyt.idk P(k) matrix file (unformatted) 60 ORD polyt.ord E(k) eigenvalues (and its derivatives) file for

the graphic program (BANDDOS)

2. plh polyt save In this example, the working files will not be discarded at the end of the run.

3.plh polyt test In this example, the TEST command is used to test the input data. This option generates a

file for the KGNGRAF program.

5. How to install the programs on UNIX (RS6000/AIX).

20

The tape was created with the tar utility program. To read it, type the following command:

tar -xvf /dev/rmt0 .

The reading of the tape will create five subdirectories: src, aix, bandos, bin, and sample.

To install the program, go through the following steps: - add to the file .profile, the following lines: # # plhroot=" the main directory containing plh" # for example: plhroot=/u/plh export plhroot PLH_EXEDIR="$plhroot/bin" export PLH_EXEDIR PLH_SRC="$plhroot/src" export PLH_SRC

- Use the makefile to compile the FORTRAN files (FORTRAN 77), and to generate the load module files. To do it, type the following command: make

- Run the program by using the PLH script file (see section 7), as soon as an input data file is available, whether by using test files (files with filetype DATA) included on the tape, or by creating your own input data (see section 3).

6. How to install the programs on another computer. The present version of the PLH system is set up to run on IBM computers, using the VS

FORTRAN (version 2) at the FORTRAN 77 level and the VM/CMS operating system. A UNIX version exist also for IBM RS6000, FPS 500 computers and for the SUN stations. The system dependent fortran codes are located in the file PLHIBM FORTRAN for the VM/CMS operating system, in plhaix.f for the AIX RS6000 version, in plhsun.f for SUNOS unix system, and in plhfps.f for the FPS500 computer. To set up the programs on another computer, the following steps have to be perform in order to get the program operational:

- The programs allocate the needed memory dynamically by defining a scratch vector in the main routine of each program and by using the Assembly routines: GRAB, DROP, and LOCF(VM/CMS) or C-routines: malloc, drop, loc in the UNIX version. If your operating system does not have the similar features, it is necessary to remove the call to these Assembly routines and to define a dimension in the main routine for the vector CORE by using the following relation:

LENGTH=X*MAX0(2*NTT+NWIIB,NTT+NTTS2+4*NSQ+4*NBASIS,3*NTT) where NBASIS is the maximum allowed number of atomic functions.

21

(maximum 127 functions for a 32 bit word machine). NUMCEL is the maximum number of cells (=21). NTTS=((NBASIS*(NBASIS+1))/2 NTTS2=2*NTTS NTT=NUMCEL*NTTS NSQ=NBASIS*NBASIS NWIIB=5630

X = 8 for a byte oriented machine. = 2 for a word oriented machine if the double precision data are stored in two

words. = 1 for a word oriented machine if the double precision data are stored in one

word. It is also necessary to set up the following variables in the main routine of each program:

LENCOR = the dimension of the CORE vector. LOCCOR = 1 LOC1 = 1

- Each FORTRAN file contains some OPEN statements which have to be adapted to your

Fortran language. - The PLHsys FORTRAN file (sys = IBM,fps,sun,aix) contains some routines and variables

which are machine dependent: 1. Firstly, you have to adapt the variables ISINGL and IRADIX in the BLOCK DATA

of PLHLIB. ISINGL gives the number of words which defines the double precision data and IRADIX specifies the number of bytes in an integer variable.

2. The PLHLIB and PLHsys files contain a library of subroutines (DAIO) to handle the direct R/W operations. In the PLHsys library, some subroutines (DAOPEN, DAEXT, CKDISK, and FILSIZ) are machine dependent and are written for IBM computer using the VM/CMS operating system or for UNIX system. DAOPEN subroutine opens the R/W file. In the VM/CMS version, DAEXT extends this file when necessary by defining a new XTENT parameter of the FILEDEF command. CKDISK checks the space on disk. FILSIZ gives the size and the blocksize of the R/W file. These routines use the QDISK, CFLDEF, XFLDEF, EPLIST, GPLIST,CMS, and FPLIST Fortran subroutines (in PLHIBM). They use also the RDLINE and XCMS ASSEMBLE routines.

3. The DAIO library is written to handle asynchronous direct I/O operations but this feature is not operational on IBM. If your system has this option, you need to modify the IWAIT, IODRD, and IODWRT subroutines.

CAUTION: this feature has not been thoroughly tested

22

- Some miscellaneous Assembly routines are used by the VM/CMS version of PLH system:

BITS, CLOCK, RBITS, and UDRFLW: 1. BITS and RBITS packs and unpacks four integers in one integer 32 bit word. These

routines are called in the PLH2 and PLH3 programs (see subroutines SHLOUT, INTPRT in PLH2 and FOFCLO in PLH3).

2. CLOCK is used to print the CPU time, the total time, and the date. 3. UDRFLW suppress the printing of UNDERFLOW warning messages.

The BANDDOS program depends very much on the IBM graPHIGS software and might need

some adaptation to run on other graphics systems which do not support the PHIGS international graphics standard. Some Assembly routines are used by the BANDDOS system: DISPC, XCMS, XPRMT.

These ought to be helpful hints for a less painful conversion. It could very well be that

some other features are left, but any omissions are unintentional.