pub struct ESMFold2Runner { /* private fields */ }Expand description
Wraps a loaded ESMFold2 model for all-atom structure prediction inference.
Create with:
from_pretrained— structure head only (~755 MB), backbone stubs with zeros (shape testing only).from_pretrained_with_backbone— structure head + ESMC-6B backbone (~12 GB total, real predictions).
Implementations§
Source§impl ESMFold2Runner
impl ESMFold2Runner
Sourcepub fn from_pretrained(
model_variant: ESMFold2Models,
device: Device,
) -> Result<Self>
pub fn from_pretrained( model_variant: ESMFold2Models, device: Device, ) -> Result<Self>
Download and load the ESMFold2 structure head only (~755 MB).
The ESMC-6B backbone is not loaded; hidden states passed to
fold_protein will be all-zeros, so predicted coordinates are
physically meaningless. Use this for shape/pipeline testing without
requiring 12 GB of disk space.
Sourcepub fn from_pretrained_with_backbone(
model_variant: ESMFold2Models,
device: Device,
) -> Result<Self>
pub fn from_pretrained_with_backbone( model_variant: ESMFold2Models, device: Device, ) -> Result<Self>
Download and load the structure head (~755 MB) and the ESMC-6B backbone (~12 GB). Required for predictions with meaningful pLDDT.
Sourcepub fn fold_protein(
&self,
sequence: &str,
num_loops: usize,
num_sampling_steps: usize,
) -> Result<ESMFold2Output>
pub fn fold_protein( &self, sequence: &str, num_loops: usize, num_sampling_steps: usize, ) -> Result<ESMFold2Output>
Fold a single protein sequence.
§Arguments
sequence— amino-acid string (standard one-letter codes)num_loops— recycling iterations (typically 3)num_sampling_steps— diffusion denoising steps (14 fast / 50 quality)
When the runner was created with from_pretrained
(no backbone), hidden states are zeros and coordinates will be arbitrary.
Use from_pretrained_with_backbone
for real predictions.
Auto Trait Implementations§
impl Freeze for ESMFold2Runner
impl !RefUnwindSafe for ESMFold2Runner
impl !Send for ESMFold2Runner
impl !Sync for ESMFold2Runner
impl Unpin for ESMFold2Runner
impl UnsafeUnpin for ESMFold2Runner
impl !UnwindSafe for ESMFold2Runner
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