openmopac / mopac

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

Diskless/stateless MOPAC API #203

Open godotalgorithm opened 2 months ago

godotalgorithm commented 2 months ago

This is an open PR for a new MOPAC API that is diskless and stateless. It exposes a limited set of core features: SCF calculations, geometry relaxation, and vibrational frequencies. Also, it gives access to the fast MOZYME solver for SCF calculations and geometry relaxation. Most inputs and outputs are collected and passed through Fortran types provided by the API, and the entire state of the calculation is described by that information. This API also completely avoids using the disk for input and output, which maybe be useful for high-throughput calculations on large, parallel computers with slow disks.

The intent of this API is to supersede #96, which was used as a starting point for the design of this API. All the features of that API are available in some form through this API.

The main features of the API are all implemented, but testing has just started. This open PR includes a simple unit testing system for the API, but there is only one test implemented so far and the testing criteria need to be expanded and refined to cover all the features and relevant data of the API. I expect bugs will be identified and fixed in the process of expanding the testing coverage of the API, and the PR won't be merged until all features are thoroughly tested by these unit tests.

Status

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 58.15861% with 459 lines in your changes missing coverage. Please review.

Project coverage is 66.78%. Comparing base (a22996f) to head (c111780). Report is 9 commits behind head on main.

Files Patch % Lines
src/MOZYME/iter_for_MOZYME.F90 10.00% 126 Missing :warning:
src/interface/mopac_api_saveload.F90 9.24% 108 Missing :warning:
src/interface/mopac_api_operations.F90 24.48% 74 Missing :warning:
src/interface/mopac_api_finalize.F90 48.76% 62 Missing :warning:
src/models/switch.F90 82.87% 31 Missing :warning:
tests/mopac_api_test.F90 88.65% 22 Missing :warning:
src/interface/mopac_api_initialize.F90 91.03% 13 Missing :warning:
src/utilities/seconds.F90 50.00% 7 Missing :warning:
src/optimization/ef.F90 63.63% 4 Missing :warning:
src/forces/fmat.F90 66.66% 3 Missing :warning:
... and 5 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #203 +/- ## ========================================== + Coverage 66.75% 66.78% +0.02% ========================================== Files 332 336 +4 Lines 74082 74870 +788 ========================================== + Hits 49456 50003 +547 - Misses 24626 24867 +241 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

thegodone commented 2 months ago

This is a impressive stepm thanks for you effort. I guess when it will be ready we can move to python interaction more easily.