コード例 #1
0
        private bool isRenalClearance(IPartialProcessMapping compoundProcessMapping)
        {
            var systemicPocess = compoundProcessMapping as SystemicProcessSelection;

            if (systemicPocess == null)
            {
                return(false);
            }
            return((systemicPocess.ProcessType == SystemicProcessTypes.Renal) ||
                   (systemicPocess.ProcessType == SystemicProcessTypes.GFR));
        }
コード例 #2
0
        private void addTransportProcess(IMoleculeBuilder drug, IPartialProcessMapping compoundProcessMapping, CompoundProperties compoundProperties)
        {
            var compound = compoundProperties.Compound;
            var process  = compound.ProcessByName(compoundProcessMapping.ProcessName);

            if (isRenalClearance(compoundProcessMapping))
            {
                var renalPassiveProcess = _processBuilderMapper.PassiveTransportProcessFrom(process, drug.Name, _passiveTransports.FormulaCache);
                _passiveTransports.Add(renalPassiveProcess);
                _parameterIdUpdater.UpdateBuildingBlockId(renalPassiveProcess.Parameters, compound);
                return;
            }

            var transporter = _individual.MoleculeByName <IndividualTransporter>(compoundProcessMapping.MoleculeName);
            var transporterMoleculeContainer = _processBuilderMapper.ActiveTransportFrom(process, transporter, _moleculeBuildingBlock.FormulaCache);

            _interactionKineticUpdater.UpdateTransport(transporterMoleculeContainer, compoundProcessMapping.MoleculeName, compound.Name, _simulation, _moleculeBuildingBlock.FormulaCache);
            _parameterIdUpdater.UpdateBuildingBlockId(transporterMoleculeContainer.Parameters, compound);
            drug.AddTransporterMoleculeContainer(transporterMoleculeContainer);
        }
コード例 #3
0
 private static SimulationPartialProcess newSimulationPartialProcess <TIndividualMolecule>(TIndividualMolecule individualMolecule, PartialProcess partialProcess, IPartialProcessMapping partialProcessMapping = null)
     where TIndividualMolecule : IndividualMolecule
 {
     return(new SimulationPartialProcess {
         CompoundProcess = partialProcess, IndividualMolecule = individualMolecule, PartialProcessMapping = partialProcessMapping
     });
 }
コード例 #4
0
 private static bool isSelected <TPartialProcess>(TPartialProcess compoundProcess, IPartialProcessMapping mapping) where TPartialProcess : PartialProcess
 {
     return(compoundProcess != null && string.Equals(compoundProcess.ParentCompound.Name, mapping.CompoundName));
 }