ProtPlot.Attention.PointAttentionType

Holds 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!Method

Take 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.extend_segmentMethod
extend_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.

Note

The new segment will have missing secondary structure, since segments are meant to describe uniform secondary structure of contiguous residues.

ProtPlot.Ribbon.ribbon!Method
ribbon!(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.ribbonMethod
ribbon(protein::AbstractVector{Protein.Chain}; backgroundcolor=:black, camcontrols=(;), kwargs...)

Render a protein as a ribbon diagram. The display will be automatically centered on protein, unless the user supplies camcontrols (see Makie's camera documentation for details).

See render! for additional keyword arguments.

ProtPlot.Ribbon.segmentsMethod
segments(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.splineFunction
spline(points_matrix, ghost_control_start=nothing, ghost_control_end=nothing)

Allows for "ghost" control points at the start and end of the spline, to control the curvature at the ends.