InvariantPointAttention

Documentation for InvariantPointAttention.

InvariantPointAttention.IPA_settingsMethod
IPA_settings(
    dims;
    c = 16,
    N_head = 12,
    N_query_points = 4,
    N_point_values = 8,
    c_z = 0,
    Typ = Float32,
    use_softmax1 = false,
    scaling_qk = :default,
)

Returns a tuple of the IPA settings, with defaults for everything except dims. This can be passed to the IPA and IPCrossAStructureModuleLayer.

source
InvariantPointAttention.get_TMethod
get_T(coords::Array{<:Real, 3})

Get the assosciated SE(3) frame for all residues in a protein backbone represented as a 3x3xL array of coordinates.

source
InvariantPointAttention.right_to_left_maskMethod
right_to_left_mask([T=Float32,] N::Integer)

Create a right-to-left mask for the self-attention mechanism. The mask is a matrix of size N x N where the diagonal and the lower triangular part are set to zero and the upper triangular part is set to infinity.

source
InvariantPointAttention.softmax1Method
softmax1(x, dims = 1)

Behaves like softmax, but as though there was an additional logit of zero along dims (which is excluded from the output). So the values will sum to a value between zero and 1.

See https://www.evanmiller.org/attention-is-off-by-one.html

source