MoleculeModify
is a powerful function to alter a chemical structure. However, it accepts only one modification, there is no (direct) way to give a list of consecutive modifications. For instance, in order to change all bonds to bond type "Single", you have to use e.g. Fold
:
MakeSimple[mol_] :=
Module[{kekMol = MoleculeModify[mol, "Kekulize"]},
Fold[MoleculeModify[#1, {"SetBondType", #2 -> "Single"}] &, kekMol,
Values /@
FindMoleculeSubstructure[kekMol, Bond[_, "Double"], All]]]
Is this statement true, or do I miss something?