AFIR-web Support Site

General interface with external ab initio programs

At first, there should be the following keyword at the top of the GRRM input xxx.com:

%link=non-supported

The following keyword should also be added to xxx.com below the options keyword:

sublink = aaa

The code aaa should be able to be executed by the following command:

aaa xxx

where xxx is a parameter to tell aaa the input file name xxx.com. The code aaa should be able to do the following four things: (1) generate an input file for the external program depending on requests by GRRM.out indicated in xxx_INP4GEN.rrm, (2) execute the external program, (3) read output files of the external program and generate xxx_OUT4GEN.rrm, and (4) rename an output file of the external program showing coefficients for MOs (e.g., chk files of G09) to xxx_MO2GEN.rrm.
The first line of xxx_INP4GEN.rrm may be one of the following five:

TASK: MAKE GUESS
TASK: MICROITERATION
TASK: ENERGY
TASK: ENERGY and GRADIENT
TASK: ENERGY, GRADIENT, and HESSIAN

In the first case, check (and reconstruct if necessary) MOs (e.g., Stable=OPT). In the second one, optimize positions of external atoms (also see p. 20). In the third to fifth ones, get designated data (energy, gradient vector, and Hessian matrix) at a given structure.

The second line of xxx_INP4GEN.rrm may be one of the following two:

GUESS: READ FROM xxx_MO2GEN.rrm
GUESS: MAKE FROM THE BEGINNING

In the first case, a guess of MO coefficients is available in xxx_MO2GEN.rrm; rename it to an appropriate name and use it. In the second one, no initial guess of MO coefficients is available.

The third line of xxx_INP4GEN.rrm may be as follows:

STATE: n

When the calculation is for a single potential energy surface, n is always 1. In multi-surface calculations, this line tells which state should be calculated. For example, in an OptX calculation the S1 and S0 states are calculated when n is 1 and 2, respectively. The fourth line of xxx_INP4GEN.rrm may be:

NACTIVEATOM / NATOM: k / l

This line shows the number of active and moving atoms. Only when the microiteration (external atoms keyword) is used, kl. Following l lines show the present geometry.

The next line of xxx_INP4GEN.rrm may be:

NFROZENATOM: m

where m > 0 only when the frozen atoms keyword is used. Following m lines show the positions of frozen atoms.

Do a given task for a designated state at a given geometry (starting from given MOs), using your favorite QM and/or MM code, and then, return required data with the xxx_OUT4GEN.rrm file (see below for its format) to GRRM.out.

A very simple example is shown below, where test1.com is as follows:

%link=non-supported
# MIN
 
0 1
O   0.0  0.0  0.0
H   1.0  0.0  0.0
H   0.0  1.0  0.0
Options
EigenCheck
sub link = sub_g09_b3lyp.out

A proper path should be given to the code sub_g09_b3lyp.out so that GRRMp can call the code by:

sub_g09_b3lyp.out test1

The test1_INP4GEN.rrm file at the final optimization step is as follows:

TASK: ENERGY, GRADIENT, and HESSIAN
GUESS: READ FROM test_MO2GEN.rrm
STATE: 1
NACTIVEATOM / NATOM: 3 / 3
O          0.063914791737          0.063914791737          0.000000000000
H          1.027361861843         -0.091276271821          0.000000000000
H         -0.091276271821&nnbsp;         1.027361861843          0.000000000000
NFROZENATOM: 0

Based on this task file, the code sub_g09_b3lyp.out made the following test1_OUT4GEN.rrm file after a Hessian calculation at the UB3LYP/6-31G level starting from a MO guess in test1_MO2GEN.rrm:

RESULTS
CURRENT COORDINATE
O          0.063914796500          0.063914796500          0.000000000000
H          1.027361941220         -0.091276278700          0.000000000000
H         -0.091276278700          1.027361941220          0.000000000000
ENERGY =  -76.386117837465    0.000000000000    0.000000000000
       =    0.000000000000    0.000000000000    0.000000000000
S**2   =    0.000000000000
GRADIENT
  -0.000001513128
  -0.000001513128
   0.000000000000
  -0.000000960312
   0.000002473440
  -0.000000000000
   0.000002473440
  -0.000000960312
  -0.000000000000
DIPOLE =    0.000000000000    0.000000000000    0.000000000000
HESSIAN
  0.514458975
 -0.147759611   0.514458975
  0.000000000   0.000000000   0.000031510
 -0.459954843   0.110306934  -0.000000000   0.472688955
  0.037452677  -0.054504132  -0.000000000  -0.091868572   0.067238244
 -0.000000000  -0.000000000  -0.000015755   0.000000000   0.000000000
 -0.054504132   0.037452677  -0.000000000  -0.012734112   0.054415895
  0.110306934  -0.459954843  -0.000000000  -0.018438362  -0.012734112
 -0.000000000  -0.000000000  -0.000015755   0.000000000   0.000000000
  0.000037248
 -0.000000000   0.067238244
  0.000000000  -0.091868572   0.472688955
 -0.000021493   0.000000000   0.000000000   0.000037248
DIPOLE DERIVATIVES
   0.000000000000          0.000000000000          0.000000000000
   0.000000000000          0.000000000000          0.000000000000
   0.000000000000          0.000000000000          0.000000000000
   0.000000000000          0.000000000000          0.000000000000
   0.000000000000          0.000000000000          0.000000000000
   0.000000000000          0.000000000000          0.000000000000
   0.000000000000          0.000000000000          0.000000000000
   0.000000000000          0.000000000000          0.000000000000
   0.000000000000          0.000000000000          0.000000000000
POLARIZABILITY
   0.000000000000
   0.000000000000          0.000000000000
   0.000000000000          0.000000000000          0.000000000000
 

Since the given task is energy, force, and Hessian calculations, elements of dipole, dipole derivative, and polarizability are all zero. GRRM.out cannot read files in the other format. In general, DIPOLE, DIPOLE DERIVATIVES, and POLARIZABILITY are all zero.

Manual