Skip to main content

THREE_DI_OFFSET

Constant THREE_DI_OFFSET 

Source
pub const THREE_DI_OFFSET: u32 = 125;
Expand description

How far a 3Di token sits above its amino-acid counterpart.

ProstT5 extends this vocabulary with Foldseek’s 3Di alphabet as lowercase letters at ids 128..=147, and every one of them is exactly its uppercase residue’s id plus this offset — a = 128 = A(3) + 125, through c = 147 = C(22) + 125. So there is no second table: 3Di is this table shifted.

test_three_di_is_the_residue_table_shifted checks that against the ids published in ProstT5’s added_tokens.json, so the shortcut is verified rather than assumed.