Skip to content

TheochemUI/legacy_eongit

 
 

Repository files navigation

About

  • A modern, elegant approach to working with EON

Build

Conda

We provide a conda environment, which is only partially supported for reproducible usage, since it depends on local compilers.

micromamba create -f environment.yml
micromamba activate eongit

This leads to the most robust installation approach:

meson setup bbdir --prefix=$CONDA_PREFIX
meson install -C bbdir

The server is accessed through python -m eon.server.

Note that all older documentation calls to eon should now be python -m eon.server. The eonclient binary is automatically made available in the activated environment.

Running Tests

Meson

This is the preferred method.

cd client
# in conda, add  --prefix=$CONDA_PREFIX
meson setup bbdir --buildtype=debug -Dbuild_tests=true
meson test -C bbdir

Writing and Registering Tests

We find that, rather than build each executable by hand or even register each one by hand, we can leverage the array iteration features of the meson language.

if get_option('build_tests')
  _args += ['-DEONTEST'] # Unused
  _deps += [ gtest_dep ]
test_array = [#
  ['Improved Dimer', 'impldim_run', 'ImpDimerTest.cpp', '/gtests/data/saddle_search'],
             ]
foreach test : test_array
  test(test.get(0),
       executable(test.get(1),
          sources : ['gtests/'+test.get(2)],
          dependencies : [ eon_deps, gtest_dep, gmock_dep ],
          link_with : eclib,
          cpp_args : eon_extra_args
                 ),
        workdir : meson.source_root() + test.get(3)
      )
endforeach
endif

Usage

Included is the eonc.rb helper in tools/gprdimer/, which can be used with any of the gtests/data/systems and a suitable configuration file.

Contributing

Do run pre-commit before actually submitting pull requests!

pipx run pre-commit run --all-files

For best results, consider installing the git hook as well.

pipx run pre-commit install

Testing

We have both Catch2 unit tests, and also ApprovalTests. For adding new approval tests, first build them with meson compile, run them to approve, and then re-run to make sure things pass with meson test.

License

BSD-3 clause.

Packages

No packages published

Languages

  • C++ 55.2%
  • Python 28.4%
  • Fortran 7.1%
  • C 5.2%
  • Makefile 1.0%
  • Meson 1.0%
  • Other 2.1%