From: Gabor B. <bg...@us...> - 2005-02-05 04:54:44
|
Update of /cvsroot/ecell/ecell3/modeleditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17342 Modified Files: ModelStore.py Log Message: Small bugfix about the recalculation of MolarConc, NumConc and Value in variables. Index: ModelStore.py =================================================================== RCS file: /cvsroot/ecell/ecell3/modeleditor/ModelStore.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ModelStore.py 9 Jan 2005 10:35:17 -0000 1.10 --- ModelStore.py 5 Feb 2005 04:54:35 -0000 1.11 *************** *** 603,606 **** --- 603,607 ---- aValueRef = self.__getEntityProperty( aFullID, MS_VARIABLE_VALUE ) aValueRef[MS_PROPERTY_VALUE] = AVOGADRO * aSystemSize * float(convertValue) + aValueRef[MS_PROPERTY_FLAGS][MS_CHANGED_FLAG] = 1 self.__recalculateConcentrations( aVariable, aSystemSize ) *************** *** 610,613 **** --- 611,615 ---- aValueRef = self.__getEntityProperty( aFullID, MS_VARIABLE_VALUE ) aValueRef[MS_PROPERTY_VALUE] = aSystemSize * float(convertValue) + aValueRef[MS_PROPERTY_FLAGS][MS_CHANGED_FLAG] = 1 self.__recalculateConcentrations( aVariable, aSystemSize ) elif aPropertyName == MS_VARIABLE_VALUE: *************** *** 628,631 **** --- 630,634 ---- newMolarConc = 0.0 aVariable[MS_ENTITY_PROPERTYLIST][MS_VARIABLE_MOLARCONC][MS_PROPERTY_VALUE] = newMolarConc + aVariable[MS_ENTITY_PROPERTYLIST][MS_VARIABLE_MOLARCONC][MS_PROPERTY_FLAGS][MS_CHANGED_FLAG] = 1 if systemSize != 0.0: newNumberConc = aValue / systemSize *************** *** 633,637 **** newNumberConc = 0.0 aVariable[MS_ENTITY_PROPERTYLIST][MS_VARIABLE_NUMCONC][MS_PROPERTY_VALUE] = newNumberConc ! def __getSystemSize( self, aFullID ): --- 636,640 ---- newNumberConc = 0.0 aVariable[MS_ENTITY_PROPERTYLIST][MS_VARIABLE_NUMCONC][MS_PROPERTY_VALUE] = newNumberConc ! aVariable[MS_ENTITY_PROPERTYLIST][MS_VARIABLE_NUMCONC][MS_PROPERTY_FLAGS][MS_CHANGED_FLAG] = 1 def __getSystemSize( self, aFullID ): |