MolecularDiffusion.modules.models.pharmacophore_dynamics

Pharmacophore Model Dynamics - Wrapper for ShEPhERD model.

Builds input_dict from HeteroData batch exactly matching shepherd/src/shepherd/lightning_module.py get_training_input_dict(), then calls shepherd_arch.Model.forward().

Attributes

Classes

PharmacophoreEnVariationalDiff

Wrapper that makes ShEPhERD compatible with MolecularDiffusion's

PharmacophoreModelWrapper

Wrapper around ShEPhERD Model.

Module Contents

class MolecularDiffusion.modules.models.pharmacophore_dynamics.PharmacophoreEnVariationalDiff(model_params: Dict | None = None, device: torch.device | None = None)

Bases: torch.nn.Module

Wrapper that makes ShEPhERD compatible with MolecularDiffusion’s EnVariationalDiffusion interface.

forward(batch, device=None)
device = None
dynamics
class MolecularDiffusion.modules.models.pharmacophore_dynamics.PharmacophoreModelWrapper(shepherd_model, params=None)

Bases: torch.nn.Module

Wrapper around ShEPhERD Model.

Converts a batched HeteroData into the input_dict format that shepherd_arch.Model.forward() expects, runs the forward pass, and returns (input_dict, output_dict).

forward(batch, device=None) Tuple[Dict[str, Any], Dict[str, Any]]

Build input_dict from HeteroData batch and run model.

Parameters:
  • batch – HeteroData batch from pharmacophore_collate_fn

  • device – target device

Returns:

(input_dict, output_dict)

model
params
MolecularDiffusion.modules.models.pharmacophore_dynamics.logger