Пример #1
0
        /// <summary> Returns all the AtomContainer's of a ChemModel.</summary>
        public static IAtomContainer[] getAllAtomContainers(IChemModel chemModel)
        {
            ISetOfMolecules moleculeSet = chemModel.Builder.newSetOfMolecules();

            if (chemModel.SetOfMolecules != null)
            {
                moleculeSet.add(chemModel.SetOfMolecules);
            }
            if (chemModel.SetOfReactions != null)
            {
                moleculeSet.add(SetOfReactionsManipulator.getAllMolecules(chemModel.SetOfReactions));
            }
            return(SetOfMoleculesManipulator.getAllAtomContainers(moleculeSet));
        }
        public static ISetOfMolecules getAllMolecules(ISetOfReactions set_Renamed)
        {
            ISetOfMolecules moleculeSet = set_Renamed.Builder.newSetOfMolecules();

            IReaction[] reactions = set_Renamed.Reactions;
            for (int i = 0; i < reactions.Length; i++)
            {
                IReaction reaction = reactions[i];
                moleculeSet.add(ReactionManipulator.getAllMolecules(reaction));
            }
            return(moleculeSet);
        }