Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyAJohnston committed Dec 18, 2024
1 parent c04a123 commit 66378f3
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 21 deletions.
22 changes: 13 additions & 9 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ website:
text: Installation
- file: tutorials/
text: Tutorials
- file: nodes/
text: Node Documentation
- file: attributes.qmd
- file: documentation.qmd
- file: examples/
text: Examples
- file: cite/
Expand All @@ -31,14 +29,20 @@ website:
href: https://youtube.com/c/bradyjohnston

sidebar:

- id: nodes
title: Nodes
- id: documentation
title: Documentation
style: floating
align: left
contents: nodes/
pinned: true

# pinned: true
contents:
- text: Docs
href: documentation.qmd
- installation.qmd
- attributes.qmd
- text: Nodes
href: nodes/index.qmd
contents: nodes/*


- id: tutorials
Title: Tutorials
Expand Down
3 changes: 3 additions & 0 deletions docs/attributes.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Below are the attributes which are potentially created when a structure is impor

more detailed explanations of type conversions can be found in the Blender documentation [here](https://docs.blender.org/manual/en/latest/modeling/geometry_nodes/attributes_reference.html)

- explain about world scale (1 angstrom == 1 cm in Blender, will be changed for 5.0 to be 1 nm = 1 m)
- write-ups about different entities, ways to interact with them

When an attribute is going to be read from the geometry, it is colored red like so: `Index::Input`, `chain_id`, etc.

## Data Types
Expand Down
7 changes: 5 additions & 2 deletions docs/documentation.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Docs
# Documentation

Some documentation goes here <-
Some documentation goes here <-

::: {.documentation}
:::
12 changes: 10 additions & 2 deletions docs/filters.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
local keywords = {"Float", "Int", "Vector", "Geometry", "Bool", "Matrix", "Rotation", "Material", "Color", "Collection", "String", "Name", "Object", "Input"}
local attributes = {"sec_struct", "res_id", "chain_id", "entity_id", "res_name", "atom_name", "atom_id", "occupancy", "bfactor", "atomic_number", "charge", "vdw_radii", "mass", "is_backbone", "is_side_chain", "is_alpha_carbon"}
local attributes = {"sec_struct", "res_id", "chain_id", "entity_id", "res_name", "atom_name", "atom_id", "occupancy", "bfactor", "atomic_number", "charge", "vdw_radii", "mass", "is_backbone", "is_side_chain", "is_alpha_carbon", "Position", "Index", "Normal", "ID"}

local combined = {}
for _, v in ipairs(keywords) do
table.insert(combined, v)
end
for _, v in ipairs(attributes) do
table.insert(combined, v)
end

function Code(el)
for _, keyword in ipairs(keywords) do
Expand All @@ -11,7 +19,7 @@ function Code(el)
return el
end
end
for _, attribute in ipairs(attributes) do
for _, attribute in ipairs(combined) do
if el.text == attribute then
-- el.text = "[".. el.text .. "](attributes.qmd#" .. attribute .. ")"
table.insert(el.classes, "custom-attribute")
Expand Down
7 changes: 3 additions & 4 deletions docs/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@return 0.2126 * $r + 0.7152 * $g + 0.0722 * $b;
}

@function contrast-color($background-color, $light-color: #dedede, $dark-color: #2d2d2d) {
@function contrast-color($background-color, $light-color: #d1d1d1, $dark-color: #2d2d2d) {
@if luminance($background-color) > 0.3 {
@return $dark-color;
} @else {
Expand Down Expand Up @@ -115,11 +115,10 @@ background-color: $node-editor-grid;

// Define the mixin
@mixin code-style($background-color) {
// color: contrast-color($background-color);
color: $body-font-color;
color: contrast-color($background-color);
// color: $body-font-color;
text-wrap-mode: nowrap;
background-color: rgba(darken($background-color, 0%), 0.7);
// padding-top: .3em;
padding-left: .4em;
padding-right: .4em;
font-weight: bold;
Expand Down
8 changes: 4 additions & 4 deletions molecularnodes/noodlenotes/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def default(self) -> str:
return "_None_"

@property
def label(self) -> str:
def socket(self) -> str:
return "{}::{}".format(self.name, self.type)

@property
Expand Down Expand Up @@ -134,17 +134,17 @@ def __init__(self, items: List[InterfaceItem], is_output: bool = False) -> None:
@property
def attributes(self) -> List[str]:
if self._is_output:
return ["description", "label"]
return ["description", "socket"]
else:
return ["label", "default", "description"]
return ["socket", "default", "description"]

def sep(self) -> str:
string = ""
for attribute in self.attributes:
lines = "-" * self.lengths[attribute]
if attribute == "default":
string += ":{}:|".format(lines)
elif attribute == "label" and self._is_output:
elif attribute == "socket" and self._is_output:
string += "{}:|".format(lines)
else:
string += "{}|".format(lines)
Expand Down

0 comments on commit 66378f3

Please sign in to comment.