# MOPAC, bug in POLAR

BUG IN MOPAC 93 AND MOPAC 7
POLAR calculations involving electrooptic Pockels effect (EOPE) and
optical rectification (OR) give incorrect beta values.
Second harmonic generation (SHG) beta values are correct. The fault
was due to a programming error caused by myself. The bug was found by
Prof. Henry Kurtz, one of the authors of the POLAR routine.
To correct the fault, modify subroutine BEOPOR to replace the line
COMMON /COORD/ COORD(3,NUMATM)
with
COMMON /GEOM / GEO(3,NUMATM), COORD(3,NUMATM)
This correction should be made to all copies of MOPAC 93 and MOPAC 7.
The fault appeared when iterated beta calculations were done. The following
data-sets can be used to verify (1) that the fault exists, and (2) that
the bug-fix is done correctly.
James J. P. Stewart.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Test data sets:
POLAR(iwflb=0,beta=1) 1scf
Formaldehyde
(Second harmonic generation)
O 0.00000000 0 0.0000000 0 0.0000000 0 0 0 0 -0.2902
C 1.21651960 0 0.0000000 0 0.0000000 0 1 0 0 0.2922
H 1.10612798 0 123.5116221 0 0.0000000 0 2 1 0 -0.0010
H 1.10612798 0 123.5116221 0 180.0000000 0 2 1 3 -0.0010
POLAR(iwflb=2,beta=1,gamma=0) 1scf
Formaldehyde
(Electrooptic Pockels Effect)
O 0.00000000 0 0.0000000 0 0.0000000 0 0 0 0 -0.2902
C 1.21651960 0 0.0000000 0 0.0000000 0 1 0 0 0.2922
H 1.10612798 0 123.5116221 0 0.0000000 0 2 1 0 -0.0010
H 1.10612798 0 123.5116221 0 180.0000000 0 2 1 3 -0.0010
POLAR(iwflb=3,beta=1,gamma=0) 1scf
Formaldehyde
(Optical rectification)
O 0.00000000 0 0.0000000 0 0.0000000 0 0 0 0 -0.2902
C 1.21651960 0 0.0000000 0 0.0000000 0 1 0 0 0.2922
H 1.10612798 0 123.5116221 0 0.0000000 0 2 1 0 -0.0010
H 1.10612798 0 123.5116221 0 180.0000000 0 2 1 3 -0.0010
Faulty results:
(Second harmonic generation)
AVERAGE BETA (SHG) VALUE AT 0.50000 EV = 50.39719
(Electrooptic Pockels Effect)
AVERAGE BETA VALUE AT 0.50000 EV = 7.50247
(Optical rectification)
AVERAGE BETA VALUE AT 0.50000 EV = 7.55551
Correct results:
(Second harmonic generation)
AVERAGE BETA (SHG) VALUE AT 0.50000 EV = 50.39719
(Electrooptic Pockels Effect)
AVERAGE BETA VALUE AT 0.50000 EV = 49.84824
(Optical rectification)
AVERAGE BETA VALUE AT 0.50000 EV = 49.85153