Tasks

Tasks map sampler indices to model inputs and supervision targets. Summaries below are taken from each class docstring.

Predict amino-acid sequences from backbone structure.

class bioverse.tasks.inverse_folding.InverseFoldingTask(resolution='residue')[source]

Bases: Task

Predict amino-acid sequences from backbone structure.

Mask protein pocket residues and predict their amino-acid identities.

class bioverse.tasks.masked_pocket_prediction.MaskedPocketPredictionTask(radius=8.0, hide_peptide=False, peptide_type='peptide')[source]

Bases: Task

Mask protein pocket residues and predict their amino-acid identities.

The pocket is every protein residue whose Cα is within radius Å of any peptide Cα. Peptide letters are optional context: set hide_peptide to replace them with the masking token after the targets are extracted.

Predict masked residue identities or properties.

class bioverse.tasks.masked_residue_prediction.MaskedResiduePredictionTask[source]

Bases: Task

Predict masked residue identities or properties.

Predict the effect of amino-acid mutations.

class bioverse.tasks.mutation_effect_prediction.MutationEffectPredictionTask(resolution='residue', mutate_structure=True)[source]

Bases: Task

Predict the effect of amino-acid mutations.

mutate_structure=True writes the mutant residue into X (ProteinGym fitness / inverse-folding). False leaves the wild-type graph and only records position / wt / mut on y so the model can splice one-hot features and re-encode, matching Huber eval.

Predict a property for pairs of molecules.

class bioverse.tasks.pairwise_property_prediction.PairwisePropertyPredictionTask(meta: str, id_field: str = 'id', level: str = 'molecule', target: str | None = None, resolution: str = 'residue')[source]

Bases: Task

Predict a property for pairs of molecules.

Predict which protein residues contact a bound peptide.

class bioverse.tasks.pocket_contact_prediction.PocketContactPredictionTask(radius=8.0, peptide_type='peptide', drop_peptide=True)[source]

Bases: Task

Predict which protein residues contact a bound peptide.

Labels come from Cα distance to the peptide (AnnotatePocketContacts) or are computed here. The peptide is dropped from X so the encoder matches MEROPS (receptor only). y["target"] is a 0/1 contact per remaining residue; y["distance"] is the nearest peptide Cα distance.

Predict a scalar or vector property at a chosen hierarchy level.

class bioverse.tasks.property_prediction.PropertyPredictionTask(property='label', level='molecule', resolution='atom')[source]

Bases: Task

Predict a scalar or vector property at a chosen hierarchy level.

Loads a molecule (or sub-molecule level) from the indexed batch and extracts {level}_{property} as the supervision target. Set resolution to control which atoms/residues are exposed as features.

Parameters:
  • property (str or tuple) – Target column name, or (name, index) to select one element of a vector-valued property.

  • level (str) – Hierarchy level of the target ("molecule", "residue", etc.).

  • resolution (str) – Feature resolution passed to the returned batch ("atom" or "residue").

Keep the wild-type fold and emit mutation + P6–P4′ fields.

class bioverse.tasks.protease_mutation_delta.ProteaseMutationDeltaTask(resolution='residue', window_len: int = 10)[source]

Bases: Task

Keep the wild-type fold and emit mutation + P6–P4′ fields.

The geometric model scores f(P_mut, S) - f(P_WT, S) against the synthetic (or measured) Δactivity stored in molecule_mutation_effect. Coordinates stay wild-type; mutant identity is spliced at train time.

Return a protease fold and a tokenized P6–P4′ substrate window.

class bioverse.tasks.protease_substrate_compatibility.ProteaseSubstrateCompatibilityTask(resolution='residue', window_len: int = 10)[source]

Bases: Task

Return a protease fold and a tokenized P6–P4′ substrate window.

Protease point mutations from molecule_mutation_* are applied to residue identity (coordinates stay wild-type). The paired substrate window is written to y["substrate"] as integer tokens so a two-tower model can score f(P, S).

Score ligand-target pairs for virtual screening.

class bioverse.tasks.virtual_screen.VirtualScreenTask[source]

Bases: Task

Score ligand-target pairs for virtual screening.