pub struct GeometricReasoningOriginalImpl { /* private fields */ }Implementations§
Source§impl GeometricReasoningOriginalImpl
impl GeometricReasoningOriginalImpl
Sourcepub fn load(vb: VarBuilder<'_>, config: &ESMCConfig) -> Result<Self>
pub fn load(vb: VarBuilder<'_>, config: &ESMCConfig) -> Result<Self>
Load geometric attention from a VarBuilder rooted at geom_attn.
Weight layout, verified against both esm3_sm_open_v1.pth and
esm3_structure_encoder_v0.pth (ferritin-100.21):
s_norm.weight[/.bias] — (d_model,)
proj.weight[/.bias] — (15 * v_heads, d_model)
out_proj.weight[/.bias] — (d_model, 3 * v_heads)
distance_scale_per_head — (v_heads,)
rotation_scale_per_head — (v_heads,)The main ESM3 model stores these without bias terms while the VQ-VAE
structure encoder stores them with bias, so config.bias selects.
Sourcepub fn forward(
&self,
s: &Tensor,
affine: &Affine3D,
affine_mask: &Tensor,
sequence_id: Option<&Tensor>,
chain_id: Option<&Tensor>,
) -> Result<Tensor>
pub fn forward( &self, s: &Tensor, affine: &Affine3D, affine_mask: &Tensor, sequence_id: Option<&Tensor>, chain_id: Option<&Tensor>, ) -> Result<Tensor>
Geometric attention forward pass.
s:(B, L, d_model)hidden states.affine: per-residue local frames(B, L, 3, 3)rot +(B, L, 3)trans.affine_mask:(B, L)u8 — 1 where the frame is valid, 0 for frameless positions.sequence_id: optional(B, L)int — positions with the same ID form one protein.chain_id: optional(B, L)int — positions in the same chain.
Returns (B, L, d_model).
Auto Trait Implementations§
impl !RefUnwindSafe for GeometricReasoningOriginalImpl
impl !UnwindSafe for GeometricReasoningOriginalImpl
impl Freeze for GeometricReasoningOriginalImpl
impl Send for GeometricReasoningOriginalImpl
impl Sync for GeometricReasoningOriginalImpl
impl Unpin for GeometricReasoningOriginalImpl
impl UnsafeUnpin for GeometricReasoningOriginalImpl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more