pub struct ProteinMPNNRunner { /* private fields */ }Implementations§
Source§impl ProteinMPNNRunner
impl ProteinMPNNRunner
Sourcepub fn load_model(modeltype: ProteinMPNNModels, device: Device) -> Result<Self>
pub fn load_model(modeltype: ProteinMPNNModels, device: Device) -> Result<Self>
Load a ProteinMPNN model from HuggingFace hub.
Sourcepub fn from_path(path: impl AsRef<Path>, device: Device) -> Result<Self>
pub fn from_path(path: impl AsRef<Path>, device: Device) -> Result<Self>
Load from a local .pt file (e.g. from ferritin-test-data or a cached download).
Sourcepub fn get_log_probs(&self, features: &ProteinFeatures) -> Result<Tensor>
pub fn get_log_probs(&self, features: &ProteinFeatures) -> Result<Tensor>
Run ProteinMPNN and return a (L, 21) log-probability tensor for all positions.
Useful for numerical parity tests against a Python reference. Values are
log-softmax of the raw logits from a single structure-conditioned forward pass
(the same computation as simple_decode).
Sourcepub fn get_pseudo_probabilities(
&self,
features: &ProteinFeatures,
) -> Result<Vec<PseudoProbability>>
pub fn get_pseudo_probabilities( &self, features: &ProteinFeatures, ) -> Result<Vec<PseudoProbability>>
Run ProteinMPNN and return per-residue pseudo-probabilities for the 21 amino acids.
Auto Trait Implementations§
impl Freeze for ProteinMPNNRunner
impl !RefUnwindSafe for ProteinMPNNRunner
impl Send for ProteinMPNNRunner
impl Sync for ProteinMPNNRunner
impl Unpin for ProteinMPNNRunner
impl UnsafeUnpin for ProteinMPNNRunner
impl !UnwindSafe for ProteinMPNNRunner
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