-
Notifications
You must be signed in to change notification settings - Fork 0
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
Scipy optimizer module #2
Open
keceli
wants to merge
20
commits into
master
Choose a base branch
from
optimizer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5bcf0ff
Create the skeleton
keceli 435ec6d
Added chemisttools, scipy optimizer and tests
keceli 36587e8
Fixes for the format
keceli 38175f3
Add test for optimizer
keceli 59a8fd5
Update optimizer modules
keceli df50753
Add CI workflows
keceli f55d94e
Add requirements.txt file for dependencies
keceli b1aad79
Committing clang-format changes
github-actions[bot] 4f5254c
Merge branch 'optimizer' of github.com:NWChemEx-Project/StructureFind…
keceli 8e5de71
Add license config file
keceli ab1a549
Remove license headers
keceli 5e5c8a2
Committing clang-format changes
github-actions[bot] c7dc231
Remove old license headers
keceli 9950d75
Add docs placeholder
keceli b314c88
Committing clang-format changes
github-actions[bot] 2081ebf
Remove obsolete options
keceli 6d1fbb7
Merge branch 'optimizer' of github.com:NWChemEx-Project/StructureFind…
keceli 642da7e
Remove NWX_MODULE_DIRECTORY check
keceli 8b235c6
Add sphinx-autoapi to requirements
keceli 5e0a3c5
Use sphinx-autoapi==3.0.0
keceli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
header: | ||
license: | ||
spdx-id: Apache-2.0 | ||
copyright-owner: NWChemEx-Project | ||
|
||
paths-ignore: | ||
- .github/ | ||
- docs/Makefile | ||
- LICENSE | ||
- docs/requirements.txt | ||
- docs/source/bibliography/*.bib | ||
- version.txt | ||
- cmake/friends.py.in | ||
|
||
comment: never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
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) | ||
|
||
## Build StructureFinder's dependencies ## | ||
cpp_find_or_build_dependency( | ||
nwchemex | ||
URL github.com/NWChemEx-Project/NWChemEx | ||
PRIVATE TRUE | ||
VERSION master | ||
BUILD_TARGET nwchemex | ||
FIND_TARGET nwx::nwchemex | ||
CMAKE_ARGS BUILD_TESTING=OFF | ||
) | ||
|
||
if("${BUILD_TESTING}") | ||
include(CTest) | ||
include(nwx_pybind11) | ||
|
||
# override | ||
function(nwx_pybind11_tests npt_name npt_driver) | ||
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}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,18 @@ | ||
<!-- | ||
~ 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. | ||
--> | ||
|
||
# StructureFinder | ||
Repo for geometry optimization, transition states, etc. Much of this repo will be Python based, providing interfaces to geomeTRIC, pyBerny, ASE NEB, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = structurefinder | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!-- | ||
~ 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. | ||
--> | ||
|
||
General instructions for building documentation found throughout the NWChemEx project are available at: | ||
https://github.com/NWChemEx-Project/NWChemEx/blob/master/docs/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sphinx | ||
sphinx_rtd_theme==1.3.0 | ||
sphinxcontrib-bibtex | ||
sphinx_tabs | ||
sphinx-autoapi==3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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. | ||
|
||
# | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file does only contain a selection of the most common options. For a | ||
# full list see the documentation: | ||
# http://www.sphinx-doc.org/en/master/config | ||
|
||
import os | ||
import sys | ||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = u'structurefinder' | ||
copyright = u'2023, NWChemEx Team' | ||
author = u'NWChemEx Team' | ||
|
||
# Get the version from version.txt | ||
version = '1.0.0' | ||
# The full version, including alpha/beta/rc tags | ||
release = version | ||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# We use numref which is introduced in Sphinx 1.3 | ||
needs_sphinx = '1.3' | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx_tabs.tabs', | ||
'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', | ||
'sphinx.ext.mathjax', 'sphinx.ext.githubpages', 'autoapi.extension' | ||
] | ||
dir_path = os.path.dirname(os.path.realpath(__file__)) | ||
doc_path = os.path.dirname(dir_path) | ||
root_path = os.path.dirname(doc_path) | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
#templates_path = ['_templates'] | ||
|
||
# The suffix(es) of source filenames. | ||
# You can specify multiple suffix as a list of string: | ||
# | ||
# source_suffix = ['.rst', '.md'] | ||
source_suffix = '.rst' | ||
|
||
# The master toctree document. | ||
master_doc = 'index' | ||
|
||
# The language for content autogenerated by Sphinx. Refer to documentation | ||
# for a list of supported languages. | ||
# | ||
# This is also used if you do content translation via gettext catalogs. | ||
# Usually you set "language" from the command line for these cases. | ||
language = 'en' | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path . | ||
exclude_patterns = [] | ||
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = 'sphinx' | ||
|
||
# Should figures be numbered? | ||
numfig = True | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'sphinx_rtd_theme' | ||
|
||
# Theme options are theme-specific and customize the look and feel of a theme | ||
# further. For a list of options available for each theme, see the | ||
# documentation. | ||
# | ||
# html_theme_options = {} | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
#html_static_path = ['_static'] | ||
|
||
# Custom sidebar templates, must be a dictionary that maps document names | ||
# to template names. | ||
# | ||
# The default sidebars (for documents that don't match any pattern) are | ||
# defined by theme itself. Builtin themes are using these templates by | ||
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', | ||
# 'searchbox.html']``. | ||
# | ||
# html_sidebars = {} | ||
|
||
# -- Options for HTMLHelp output --------------------------------------------- | ||
|
||
# Output file base name for HTML help builder. | ||
htmlhelp_basename = project + 'doc' | ||
|
||
# -- Options for LaTeX output ------------------------------------------------ | ||
|
||
latex_elements = { | ||
# The paper size ('letterpaper' or 'a4paper'). | ||
# | ||
# 'papersize': 'letterpaper', | ||
|
||
# The font size ('10pt', '11pt' or '12pt'). | ||
# | ||
# 'pointsize': '10pt', | ||
|
||
# Additional stuff for the LaTeX preamble. | ||
# | ||
# 'preamble': '', | ||
|
||
# Latex figure (float) alignment | ||
# | ||
# 'figure_align': 'htbp', | ||
} | ||
|
||
# Grouping the document tree into LaTeX files. List of tuples | ||
# (source start file, target name, title, | ||
# author, documentclass [howto, manual, or own class]). | ||
latex_documents = [ | ||
(master_doc, project + '.tex', project + ' Documentation', author, | ||
'manual'), | ||
] | ||
|
||
# -- Options for manual page output ------------------------------------------ | ||
|
||
# One entry per manual page. List of tuples | ||
# (source start file, name, description, authors, manual section). | ||
man_pages = [(master_doc, project.lower(), project + ' Documentation', | ||
[author], 1)] | ||
|
||
# -- Options for Texinfo output ---------------------------------------------- | ||
|
||
# Grouping the document tree into Texinfo files. List of tuples | ||
# (source start file, target name, title, author, | ||
# dir menu entry, description, category) | ||
texinfo_documents = [ | ||
(master_doc, project, project + ' Documentation', author, project, | ||
'One line description of project.', 'Miscellaneous'), | ||
] | ||
|
||
# -- Extension configuration ------------------------------------------------- | ||
autoapi_dirs = ['../../src', '../../tests'] | ||
autoapi_add_toctree_entry = False | ||
|
||
# -- Options for intersphinx extension --------------------------------------- | ||
|
||
# Example configuration for intersphinx: refer to the Python standard library. | ||
intersphinx_mapping = {'https://docs.python.org/': None} | ||
|
||
# -- Options for todo extension ---------------------------------------------- | ||
|
||
# If true, `todo` and `todoList` produce output, else they produce nothing. | ||
todo_include_todos = True |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why do you need to override? Can we update nwx_pybind11?