Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
f70b1b7
features: rename `OrbitalFieldMatrix` to `OrbitalFeatureDescriptor`
thazhemadam Jul 4, 2021
3163da9
codec: rename OneHotOneCold.jl to onehotonecold.jl
thazhemadam Jul 7, 2021
69bd611
codec: create a simple codec - `SimpleCodec`
thazhemadam Jul 8, 2021
f6737fb
elementfeature: add constructor for building `ElementFD` from name,codec
thazhemadam Jul 9, 2021
2378190
features: simplify encoding-decoding logic, and minimize repetitive code
thazhemadam Jul 9, 2021
9161923
Merge branch 'move_bov' of github.com:Chemellia/ChemistryFeaturizatio…
thazhemadam Jul 10, 2021
f1b4588
data:tabulate_pmg_data.py: update script to include Electronic Structure
thazhemadam Jul 10, 2021
a2f34b5
data: pymatgen_atom_data.csv: update to include Electronic Structure
thazhemadam Jul 10, 2021
21f2d11
test: ElementFeature_tests: reorganize tests into testsets
thazhemadam Jul 15, 2021
23393a2
Merge branch 'main' of github.com:Chemellia/ChemistryFeaturization.jl…
thazhemadam Jul 15, 2021
7e6ad96
atoms: add new generic `elements()` function
thazhemadam Jul 15, 2021
b03a159
test: add tests and improve coverage
thazhemadam Jul 16, 2021
23b1ecf
features: make `output_shape` generic
thazhemadam Jul 16, 2021
0004aed
orbitalfeaturedescriptor: basic sketch
thazhemadam Jul 16, 2021
fd42c7e
orbitalfeature: annotate, fix order of shells in lookup in defaultdecode
thazhemadam Jul 18, 2021
120c4c1
orbitalfeature: trim down `lookup_table`
thazhemadam Jul 18, 2021
d21c568
data: pymatgen_atom_data: standardize `Lawrencium`'s configuration value
thazhemadam Jul 18, 2021
d799766
atoms: export `elements` at the main module level
thazhemadam Jul 18, 2021
a32599d
data.jl: create new module - `Data`
thazhemadam Jul 19, 2021
374904b
data.jl: remove const-ness for `atom_data_df` and `feature_info`
thazhemadam Jul 19, 2021
5a732f8
orbitalfeature: remove `lookup_table` field
thazhemadam Jul 19, 2021
f02bb76
orbitalfeature: add custom `Base.show` methods
thazhemadam Jul 19, 2021
ccb8ba1
add Zygote to deps
DhairyaLGandhi Aug 5, 2021
678e1de
refactor weight_cutoff
DhairyaLGandhi Aug 5, 2021
17d93f0
basic adjoints - TODO - move them to Zygote
DhairyaLGandhi Aug 5, 2021
1c551e9
fixes to cutoff adjoint
DhairyaLGandhi Aug 10, 2021
bd6fe29
add backwards lengths in adjoint
DhairyaLGandhi Aug 10, 2021
cbb55ea
make fn amenable to FiniteDifferences
DhairyaLGandhi Aug 10, 2021
65d9bc0
add tests for AD
DhairyaLGandhi Aug 10, 2021
faa6648
add FiniteDiff to test deps
DhairyaLGandhi Aug 10, 2021
68b90fb
fix tests
DhairyaLGandhi Aug 11, 2021
d2ff77c
fix equality
DhairyaLGandhi Aug 11, 2021
0ac1c19
Add Xtals dep, sketch out neighbor list function
rkurchin Aug 11, 2021
e011a6b
update sketch to use NearestNeighbors.jl
rkurchin Aug 11, 2021
eb806cb
simplify cutoff adjoint
DhairyaLGandhi Aug 12, 2021
f262cf1
finitedifferences fix
DhairyaLGandhi Aug 12, 2021
46cadf8
better tests
DhairyaLGandhi Aug 12, 2021
bb12d1c
fixes
DhairyaLGandhi Aug 12, 2021
85d898f
fix typo
DhairyaLGandhi Aug 12, 2021
872e5fc
another typo
DhairyaLGandhi Aug 12, 2021
73268d9
refactor tests
DhairyaLGandhi Aug 12, 2021
46498dd
cleanup
DhairyaLGandhi Aug 12, 2021
53b4e85
give it another shot
DhairyaLGandhi Aug 17, 2021
01d5c33
Update README.md
ViralBShah Aug 19, 2021
7b14382
Update README.md
ViralBShah Aug 19, 2021
81c61ef
basic neighbor list implementtion is there
rkurchin Aug 23, 2021
b0d6b1a
formatting
rkurchin Aug 23, 2021
f5dc410
Should be ready to test autodiff on this!
rkurchin Aug 25, 2021
909a41c
formatting
rkurchin Aug 25, 2021
4f42fe0
compat and docs build to julia 1.6 to match Xtals
rkurchin Aug 25, 2021
74375f4
add spaces between badges
DhairyaLGandhi Aug 26, 2021
3b5f92a
Update src/utils/graph_building.jl
rkurchin Aug 28, 2021
6e45306
don't change rc (this means we need absolute paths to cifs), add chec…
rkurchin Aug 30, 2021
c66ee74
Merge branch 'graph_ad' of https://github.com/Chemellia/ChemistryFeat…
rkurchin Aug 30, 2021
64edcd4
formatting
rkurchin Aug 30, 2021
1b8cb56
minor version bump
rkurchin Aug 30, 2021
324b828
update changelog
rkurchin Aug 30, 2021
b548f60
construct AtomGraph from Crystal
rkurchin Aug 30, 2021
79c6287
docs: remove explicit `versions` so it can possibly publish `dev` too?
thazhemadam Sep 1, 2021
94fbbd0
Merge pull request #115 from Chemellia/at/doc-dev-publish
thazhemadam Sep 1, 2021
9887a06
docs: add overview section for types, tweak `terminology and philosophy`
thazhemadam Sep 1, 2021
8e55598
docs: add more info into docs for types, minor restructuring and links
thazhemadam Sep 1, 2021
02a9b4f
docs: add examples for what a feature could be
thazhemadam Sep 2, 2021
f6f5ab5
orbitalfeature:clean up default_ofd_decode & rename valence_shell_config
thazhemadam Aug 21, 2021
fb2c4ff
orbitalfeaturedescriptor: add docstrings
thazhemadam Sep 2, 2021
7d155a9
tests: add `OrbitalFeatureUtils` tests
thazhemadam Sep 2, 2021
3f5dc40
orbitalfeatureutils: make `df::DataFrame` an optional argument
thazhemadam Sep 2, 2021
9c581c1
features: fix bug in `output_shape` by renaming `fd` to `efd`
thazhemadam Sep 2, 2021
ba4f8c4
Merge pull request #116 from Chemellia/at/docs
thazhemadam Sep 2, 2021
4565893
Merge pull request #100 from Chemellia/at/orbital-fd
thazhemadam Sep 2, 2021
82b04a9
changelog: include changes made in #100
thazhemadam Sep 2, 2021
68fdf54
Merge branch 'main' into graph_ad
rkurchin Sep 2, 2021
03d96d2
fix Atoms namespace conflict in AtomGraph tests...this probably needs…
rkurchin Sep 2, 2021
35a4c13
formatting
rkurchin Sep 2, 2021
8b6d05e
add other AtomGraph constructor to docs
rkurchin Sep 3, 2021
d04e46c
Merge pull request #112 from Chemellia/graph_ad
rkurchin Sep 7, 2021
aa7d310
update compats and changelog
rkurchin Sep 7, 2021
991f878
add Zygote to deps
DhairyaLGandhi Aug 5, 2021
84b1834
refactor weight_cutoff
DhairyaLGandhi Aug 5, 2021
c683a55
basic adjoints - TODO - move them to Zygote
DhairyaLGandhi Aug 5, 2021
ec29db1
fixes to cutoff adjoint
DhairyaLGandhi Aug 10, 2021
bb0e2c6
add backwards lengths in adjoint
DhairyaLGandhi Aug 10, 2021
7b17f24
make fn amenable to FiniteDifferences
DhairyaLGandhi Aug 10, 2021
4261c2d
add tests for AD
DhairyaLGandhi Aug 10, 2021
504dd2f
add FiniteDiff to test deps
DhairyaLGandhi Aug 10, 2021
b65b853
fix tests
DhairyaLGandhi Aug 11, 2021
d53f9af
fix equality
DhairyaLGandhi Aug 11, 2021
8011d10
simplify cutoff adjoint
DhairyaLGandhi Aug 12, 2021
e97a375
finitedifferences fix
DhairyaLGandhi Aug 12, 2021
3bd7996
better tests
DhairyaLGandhi Aug 12, 2021
77db19a
fixes
DhairyaLGandhi Aug 12, 2021
1662228
fix typo
DhairyaLGandhi Aug 12, 2021
6e78367
another typo
DhairyaLGandhi Aug 12, 2021
c17ce49
refactor tests
DhairyaLGandhi Aug 12, 2021
496475f
cleanup
DhairyaLGandhi Aug 12, 2021
2f5ab3d
give it another shot
DhairyaLGandhi Aug 17, 2021
b1194d2
rebase
DhairyaLGandhi Sep 14, 2021
8f5606f
add code but dont include
DhairyaLGandhi Sep 16, 2021
239a2b6
cleanups for unneeded adjoints
DhairyaLGandhi Sep 17, 2021
1f9529f
fixes
DhairyaLGandhi Sep 17, 2021
72b4542
refactor + array distance
DhairyaLGandhi Sep 17, 2021
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
2 changes: 1 addition & 1 deletion .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.4'
version: '1.6'
- name: Install dependencies
env:
PYTHON: ""
Expand Down
14 changes: 11 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ChemistryFeaturization"
uuid = "6c925690-434a-421d-aea7-51398c5b007a"
authors = ["Rachel Kurchin <rkurchin@cmu.edu>", "Anant Thazhemadam <anant.thazhemadam@gmail.com>", "Sean Sun"]
version = "0.4.2"
version = "0.5.0"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand All @@ -15,9 +15,13 @@ GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
SimpleWeightedGraphs = "47aef6b3-ad0c-573a-a1e2-d07658019622"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Xtals = "ede5f01d-793e-4c47-9885-c447d1f18d6d"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
CSV = "0.7, 0.8"
Expand All @@ -30,12 +34,16 @@ Flux = "0.11, 0.12"
GraphPlot = "0.4.4"
JSON = "0.21"
LightGraphs = "1"
NearestNeighbors = "0.4"
PyCall = "1"
SimpleWeightedGraphs = "1"
julia = "1.4, 1.5, 1.6"
Xtals = "0.3"
julia = "1.6"

[extras]
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["Test"]
test = ["FiniteDifferences", "Test", "Zygote"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ChemistryFeaturization.jl
![Run tests](https://github.com/chemellia/ChemistryFeaturization.jl/workflows/Run%20tests/badge.svg)[![codecov](https://codecov.io/gh/chemellia/ChemistryFeaturization.jl/branch/main/graph/badge.svg?token=C0Fdt8BGnr)](https://codecov.io/gh/chemellia/ChemistryFeaturization.jl)[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://chemellia.github.io/ChemistryFeaturization.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://chemellia.github.io/ChemistryFeaturization.jl/dev/)
![Run tests](https://github.com/chemellia/ChemistryFeaturization.jl/workflows/Run%20tests/badge.svg) [![codecov](https://codecov.io/gh/chemellia/ChemistryFeaturization.jl/branch/main/graph/badge.svg?token=C0Fdt8BGnr)](https://codecov.io/gh/chemellia/ChemistryFeaturization.jl) [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://chemistryfeaturization.chemellia.org/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://chemistryfeaturization.chemellia.org/dev/)

Flexible, modular, invertible featurization for Chemellia models including AtomicGraphnets.jl and WeaveModel.jl.

Expand Down
208 changes: 104 additions & 104 deletions data/pymatgen_atom_data.csv

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion data/tabulate_pmg_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,16 @@
groups = []
valences = []
blocks = []
electronic_structure = []
for row in df.iterrows():
sym = row[1]['Symbol']
el = pt.Element(sym)
rows.append(el.row)
groups.append(el.group)
blocks.append(el.block)
electronic_structure.append(el.electronic_structure)
try:
v = valence(el)[1]
v = el.valence[1]
except ValueError: #ambiguous valence
v = np.nan
valences.append(v)
Expand All @@ -87,6 +89,7 @@
df['Group'] = groups
df['Valence'] = valences
df['Block'] = blocks
df['Electronic Structure'] = electronic_structure

df.to_csv("pymatgen_atom_data.csv")

Expand Down
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ makedocs(
"Terminology"=>"terminology.md",
"Tutorial"=>"tutorial.md",
"Types"=>Any[
"Overview"=>"types/overview.md",
"Abstract Types"=>"types/abstracttypes.md",
"Atoms Objects"=>"types/atoms.md",
"Feature Descriptors"=>"types/feature_descriptors.md",
"Codec"=>"types/codecs.md",
"Featurization"=>"types/featurizations.md",
"Featurized Atoms"=>"types/featurizedatoms.md",
"Codec"=>"types/codecs.md",
],
"Utilities"=>"utils.md",
"Contributing"=>"contributing.md",
Expand All @@ -31,7 +32,6 @@ deploydocs(
repo = "github.com/Chemellia/ChemistryFeaturization.jl.git",
target = "build",
devbranch = "main",
versions = ["stable" => "v^", "v#.#"],
branch = "gh-pages",
)

Expand Down
15 changes: 15 additions & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,29 @@ I'm generally trying to adhere to [semver](https://semver.org) here. This means
Categories to include for each release, if relevant: breaking, added, fixed, removed/deprecated

## Upcoming

## v0.5.0 [2021-09-07]

### Added

* Add new `FeatureDescriptor` - `OrbitalFeatureDescriptor`
* Add new module `OrbitalFeatureUtils` which provides utility functions used by `OrbitalFeatureDescriptor`
* Add new simple `Codec` - `SimpleCodec`
* Add a new function - `elements`, which prints the elements in an `Atoms` object
* Make `output_shape` generic
* Add a new module - `Data` which encapsulates all the data and tables required by the package.
* add pretty printing for `GraphNodeFeaturization`, `FeaturizedAtoms`, uniformize spacing via `\t` across these and `AtomGraph`
* [logic] move `data/` directory to root of repo
* [logic] move `build_onehot_vec` to `OneHotOneCold`
* replaced Python ASE dependency with Xtals.jl, allowing AD through graph-building! Can now also pass a Crystal object for graph-building

### Fixed

* export `featurize` and `decode` properly for `FeaturizedAtoms`

### Removed/Deprecated
* ASE deprecation removes compatibility with reading some file formats that ASE supports but Xtals does not

## v0.4.2 [2021-07-02]
### Added
* export `featurize` and `decode` functions at top-level module
Expand Down
2 changes: 1 addition & 1 deletion docs/src/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pages = ["contributing.md"]

For some high-level general guidance, please see [CONTRIBUTING.md](https://github.com/Chemellia/ChemistryFeaturization.jl/blob/main/CONTRIBUTING.md) on the GitHub repo.

The remainder of this page includes some pointers about package structure, etc. that could be helpful depending on what sorts of functionality you're interested in adding to the package. An understanding of "what goes where" will help in making sure you put your code in the right place! We also strongly encourage you to read the [Terminology/Philosophy](@ref) page, as it will help to understand the best ways to add different types of functionality.
The remainder of this page includes some pointers about package structure, etc. that could be helpful depending on what sorts of functionality you're interested in adding to the package. An understanding of "what goes where" will help in making sure you put your code in the right place! We also strongly encourage you to read the [Terminology and Philosophy](@ref) page, as it will help to understand the best ways to add different types of functionality.

TODO: flesh out everything below

Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ It provides flexible, modular data types and functions for starting from a "bare

![CF_flowchart](files/flowchart.png)

To learn more about the package, it would be good to start with the [Terminology/Philosophy](@ref) section to get a handle on the vocabulary as we use it, and also some insights about the design philosophy behind the package. Then go ahead and browse the sidebar for more!
To learn more about the package, it would be good to start with the [Terminology and Philosophy](@ref) section to get a handle on the vocabulary as we use it, and also some insights about the design philosophy behind the package. Then go ahead and browse the sidebar for more!
37 changes: 11 additions & 26 deletions docs/src/terminology.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Terminology/Philosophy
# Terminology and Philosophy

There are a lot of seemingly similar terms used for quantities in this package that refer to disparate things (or, are used slightly differently by other people in other places). Here, we try to best define these terms as we intend them. Further down, once the terms are defined, we elaborate on why the package is designed the way it is.

Expand All @@ -11,39 +11,24 @@ Depth = 3

### Feature

A quality or quantity associated with an atom that we wish to encode, such as atomic mass, row in the periodic table, etc.
A quality or a quantity that is associated with an atom, which is of interest to us.\
A feature could be a property of an individual atom, such as its atomic mass or the row in the periodic table to which it belongs; or it could be a property of a pair of atoms (e.g. distance between them, presence of a bond), or even a fingerprint of an entire structure.

### Encoding

The process of translating the value of a feature from its human-readable form (such as a float or a string) to whatever form will be ingested by a machine learning model. This could be as simple as an equality operation, but more often is, e.g. building a one-hot vector.
The process of translating the value of a feature from its human-readable form (such as a `Float` or a `String`) to the form fed into the machine learning model.

### Decoding

The inverse process to encoding. Note that in many cases (e.g. a continuous-valued feature encoded to a one-hot vector), the process isn't fully invertible, i.e. you can't get back a precise value but rather only a range corresponding to the associated onehot bin.

## Data types in `ChemistryFeaturization`

### Feature Descriptor

Describes the "features of a feature" – i.e. its name, possible values, instructions for encoding it, etc., but does NOT store an actual instance of its value.

For more on the available types of feature descriptors, see [Feature Descriptors](@ref fd).
The complexity of the encoding logic, whether it's something as simple as an equality operation, or something much more complex, is a decision left to the user. Often, this is building a one-hot vector.

### AbstractCodec

Component of a feature descriptor that stores the actual encoding/decoding functions.

### Atoms Object

Describes a molecule, crystal, etc. in whatever representation will be ingested by an ML model (e.g. a graph), and can also store encoded features of that structure.

For more on the available types of atoms objects, see [Atoms Objects](@ref atoms).
### Decoding

### Featurization Object
The inverse process to encoding.

Stores sets of feature descriptors and instructions for combining the values they encode on an atoms object.
Generally, it is recommended that there is symmetry between the encoding and decoding logic.

For more on the available types of featurization objects, see [Featurization](@ref).
!!! note
In many cases, the process isn't fully invertible. For instance, for a continuous-valued feature encoded to a one-hot vector you can't get back a precise value but rather only a range corresponding to the associated onehot bin.
In such cases, the decoding mechanism should try and return the most meaningful and human-interpretable form.

## Design Philosophy

Expand Down
6 changes: 5 additions & 1 deletion docs/src/types/atoms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
Atoms
```

Atoms objects (terminology borrowed from [ASE](https://wiki.fysik.dtu.dk/ase/)) store information about the structure of a molecule, crystal, etc. as well as, optionally, encoded features and the featurization used to encode them. The parent abstract type is `AbstractAtoms`.
Atoms objects (terminology borrowed from [ASE](https://wiki.fysik.dtu.dk/ase/)) store information about the structure of a molecule, crystal, etc.

The parent abstract type is `AbstractAtoms`.

## AtomGraph

The `AtomGraph` type is used to store atomic graph representations. It can also be visualized using some customized formatting with the GraphPlot package.

```@docs
Atoms.AtomGraph
Atoms.AtomGraph(::String, ::String)
Atoms.AtomGraph(::Crystal)
Atoms.visualize
```
2 changes: 1 addition & 1 deletion docs/src/types/codecs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Codecs
# [Codecs](@id codecs)

```@docs
Codec
Expand Down
45 changes: 25 additions & 20 deletions docs/src/types/feature_descriptors.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,36 @@
FeatureDescriptor
```

Feature descriptors store all necessary information to encode **and decode** feature values on various parts of an atoms object and appropriately combine them into a single object (vector, matrix, etc.) describing the value/values of the feature for the entire object.
Feature descriptors store all necessary information to encode and decode feature values on various parts of an [Atoms](@ref atoms) object and appropriately combine them into a single form (vector, matrix, etc.), describing the value(s) of the feature for the entire object.

For example, if an `ElementFeatureDescriptor` encodes a vector for each atom in an object, they could be concatenated together into a matrix with a column for each atom to describe a structure.

Feature Descriptors must be designed with interoperability in mind. A `FeatureDescriptor` object must work deterministically with different datasets.

The type hierarchy of these objects is currently:
```
|---- AbstractFeatureDescriptor
|---- AbstractAtomFeatureDescriptor
|==== ElementFeatureDescriptor
|==== SpeciesFeatureDescriptor
|---- AbstractPairFeatureDescriptor
|==== PairFeatureDescriptor
|---- BondFeatureDescriptor
|==== BondType
|==== InRing
|==== IsConjugated
Feature Descriptors must be designed with interoperability in mind. A [FeatureDescriptor](@ref fd) object must work deterministically with different datasets.

## Hierarchy

The type hierarchy of these objects is currently as follows.

```text
AbstractType.AbstractFeatureDescriptor
├─── AbstractAtomFeatureDescriptor
│ ├─── SpeciesFeatureDescriptor
│ └─── ElementFeatureDescriptor
├─── AbstractEnvironmentFeatureDescriptor
│ └─── OrbitalFieldMatrix
└─── AbstractPairFeatureDescriptor
├─── BondFeatureDescriptor
│ ├─── BondType
│ ├─── InRing
│ └─── IsConjugated
└─── PairFeatureDescriptor
```
where
`----` = Abstract Type
and
`====` = Concrete Type

More details on each of these types is below, and more types (e.g. environment features) will be implemented in the future!
More details on each of these types can be found below.\
More types (e.g. environment features) will be implemented in the future!

## Functionality common to all feature descriptors

Expand Down
4 changes: 2 additions & 2 deletions docs/src/types/featurizations.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Featurization
# [Featurization](@id fzn)

```@docs
Featurization
Expand All @@ -10,4 +10,4 @@ The implementation for a featurization must be as standardized and generic as po

```@docs
GraphNodeFeaturization
```
```
7 changes: 4 additions & 3 deletions docs/src/types/featurizedatoms.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Featurized Atoms
# [Featurized Atoms](@id fznatoms)

A `FeaturizedAtoms` object is a flexible container for an `Atoms` object, a compatible `Featurization` object, and the resulting encoded features. The type is parameterized by the type of atoms object and the featurization type, e.g. `FeaturizedAtoms{AtomGraph,GraphNodeFeaturization}`.
A [FeaturizedAtoms](@ref fznatoms) object is a container for an [Atoms](@ref atoms) object, a compatible [Featurization](@ref fzn) object, and the resulting encoded features.\
The type is parameterized by the type of atoms object and the featurization type, e.g. `FeaturizedAtoms{AtomGraph,GraphNodeFeaturization}`.

This is intended to be the type that is directly fed into a Chemellia model, so the format of `encoded_features` should be whatever the associated model requires, and not necessarily human-readable (though interpretable through the `decode` function!).

```@docs
FeaturizedAtoms
```
```
23 changes: 23 additions & 0 deletions docs/src/types/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# Primary Data Types

In [Terminology and Philosophy](@ref), we discussed general terms that pop up all over the package and the overall design philosophy of the package.

Let's go one step further and gloss over some essential categories of data structures.\
More information about each of these types can be found in the respective sections.

## Atoms

[Atoms](@ref atoms) objects (terminology borrowed from [ASE](https://wiki.fysik.dtu.dk/ase/)) store information about the structure of a molecule, crystal, etc., and other useful information required to interpret the same.

## Feature Descriptor

[Feature Descriptors](@ref fd) represent the *"features of a feature"* - i.e., its name, possible values, instructions for encoding it, etc., but do NOT store an actual instance of their value.

## Codec

[Codecs](@ref codecs) define the actual encoding and decoding logic to be used with a feature descriptor.

## Featurization

A [Featurization](@ref fzn) stores sets of feature descriptors and defines the logic for combining the values they encode on an `Atoms` object.
18 changes: 15 additions & 3 deletions docs/src/utils.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# Utilities
Some helper/utility functions that aren't documented elsewhere...

```@index
```@contents
Pages = ["utils.md"]
```

## Element Feature Utilities

Utility methods primarily used for representing element features.

```@autodocs
Modules = [Utils.ElementFeatureUtils]
```

## Graph Building

Utility methods used for building adjacency graph representations for [Atoms](@ref atoms).

```@autodocs
Modules = [Utils.ElementFeatureUtils, Utils.GraphBuilding]
```
Modules = [Utils.GraphBuilding]
```
6 changes: 5 additions & 1 deletion src/ChemistryFeaturization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ using SimpleWeightedGraphs
encodable_elements(a::Any) = throw(MethodError(encodable_elements, a))
encode(a::Any, object_to_be_encoded) = throw(MethodError(encode, a))
decode(a::Any, encoded_features) = throw(MethodError(decode, a))
elements(a::Any) = throw(MethodError(elements, a))

include("data.jl")
export Data

include("abstracts/abstracttypes.jl")
export AbstractType
Expand All @@ -23,7 +27,7 @@ export ElementFeatureDescriptor, output_shape
include("atoms/atoms.jl")
export Atoms

using .Atoms: AtomGraph, visualize
using .Atoms: AtomGraph, visualize, elements
export AtomGraph, visualize

include("featurizations/featurizations.jl")
Expand Down
Loading