コード例 #1
0
        private void addInteraction(Simulation simulation, InteractionType interactionType, Action <IMoleculeBuilder, InteractionProcess> addInteractionAction)
        {
            if (!simulation.InteractionProperties.Any())
            {
                return;
            }

            foreach (var moleculeName in _allMoleculeNames)
            {
                var allInteractions = _interactionTask.AllInteractionProcessesFor(moleculeName, interactionType, simulation);
                if (!allInteractions.Any())
                {
                    continue;
                }

                var molecule = _moleculeBuildingBlock[moleculeName];
                addTurnoverReactionIfNotDefinedAlreadyFor(molecule);
                allInteractions.Each(x => addInteractionAction(molecule, x));
            }
        }
コード例 #2
0
 protected virtual IReadOnlyList <InteractionProcess> AllInteractionProcessesFor(string moleculeName, string compoundName, Simulation simulation)
 {
     return(_interactionTask.AllInteractionProcessesFor(moleculeName, _interactionType, simulation, compoundName));
 }