示例#1
0
        private void updatePkaType(ModelCompound compound, PkaType pkaType, int index)
        {
            var(compoundTypeParameter, pKaParameter) = pkaParametersFor(compound, index);

            compoundTypeParameter.Value = (int)pkaType.Type;
            pKaParameter.Value          = pkaType.Pka;
        }
示例#2
0
        private void setPka(ModelCompound compound, PkaType pkaType, int i)
        {
            var type = EnumHelper.ParseValue <CompoundType>(pkaType.Type);

            setValue(compound, CoreConstants.Parameter.ParameterCompoundType(i), (int)type);
            setValue(compound, CoreConstants.Parameter.ParameterPKa(i), pkaType.Value);
        }
示例#3
0
        private void synchronizePkaValueOrigins(PkaType pkaType, ModelCompound compound)
        {
            var valueOrign = pkaType?.ValueOrigin;

            if (valueOrign == null)
            {
                return;
            }

            //Making sure that all pKa parameters have the same value origin, even neutral ones
            Enumerable.Range(0, CoreConstants.NUMBER_OF_PKA_PARAMETERS).Each(index =>
            {
                var(compoundTypeParameter, pKaParameter) = pkaParametersFor(compound, index);
                _valueOriginMapper.UpdateValueOrigin(compoundTypeParameter.ValueOrigin, valueOrign);
                _valueOriginMapper.UpdateValueOrigin(pKaParameter.ValueOrigin, valueOrign);
            });
        }