pub struct ProteinMPNNRunner { /* private fields */ }Implementations§
Source§impl ProteinMPNNRunner
impl ProteinMPNNRunner
Sourcepub fn from_pretrained(
modeltype: ProteinMPNNModels,
device: Device,
) -> Result<Self>
pub fn from_pretrained( modeltype: ProteinMPNNModels, device: Device, ) -> Result<Self>
Load a ProteinMPNN model from HuggingFace hub.
Sourcepub fn load_model(modeltype: ProteinMPNNModels, device: Device) -> Result<Self>
👎Deprecated since 0.4.0: renamed to from_pretrained
pub fn load_model(modeltype: ProteinMPNNModels, device: Device) -> Result<Self>
renamed to from_pretrained
Renamed to from_pretrained (ferritin-100.8).
Sourcepub fn load_model_with(
modeltype: ProteinMPNNModels,
opts: &LoadOptions,
) -> Result<Self>
👎Deprecated since 0.4.0: renamed to from_pretrained_with
pub fn load_model_with( modeltype: ProteinMPNNModels, opts: &LoadOptions, ) -> Result<Self>
renamed to from_pretrained_with
Renamed to from_pretrained_with (ferritin-100.8).
Sourcepub fn from_pretrained_with(
modeltype: ProteinMPNNModels,
opts: &LoadOptions,
) -> Result<Self>
pub fn from_pretrained_with( modeltype: ProteinMPNNModels, opts: &LoadOptions, ) -> Result<Self>
Load with an explicit device and dtype (ferritin-100.9).
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).
Assumes a ProteinMPNN checkpoint. For LigandMPNN use
from_path_as — the two need different configs
and a LigandMPNN checkpoint loaded as ProteinMPNN silently ignores its
nine ligand tensors.
Sourcepub fn from_path_with(
path: impl AsRef<Path>,
opts: &LoadOptions,
) -> Result<Self>
pub fn from_path_with( path: impl AsRef<Path>, opts: &LoadOptions, ) -> Result<Self>
Load from a local file with an explicit device and dtype.
Sourcepub fn from_path_as(
path: impl AsRef<Path>,
config: &ProteinMPNNConfig,
opts: &LoadOptions,
) -> Result<Self>
pub fn from_path_as( path: impl AsRef<Path>, config: &ProteinMPNNConfig, opts: &LoadOptions, ) -> Result<Self>
Load from a local file against an explicit architecture config.
Sourcepub fn into_model(self) -> ProteinMPNN
pub fn into_model(self) -> ProteinMPNN
Consume the runner and yield the loaded model.
Lets callers that need the bare ProteinMPNN — such as
MPNNExecConfig::load_model — go through this tested loading path
instead of duplicating the download (ferritin-100.10).
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 !RefUnwindSafe for ProteinMPNNRunner
impl !UnwindSafe for ProteinMPNNRunner
impl Freeze for ProteinMPNNRunner
impl Send for ProteinMPNNRunner
impl Sync for ProteinMPNNRunner
impl Unpin for ProteinMPNNRunner
impl UnsafeUnpin 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
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> ⓘ
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> ⓘ
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