Topology
Topology DSSP
Calculate the secondary structure of a structure, storing it on the sec_struct
attribute.
Calculate the secondary structure attributes for the protein chains, based on the 1983 Kabsch algorithm
Inputs
Name | Type | Description | Default |
---|---|---|---|
Atoms | Geometry |
Atomic geometry that contains vertices and edges | None |
Selection | Bool |
The selection of points at which to override any existing sec_struct attribute. Unselected points will still be used for the calculation |
True |
Outputs
Name | Type | Description | Default |
---|---|---|---|
Atoms | Geometry |
The input Atoms with updated sec_struct attributes based on the DSSP algorithm |
None |
Residue Mask
Returns the index for the atom for each unique group (from res_id) for each point in that group. Allows for example, all atoms in a group to be rotated around the position of the selected atom.
In the video example, the atom_name
is used to select an atom within the groups. Each atom’s position is then offset to that position, showing the group-wise selection.
Inputs
Name | Type | Description | Default |
---|---|---|---|
atom_name | Int |
Atom to pick from the group | None |
Use Fallback | Bool |
Uses a calculated Unique Group ID as a fallback. Disabling can increase performance if pre-computing a Group ID for multiple nodes | True |
Group ID | Int |
None |
Outputs
Name | Type | Description | Default |
---|---|---|---|
Is Valid | Bool |
Group contains only one occurrance of the selected atom. None or more than one returns False | False |
Index | Int |
Index for the group’s atom with specified name, returns -1 if not valid | None |
Position | Vector |
Position of the picked point in the group, returns (0, 0, 0) if not valid | [0.0, 0.0, 0.0] |
Group ID | Int |
None |
Backbone Positions
If the atoms have been through the “Compute Backbone” node, then the backbone atom positions will be available as attributes through this node.
In the video example, the Alpha Carbons
output is styled as spheres, where the position is mixed with some of the backbone posiitons. The backbone positions can also be selected from the AA residue higher or lower with the specified offset.
Inputs
Name | Type | Description | Default |
---|---|---|---|
Index | Int |
The index at which to read the values from | Index |
Offset | Int |
Offset the sampling of the | None |
Outputs
Name | Type | Description | Default |
---|---|---|---|
O | Vector |
The position of the backbone O atom for the residue | [0.0, 0.0, 0.0] |
C | Vector |
The position of the backbone C atom for the residue | [0.0, 0.0, 0.0] |
CA | Vector |
The position of the backbone CA atom for the residue | [0.0, 0.0, 0.0] |
N | Vector |
The position of the backbone N atom for the residue | [0.0, 0.0, 0.0] |
Dihedral Phi
Outputs
Name | Type | Description | Default |
---|---|---|---|
Phi | Float |
The calculated Phi angle for the residue, in the range of (-pi, pi) |
0.0 |
BA⟂(BC) | Vector |
The perpendicular vector from the line of BC to the point A | [0.0, 0.0, 0.0] |
CD⟂(BC) | Vector |
The perpendicular vector from the line of BC to the point D | [0.0, 0.0, 0.0] |
BC | Vector |
The vector BC corresponding to the backbone vector around which the angle is calculated | [0.0, 0.0, 0.0] |
Dihedral Psi
Outputs
Name | Type | Description | Default |
---|---|---|---|
Psi | Float |
The calculated Psi angle for the residue, in the range of (-pi, pi) |
0.0 |
BA⟂(BC) | Vector |
The perpendicular vector from the line of BC to the point A | [0.0, 0.0, 0.0] |
CD⟂(BC) | Vector |
The perpendicular vector from the line of BC to the point D | [0.0, 0.0, 0.0] |
BC | Vector |
The vector BC corresponding to the backbone vector around which the angle is calculated | [0.0, 0.0, 0.0] |
Rotate Backbone
Rotate the atoms cumulatively for each residue, adjusting the phi
and psi
angles for the selected residues
Rotate around the _ph_i and psi angles of a protein backbone.Rotations accumulate up the peptide backbone
Inputs
Name | Type | Description | Default |
---|---|---|---|
Selection | Bool |
Selected alpha carbons will have the dihedral rotations applied | True |
Phi | Float |
Rotation to apply to the phi backbone angle | 0.0 |
Psi | Float |
Rotation to apply to the Psi backbone angle | 0.0 |
Outputs
Name | Type | Description | Default |
---|---|---|---|
Position | Vector |
The Position after rotating the backbone dihedral angles |
[0.0, 0.0, 0.0] |
Backbone Position
Return the backbone position for the peptide residue, and recalculate if the attribute doesn’t exist
Inputs
Name | Type | Description | Default |
---|---|---|---|
Menu | Menu |
the particular backbone residue to read the value from | backbone_N |
Index | Int |
The index for the point to read the value from | Index |
Offset | Int |
The offset to apply to the Index before reading the residue |
None |
Outputs
Name | Type | Description | Default |
---|---|---|---|
Position | Vector |
[0.0, 0.0, 0.0] |
Backbone Vectors
Calculate Normal
, Tangent
and Bitangent
values from protein backbone atom positions
The Vectors
that are useful for a curve when reading from a peptide backbone
Outputs
Name | Type | Description | Default |
---|---|---|---|
Normal | Vector |
The vector used for the Normal of a curve when reading positions from a peptide backbone |
[0.0, 0.0, 0.0] |
Tangent | Vector |
The vector used as the Tangent for a curve when reading values from a peptide backbone |
[0.0, 0.0, 0.0] |
Bitangent | Vector |
Cross product of the Normal and Tangent | [0.0, 0.0, 0.0] |
Atom ID
The atom_id
attribute which is read from the file. Will be increasing linearly for each subsequent atom
Outputs
Name | Type | Description | Default |
---|---|---|---|
atom_id | Int |
The atom_id attribute, read from geometry. Corresponds to the order of the atoms when they were read from the file |
None |
Chain ID
The ‘chain_id’ attribute, an integer representation of the Chain IDs from the structure. Chains are sorted alphabetically then assigned an ID startin at 0
and increasing.
Integer representation of the Chain IDs that were present in the structure
Outputs
Name | Type | Description | Default |
---|---|---|---|
chain_id | Int |
The chain_id attribute read from the points, corresponding to the different chains that were read from the structure |
None |
Entity ID
The entity_id
attribute of the point
The entity_id
attribute read from the points, corresponding to the unique entities in the structure (that may appear several times as different chains)
Outputs
Name | Type | Description | Default |
---|---|---|---|
entity_id | Int |
The entity_id attribute read from the points, corresponding to the unique entities in the structure (that may appear several times as different chains) |
None |
Residue ID
The residue_id
attribute of the point, which is the assigned number of the residue inside the chain of the structure
Outputs
Name | Type | Description | Default |
---|---|---|---|
res_id | Int |
Read the res_id attribute from the geometry |
None |
Atomic Number
The atomic_number
attribute, ascending from 1
for each element on the periodic table
Outputs
Name | Type | Description | Default |
---|---|---|---|
atomic_number | Int |
Read the atomic_number attribute from the geometry corresponding to elements |
None |
Atom Name
The atom_name
attribute, an integer representation of the atom names such as C for carbon, CA for alpha carbon
Geometry Nodes doesn’t currently support text attributes, so strings like atom names have to be first converted to integers and mapping to atom names back and forth. Definitions for the atom names are available on the GitHub page
Outputs
Name | Type | Description | Default |
---|---|---|---|
atom_name | Int |
The atom_name attribute read from the points, an integer representation of the atom names. Corresponds to CA and O in the file etc. |
None |
Residue Name
The res_name
attribute, an integer representation of the residue names. Amino acids are sorted alphabetically and assigned a value starting at 0
. DNA starts at 40 and DNA starts at 30
Outputs
Name | Type | Description | Default |
---|---|---|---|
res_name | Int |
Read the res_name attribute from the geometry |
None |
Secondary Structure
The sec_struct
attribute of the point. 0
is non-peptide, 1 is helix, 2 is sheet and 3 is loop
Outputs
Name | Type | Description | Default |
---|---|---|---|
sec_struct | Int |
None |
VDW Radii
The vdw_radii
attribute of the point, corresponding the radius of the element as defined in the data dictionary. Used for scaling sphers for Style Spheres
and Style Ball and Stick
Outputs
Name | Type | Description | Default |
---|---|---|---|
vdw_radii | Float |
Read the vdw_radii attribute from the geometry |
0.0 |
Mass
The mass
attribute of the point, used for centre of mass calculations
Outputs
Name | Type | Description | Default |
---|---|---|---|
mass | Float |
Read the mass attribute from the geometry |
0.0 |
B Factor
The b_factor
attribute of the point, representing the ‘temperature’ of the point
Outputs
Name | Type | Description | Default |
---|---|---|---|
b_factor | Float |
0.0 |
Color
The Color
attribute of the point, used for coloring the final generated geometry inside of the materials
Outputs
Name | Type | Description | Default |
---|---|---|---|
Color | Color |
Read the Color attribute from the geometry |
[0.0, 0.0, 0.0, 1.0] |
Res Info
Read information about the atoms with the context of each residue the atom is in
Outputs
Name | Type | Description | Default |
---|---|---|---|
Factor | Float |
An atom’s relative position in a residue, with the first atom being 0 and the last atom being 1 | 0.0 |
Length | Int |
Number of atoms in a residue | None |
Counted Index | Int |
Index of an atom in a residue when counting from 0 | None |
First atom_name | Int |
the atom_name for the first atom in a residue | None |
Last atom_name | Int |
The atom_name for the last atom in a residue | None |
First Index | Int |
Index (in the whole structure) for the first atom in a residue | None |
Last Index | Int |
Index (in the whole structure) for the last atom in a residue | None |
Chain Info
Read information about the residues within the context of each chain
Information for each residue within the context of the chain
Inputs
Name | Type | Description | Default |
---|---|---|---|
Per Chain | Bool |
Whether to calculate these parameters indivudually for each chain, defined by chain_id |
True |
Outputs
Name | Type | Description | Default |
---|---|---|---|
Factor | Float |
A residues relative position along a chain. 0 being the first residue in a chain, 1 being the last | 0.0 |
Length | Int |
Number of residues in the chain | None |
Counted Index | Int |
Res ID along the chain if counting from 1 | None |
First Res ID | Int |
The first Res ID in a chain (truncated chains start above 1) | None |
Last Res ID | Int |
The Res ID of the last residue in chain (not equal to Length if chain is truncated) | None |
Index First | Int |
Index in whole structure of the first atom in the chain | None |
Index Last | Int |
Index in the whole structure the last atom in the chain | None |
Res Group ID
A unique Group ID that is calculated for every residue in the structure
Outputs
Name | Type | Description | Default |
---|---|---|---|
Unique Group ID | Int |
A unique Group ID for eash residue | None |
Topology Find Bonds
Finds bonds between atoms based on distance. Based on the vdw_radii for each point, finds other points within a certain radius to create a bond to. Does not preserve the index for the points, detect bond type, or transfer all attributes
Inputs
Name | Type | Description | Default |
---|---|---|---|
Atoms | Geometry |
Atomic geometry that contains vertices and edges | None |
Selection | Bool |
Selection of atoms to apply this node to | True |
Scale | Float |
Scale the VDW radii of the atoms when searching for bonds | 1.0 |
Outputs
Name | Type | Description | Default |
---|---|---|---|
Atoms | Geometry |
None |
Topology Break Bonds
Will delete a bond between atoms that already exists based on a distance cutoff, or is selected in the Selection
input. Leaves the atoms unaffected
Inputs
Name | Type | Description | Default |
---|---|---|---|
Atoms | Geometry |
Atomic geometry that contains vertices and edges | None |
Selection | Bool |
Selection of atoms to apply this node to | False |
Cutoff | Float |
Cutoff distance over which to remove bonds (Angstrom) | 2.5 |
Outputs
Name | Type | Description | Default |
---|---|---|---|
Atoms | Geometry |
Atomic geometry that contains vertices and edges | None |
Bond Count
The number of bonds for an atom
Outputs
Name | Type | Description | Default |
---|---|---|---|
Is Bonded | Bool |
If the point has an edge / bond to another point | False |
Bonds | Int |
The number of bonds or edges that a point has | None |
Edge Info
Get information for the selected edge, evaluated on the point domain. The “Edge Index” selects the edge from all possible connected edges. Edges are unfortunately stored somewhat randomly. The resulting information is between the evaluating point and the point that the edge is between. Point Index returns -1 if not connected.
In the video example, cones are instanced on each point where the Edge Index returns a valid connection. The Edge Vector can be used to align the instanced cone along that edge. The length of the edge can be used to scale the cone to the other point. As the “Edge Index” is changed, the selected edge changes. When “Edge Index” == 3, only the atoms with 4 connections are selected, which in this model (1BNA) are just the phosphates.
Inputs
Name | Type | Description | Default |
---|---|---|---|
Vertex Index | Int |
Index |
|
Edge Index | Int |
Index within the gorup of edges that are connected to this point | None |
Outputs
Name | Type | Description | Default |
---|---|---|---|
Is Valid | Bool |
Whether there is a valid edge corresponding to the given index | False |
Point Index | Int |
The index for the other point involved in this edge, -1 if not connected | None |
Point Position | Vector |
The position for the other point involved in this edge, (0, 0, 0) if not connected | [0.0, 0.0, 0.0] |
Edge Index | Int |
The index on the edge domain for the selected edge. -1 if not connected | None |
Edge Vector | Vector |
The vector along the selected edge. (0, 0, 0) if not connected | [0.0, 0.0, 0.0] |
Edge Length | Float |
Length of the selected edge, -1 if not connected | -1.0 |
Point Edge Angle
Calculate the angle between two edges, selected with the edge indices. For molecule bonds, combinations of [(0, 1), (0, 2), (0, 3), (1, 2), (1, 3), (2, 3)] will select all possible bond angles.
In the video example, two edges are selected with their “Edge Index” values. Those atoms which aren’t valid return false and do not get instanced. The two edge vectors are used to calculate the perpendicular vector through cross product, around which the rotation for the cone is rotated. This demonstrates the ability to calculate the edge angle between the two selected edges.
Inputs
Name | Type | Description | Default |
---|---|---|---|
Vertex Index | Int |
The index of the point at which to evaluate this node | Index |
Edge A | Int |
The index of the edges of this point to select | None |
Edge B | Int |
The index of the edges of this point to select | None |
Outputs
Name | Type | Description | Default |
---|---|---|---|
Is Valid | Bool |
Both of the selected edges are valid | False |
Angle | Float |
Angle between the two selected edges in radians. Returns 0 if not valid | -1.0 |
Edge Index A | Int |
Index for “Edge A” in the Edge domain of the geometry. Returns -1 if not valid | None |
Edge Index B | Int |
Index for “Edge B” in the Edge domain of the geometry. Returns -1 if not valid | None |
Edge Vector A | Vector |
Vector from the current point to the other point in Edge A. Returns (0, 0, 0) if not valid. | [0.0, 0.0, 0.0] |
Edge Vector B | Vector |
Vector from the current point to the other point in Edge B. Returns (0, 0, 0) if not valid. | [0.0, 0.0, 0.0] |
Points of Edge
Finds the conntected point for the selected “Edge Index”, and returns each point index for all of the points connected to that point. If the connection doesn’t exist, or the connection is back to the original point, -1 is returned.
In the video example, a new point is selected based on the “Edge Index”. At that point, all of the connecting points are exposed as indices 0, 1, 2, 3
. If that index is not a valid point or connection, or the point is the same as the original point that is being evaluated, then -1 is returned.
This is one of the more complicated topology nodes, but allows indexing of the atoms that are bonded to a bonded atom. This helps with doing calculations for planar molecules.
Inputs
Name | Type | Description | Default |
---|---|---|---|
Edge Index | Int |
Index within the gorup of edges that are connected to this point | None |
Outputs
Name | Type | Description | Default |
---|---|---|---|
0 | Int |
Index for the 0th point, connected to the point at the end of the selected edge. Returns -1 if not connected or self | None |
1 | Int |
Index for the 1th point, connected to the point at the end of the selected edge. Returns -1 if not connected or self | None |
2 | Int |
Index for the 2th point, connected to the point at the end of the selected edge. Returns -1 if not connected or self | None |
3 | Int |
Index for the 3th point, connected to the point at the end of the selected edge. Returns -1 if not connected or self | None |
Total | Int |
Number of edges conncted to the connected point, including this edge | None |