pat = Chem.MolFromSmarts(mcs.smarts)
for structure in structures:
atom_indices = structure.GetSubstructMatch(pat)
+ # The only time that a SMARTS shouldn't match an input
+ # structure is if there's a threshold cutoff and this
+ # structure didn't make it.
+ assert args.threshold < 1, "No indices but should have matched everything!"
bond_indices = _get_match_bond_indices(pat, structure, atom_indices)
subgraph = Subgraph(atom_indices, bond_indices)