Skip to content

Fixed documentation for common families #191

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

Merged
merged 4 commits into from
Aug 30, 2023
Merged
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
101 changes: 59 additions & 42 deletions coxeter/families/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,82 +75,99 @@ def make_vertices(cls, n):
PlatonicFamily = TabulatedGSDShapeFamily.from_json_file(
os.path.join(_DATA_FOLDER, "platonic.json"),
classname="PlatonicFamily",
docstring="""The family of Platonic solids.
docstring="""The family of Platonic solids (5 total).

The following parameters are required by this class:
Args:
name (str):
The name of the Platonic solid.

- name: The name of the Platonic solid. Options are "Cube", "Dodecahedron", \
"Icosahedron", "Octahedron", and "Tetrahedron".
Options are "Cube", "Dodecahedron", "Icosahedron", "Octahedron", and "Tetrahedron".
""",
)

ArchimedeanFamily = TabulatedGSDShapeFamily.from_json_file(
os.path.join(_DATA_FOLDER, "archimedean.json"),
classname="ArchimedeanFamily",
docstring="""The family of Archimedean solids (13 total).
The following parameters are required by this class:
- name: The name of the ArchimedeanFamily solid. Options are "Cuboctahedron", \
"Icosidodecahedron", "Truncated Tetrahedron", "Truncated Octahedron", \
"Truncated Cube", "Truncated Icosahedron", "Truncated Dodecahedron", \
"Rhombicuboctahedron", "Rhombicosidodecahedron", "Truncated \
Cuboctahedron", "Truncated Icosidodecahedron", "Snub Cuboctahedron", \
and "Snub Icosidodecahedron".

Args:
name (str):
The name of the Archimedean solid.

Options are "Cuboctahedron", "Icosidodecahedron", "Truncated Tetrahedron",
"Truncated Octahedron", "Truncated Cube", "Truncated Icosahedron", "Truncated
Dodecahedron", "Rhombicuboctahedron", "Rhombicosidodecahedron", "Truncated \
Cuboctahedron", "Truncated Icosidodecahedron", "Snub Cuboctahedron", and "Snub
Icosidodecahedron".
""",
)

CatalanFamily = TabulatedGSDShapeFamily.from_json_file(
os.path.join(_DATA_FOLDER, "catalan.json"),
classname="CatalanFamily",
docstring="""The family of Catalan solids, also known as Archimedean duals
docstring="""The family of Catalan solids, also known as Archimedean duals \
(13 total).
The following parameters are required by this class:
- name: The name of the CatalanFamily solid. Options are "Deltoidal \
Hexecontahedron", "Deltoidal Icositetrahedron", "Disdyakis \
Dodecahedron", "Disdyakis Triacontahedron", "Pentagonal \
Hexecontahedron", "Pentagonal Icositetrahedron", "Pentakis \
Dodecahedron", "Rhombic Dodecahedron", "Rhombic \
Triacontahedron", "Triakis Octahedron", "Tetrakis \
Hexahedron", "Triakis Icosahedron", and "Triakis Tetrahedron".

Args:
name (str):
The name of the Catalan solid.

Options are "Deltoidal Hexecontahedron", "Deltoidal Icositetrahedron", "Disdyakis \
Dodecahedron", "Disdyakis Triacontahedron", "Pentagonal Hexecontahedron",
"Pentagonal Icositetrahedron", "Pentakis Dodecahedron", "Rhombic Dodecahedron",
"Rhombic Triacontahedron", "Triakis Octahedron", "Tetrakis Hexahedron", "Triakis
Icosahedron", and "Triakis Tetrahedron".
""",
)

JohnsonFamily = TabulatedGSDShapeFamily.from_json_file(
os.path.join(_DATA_FOLDER, "johnson.json"),
classname="JohnsonFamily",
docstring="""The family of Johnson solids (92 total).
The following parameters are required by this class:
- name: The name of the JohnsonFamily solid. A full list is available in \
10.1126/science.1220869: :cite:`Damasceno2012`. In general, shape names \
should have the first character of each word capitalized, with spaces \
between words (e.g. "Elongated Triangular Cupola"). Pyramids and \
dipyramids are named from their base polygon (e.g. "Square Pyramid" \
or "Elongated Pentagonal Dipyramid").
docstring="""The family of Johnson solids, as enumerated in \
:cite:`Johnson1966` (92 total).

Args:
name (str):
The name of the Johnson solid.

A full list of Johnson solids is available in :cite:`Johnson1966`. In general, shape
names should have the first character of each word capitalized, with spaces between
words (e.g. "Elongated Triangular Cupola"). Pyramids and dipyramids are named from
their base polygon (e.g. "Square Pyramid" or "Elongated Pentagonal Dipyramid").
""",
)


PyramidDipyramidFamily = TabulatedGSDShapeFamily.from_json_file(
os.path.join(_DATA_FOLDER, "pyramid_dipyramid.json"),
classname="PyramidDipyramidFamily",
docstring="""The family of regular equilateral pyramids and dipyramids (6 total).
The following parameters are required by this class:
- name: The name of the pyramid or dipyramid. Options are "Triangular Pyramid", \
"Square Pyramid", "Pentagonal Pyramid", "Triangular Dipyramid", \
"Square Dipyramid", and "Pentagonal Dipyramid".

Args:
name (str):
The name of the pyramid or dipyramid.

Options for pyramids are "Triangular Pyramid", "Square Pyramid", and
"Pentagonal Pyramid". Options for dipyramids are "Triangular Dipyramid",
"Square Dipyramid", and "Pentagonal Dipyramid".
""",
)

PrismAntiprismFamily = TabulatedGSDShapeFamily.from_json_file(
os.path.join(_DATA_FOLDER, "prism_antiprism.json"),
classname="PrismAntiprismFamily",
docstring="""The family of n-gonal prisms and antiprisms with n∈[3,10] (16 total).
The following parameters are required by this class:
- name: The name of the prism or antiprism. Options for prisms are \
"Triangular Prism", "Square Prism", "Pentagonal Prism", "Hexagonal Prism", \
"Heptagonal Prism", "Octagonal Prism", "Nonagonal Prism", and \
"Decagonal Prism". Options for antiprisms are "Triangular Antiprism", \
"Square Antiprism", "Pentagonal Antiprism", "Hexagonal Antiprism", \
"Heptagonal Antiprism", "Octagonal Antiprism","Nonagonal Antiprism", \
and "Decagonal Antiprism".
docstring="""The family of uniform n-prisms and n-antiprisms with n∈[3,10] \
(16 total).

Args:
name (str):
The name of the prism or antiprism.

Options for prisms are \
"Triangular Prism", "Square Prism", "Pentagonal Prism", "Hexagonal Prism", \
"Heptagonal Prism", "Octagonal Prism", "Nonagonal Prism", and \
"Decagonal Prism". Options for antiprisms are "Triangular Antiprism", \
"Square Antiprism", "Pentagonal Antiprism", "Hexagonal Antiprism", \
"Heptagonal Antiprism", "Octagonal Antiprism","Nonagonal Antiprism", \
and "Decagonal Antiprism".
""",
)
11 changes: 11 additions & 0 deletions doc/source/coxeter.bib
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ @article{Chen2014
doi = {10.1103/PhysRevX.4.011024},
}

@article{Johnson1966,
title={Convex Polyhedra with Regular Faces},
author={Johnson, Norman W.},
journal={Canadian Journal of Mathematics},
volume={18},
pages={169–200},
year={1966},
publisher={Cambridge University Press},
doi={10.4153/cjm-1966-021-8},
}

@article{Damasceno2012,
author = {Damasceno, Pablo F. and Engel, Michael and Glotzer, Sharon C.},
title = {Crystalline Assemblies and Densest Packings of a Family of Truncated Tetrahedra and the Role of Directional Entropic Forces},
Expand Down