diff --git a/utils/difflinker_sample_and_analyze.py b/utils/difflinker_sample_and_analyze.py index 1baf732c..8892d0cc 100644 --- a/utils/difflinker_sample_and_analyze.py +++ b/utils/difflinker_sample_and_analyze.py @@ -126,16 +126,16 @@ def sample_fn(_data): print('Please upload the file in one of the following formats: .pdb, .sdf, .mol, .mol2') return - # try: - # molecules = read_molecules(input_path) - # # molecules = [Chem.RemoveAllHs(i) for i in molecules] - # name = '.'.join(input_path.split('/')[-1].split('.')[:-1]) - # except Exception as e: - # return f'Could not read the molecule: {e}' + try: + molecules = read_molecules(input_path) + # molecules = [Chem.RemoveAllHs(i) for i in molecules] + name = '.'.join(input_path.split('/')[-1].split('.')[:-1]) + except Exception as e: + return f'Could not read the molecule: {e}' - molecules = read_molecules(input_path) - # molecules = [Chem.RemoveAllHs(i) for i in molecules] - name = '.'.join(input_path.split('/')[-1].split('.')[:-1]) + # molecules = read_molecules(input_path) + # # molecules = [Chem.RemoveAllHs(i) for i in molecules] + # name = '.'.join(input_path.split('/')[-1].split('.')[:-1]) for n_mol,molecule in enumerate(molecules): positions, one_hot, charges = parse_molecule(molecule, is_geom=ddpm.is_geom)