MolecularDiffusion.runmodes.generate.tasks_generate¶
Attributes¶
Classes¶
Module Contents¶
- class MolecularDiffusion.runmodes.generate.tasks_generate.GenerativeFactory(task: MolecularDiffusion.modules.tasks.task.Task, task_type: str = 'unconditional', sampling_mode: str = 'ddpm', num_generate: int = 100, mol_size: List[int] = [0, 0], target_values: List[float] = [], property_names: List[str] = [], negative_target_values: List[float] = [], batch_size: int = 1, seed: int = 86, n_frames: int = 0, output_path: str = 'generated_mol', condition_configs={})¶
- conditional_generation()¶
- hybrid_guidance()¶
- preprocess_ref_structure(device)¶
Load and preprocess a reference molecular structure from an XYZ file.
This function reads an XYZ file, encodes atomic features, normalizes coordinates and features, and returns a tensor combining positions and processed features.
- Returns:
- Tensor of shape (1, n_atoms, 3 + n_features + 1) containing:
[normalized_coords | normalized_onehot_features | normalized_charges].
- Return type:
- Raises:
FileNotFoundError – If the reference structure file is not found.
ValueError – If the processed reference structure is empty.
- property_guidance()¶
- property_prediction(xh: torch.Tensor, t: int)¶
- run()¶
- structural_guidance()¶
- unconditional_generation()¶
- batch_size = 1¶
- condition_configs¶
- mol_size = [0, 0]¶
- n_frames = 0¶
- negative_target_values = []¶
- num_generate = 100¶
- output_path = 'generated_mol'¶
- property_names = []¶
- sampling_mode = 'ddpm'¶
- seed = 86¶
- target_values = []¶
- task¶
- task_type = 'unconditional'¶
- MolecularDiffusion.runmodes.generate.tasks_generate.logger¶