ProtPlot.Attention.PointAttention
— TypeHolds L 3D points and an HxLxL attention intensity tensor. The attention to the first i residues at time i is intensities[:, i, 1:i]. Each column of this matrix represents the attention of some head to the corresponding points[1:i].
ProtPlot.Attention.draw_attention!
— MethodTake H points, and an LxH attention intensity matrix. For each column slice of the attention matrix, draw lines to the corresponding points with the intensities in the vector that exceed a certain threshold. The thickness of the lines should be proportional to the value in the attention matrix.
ProtPlot.Ribbon.Segment
— TypeSegment{SS}
A segment of a chain with uniform secondary structure.
AssigningSecondaryStructure.assign_secondary_structure!
— Methodassign_secondary_structure!(protein)
Uses a simplified version of DSSP to fill the secondary structure vector of each chain with '-' (coil/loop), 'H' (helix), and 'E' (strand).
AssigningSecondaryStructure.assign_secondary_structure
— Methodassign_secondary_structure(protein)
Returns a new protein with secondary structure assigned.
ProtPlot.Ribbon.extend_segment
— Methodextend_segment(segment, range)
Returns a segment of the parent chain, extended to the given range. If segment
covers indices 3:4 of the parent chain, then extend_segment(segment, 0:3)
will return a segment that covers indices 2:5, since 0 is one less than 1, and 3 is one more than 4. extend_segment(segment, 1:2)
would therefore return the same segment as segment
. This function is useful if one wishes to access the coordinates of the atoms of the parent chain that are adjacent to the segment.
The new segment will have missing secondary structure, since segments are meant to describe uniform secondary structure of contiguous residues.
ProtPlot.Ribbon.ribbon!
— Methodribbon!(container, protein::AbstractVector{Protein.Chain}; kwargs...)
Renders a protein as a ribbon diagram onto a container.
Keyword arguments:
colorscheme::ColorScheme = ColorSchemes.jet
: The color scheme to use for the ribbon.color_vectors::Vector{<:Vector{<:Union{AbstractFloat, RGB}}} = [LinRange(0, 1, length(chain)) for chain in protein]
: The color vectors to use for each chain. The length of each vector must match the length of the corresponding chain. The vectors must be either vectors of real number between 0 and 1, or vectors of RGB colors.
ProtPlot.Ribbon.ribbon
— Methodribbon(protein::AbstractVector{Protein.Chain}; kwargs...)
Renders a protein as a ribbon diagram. See render!
for keyword arguments.
ProtPlot.Ribbon.segments
— Methodsegments(chain)
Returns an array of segments of a chain. The segments are defined by the secondary structure of the residues. A chain with missing secondary structure information will throw an error.
ProtPlot.Ribbon.spline
— Methodspline(points_matrix, ghost_control_start, ghost_control_end)
Allows for "ghost" control points at the start and end of the spline, to control the curvature at the ends.
ProtPlot.Ribbon.spline
— Methodspline(points_matrix)
Creates a spline curve from a matrix of points. The points are the columns of the matrix.
ProtPlot.Animate.animate_attention
— Methodanimate_attention(chain::Backboner.Protein.Chain, attention::AbstractArray{<:Real, 3}; kwargs...)