Skip to content
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
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/.licenserc.yaml
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
14 changes: 14 additions & 0 deletions .github/workflows/merge.yaml
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
16 changes: 16 additions & 0 deletions .github/workflows/pull_request.yaml
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
94 changes: 94 additions & 0 deletions CMakeLists.txt
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)
Copy link
Member

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?

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}"
)
16 changes: 16 additions & 0 deletions README.md
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.
20 changes: 20 additions & 0 deletions docs/Makefile
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)
18 changes: 18 additions & 0 deletions docs/README.md
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
5 changes: 5 additions & 0 deletions docs/requirements.txt
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
174 changes: 174 additions & 0 deletions docs/source/conf.py
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
Loading