Adding Add-OnsΒΆ

  • Project Name

    • Select a name. May be mixed case with numerals and underscores (e.g., CheMPS2, libefp, PCMSolver, v2rdm_casscf). Shouldn’t start with a numeral. Needn’t start with “lib”, even if a library.
    • GitHub repository name should be addon_name or addon_name.lower(). For example: CheMPS2, libefp, pcmsolver, v2rdm_casscf.
    • CMake project name should be addon_name. For example: project(libefp), project(CheMPS2), project(PCMSolver), project(v2rdm_casscf). Namespacing in the directory structure used to detect the addon should have this name (e.g., share/cmake/CheMPS2).
    • Restricted by the CMake project name, add-ons return CMake variables and compile definitions of FOUND_addon_name and USING_addon_name. For example: FOUND_libefp, USING_CheMPS2, PCMSolver_LIBRARIES, USING_v2rdm_casscf.
    • The CMake target(s) formed use the full add-on name as the namespace, addon_name::lib_name_without_lib.lower(). For example: libefp::efp, CheMPS2::chemps2, PCMSolver::pcm, v2rdm_casscf::v2rdm_casscf.
    • Following the CMake project name (though not restricted to it – PSI4 managment could change the pattern), the user flag to enable an add-on is ENABLE_addon_name. Note that binary-only add-ons don’t go through this enabling process.
    • Internally, the ExternalProject_Add and dummy libraries as well as any tests/ and external/ subdirectories should all be lowercase, addon_name.lower().
    • The conda package and internal to PSI4 (that is, the ExternalProject_Add, dummy libraries, and any tests/ and external/ subdirectories) should all be lowercase, addon_name.lower().
    • Alternatively, you can do everything mentioned here lowercase and just have a different capitalization for an advertising name. After all, that’s what PSI4 does.
  • Debugging

    >>> lldb -- python stage/CMAKE_INSTALL_PREFIX/bin/psi4 ../tests/tu1-h2o-energy/input.dat -l stage/CMAKE_INSTALL_PREFIX/share/psi4/
    >>> (lldb) run