public static void SetAtomProperties <T>(IChemObjectSet <T> set, string propKey, object propVal) where T : IAtomContainer { if (set != null) { for (int i = 0; i < set.Count; i++) { AtomContainerManipulator.SetAtomProperties(set[i], propKey, propVal); } } }
/// <summary> /// Sets the AtomProperties of all Atoms inside an IChemModel. /// </summary> /// <param name="chemModel">The IChemModel object.</param> /// <param name="propKey">The key of the property.</param> /// <param name="propVal">The value of the property.</param> public static void SetAtomProperties(IChemModel chemModel, string propKey, object propVal) { if (chemModel.MoleculeSet != null) { MoleculeSetManipulator.SetAtomProperties(chemModel.MoleculeSet, propKey, propVal); } if (chemModel.ReactionSet != null) { ReactionSetManipulator.SetAtomProperties(chemModel.ReactionSet, propKey, propVal); } if (chemModel.Crystal != null) { AtomContainerManipulator.SetAtomProperties(chemModel.Crystal, propKey, propVal); } }
public static void SetAtomProperties(IReaction reaction, string propKey, object propVal) { var reactants = reaction.Reactants; for (int j = 0; j < reactants.Count; j++) { AtomContainerManipulator.SetAtomProperties(reactants[j], propKey, propVal); } var products = reaction.Products; for (int j = 0; j < products.Count; j++) { AtomContainerManipulator.SetAtomProperties(products[j], propKey, propVal); } }