├── .github └── workflows │ └── install.yml ├── LICENSE ├── README.md └── multiwfn.rb /.github/workflows/install.yml: -------------------------------------------------------------------------------- 1 | name: install 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [main] 7 | pull_request: 8 | branches: [main] 9 | schedule: 10 | - cron: '0 0 * * 0' 11 | 12 | jobs: 13 | install: 14 | runs-on: macos-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | 19 | - name: Install 20 | run: | 21 | brew install --formula --HEAD multiwfn.rb --with-openmp --verbose 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Kjell Jorner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # homebrew-multiwfn 2 | 3 | A homebrew formula for Multiwfn. 4 | 5 | You can install `multiwfn` with the following command. It can take quite a while to compile. 6 | 7 | ``` 8 | brew install --HEAD digital-chemistry-laboratory/multiwfn/multiwfn 9 | ``` 10 | 11 | To add OpenMP support, use instead 12 | 13 | ``` 14 | brew tap digital-chemistry-laboratory/multiwfn 15 | brew install --HEAD multiwfn --with-openmp 16 | ``` 17 | 18 | To upgrade to the latest version, run `brew upgrade multiwfn --fetch-HEAD` 19 | 20 | A copy of settings.ini is installed. To use it, set environment variable `Multiwfnpath=${HOMEBREW_PREFIX}/etc/multiwfn`. If you want to keep the config file between upgrades, copy it to for example `~/.config/multiwfn/` and point `Multiwfnpath` there instead. 21 | -------------------------------------------------------------------------------- /multiwfn.rb: -------------------------------------------------------------------------------- 1 | class Multiwfn < Formula 2 | desc "A Multifunctional Wavefunction Analyzer" 3 | homepage "http://sobereva.com/multiwfn/" 4 | head "https://github.com/digital-chemistry-laboratory/multiwfn-mac-build.git", branch: "source_dist" 5 | license :cannot_represent 6 | 7 | desc "A copy of settings.ini is installed. To use it, set environment variable Multiwfnpath=${HOMEBREW_PREFIX}/etc/multiwfn." 8 | 9 | option "with-openmp", "Builds with OpenMP support." 10 | 11 | depends_on "cmake" => :build 12 | depends_on "pkg-config" => :build 13 | depends_on "gcc" 14 | depends_on "openblas" 15 | depends_on "flint" 16 | fails_with :clang 17 | 18 | def install 19 | cmake_args = std_cmake_args 20 | if build.with? "openmp" 21 | cmake_args << "-DWITH_OpenMP=ON" 22 | end 23 | system "cmake", "-S", ".", "-B", "build", *cmake_args 24 | system "cmake", "--build", "build" 25 | system "cmake", "--install", "build" 26 | end 27 | 28 | test do 29 | system "expect", "-c", "'spawn multiwfn; send \\003;'" 30 | end 31 | end 32 | --------------------------------------------------------------------------------