Skip to content

Commit 0094698

Browse files
committed
Minor doc changes+roll back of compiler flags and sphinx setup
1 parent a96624d commit 0094698

File tree

4 files changed

+60
-2
lines changed

4 files changed

+60
-2
lines changed

Diff for: docs/build/html/.nojekyll

Whitespace-only changes.

Diff for: docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
# If your documentation needs a minimal Sphinx version, state it here.
2828
#
29-
needs_sphinx = '1.5.4'
29+
# needs_sphinx = '1.5.4'
3030

3131
# Add any Sphinx extension module names here, as strings. They can be
3232
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

Diff for: qml/representations.py

+58
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@
3434
from .data import NUCLEAR_CHARGE
3535

3636
def generate_coulomb_matrix(nuclear_charges, coordinates, size = 23, sorting = "row-norm"):
37+
""" Generates a sorted molecular coulomb, sort either by ``"row-norm"`` or ``"unsorted"``.
38+
``size=`` denotes the max number of atoms in the molecule (thus the size of the resulting square matrix.
39+
The resulting matrix is the upper triangle put into the form of a 1D-vector.
40+
41+
:param coordinates: Input coordinates.
42+
:type coordinates: numpy array
43+
:param nuclear_charges: List of nuclear charges.
44+
:type nuclear_charges: numpy array
45+
:param size: Max number of atoms in representation.
46+
:type size: integer
47+
:param sorting: Matrix sorting scheme, "row-norm" or "unsorted".
48+
:type sorting: string
49+
:return: 1D Coulomb matrix representation
50+
:rtype: numpy array
51+
"""
3752

3853
if (sorting == "row-norm"):
3954
return fgenerate_coulomb_matrix(nuclear_charges, \
@@ -48,6 +63,21 @@ def generate_coulomb_matrix(nuclear_charges, coordinates, size = 23, sorting = "
4863
raise SystemExit
4964

5065
def generate_atomic_coulomb_matrix(nuclear_charges, coordinates, size = 23, sorting = "distance"):
66+
""" Generates a list of sorted Coulomb matrices, sorted either by ``"row-norm"`` or ``"distance"``, the latter refers to sorting by distance to each query atom.
67+
``size=`` denotes the max number of atoms in the molecule (thus the size of the resulting square matrix.
68+
The resulting matrix is the upper triangle put into the form of a 1D-vector.
69+
70+
:param coordinates: Input coordinates.
71+
:type coordinates: numpy array
72+
:param nuclear_charges: List of nuclear charges.
73+
:type nuclear_charges: numpy array
74+
:param size: Max number of atoms in representation.
75+
:type size: integer
76+
:param sorting: Matrix sorting scheme, "row-norm" or "distance".
77+
:type sorting: string
78+
:return: List of 1D Coulomb matrix representations.
79+
:rtype: numpy array
80+
"""
5181

5282
if (sorting == "row-norm"):
5383
return fgenerate_local_coulomb_matrix(nuclear_charges,
@@ -62,10 +92,38 @@ def generate_atomic_coulomb_matrix(nuclear_charges, coordinates, size = 23, sort
6292
raise SystemExit
6393

6494
def generate_eigenvalue_coulomb_matrix(nuclear_charges, coordinates, size = 23):
95+
""" Generates the eigenvalue-Coulomb matrix representation.
96+
``size=`` denotes the max number of atoms in the molecule (thus the size of the resulting square matrix.
97+
The resulting matrix is in the form of a 1D-vector.
98+
99+
:param coordinates: Input coordinates.
100+
:type coordinates: numpy array
101+
:param nuclear_charges: List of nuclear charges.
102+
:type nuclear_charges: numpy array
103+
:param size: Max number of atoms in representation.
104+
:type size: integer
105+
:return: 1D representation.
106+
:rtype: numpy array
107+
"""
65108
return fgenerate_eigenvalue_coulomb_matrix(nuclear_charges,
66109
coordinates, size)
67110

68111
def generate_bob(nuclear_charges, coordinates, atomtypes, asize = {"O":3, "C":7, "N":3, "H":16, "S":1}):
112+
""" Generates a bag-of-bonds (BOB) representation of the molecule. ``size=`` denotes the max number of atoms in the molecule (thus relates to the size of the resulting matrix.)
113+
``asize=`` is the maximum number of atoms of each type (necessary to generate bags of minimal sizes).
114+
The resulting matrix is the BOB representation put into the form of a 1D-vector.
115+
116+
:param coordinates: Input coordinates.
117+
:type coordinates: numpy array
118+
:param nuclear_charges: List of nuclear charges.
119+
:type nuclear_charges: numpy array
120+
:param size: Max number of atoms in representation.
121+
:type size: integer
122+
:param asize: Max number of each element type.
123+
:type asize: dict
124+
:return: 1D BOB representation.
125+
:rtype: numpy array
126+
"""
69127

70128
n = 0
71129
atoms = sorted(asize, key=asize.get)

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
# Intel
3232
if any(["intelem" in arg for arg in sys.argv]):
33-
COMPILER_FLAGS = ["-fast", "-axCORE-AVX2", "-unroll-aggressive", "-qopenmp"]
33+
COMPILER_FLAGS = ["-xHost", "-O3", "-axAVX", "-qopenmp"]
3434
LINKER_FLAGS = ["-liomp5", " -lpthread", "-lm", "-ldl"]
3535
MATH_LINKER_FLAGS = ["-L${MKLROOT}/lib/intel64", "-lmkl_rt"]
3636

0 commit comments

Comments
 (0)