openmopac / mopac

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

Coordinate output in AUX file has too few significant figures #132

Closed paulsaxe closed 11 months ago

paulsaxe commented 1 year ago

Describe the bug The coordinate output in the AUX file has 4 figures after the decimal, which is too few for MOPAC to recognize the symmetry if those coordinates are used for another calculation:

 ATOM_X_OPT:ANGSTROMS[09]=
    1.0823   -0.0542    0.0137
    0.7961   -0.9604    0.1110
    2.0370   -0.0880    0.0174

To Reproduce

PM7 PRECISE GRADIENTS AUX(MOS=10,XP,XS) CHARGE=0 SINGLET
O
optimized with GAFF
O    1.08260292 1  -0.05465095 1   0.01378518 1
H    0.74927322 1  -0.99207258 1   0.11444302 1
H    2.08260292 1  -0.05465095 1   0.01378518 1

or any optimization calculation shows this issue. Expected behavior It is not a problem (I think) that the steps along the optimization have fewer figures to keep the file small, but the final geometry of the optimization and any other place where MOPAC changes the geometry should write out more decimal places, probably about 8. The FORCE and THERMO calculations reorient the structure so they create a new geometry.

godotalgorithm commented 1 year ago

Right now, the AUX file uses a single format for all floating-point number outputs and its precision can be adjusted with the PRECISION option of AUX: AUX(PRECISION=4,MOS=10,XP,XS) in your example will add 4 extra digits of precision. Does this address your request, or do you think that there is value in independently adjusting the precision of specific quantities in the AUX file?

paulsaxe commented 1 year ago

Fabulous. Didn’t know of that option! Will try it.

For smaller systems it doesn’t matter, but for larger systems with many optimization steps I imagine the AUX file is already huge and huger doesn’t sound good. However, I think that leaving the AUX file pretty much alone and added something like a JSON file in addition or instead, with more control, would be a better idea.