openmopac / mopac

Molecular Orbital PACkage
http://openmopac.net
GNU Lesser General Public License v3.0
115 stars 31 forks source link

No table header in IRC output #209

Closed tomoya8 closed 2 weeks ago

tomoya8 commented 2 weeks ago

Describe the bug PR #208 seems to introduce a new bug where no header is printed in the IRC output when using the LARGE or LARGE=1 keyword. However, headers are printed when using the LARGE=-1, LARGE=n, or LARGE=-n keywords.

          FINAL GEOMETRY OBTAINED                                 CHARGE
 PM6 IRC=1 LARGE CHARGE=-1
 SN2

  Br    0.000000  0    0.000000  0    0.000000  0   0  0  0   -0.7450       1AA*
   H    2.617012  1    0.000000  0    0.000000  0   1  0  0    0.1515       1AB*
   H    1.871914  1   69.045204  1    0.000000  0   2  1  0    0.1515       1AC*
   H    1.871909  1   60.000438  1   77.228081  1   3  2  1    0.1515       1AD*
   C    1.080778  1   66.020245  1   32.371885  1   2  1  3    0.0070       1AE*
  Cl    2.208304  1   90.412916  1  179.999990  1   5  2  1   -0.7166       1AF*
       2     -71.56322      0.00000        -71.56322  -0.00235     2   %  0.0014
                CARTESIAN GEOMETRY           VELOCITY (IN CM/SEC)
  ATOM        X          Y          Z                X          Y          Z
   1   Br   -1.38998   -0.53234   -0.33746      -7687.8    -2944.2    -1866.4
   2    H    1.22711   -0.53231   -0.33745        268.4       79.8       49.5
   3    H    0.55766    1.21581   -0.33745        249.8      121.4       53.9
   4    H    0.55770    0.21359    1.24357        249.4       94.6       85.2
   5    C    0.78888    0.30211    0.19152     101556.9    38894.4    24656.3
   6   Cl    2.79888    1.07193    0.67953     -17101.1    -6549.6    -4152.0

To Reproduce PR #208 version and IRC with LARGE or LARGE=1 keyword:

PM6 IRC=1 LARGE CHARGE=-1
SN2

Br 0.000000     1 0.000000     1 0.000000     1
H  2.617012     1 0.000000     1 0.000000     1
H  1.947557     1 1.748111     1 0.000000     1
H  1.947598     1 0.745900     1 1.581018     1
C  2.177769     1 0.834029     1 0.528717     1
Cl 4.188952     1 1.604298     1 1.017015     1

Expected behavior Blank lines and headers should be printed:

          FINAL GEOMETRY OBTAINED                                 CHARGE
 PM6 IRC=1 LARGE CHARGE=-1
 SN2

  Br    0.000000  0    0.000000  0    0.000000  0   0  0  0   -0.7450       1AA*
   H    2.617012  1    0.000000  0    0.000000  0   1  0  0    0.1515       1AB*
   H    1.871914  1   69.045204  1    0.000000  0   2  1  0    0.1515       1AC*
   H    1.871909  1   60.000438  1   77.228081  1   3  2  1    0.1515       1AD*
   C    1.080778  1   66.020245  1   32.371885  1   2  1  3    0.0070       1AE*
  Cl    2.208304  1   90.412916  1  179.999990  1   5  2  1   -0.7166       1AF*

     POINT   POTENTIAL  +  ENERGY LOST   =   TOTAL      ERROR    REF%   MOVEMENT
       2     -71.56322      0.00000        -71.56322  -0.00235     2   %  0.0014
                CARTESIAN GEOMETRY           VELOCITY (IN CM/SEC)
  ATOM        X          Y          Z                X          Y          Z
   1   Br   -1.38998   -0.53234   -0.33746      -7687.8    -2944.2    -1866.4
   2    H    1.22711   -0.53231   -0.33745        268.4       79.8       49.5
   3    H    0.55766    1.21581   -0.33745        249.8      121.4       53.9
   4    H    0.55770    0.21359    1.24357        249.4       94.6       85.2
   5    C    0.78888    0.30211    0.19152     101556.9    38894.4    24656.3
   6   Cl    2.79888    1.07193    0.67953     -17101.1    -6549.6    -4152.0

Operating system Mac, Windows, Linux

Additional context There is no separator printed between energy data and Cartesian geometry data, but this style seems to have been in use since at least MOPAC6...

godotalgorithm commented 2 weeks ago

Sorry, my previous bug fix had a small bookkeeping error that messed up the LARGE and LARGE=1 cases. Your examples work now as intended. The same caveat applies: the IRC/DRC output printing is rather complicated and has low test coverage right now, so I can only fix problems as they are reported while preserving behavior in a set of test cases that I will expand if problems persist.

tomoya8 commented 2 weeks ago

Now I find no problems in all LARGE cases. Thank you so much for your quick response.