MolecularDiffusion.modules.tasks.pharmacophore¶
Pharmacophore Diffusion Task.
Multi-modal diffusion task for generating molecules with 4 modalities: - x1: Molecular structure (atoms + bonds) - x2: Shape (point cloud) - x3: Electrostatics (point cloud) - x4: Pharmacophores (points + directions)
Attributes¶
Classes¶
Generative diffusion task for pharmacophore model. |
Module Contents¶
- class MolecularDiffusion.modules.tasks.pharmacophore.PharmacophoreGenerative(model=None, modality_weights: Dict[str, float] | None = None, loss_type: str = 'mse', model_params: Dict | None = None, **kwargs)¶
Bases:
MolecularDiffusion.modules.tasks.task.Task,MolecularDiffusion.core.ConfigurableGenerative diffusion task for pharmacophore model.
Handles training of the 4-modal pharmacophore diffusion model with per-modality loss weighting.
- build()¶
Build the task (no-op, model already instantiated).
- evaluate(pred, target)¶
Return empty metrics for generative models (evaluation not supported).
- forward(batch)¶
Forward pass through the model.
- Parameters:
batch – HeteroData batch from pharmacophore_collate_fn
- Returns:
Tuple of (total_loss, metrics_dict)
- predict(batch: Dict[str, Any], all_loss=None, metric=None)¶
Return empty predictions for generative models (evaluation not supported).
- preprocess(train_set=None, valid_set=None, test_set=None)¶
Preprocess datasets.
- Parameters:
train_set – Training dataset
valid_set – Validation dataset
test_set – Test dataset
- target(batch: Dict[str, Any])¶
Return empty targets for generative models (evaluation not supported).
- loss_type = 'mse'¶
- modality_weights = None¶
- model = None¶
- task_type = 'diffusion_pharmacophore'¶
- MolecularDiffusion.modules.tasks.pharmacophore.logger¶