Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 8, 2024. It is now read-only.

Commit f87ce48

Browse files
committed
Updated docstrings and docs
1 parent 8f997cf commit f87ce48

24 files changed

+547
-153
lines changed

DOCUMENTATION.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = python -msphinx
7+
SPHINXPROJ = QML
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/source/conf.py

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# QML documentation build configuration file, created by
4+
# sphinx-quickstart on Sun Jun 4 14:41:04 2017.
5+
#
6+
# This file is execfile()d with the current directory set to its
7+
# containing dir.
8+
#
9+
# Note that not all possible configuration values are present in this
10+
# autogenerated file.
11+
#
12+
# All configuration values have a default; values that are commented out
13+
# serve to show the default.
14+
15+
# If extensions (or modules to document with autodoc) are in another directory,
16+
# add these directories to sys.path here. If the directory is relative to the
17+
# documentation root, use os.path.abspath to make it absolute, like shown here.
18+
#
19+
import os
20+
import sys
21+
print os.getcwd()
22+
sys.path.insert(0, os.path.abspath('../../build/lib.linux-x86_64-2.7/'))
23+
import sphinx_rtd_theme
24+
25+
# -- General configuration ------------------------------------------------
26+
27+
# If your documentation needs a minimal Sphinx version, state it here.
28+
#
29+
# needs_sphinx = '1.0'
30+
31+
# Add any Sphinx extension module names here, as strings. They can be
32+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33+
# ones.
34+
extensions = ['sphinx.ext.autodoc','sphinx.ext.mathjax']
35+
36+
# Add any paths that contain templates here, relative to this directory.
37+
templates_path = ['_templates']
38+
39+
# The suffix(es) of source filenames.
40+
# You can specify multiple suffix as a list of string:
41+
#
42+
# source_suffix = ['.rst', '.md']
43+
source_suffix = '.rst'
44+
45+
# The master toctree document.
46+
master_doc = 'index'
47+
48+
# General information about the project.
49+
project = u'QML'
50+
copyright = u'2017, Anders S. Christensen'
51+
author = u'Anders S. Christensen'
52+
53+
# The version info for the project you're documenting, acts as replacement for
54+
# |version| and |release|, also used in various other places throughout the
55+
# built documents.
56+
#
57+
# The short X.Y version.
58+
version = u'0.2.10'
59+
# The full version, including alpha/beta/rc tags.
60+
release = u'0.2.10'
61+
62+
# The language for content autogenerated by Sphinx. Refer to documentation
63+
# for a list of supported languages.
64+
#
65+
# This is also used if you do content translation via gettext catalogs.
66+
# Usually you set "language" from the command line for these cases.
67+
language = None
68+
69+
# List of patterns, relative to source directory, that match files and
70+
# directories to ignore when looking for source files.
71+
# This patterns also effect to html_static_path and html_extra_path
72+
exclude_patterns = []
73+
74+
# The name of the Pygments (syntax highlighting) style to use.
75+
pygments_style = 'sphinx'
76+
77+
# If true, `todo` and `todoList` produce output, else they produce nothing.
78+
todo_include_todos = False
79+
80+
81+
# -- Options for HTML output ----------------------------------------------
82+
83+
# The theme to use for HTML and HTML Help pages. See the documentation for
84+
# a list of builtin themes.
85+
#
86+
# html_theme = 'alabaster'
87+
html_theme = "sphinx_rtd_theme"
88+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
89+
90+
# Theme options are theme-specific and customize the look and feel of a theme
91+
# further. For a list of options available for each theme, see the
92+
# documentation.
93+
#
94+
# html_theme_options = {}
95+
96+
# Add any paths that contain custom static files (such as style sheets) here,
97+
# relative to this directory. They are copied after the builtin static files,
98+
# so a file named "default.css" will overwrite the builtin "default.css".
99+
html_static_path = ['_static']
100+
101+
102+
# -- Options for HTMLHelp output ------------------------------------------
103+
104+
# Output file base name for HTML help builder.
105+
htmlhelp_basename = 'QMLdoc'
106+
107+
108+
# -- Options for LaTeX output ---------------------------------------------
109+
110+
latex_elements = {
111+
# The paper size ('letterpaper' or 'a4paper').
112+
#
113+
# 'papersize': 'letterpaper',
114+
115+
# The font size ('10pt', '11pt' or '12pt').
116+
#
117+
# 'pointsize': '10pt',
118+
119+
# Additional stuff for the LaTeX preamble.
120+
#
121+
# 'preamble': '',
122+
123+
# Latex figure (float) alignment
124+
#
125+
# 'figure_align': 'htbp',
126+
}
127+
128+
# Grouping the document tree into LaTeX files. List of tuples
129+
# (source start file, target name, title,
130+
# author, documentclass [howto, manual, or own class]).
131+
latex_documents = [
132+
(master_doc, 'QML.tex', u'QML Documentation',
133+
u'Anders S. Christensen', 'manual'),
134+
]
135+
136+
137+
# -- Options for manual page output ---------------------------------------
138+
139+
# One entry per manual page. List of tuples
140+
# (source start file, name, description, authors, manual section).
141+
man_pages = [
142+
(master_doc, 'qml', u'QML Documentation',
143+
[author], 1)
144+
]
145+
146+
147+
# -- Options for Texinfo output -------------------------------------------
148+
149+
# Grouping the document tree into Texinfo files. List of tuples
150+
# (source start file, target name, title, author,
151+
# dir menu entry, description, category)
152+
texinfo_documents = [
153+
(master_doc, 'QML', u'QML Documentation',
154+
author, 'QML', 'One line description of project.',
155+
'Miscellaneous'),
156+
]
157+
158+
159+
html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'], }

docs/source/examples.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Examples
2+
--------
3+
4+
Generating representations using the ``Compound`` class:
5+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6+
7+
The following example demonstrates how to generate a representation via
8+
the ``qml.Compound`` class.
9+
10+
.. code:: python
11+
12+
from qml import Compound
13+
14+
# Read in an xyz or cif file.
15+
water = Compound(xyz="water.xyz")
16+
17+
# Generate a molecular coulomb matrices sorted by row norm.
18+
water.generate_coulomb_matrix(size=5, sort="row-norm")
19+
20+
print water.coulomb_matrix
21+
22+
Generating representations via the ``qml.representations`` module:
23+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24+
25+
.. code:: python
26+
27+
from qml.representations import *
28+
29+
# Dummy atomtypes and coordinates
30+
atomtypes = ["O", "H", H"]
31+
coordinates = np.array([1.464, 0.707, 1.056],
32+
[0.878, 1.218, 0.498],
33+
[2.319, 1.126, 0.952])
34+
35+
# Generate a molecular coulomb matrices sorted by row norm.
36+
cm1 = generate_coulomb_matrix(atomtypes, coordinates,
37+
size=5, sort="row-norm")
38+
print cm1
39+
40+
# Generate all atomic coulomb matrices sorted by distance to
41+
# query atom.
42+
cm2 = generate_atomic_coulomb_matrix(atomtypes, coordinates,
43+
size=5, sort="distance")
44+
print cm2

docs/source/index.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.. QML documentation master file, created by
2+
sphinx-quickstart on Sun Jun 4 14:41:04 2017.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
|Build Status|
7+
8+
QML: A Python Toolkit for Quantum Machine Learning
9+
==================================================
10+
11+
QML is a Python2/3-compatible toolkit for representation learning of
12+
properties of molecules and solids. QML is not a high-level framework
13+
where you can do ``model.train()``, but supplies the building blocks to
14+
carry out efficient and accurate machine learning on chemical compounds.
15+
As such, the goal is to provide usable and efficient implementations of
16+
concepts such as representations and kernels, which can then be
17+
implemented in other machine learning codes.
18+
19+
Current list of contributors:
20+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21+
22+
- Anders S. Christensen (University of Basel)
23+
- Felix Faber (University of Basel)
24+
- Bing Huang (University of Basel)
25+
- Lars A. Bratholm (University of Copenhagen)
26+
- O. Anatole von Lilienfeld (University of Basel)
27+
28+
1) Citing QML:
29+
--------------
30+
31+
Until the preprint is available from arXiv, please cite this GitHub
32+
repository as:
33+
34+
::
35+
36+
AS Christensen, F Faber, B Huang, LA Bratholm, OA von Lilienfeld (2017) "QML: A Python Toolkit for Quantum Machine Learning" https://github.com/qmlcode/qml
37+
38+
39+
2) Installation
40+
---------------
41+
42+
Please go to the QML github repository at https://github.com/qmlcode/qml/
43+
44+
45+
46+
.. toctree::
47+
:maxdepth: 2
48+
:caption: GETTING STARTED:
49+
:name: index
50+
51+
installation
52+
examples
53+
54+
55+
.. toctree::
56+
:maxdepth: 2
57+
:caption: SOURCE DOCUMENTATION:
58+
:name: qml
59+
60+
qml
61+
62+
3) License:
63+
-----------
64+
65+
QML is freely available under the terms of the MIT license.
66+
67+
.. |Build Status| image:: https://travis-ci.org/qmlcode/qml.svg?branch=master
68+
:target: https://travis-ci.org/qmlcode/qml

docs/source/installation.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Installation
2+
---------------
3+
4+
The easiest way to install the stable version from the Python Package
5+
Index (PyPI) is using the official, built-in Python package manager,
6+
``pip``:
7+
8+
.. code:: bash
9+
10+
pip install qml --user -U
11+
12+
Alternatively, you can install the most recent stable development
13+
snapshot directly from GitHub:
14+
15+
.. code:: bash
16+
17+
pip install git+https://github.com/qmlcode/qml --user -U
18+
19+
20+
For more installation help, please see the github repository: https://github.com/qmlcode/qml/

0 commit comments

Comments
 (0)