diff --git a/synutility/SynIO/Format/dg_to_gml.py b/synutility/SynIO/Format/dg_to_gml.py index f8e58f6..b2d079d 100644 --- a/synutility/SynIO/Format/dg_to_gml.py +++ b/synutility/SynIO/Format/dg_to_gml.py @@ -93,7 +93,8 @@ def printGraph(g): def fit(self, dg, origSmiles): """ - Matches the original SMILES to a list of generated reaction SMILES and returns the parsed reaction. + Matches the original SMILES to a list of generated reaction SMILES and + returns the parsed reaction. Parameters: - dg (DataGenerator): The data generator instance containing the reactions. @@ -106,12 +107,11 @@ def fit(self, dg, origSmiles): res = DGToGML.getReactionSmiles(dg) smiles_list = [value for values in res.values() for value in values] - - smiles_standard = [self.standardizer.fit(rsmi, True, True) - for rsmi in smiles_list] + smiles_standard = [ + self.standardizer.fit(rsmi, True, True) for rsmi in smiles_list + ] origSmiles_standard = self.standardizer.fit(origSmiles, True, True) - for index, value in enumerate(smiles_standard): if value == origSmiles_standard: return self.parseReactionSmiles(smiles_list[index])