[Fix] enviFormer prediction (#352)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#352
This commit is contained in:
2026-03-12 08:49:44 +13:00
parent e0764126e3
commit f1a9456d1d

View File

@ -3471,9 +3471,7 @@ class EnviFormer(PackageBasedModel):
def predict_batch(self, smiles: List[str], *args, **kwargs): def predict_batch(self, smiles: List[str], *args, **kwargs):
# Standardizer removes all but one compound from a raw SMILES string, so they need to be processed separately # Standardizer removes all but one compound from a raw SMILES string, so they need to be processed separately
canon_smiles = [ canon_smiles = [
".".join( ".".join([FormatConverter.standardize(s, remove_stereo=True) for s in smi.split(".")])
[FormatConverter.standardize(s, remove_stereo=True) for s in smiles.split(".")]
)
for smi in smiles for smi in smiles
] ]
logger.info(f"Submitting {canon_smiles} to {self.get_name()}") logger.info(f"Submitting {canon_smiles} to {self.get_name()}")