MolecularDiffusion.cli.predict

Prediction command for MolCraft CLI.

Adapted from scripts/predict.py for package-level execution.

Attributes

log

Functions

count_atoms_from_xyz(→ int)

Fast atom counter for XYZ files.

is_rank_zero()

Check if current process is rank zero.

load_model(chkpt_path[, task_config, atom_vocab])

Load a pre-trained model from checkpoint with auto-detection.

log_hyperparameters(object_dict)

Log hyperparameters for debugging.

predict_main(cfg)

Entry point for CLI predict command.

runner(→ Tuple[Dict[str, Any], Dict[str, Any]])

Property prediction run.

xyz2mol(xyz_file, atom_vocab, node_feature[, ...])

Convert an XYZ file into a PyTorch Geometric Data object.

Module Contents

MolecularDiffusion.cli.predict.count_atoms_from_xyz(path: str) int

Fast atom counter for XYZ files.

MolecularDiffusion.cli.predict.is_rank_zero()

Check if current process is rank zero.

MolecularDiffusion.cli.predict.load_model(chkpt_path, task_config=None, atom_vocab=None)

Load a pre-trained model from checkpoint with auto-detection.

MolecularDiffusion.cli.predict.log_hyperparameters(object_dict: dict)

Log hyperparameters for debugging.

MolecularDiffusion.cli.predict.predict_main(cfg: omegaconf.DictConfig)

Entry point for CLI predict command.

MolecularDiffusion.cli.predict.runner(cfg: omegaconf.DictConfig) Tuple[Dict[str, Any], Dict[str, Any]]

Property prediction run.

MolecularDiffusion.cli.predict.xyz2mol(xyz_file, atom_vocab, node_feature, edge_type='fully_connected', radius=4.0, n_neigh=5, device='cpu')

Convert an XYZ file into a PyTorch Geometric Data object.

MolecularDiffusion.cli.predict.log