pub struct ESMFold2Model { /* private fields */ }Expand description
Full ESMFold2-Fast structure prediction model.
The ESMC-6B backbone (frozen) is loaded separately; this struct holds only the structure-head components that are fine-tuned for structure prediction.
Implementations§
Source§impl ESMFold2Model
impl ESMFold2Model
Sourcepub fn load(vb: VarBuilder<'_>, config: ESMFold2Config) -> Result<Self>
pub fn load(vb: VarBuilder<'_>, config: ESMFold2Config) -> Result<Self>
Load the ESMFold2-Fast structure head from a VarBuilder.
The VarBuilder should be rooted at the structure-head safetensors
(biohub/ESMFold2-Fast model.safetensors). The ESMC-6B backbone is
loaded separately.
Sourcepub fn forward(
&self,
hidden_states: &Tensor,
residue_indices: &Tensor,
chain_ids: &Tensor,
num_loops: usize,
num_steps: usize,
) -> Result<ESMFold2Output>
pub fn forward( &self, hidden_states: &Tensor, residue_indices: &Tensor, chain_ids: &Tensor, num_loops: usize, num_steps: usize, ) -> Result<ESMFold2Output>
Run the full ESMFold2 structure-head forward pass.
§Arguments
hidden_states— ESMC-6B backbone output[B, L, 2560]residue_indices— residue positions[B, L], any numeric dtypechain_ids— chain identifiers[B, L], any numeric dtypenum_loops— number of recycling iterations (typically 3)num_steps— diffusion denoising steps (14 fast / 50 quality)
§Returns
ESMFold2Output with coordinates, pLDDT, and optional PAE/distogram.
Auto Trait Implementations§
impl Freeze for ESMFold2Model
impl !RefUnwindSafe for ESMFold2Model
impl !Send for ESMFold2Model
impl !Sync for ESMFold2Model
impl Unpin for ESMFold2Model
impl UnsafeUnpin for ESMFold2Model
impl !UnwindSafe for ESMFold2Model
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<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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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