private void updatePkaType(ModelCompound compound, PkaType pkaType, int index) { var(compoundTypeParameter, pKaParameter) = pkaParametersFor(compound, index); compoundTypeParameter.Value = (int)pkaType.Type; pKaParameter.Value = pkaType.Pka; }
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); }
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); }); }