The "newscf" module of GAMESS-UK

P.Sherwood, August 1999.

This module is not yet ready for general use, but is included in the repository to allow development work on a number of platforms. Here are a few explanatory notes. See limitations section at the end.

Objectives

The main reason the code was written was to allow more flexible control of convergence schemes, for experiments on the Cu-NO systems (Norsk Hydro project).

A secondary motive was to provide a testbed, separate from the mainline code, for the ideas mentioned in the next section.

Design ideas

All matrices will be handled in an object oriented way, this should lead to a faster migration to a distributed data model based on GAs. A heap memory allocator is used, to support the matrix library.

The SCF driver will combine UHF/RHF and conventional/direct to cut down on duplication when future work is done on the SCF programs e.g. addition convergence schemes (second order etc) and work on parallelisation.

Fortran 90 now offers some substantial benefits with respect to code maintenance when used in conjunction with an object-oriented design. This code will provide a way to explore use of F90 without affecting the stability of the main code. An example of an "object" that will be handled by an F90 module are the sets of vectors and associated data. At the moment the code is standard F77.

Input Control

The module is requested by including a block of direcives of the following form:
newscf

end

The block can be empty, or it can contain the following control directives:

a) Overall control flags:

maxcyc
   Maximum number of cycles

print   ....
   where key1,2 etc are taken from
   guess, density, vectors, full, frontier, diis

softfail
   Don't generate an error if maxcyc is reached without convergence

b) Convergence control:

Convergence is controlled by providing parameters for a series of "phases", allowing different approaches to be used at different stages of the SCF calculation. If convergence control directives are omitted, a default scheme is adopted, otherwise the user will need to provide the control information for a number of phases, including the criteria that are used to switch from one phase to another.

phase 
   Set phase for subsequent control directives

level  
   Set level shifters

diis
   Activate DIIS

newdiis
   Reset DIIS space (

extrap  
   When two successive SCF steps satisfy the colinearity criteria

      d1.d2 / (|d1| |d2|)  >  

    where

      d1 = f_{-1} - f_{-2}  and  d2 = f - f_{-1} 

   and f, f_{-1} and f_{-2} are the current, previous and
   next previous fock matrices, the extrapolation 

       f +=   * d2 will be applied.

   Typically  should be around 0.95 and  around 1. In addition,
   there is also a test on |d1| / |d2|, so that if successive steps are
   in the same direction but of very different lengths extrapolation is 
   suppressed.

restore
   Recover best set of vectors at start of the phase

lock
   Apply configurational locking

next 
   Specify next phase in convergence scheme
    == 0 denotes convergence

The following four keywords define the criteria used to determine if
the phase given by the preceding next directive can be started:

tester [below | above ] 
   Max fock matrix element in MO basis for the ov block.
de     [below | above ] 
   Energy change
deabs  [below | above ] 
   Absolute value of energy change
ncyc   [below | above ] 
   number of cycles within this phase

Example

The following example implements the following convergence scheme:
Phase 1 Level shifters of 2.0 and 2.0 (alpha and beta)
        Switch to phase 2 when tester < 0.01

Phase 2 Level shifters of 0.5 and 0.5, DIIS and configurational locking
        Switch to phase 3 when tester < 0.002

Phase 3 DIIS only, until convergence when tester <  5.0d-6


time 1000
core 3000000
#restart new
punch coor conn
punch basi vect 1 occu scfe eige
mult 2
symt 6
title
Cu-NO, DZ Cation  - new geom, new code
geometry
      1.931427      -0.080801      -0.022645  29  Cu
     -0.924018      -1.179405       2.034581  8    O
     -3.444799       0.046586       0.020112  13  Al
      7.478471       0.371579       0.192578  8    O
     -5.043143       2.660967       1.071269  8    O
     -0.902242       1.249695      -1.985263  8    O
     -5.027333      -2.570596      -1.047347  8    O
     -6.519617      -3.214017      -1.846467  1    H
     -0.954846      -2.572273       3.214984  1    H
      5.298164      -0.243155      -0.154613  7    N
     -0.874905       2.707837      -3.083889  1    H
     -6.599492       3.284123       1.755577  1    H
end
basis dz
runt scf
newscf
print full diis frontier
phase 1
level 2.0 2.0
next 2
tester below  0.01
#
phase 2
level 0.5 0.5
diis
lock
next 3
tester below 0.002
#
#
phase 3
lock
diis
next 0
tester below 5.0d-6
end
runtype optx
scftype uhf
cdft quad high
cdft b3lyp screen
#vectors 3 4
enter 1 2

Limitations

You must ensure there is no symmetry, and the harmonic directive is not present.