Ejemplo n.º 1
0
        private void updateLipophilicityReferences(SystemicProcess systemicProcess, string parameterName)
        {
            var parameter = systemicProcess.Parameter(parameterName);

            if (parameter == null)
            {
                return;
            }
            foreach (var objectPath in parameter.Formula.ObjectPaths)
            {
                objectPath.Replace(ConverterConstants.Parameter.Lipophilicity, CoreConstants.Parameter.LIPOPHILICITY_EXPERIMENT);
            }
        }
Ejemplo n.º 2
0
        public override void GlobalContext()
        {
            base.GlobalContext();
            _processGFR      = _cloneManager.Clone(_compoundProcessRepository.ProcessByName(CoreConstantsForSpecs.Process.GLOMERULAR_FILTRATION).DowncastTo <SystemicProcess>());
            _processGFR.Name = "My GFR Process";
            _processGFR.Parameter(CoreConstants.Parameters.GFR_FRACTION).Value = 0.8;
            _compound.AddProcess(_processGFR);
            _simulation = DomainFactoryForSpecs.CreateModelLessSimulationWith(_individual, _compound, _protocol).DowncastTo <IndividualSimulation>();
            _simulation.CompoundPropertiesList.First()
            .Processes
            .TransportAndExcretionSelection
            .AddSystemicProcessSelection(new SystemicProcessSelection {
                ProcessName = _processGFR.Name, ProcessType = _processGFR.SystemicProcessType
            });

            DomainFactoryForSpecs.AddModelToSimulation(_simulation);
        }
Ejemplo n.º 3
0
        public override void GlobalContext()
        {
            base.GlobalContext();
            _kidneyProcess      = _cloneManager.Clone(_compoundProcessRepository.ProcessByName(CoreConstants.Process.KIDNEY_CLEARANCE).DowncastTo <SystemicProcess>());
            _kidneyProcess.Name = "My Kidney Process";
            _kidneyProcess.Parameter(ConverterConstants.Parameter.PlasmaClearance).Value = 10;
            _compound.AddProcess(_kidneyProcess);
            _simulation = DomainFactoryForSpecs.CreateModelLessSimulationWith(_individual, _compound, _protocol).DowncastTo <IndividualSimulation>();
            _simulation.CompoundPropertiesList.First()
            .Processes
            .TransportAndExcretionSelection
            .AddSystemicProcessSelection(new SystemicProcessSelection {
                ProcessName = _kidneyProcess.Name, ProcessType = _kidneyProcess.SystemicProcessType
            });

            DomainFactoryForSpecs.AddModelToSimulation(_simulation);
        }
Ejemplo n.º 4
0
        public override void GlobalContext()
        {
            base.GlobalContext();
            _process      = _cloneManager.Clone(_compoundProcessRepository.ProcessByName(ProcessName).DowncastTo <SystemicProcess>());
            _process.Name = "My Liver Process";
            _process.Parameter(ConverterConstants.Parameter.CLspec).Value = 1;
            _compound.AddProcess(_process);
            _simulation = DomainFactoryForSpecs.CreateModelLessSimulationWith(_individual, _compound, _protocol).DowncastTo <IndividualSimulation>();
            _simulation.CompoundPropertiesFor(_compound.Name)
            .Processes
            .MetabolizationSelection
            .AddSystemicProcessSelection(new SystemicProcessSelection {
                ProcessName = _process.Name, ProcessType = _process.SystemicProcessType
            });

            DomainFactoryForSpecs.AddModelToSimulation(_simulation);
        }
Ejemplo n.º 5
0
        public void the_created_simulation_should_have_a_kdiney_GFR_clearance_process_created_based_on_the_one_defined_in_the_compound()
        {
            var allProcessParameters = _parameterGroupTask.ParametersInTopGroup(CoreConstants.Groups.COMPOUND_PROCESSES, _simulation.All <IParameter>());

            allProcessParameters.Select(x => x.ParentContainer.Name).Distinct().ShouldOnlyContain(_processGFR.Name);

            allProcessParameters.FindByName(CoreConstants.Parameters.GFR_FRACTION).Value.ShouldBeEqualTo(_processGFR.Parameter(CoreConstants.Parameters.GFR_FRACTION).Value);
        }
Ejemplo n.º 6
0
        protected void CheckProcess()
        {
            var allProcessParameters = _parameterGroupTask.ParametersInTopGroup(CoreConstants.Groups.COMPOUND_PROCESSES, _simulation.All <IParameter>()).ToList();

            allProcessParameters.Select(x => x.ParentContainer.Name).Distinct().ShouldOnlyContain(CoreConstants.CompositeNameFor(_compound.Name, _process.Name));

            allProcessParameters.FindByName(ConverterConstants.Parameter.CLspec).Value.ShouldBeEqualTo(_process.Parameter(ConverterConstants.Parameter.CLspec).Value);
        }
Ejemplo n.º 7
0
        public void the_created_simulation_should_have_a_biliary_clearance_process_created_based_on_the_one_defined_in_the_compound()
        {
            var allProcessParameters = _parameterGroupTask.ParametersInTopGroup(CoreConstants.Groups.COMPOUND_PROCESSES, _simulation.All <IParameter>()).ToList();

            allProcessParameters.Select(x => x.ParentContainer.Name).Distinct().ShouldOnlyContain(CoreConstants.CompositeNameFor(_compound.Name, _liverClearance.Name));

            allProcessParameters.FindByName(ConverterConstants.Parameter.PlasmaClearance).Value.ShouldBeEqualTo(_liverClearance.Parameter(ConverterConstants.Parameter.PlasmaClearance).Value);
        }