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

Pyberny addition #3

Draft
wants to merge 50 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c6af382
Initial commit using cookiecutter to generate plugin template.
jlheflin Jun 13, 2024
313f15d
Added PyBernyOpt.py and __init__.py
jlheflin Jun 14, 2024
4146ec8
Removed scripting text at top of PyBernyOpt
jlheflin Jun 14, 2024
68d7614
Removed structurefinder_mm.cpp and added structurefinder_mm.py for Mo…
jlheflin Jun 14, 2024
6e0b3dd
Removed structurefinder_mm.py and moved python module structurefinder…
jlheflin Jun 18, 2024
fca3d17
Mirrored file structure of FriendZone
jlheflin Jun 20, 2024
e9d44ee
PyBernyOpt.py now returns the energy as well as the xyz string of the…
jlheflin Jun 20, 2024
c6a3b71
Changed wording on self.input in __init__.py to reflect the correct i…
jlheflin Jun 20, 2024
b3374d8
Rename PyBernyOpt.py to pybernyopt.py
ryanmrichard Jun 20, 2024
5d0f334
Delete default_toolchain.cmake
ryanmrichard Jun 20, 2024
46e5ace
Made it so that the xyz string that is made is generated by a loop ov…
jlheflin Jun 20, 2024
423ec3d
more aligned with nwx
ryanmrichard Jun 24, 2024
853fc8c
Merge pull request #4 from NWChemEx/refactor
jlheflin Jun 24, 2024
907b88a
Committing clang-format changes
github-actions[bot] Jun 24, 2024
4ba4214
Restructured to nwx style, added __init__.py files for structurefinde…
jlheflin Jun 24, 2024
1fcb570
Fixed typo
jlheflin Jun 24, 2024
5488415
Committing clang-format changes
github-actions[bot] Jun 24, 2024
8377697
Adjusted __init__.py files to reflect that of FriendZone
jlheflin Jun 25, 2024
80542aa
Fixed indentation issue
jlheflin Jun 25, 2024
0e4b3ca
address jwaldrop's comments
ryanmrichard Jun 25, 2024
1978f02
Delete src/python/structurefinder/pybernyopt.py
ryanmrichard Jun 25, 2024
e1e0524
add exception
ryanmrichard Jun 25, 2024
4a86be4
Merge branch 'pyberny_addition' of https://github.com/nwchemex/struct…
ryanmrichard Jun 25, 2024
54ba7c9
Committing clang-format changes
github-actions[bot] Jun 25, 2024
2b63ee8
Made suggested changes to test_pybernyop.py and the pyberny __init__.…
jlheflin Jun 25, 2024
2c73442
Adjusted __init__.py in pybery to make it work
jlheflin Jun 27, 2024
a20f551
Committing clang-format changes
github-actions[bot] Jun 27, 2024
4613bc4
Adjusted __init__.py to include the correct submodule 'Energy and Gra…
jlheflin Jun 27, 2024
40c921b
Resolve conflict
jlheflin Jun 27, 2024
df33484
Committing clang-format changes
github-actions[bot] Jun 27, 2024
6f68017
Change property type from TotalEnergy to EnergyNuclearGradientStdVectorD
jlheflin Jun 27, 2024
96a6432
Resolve conflict
jlheflin Jun 27, 2024
69ec4bc
Committing clang-format changes
github-actions[bot] Jun 27, 2024
49c9c72
Fix missing modules in pyberny __init__.py
jlheflin Jun 27, 2024
71e2f35
Committing clang-format changes
github-actions[bot] Jun 27, 2024
6a1c6dd
This does not fix anything, but if 'pointset1' is replaced by 'chemis…
jlheflin Jun 27, 2024
6761af5
Committing clang-format changes
github-actions[bot] Jun 27, 2024
81fcb06
Reverted changes
jlheflin Jun 27, 2024
276a0bd
Committing clang-format changes
github-actions[bot] Jun 27, 2024
bb561b6
Fixed missing TotalEnergy import
jlheflin Jun 28, 2024
9800bc3
Made suggested change from 'pointset1' to geom.molecule.nuclei
jlheflin Jun 28, 2024
d1206c1
Made suggested changes regarding removal of incorrectly specified cod…
jlheflin Jun 28, 2024
69d06f6
Added PointSetD() to gradient calculation and fixed string output
jlheflin Jun 28, 2024
ad568ea
Committing clang-format changes
github-actions[bot] Jun 28, 2024
477e58f
Added diagnostic printing and removed dependency of FriendZone
jlheflin Jul 8, 2024
591ba2d
Fixed merge conflicts
jlheflin Jul 8, 2024
8f420ab
Added parameters to allow tests to be passed for PyBerny optimization.
jlheflin Jul 8, 2024
1746d1b
Committing clang-format changes
github-actions[bot] Jul 8, 2024
fceb006
Adjusted test files
jlheflin Jul 8, 2024
84d379d
Added NWChemEx as a dependency for integration test
jlheflin Jul 9, 2024
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
26 changes: 26 additions & 0 deletions .github/.licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2021 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.
#
header:
license:
spdx-id: Apache-2.0
copyright-owner: NWChemEx Community

paths-ignore:
- .github/
- LICENSE
- version.txt
- docs/source/nitpick_exceptions

comment: never
29 changes: 29 additions & 0 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2024 NWChemEx Community
#
# 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/.github/.github/workflows/common_merge.yaml@master
with:
doc_target: 'structure_finder_cxx_api'
ryanmrichard marked this conversation as resolved.
Show resolved Hide resolved
generate_module_docs: true
secrets: inherit
31 changes: 31 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2024 NWChemEx Community
#
# 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/.github/.github/workflows/common_pull_request.yaml@master
with:
config_file: '.github/.licenserc.yaml'
source_dir: ''
compilers: '["gcc-11", "clang-14"]'
doc_target: 'structure_finder_cxx_api'
ryanmrichard marked this conversation as resolved.
Show resolved Hide resolved
secrets: inherit
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2024 NWChemEx Community
#
# 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.

__pycache__/
build/
venv/
install/
88 changes: 88 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Copyright 2024 NWChemEx Community
#
# 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 Project and Version
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/version.txt" VERSION)
project(structurefinder VERSION "${VERSION}" LANGUAGES CXX)

## Get CMaize
include(cmake/get_cmaize.cmake)

## Paths ##
set(${PROJECT_NAME}_INC_DIR "${CMAKE_CURRENT_LIST_DIR}/include/${PROJECT_NAME}")
set(${PROJECT_NAME}_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/src/${PROJECT_NAME}")
set(${PROJECT_NAME}_TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests")
set(${PROJECT_NAME}_PYTHON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/python")
set(${PROJECT_NAME}_PYTHON_TEST_DIR "${${PROJECT_NAME}_TESTS_DIR}/python")

ryanmrichard marked this conversation as resolved.
Show resolved Hide resolved
## Options ##
cmaize_option_list(
BUILD_TESTING OFF "Should the tests be built?"
BUILD_PYBIND11_PYBINDINGS ON "Use Pybind11 to build Python bindings?"
)

## Find or build dependencies ##
cmaize_find_or_build_dependency(
simde
URL github.com/NWChemEx/SimDE
VERSION master
BUILD_TARGET simde
FIND_TARGET nwx::simde
CMAKE_ARGS BUILD_TESTING=OFF
BUILD_PYBIND11_PYBINDINGS=${BUILD_PYBIND11_PYBINDINGS}
)

cmaize_find_or_build_dependency(
pyberny
PACKAGE_MANAGER pip
)

# Builds C++ API documentation
include(nwx_cxx_api_docs)
nwx_cxx_api_docs("${${PROJECT_NAME}_INC_DIR}" "${${PROJECT_NAME}_SRC_DIR}")

## Add libraries ##
add_library(${PROJECT_NAME} INTERFACE)
target_link_libraries(${PROJECT_NAME} INTERFACE simde pyberny)

## Build tests ##
if("${BUILD_TESTING}")
include(CTest)
include(nwx_pybind11)

## Add Tests ##
cmaize_find_or_build_dependency(
nwchemex
URL github.com/NWChemEx/NWChemEx
BUILD_TARGET nwchemex
FIND_TARGET nwx::nwchemex
CMAKE_ARGS BUILD_TESTING=OFF
)

nwx_pybind11_tests(
py_${PROJECT_NAME}
"${${PROJECT_NAME}_PYTHON_TEST_DIR}/unit_tests/test_${PROJECT_NAME}.py"
DEPENDS nwchemex
SUBMODULES simde chemist pluginplay parallelzone friendzone chemcache nwchemex
)

endif()

## Add package ##
install(
DIRECTORY "${${PROJECT_NAME}_PYTHON_DIR}/${PROJECT_NAME}"
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 2024 NWChemEx Community
~
~ 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.
49 changes: 49 additions & 0 deletions cmake/get_cmaize.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2024 NWChemEx Community
#
# 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.

function(get_cmaize)

if("${CMAIZE_VERSION}" STREQUAL "")
set(CMAIZE_VERSION v1.1.0 )
endif()

# Store whether we are building tests or not, then turn off the tests
if(BUILD_TESTING)
set(build_testing_old "${BUILD_TESTING}")
endif()
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)

# Download CMakePP and bring it into scope
include(FetchContent)
FetchContent_Declare(
cmaize
GIT_REPOSITORY https://github.com/CMakePP/CMaize
GIT_TAG ${CMAIZE_VERSION}
)
FetchContent_MakeAvailable(cmaize)

# Restore the previous value, if set
# Unset otherwise
if(build_testing_old)
set(BUILD_TESTING "${build_testing_old}" CACHE BOOL "" FORCE)
else()
unset(BUILD_TESTING CACHE)
endif()
endfunction()

# Call the function we just wrote to get CMaize
get_cmaize()

# Include CMaize
include(cmaize/cmaize)
34 changes: 34 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2024 NWChemEx Community
#
# 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.

# 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 2024 NWChemEx Community
~
~ 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/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==v7.2.6
sphinx_rtd_theme==1.3.0
sphinxcontrib-bibtex
sphinx_tabs
sphinx-autoapi
Loading
Loading