use of cbit.vcell.model.HMM_IRRKinetics in project vcell by virtualcell.
the class SBPAXKineticsExtractor method setVMForwardParamAsExpression.
private static void setVMForwardParamAsExpression(ReactionStep reaction, SBOParam kCat, Kinetics kinetics) throws ExpressionException, PropertyVetoException {
if (kCat != null) {
KineticsParameter Vmax = ((HMM_IRRKinetics) kinetics).getVmaxParameter();
String unitF = SBOParam.formatUnit(kCat.getUnit());
VCUnitDefinition kCatUnit = reaction.getModel().getUnitSystem().getInstance(unitF);
Double numberKCat = 0.0;
if (kCat.hasNumber()) {
numberKCat = kCat.getNumber();
}
Expression KCatExpression = new Expression(numberKCat);
KineticsParameter Kcat = kinetics.addUserDefinedKineticsParameter("Kcat", KCatExpression, kCatUnit);
String enzymeName = "";
ReactionParticipant[] participants = reaction.getReactionParticipants();
for (int i = 0; i < participants.length; i++) {
ReactionParticipant rp = participants[i];
if (rp instanceof Catalyst) {
enzymeName = rp.getName();
}
}
SpeciesContext enzyme = reaction.getModel().getSpeciesContext(enzymeName);
Vmax.setExpression(Expression.mult(new Expression(Kcat, reaction.getNameScope()), new Expression(enzyme, reaction.getNameScope())));
}
}
use of cbit.vcell.model.HMM_IRRKinetics in project vcell by virtualcell.
the class SBPAXKineticsExtractor method setMichaelisForwardParam.
private static void setMichaelisForwardParam(ReactionStep reaction, SBOParam kMichaelis, Kinetics kinetics) throws ExpressionException, PropertyVetoException {
if (kMichaelis != null) {
KineticsParameter fwdParam = ((HMM_IRRKinetics) kinetics).getKmParameter();
kinetics.setParameterValue(fwdParam, new Expression(kMichaelis.getNumber()));
String unitF = SBOParam.formatUnit(kMichaelis.getUnit());
VCUnitDefinition fwdUnit = reaction.getModel().getUnitSystem().getInstance(unitF);
fwdParam.setUnitDefinition(fwdUnit);
}
}
Aggregations