-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add PCMSolver #22286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PCMSolver #22286
Changes from 39 commits
c2c0f46
7c04ce8
8e12350
43f18db
1408952
e78dede
5093f41
1148e6a
8758965
02e184d
05a9b6f
72bfdba
a51aefe
374636c
754ceab
f8d5052
c02c215
ab350bf
6063b3a
bd3d981
5e7f2ee
93cc3b7
732e699
af477f9
be01f5c
3c9ac63
1620813
738df10
6b31112
e34b63b
d838870
58ba26b
6cfa44c
94becf9
ae66011
94e5021
a3f1575
7ac2bc2
4593f5e
f65686a
3224aef
d5c0ddb
a55f9c3
708cc34
6a26338
655182c
7104e5c
aab04e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| @ECHO ON | ||
|
|
||
| set "CC=gcc.exe" | ||
| set "CXX=g++.exe" | ||
| set "FC=gfortran.exe" | ||
|
|
||
| cmake %CMAKE_ARGS% ^ | ||
| -G "MinGW Makefiles" ^ | ||
| -S %SRC_DIR% ^ | ||
| -B build ^ | ||
| -D CMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ | ||
| -D CMAKE_BUILD_TYPE=Release ^ | ||
| -D CMAKE_C_FLAGS="%CFLAGS%" ^ | ||
| -D CMAKE_CXX_FLAGS="%CXXFLAGS%" ^ | ||
| -D CMAKE_Fortran_FLAGS="%FFLAGS%" ^ | ||
| -D CMAKE_INSTALL_LIBDIR="lib" ^ | ||
| -D CMAKE_INSTALL_INCLUDEDIR="include" ^ | ||
| -D CMAKE_INSTALL_BINDIR="bin" ^ | ||
| -D CMAKE_INSTALL_DATADIR="share" ^ | ||
| -D PYMOD_INSTALL_LIBDIR="/../../Lib/site-packages" ^ | ||
| -D Python_EXECUTABLE="%PYTHON%" ^ | ||
| -D CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ^ | ||
| -D CMAKE_GNUtoMS=ON ^ | ||
| -D BUILD_TESTING=OFF ^ | ||
| -D CMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^ | ||
| -D ENABLE_OPENMP=OFF ^ | ||
| -D ENABLE_GENERIC=OFF ^ | ||
| -D ENABLE_TESTS=ON ^ | ||
| -D ENABLE_TIMER=OFF ^ | ||
| -D ENABLE_LOGGER=OFF ^ | ||
| -D BUILD_STANDALONE=ON ^ | ||
| -D ENABLE_CXX11_SUPPORT=ON | ||
| if errorlevel 1 exit 1 | ||
|
|
||
| cmake --build build ^ | ||
| --config Release ^ | ||
| --target install ^ | ||
| -- -j %CPU_COUNT% | ||
| if errorlevel 1 exit 1 | ||
|
|
||
| :: Building both static & shared (instead of SHARED_LIBRARY_ONLY) since the tests | ||
| :: only build with static lib. Don't want to distribute static, though, so | ||
| :: removing all the static lib stuff immediately after install. | ||
| del %LIBRARY_PREFIX%\\share\\cmake\\PCMSolver\\PCMSolverTargets-static-release.cmake | ||
| del %LIBRARY_PREFIX%\\share\\cmake\\PCMSolver\\PCMSolverTargets-static.cmake | ||
| del %LIBRARY_PREFIX%\\lib\\libpcm.a | ||
|
|
||
| cd build | ||
| ctest --rerun-failed --output-on-failure | ||
| if errorlevel 1 exit 1 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -ex | ||
|
|
||
| ${BUILD_PREFIX}/bin/cmake ${CMAKE_ARGS} \ | ||
| -S ${SRC_DIR} \ | ||
| -B build \ | ||
| -G "Ninja" \ | ||
| -D CMAKE_INSTALL_PREFIX=${PREFIX} \ | ||
| -D CMAKE_BUILD_TYPE=Release \ | ||
| -D CMAKE_C_COMPILER=${CC} \ | ||
| -D CMAKE_C_FLAGS="${CFLAGS}" \ | ||
| -D CMAKE_CXX_COMPILER=${CXX} \ | ||
| -D CMAKE_CXX_FLAGS="${CXXFLAGS}" \ | ||
| -D CMAKE_Fortran_COMPILER=${FC} \ | ||
| -D CMAKE_Fortran_FLAGS="${FFLAGS}" \ | ||
| -D CMAKE_INSTALL_LIBDIR=lib \ | ||
| -D PYMOD_INSTALL_LIBDIR="/python${PY_VER}/site-packages" \ | ||
| -D Python_EXECUTABLE=${PYTHON} \ | ||
| -D ENABLE_OPENMP=OFF \ | ||
| -D ENABLE_GENERIC=OFF \ | ||
| -D ENABLE_TESTS=ON \ | ||
| -D ENABLE_TIMER=OFF \ | ||
| -D ENABLE_LOGGER=OFF \ | ||
| -D BUILD_STANDALONE=ON \ | ||
| -D ENABLE_CXX11_SUPPORT=ON | ||
|
|
||
| cmake --build build --target install -j${CPU_COUNT} | ||
|
|
||
| # Building both static & shared (instead of SHARED_LIBRARY_ONLY) since the tests | ||
| # only build with static lib. Don't want to distribute static, though, so | ||
| # removing all the static lib stuff immediately after install. | ||
| rm ${PREFIX}/share/cmake/PCMSolver/PCMSolverTargets-static-release.cmake | ||
| rm ${PREFIX}/share/cmake/PCMSolver/PCMSolverTargets-static.cmake | ||
| rm ${PREFIX}/lib/libpcm.a | ||
|
|
||
| cd build | ||
| ctest --rerun-failed --output-on-failure -j${CPU_COUNT} | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| {% set name = "PCMSolver" %} | ||
| {% set version = "1.2.3" %} | ||
| {% set sha256 = "d22157f37cb64c1324246ae2278bdf8ec0581b0ba4ad58d4d9c209efd0dfa61f" %} | ||
|
|
||
| package: | ||
| name: {{ name|lower }} | ||
| version: {{ version }} | ||
|
|
||
| source: | ||
| # url: https://github.com/{{ name }}/{{ name|lower }}/archive/v{{ version }}.tar.gz | ||
| url: https://github.com/loriab/pcmsolver/archive/8f72076.tar.gz # v1.2.3 plus build commits | ||
| sha256: {{ sha256 }} | ||
|
|
||
| build: | ||
| number: 0 | ||
| run_exports: | ||
| - {{ pin_subpackage('pcmsolver', max_pin='x.x.x') }} | ||
|
|
||
| requirements: | ||
| build: | ||
| - {{ compiler('c') }} # [unix] | ||
| - {{ compiler('cxx') }} # [unix] | ||
| - {{ compiler('fortran') }} # [unix] | ||
| - {{ compiler('m2w64_c') }} # [win] | ||
| - {{ compiler('m2w64_fortran') }} # [win] | ||
| - cmake | ||
| - ninja | ||
| host: | ||
| # below two are header-only deps that pcmsolver supplies when missing | ||
| # - boost-cpp | ||
| # - eigen | ||
| - python | ||
| - zlib | ||
| run: | ||
| - m2w64-gcc-libgfortran # [win] | ||
| - python | ||
|
|
||
| test: | ||
| imports: | ||
| - pcmsolver | ||
| files: | ||
| - molecule.inp | ||
| requires: | ||
| - m2w64-binutils # [win] # provides objdump.exe | ||
| commands: | ||
| - ls -l $PREFIX/lib # [unix] | ||
| - ls -l $PREFIX/share/cmake/PCMSolver # [unix] | ||
| - ls -l $SP_DIR/pcmsolver # [unix] | ||
| - dir %PREFIX%\\Library\\lib # [win] | ||
| - dir %PREFIX%\\Library\\share\\cmake\\pcmsolver # [win] | ||
| - dir %SP_DIR%\\pcmsolver # [win] | ||
| # Verify library | ||
| - test -L $PREFIX/lib/libpcm$SHLIB_EXT # [unix] | ||
| - test ! -f $PREFIX/lib/libpcm.a # [unix] | ||
| - test -f $SP_DIR/pcmsolver/pcmparser.py # [unix] | ||
| - if not exist %PREFIX%\\Library\\lib\\libpcm.dll.a exit 1 # [win] # gnu import lib | ||
| - if not exist %PREFIX%\\Library\\lib\\libpcm.lib exit 1 # [win] # ms import lib | ||
| - if not exist %PREFIX%\\Library\\bin\\libpcm.dll exit 1 # [win] # gnu/ms dyn lib | ||
| - if exist %PREFIX%\\Library\\lib\\libpcm.a exit 1 # [win] # gnu static lib removed | ||
| - if not exist %SP_DIR%\\pcmsolver\\pcmparser.py exit 1 # [win] | ||
| # Verify executable | ||
| - test -f $PREFIX/bin/go_pcm.py # [unix] | ||
| - test -f $PREFIX/bin/run_pcm # [unix] | ||
| - if not exist %PREFIX%\\Library\\bin\\go_pcm.py exit 1 # [win] | ||
| - if not exist %PREFIX%\\Library\\bin\\run_pcm.exe exit 1 # [win] | ||
| # Verify accessories | ||
| - test -e $PREFIX/include/PCMSolver/pcmsolver.h # [unix] | ||
| - test -e $PREFIX/share/cmake/PCMSolver/PCMSolverConfig.cmake # [unix] | ||
| - if not exist %PREFIX%\\Library\\include\\PCMSolver\\pcmsolver.h exit 1 # [win] | ||
| - if not exist %PREFIX%\\Library\\share\\cmake\\PCMSolver\\PCMSolverConfig.cmake exit 1 # [win] | ||
| # Inspect linkage | ||
| - ldd -v $PREFIX/lib/libpcm$SHLIB_EXT # [linux and build_platform == target_platform] | ||
| - otool -L $PREFIX/lib/libpcm$SHLIB_EXT # [osx] | ||
| - objdump.exe -p %PREFIX%\\Library\\bin\\libpcm.dll | findstr /i "dll" # [win] | ||
| # Actually test | ||
| - python $PREFIX/bin/go_pcm.py --inp molecule.inp --exe $PREFIX/bin # [unix] | ||
| - python %PREFIX%\\Library\\bin\\go_pcm.py --inp molecule.inp --exe %PREFIX%\\Library\\bin # [win] | ||
| - cat molecule.out # [unix] | ||
| - type molecule.out # [win] | ||
|
|
||
| about: | ||
| home: https://github.com/PCMSolver/pcmsolver | ||
| dev_url: https://github.com/PCMSolver/pcmsolver | ||
| doc_url: https://pcmsolver.readthedocs.io/en/stable/ | ||
| doc_source_url: https://github.com/PCMSolver/pcmsolver/tree/master/doc | ||
| license: LGPL-3.0-only | ||
| license_url: https://opensource.org/license/lgpl-3-0/ | ||
| license_file: LICENSE | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to list the license files of the projects in /external, they are not all LGPL.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, I never noticed
Then I started hunting through the source a little more and found 10 in total, so I added a THIRD-PARTY-LICENSE file to the upstream repo to cover them all. |
||
| license_family: LGPL | ||
| summary: "R. Di Remigio & L. Frediani's Polarizable Continuum Model (PCM)" | ||
|
|
||
| extra: | ||
| recipe-maintainers: | ||
| - loriab | ||
| - robertodr | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| units = angstrom | ||
| codata = 2002 | ||
| medium | ||
| { | ||
| solvertype = cpcm | ||
| correction = 0.5 | ||
| solvent = cyclohexane | ||
| } | ||
|
|
||
| cavity | ||
| { | ||
| type = gepol | ||
| area = 0.6 | ||
| radiiset = uff | ||
| mode = implicit | ||
| } | ||
|
|
||
| molecule | ||
| { | ||
| # x, y, z, q | ||
| geometry = [0.000000000, 0.00000000, 0.08729478, 9.0, | ||
| 0.000000000, 0.00000000, -1.64558444, 1.0] | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use "AND" to include the license types of the projects in /external
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGPL3 + MIT + MIT-0 should cover it.