Skip to content

Commit 80d2809

Browse files
committed
Initial commit
0 parents  commit 80d2809

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3826
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# build directory
2+
build/
3+
4+
# vim temp files
5+
.*.sw*

CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
3+
project(chemkit-python)
4+
5+
set(CMAKE_MODULE_PATH ${chemkit-python_SOURCE_DIR}/cmake)
6+
7+
set(CMAKE_BUILD_TYPE Release)
8+
9+
# find cython
10+
find_program(CYTHON cython REQUIRED)
11+
12+
# find python interpreter
13+
find_package(PythonInterp REQUIRED)
14+
15+
# source directory
16+
add_subdirectory(src)
17+
18+
# testing
19+
enable_testing()
20+
add_subdirectory(tests)
21+
22+
# uninstall target
23+
configure_file(
24+
"${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
25+
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
26+
IMMEDIATE @ONLY)
27+
28+
add_custom_target(uninstall
29+
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
30+

INSTALL

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
=== Dependencies ==============================================================
2+
3+
- Chemkit - http://www.chemkit.org
4+
- Cython - http://www.cython.org
5+
6+
=== Compiling =================================================================
7+
8+
From the chemkit-python directory (the same directory this file is in) run the
9+
following commands:
10+
11+
mkdir build
12+
cd build
13+
cmake ..
14+
make
15+
16+
=== Installation ==============================================================
17+
18+
After successfully compiling chemkit run the following command to install the
19+
library (you may need root/administator privileges):
20+
21+
make install

LICENSE

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (C) 2009-2011 Kyle Lutz
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions
6+
are met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
* Neither the name of the chemkit project nor the names of its
14+
contributors may be used to endorse or promote products derived
15+
from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
chemkit-python - a python wrapper for the chemkit library
2+
3+
=== Introduction ==============================================================
4+
5+
chemkit-python provides a python interface to the chemkit library.
6+
7+
For more information see the chemkit website: http://www.chemkit.org
8+
9+
=== Installation and Usage ====================================================
10+
11+
See the included INSTALL file for directions for compiling, installing, and
12+
using the chemkit-python library.
13+
14+
=== License ===================================================================
15+
16+
The chemkit-python library is licensed under the BSD license. See the included
17+
LICENSE file to view the full license text.
18+

cmake/FindEigen3.cmake

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# - Try to find Eigen3 lib
2+
#
3+
# This module supports requiring a minimum version, e.g. you can do
4+
# find_package(Eigen3 3.1.2)
5+
# to require version 3.1.2 or newer of Eigen3.
6+
#
7+
# Once done this will define
8+
#
9+
# EIGEN3_FOUND - system has eigen lib with correct version
10+
# EIGEN3_INCLUDE_DIR - the eigen include directory
11+
# EIGEN3_VERSION - eigen version
12+
13+
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
14+
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
15+
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
16+
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
17+
18+
if(NOT Eigen3_FIND_VERSION)
19+
if(NOT Eigen3_FIND_VERSION_MAJOR)
20+
set(Eigen3_FIND_VERSION_MAJOR 2)
21+
endif(NOT Eigen3_FIND_VERSION_MAJOR)
22+
if(NOT Eigen3_FIND_VERSION_MINOR)
23+
set(Eigen3_FIND_VERSION_MINOR 91)
24+
endif(NOT Eigen3_FIND_VERSION_MINOR)
25+
if(NOT Eigen3_FIND_VERSION_PATCH)
26+
set(Eigen3_FIND_VERSION_PATCH 0)
27+
endif(NOT Eigen3_FIND_VERSION_PATCH)
28+
29+
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
30+
endif(NOT Eigen3_FIND_VERSION)
31+
32+
macro(_eigen3_check_version)
33+
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
34+
35+
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
36+
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
37+
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
38+
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
39+
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
40+
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
41+
42+
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
43+
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
44+
set(EIGEN3_VERSION_OK FALSE)
45+
else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
46+
set(EIGEN3_VERSION_OK TRUE)
47+
endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
48+
49+
if(NOT EIGEN3_VERSION_OK)
50+
51+
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
52+
"but at least version ${Eigen3_FIND_VERSION} is required")
53+
endif(NOT EIGEN3_VERSION_OK)
54+
endmacro(_eigen3_check_version)
55+
56+
if (EIGEN3_INCLUDE_DIR)
57+
58+
# in cache already
59+
_eigen3_check_version()
60+
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
61+
62+
else (EIGEN3_INCLUDE_DIR)
63+
64+
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
65+
PATHS
66+
${CMAKE_INSTALL_PREFIX}/include
67+
${KDE4_INCLUDE_DIR}
68+
PATH_SUFFIXES eigen3 eigen
69+
)
70+
71+
if(EIGEN3_INCLUDE_DIR)
72+
_eigen3_check_version()
73+
endif(EIGEN3_INCLUDE_DIR)
74+
75+
include(FindPackageHandleStandardArgs)
76+
find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
77+
78+
mark_as_advanced(EIGEN3_INCLUDE_DIR)
79+
80+
endif(EIGEN3_INCLUDE_DIR)
81+

cmake/cmake_uninstall.cmake.in

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
2+
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
3+
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
4+
5+
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
6+
string(REGEX REPLACE "\n" ";" files "${files}")
7+
foreach(file ${files})
8+
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
9+
if(EXISTS "$ENV{DESTDIR}${file}")
10+
execute_process(
11+
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
12+
OUTPUT_VARIABLE rm_out
13+
RESULT_VARIABLE rm_retval
14+
)
15+
if(NOT ${rm_retval} EQUAL 0)
16+
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
17+
endif(NOT ${rm_retval} EQUAL 0)
18+
else(EXISTS "$ENV{DESTDIR}${file}")
19+
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
20+
endif(EXISTS "$ENV{DESTDIR}${file}")
21+
endforeach(file)

doc/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# build directory
2+
_build/
3+

doc/Makefile

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
PAPER =
8+
BUILDDIR = _build
9+
10+
# Internal variables.
11+
PAPEROPT_a4 = -D latex_paper_size=a4
12+
PAPEROPT_letter = -D latex_paper_size=letter
13+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14+
15+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
16+
17+
help:
18+
@echo "Please use \`make <target>' where <target> is one of"
19+
@echo " html to make standalone HTML files"
20+
@echo " dirhtml to make HTML files named index.html in directories"
21+
@echo " singlehtml to make a single large HTML file"
22+
@echo " pickle to make pickle files"
23+
@echo " json to make JSON files"
24+
@echo " htmlhelp to make HTML files and a HTML help project"
25+
@echo " qthelp to make HTML files and a qthelp project"
26+
@echo " devhelp to make HTML files and a Devhelp project"
27+
@echo " epub to make an epub"
28+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
29+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
30+
@echo " text to make text files"
31+
@echo " man to make manual pages"
32+
@echo " changes to make an overview of all changed/added/deprecated items"
33+
@echo " linkcheck to check all external links for integrity"
34+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
35+
36+
clean:
37+
-rm -rf $(BUILDDIR)/*
38+
39+
html:
40+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
41+
@echo
42+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
43+
44+
dirhtml:
45+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
46+
@echo
47+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
48+
49+
singlehtml:
50+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
51+
@echo
52+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
53+
54+
pickle:
55+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
56+
@echo
57+
@echo "Build finished; now you can process the pickle files."
58+
59+
json:
60+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
61+
@echo
62+
@echo "Build finished; now you can process the JSON files."
63+
64+
htmlhelp:
65+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
66+
@echo
67+
@echo "Build finished; now you can run HTML Help Workshop with the" \
68+
".hhp project file in $(BUILDDIR)/htmlhelp."
69+
70+
qthelp:
71+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
72+
@echo
73+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
74+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
75+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/chemkit.qhcp"
76+
@echo "To view the help file:"
77+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/chemkit.qhc"
78+
79+
devhelp:
80+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
81+
@echo
82+
@echo "Build finished."
83+
@echo "To view the help file:"
84+
@echo "# mkdir -p $$HOME/.local/share/devhelp/chemkit"
85+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/chemkit"
86+
@echo "# devhelp"
87+
88+
epub:
89+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
90+
@echo
91+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
92+
93+
latex:
94+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
95+
@echo
96+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
97+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
98+
"(use \`make latexpdf' here to do that automatically)."
99+
100+
latexpdf:
101+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
102+
@echo "Running LaTeX files through pdflatex..."
103+
make -C $(BUILDDIR)/latex all-pdf
104+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
105+
106+
text:
107+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
108+
@echo
109+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
110+
111+
man:
112+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
113+
@echo
114+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
115+
116+
changes:
117+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
118+
@echo
119+
@echo "The overview file is in $(BUILDDIR)/changes."
120+
121+
linkcheck:
122+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
123+
@echo
124+
@echo "Link check complete; look for any errors in the above output " \
125+
"or in $(BUILDDIR)/linkcheck/output.txt."
126+
127+
doctest:
128+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
129+
@echo "Testing of doctests in the sources finished, look at the " \
130+
"results in $(BUILDDIR)/doctest/output.txt."

doc/_templates/layout.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{% extends "!layout.html" %}
2+
3+
{% block footer %}
4+
{{ super() }}
5+
<script type="text/javascript">
6+
var _gaq = _gaq || [];
7+
_gaq.push(['_setAccount', 'UA-21520458-1']);
8+
_gaq.push(['_setDomainName', '.chemkit.org']);
9+
_gaq.push(['_trackPageview']);
10+
11+
(function() {
12+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
13+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
14+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
15+
})();
16+
</script>
17+
{% endblock %}

0 commit comments

Comments
 (0)