-
Notifications
You must be signed in to change notification settings - Fork 0
Scipy optimizer module #2
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
base: master
Are you sure you want to change the base?
Changes from 7 commits
5bcf0ff
435ec6d
36587e8
38175f3
59a8fd5
df50753
f55d94e
b1aad79
4f5254c
8e5de71
ab1a549
5e5c8a2
c7dc231
9950d75
b314c88
2081ebf
6d1fbb7
642da7e
8b235c6
5e0a3c5
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,46 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| # Copyright 2023 NWChemEx-Project | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| name: .github Merge Workflow | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| Common-Merge: | ||
| uses: NWChemEx-Project/.github/.github/workflows/common_merge.yaml@master | ||
| with: | ||
| doc_target: 'Sphinx' | ||
| generate_module_docs: false | ||
| secrets: inherit | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
ryanmrichard marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Copyright 2023 NWChemEx-Project | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| name: .github Pull Request Workflow | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| Common-Pull-Request: | ||
| uses: NWChemEx-Project/.github/.github/workflows/common_pull_request.yaml@master | ||
| with: | ||
| config_file: '.github/.licenserc.yaml' | ||
| source_dir: '' | ||
| compilers: '' | ||
| doc_target: 'Sphinx' | ||
| secrets: inherit | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| # Copyright 2022 NWChemEx-Project | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| cmake_minimum_required(VERSION 3.14) | ||
| set(VERSION 1.0.0) #TODO: get from git | ||
| project(structurefinder VERSION "${VERSION}" LANGUAGES CXX) | ||
|
|
||
| include(FetchContent) | ||
| FetchContent_Declare( | ||
| nwx_cmake | ||
| GIT_REPOSITORY https://github.com/NWChemEx-Project/NWXCMake | ||
| ) | ||
| FetchContent_MakeAvailable(nwx_cmake) | ||
| list(APPEND CMAKE_MODULE_PATH "${nwx_cmake_SOURCE_DIR}/cmake") | ||
|
|
||
| set( | ||
| CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/cmake" | ||
| CACHE STRING "" FORCE | ||
| ) | ||
|
|
||
| include(get_cmaize) | ||
| include(nwx_versions) | ||
|
|
||
| ### Options ### | ||
| option(BUILD_TESTING "Should we build the tests?" OFF) | ||
| option(BUILD_PYBIND11_PYBINDINGS "Use Pybind11 to build Python bindings?" ON) | ||
| option(ENABLE_NWCHEM "Should we build supporf for friend: NWChem ?" ON) | ||
ryanmrichard marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Build StructureFinder's dependencies ## | ||
| cpp_find_or_build_dependency( | ||
| nwchemex | ||
| URL github.com/NWChemEx-Project/NWChemEx | ||
| PRIVATE TRUE | ||
| VERSION ${NWX_SIMDE_VERSION} | ||
| BUILD_TARGET nwchemex | ||
| FIND_TARGET nwx::nwchemex | ||
| CMAKE_ARGS BUILD_TESTING=OFF | ||
| ) | ||
|
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. Should be SimDE not NWX.
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. I want to be able use NWChemEx driver modules to get CCSD, MP2 energies once available.
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. It should still be SimDE. Requiring the user to build NWChemEx adds a lot of build overhead and makes your plugin dependent on literally the entire stack. That said, building of other plugins is useful for testing, but should be limited to integration testing only. I'll warn you that, to my knowledge, no one has yet tried to use NWChemEx as a dependency for integration testing, so there may be hiccups.
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.
Could you clarify? I assume the main role of this repo is to provide geometry optimization, which would require energies and gradients. NWChemEx is the repo that provides access to all plugins that can give those properties. How would I access them if I just use SimDE?
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. I understand that you mean those dependencies would only be required during testing, but I think a user of this repo would expect to access them directly.
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. The NWChemEx repo is the one that pulls together all of the functionalities. It's not meant to be used as a dependency of our plugins. This repo will more likely be a dependency of NWChemEx, actually. That way, when someone builds NWChemEx, they will get the Integrals, SCF, ChemCache, the geometry optimization modules here, and any other plugins we associate with it down the line. |
||
|
|
||
| if("${NWX_MODULE_DIRECTORY}" STREQUAL "") | ||
| message( | ||
| FATAL_ERROR "NWX_MODULE_DIRECTORY must be set to the directory " | ||
| "where you would like the Python modules installed." | ||
| ) | ||
| endif() | ||
ryanmrichard marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| if("${BUILD_TESTING}") | ||
| include(CTest) | ||
| include(nwx_pybind11) | ||
|
|
||
| # override | ||
| function(nwx_pybind11_tests npt_name npt_driver) | ||
|
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. Why do you need to override? Can we update nwx_pybind11? |
||
| if(NOT "${BUILD_PYBIND11_PYBINDINGS}") | ||
| return() | ||
| endif() | ||
|
|
||
| set(_npt_options "") | ||
| set(_npt_one_val "") | ||
| set(_npt_lists SUBMODULES) | ||
| cmake_parse_arguments( | ||
| "_npt" "${_npt_options}" "${_npt_one_val}" "${_npt_lists}" ${ARGN} | ||
| ) | ||
|
|
||
| if("${BUILD_TESTING}") | ||
| include(CTest) | ||
| find_package(Python COMPONENTS Interpreter REQUIRED) | ||
|
|
||
| # Build the PYTHONPATH for the test | ||
| set(_npt_py_path "PYTHONPATH=${NWX_MODULE_DIRECTORY}") | ||
| set(_npt_py_path "${_npt_py_path}:${CMAKE_BINARY_DIR}") | ||
| foreach(_npt_submod ${_npt_SUBMODULES}) | ||
| set(_npt_dep_dir "${CMAKE_BINARY_DIR}/_deps/${_npt_submod}-build") | ||
| set(_npt_py_path "${_npt_py_path}:${_npt_dep_dir}") | ||
| endforeach() | ||
| if(NOT "${NWX_PYTHON_EXTERNALS}" STREQUAL "") | ||
| set(_npt_py_path "${_npt_py_path}:${NWX_PYTHON_EXTERNALS}") | ||
| endif() | ||
|
|
||
| add_test( | ||
| NAME "${npt_name}" | ||
| COMMAND "${Python_EXECUTABLE}" "${npt_driver}" | ||
| ) | ||
|
|
||
| set_tests_properties( | ||
| "${npt_name}" | ||
| PROPERTIES ENVIRONMENT "${_npt_py_path}" | ||
| ) | ||
| endif() | ||
| endfunction() | ||
|
|
||
| # | ||
|
|
||
| set(PYTHON_TEST_DIR "${CMAKE_CURRENT_LIST_DIR}/tests/python") | ||
|
|
||
| message("calling nwx_pybind11_tests") | ||
| nwx_pybind11_tests( | ||
| pyStructureFinder_unit_tests | ||
| "${PYTHON_TEST_DIR}/unit_tests/test_structurefinder.py" | ||
| SUBMODULES nwchemex simde chemist pluginplay parallelzone | ||
| ) | ||
| endif() | ||
|
|
||
| install( | ||
| DIRECTORY "${python_src_directory}/structurefinder" | ||
| DESTINATION "${NWX_MODULE_DIRECTORY}" | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
ryanmrichard marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.