mgyigit commited on
Commit
9dfce05
·
verified ·
1 Parent(s): 6aeb506

Update src/util/smiles_cor.py

Browse files
Files changed (1) hide show
  1. src/util/smiles_cor.py +4 -2
src/util/smiles_cor.py CHANGED
@@ -1278,7 +1278,9 @@ class smi_correct(object):
1278
  SRC)
1279
 
1280
  df_output["SMILES"] = df_output.apply(lambda row: self.standardization_pipeline(row["CORRECT"]), axis=1)
1281
-
1282
- df_output = self.remove_smiles_duplicates(df_output, subset="SMILES").drop(columns=["CORRECT", "INCORRECT", "ORIGINAL"]).dropna()
 
 
1283
 
1284
  return df_output
 
1278
  SRC)
1279
 
1280
  df_output["SMILES"] = df_output.apply(lambda row: self.standardization_pipeline(row["CORRECT"]), axis=1)
1281
+
1282
+ cols_to_drop = ["CORRECT", "INCORRECT", "ORIGINAL"]
1283
+ cols_present = [col for col in cols_to_drop if col in df_output.columns]
1284
+ df_output = self.remove_smiles_duplicates(df_output, subset="SMILES").drop(columns=cols_present).dropna()
1285
 
1286
  return df_output