@@ -271,9 +271,9 @@ def writeConcChan(modelpath,f,sceneitems):
271
271
else :
272
272
error = error + "\n x and y co-ordinates are not specified for `" + cChan .name + "` zero will be assigned \n "
273
273
if color == "" or color == " " :
274
- color = getRandColor ()
274
+ color = getRandomColor ()
275
275
if textcolor == "" or textcolor == " " :
276
- textcolor = getRandColor ()
276
+ textcolor = getRandomColor ()
277
277
f .write ("simundump kchan /kinetics/" + trimPath (cChan )+ " " + str (int (1 )) + " " + str (cChan .permeability )+ " " +
278
278
str (int (0 )) + " " +
279
279
str (int (0 )) + " " +
@@ -344,9 +344,9 @@ def writeEnz( modelpath,f,sceneitems):
344
344
else :
345
345
error = error + "\n x and y co-ordinates are not specified for `" + enz .name + "` zero will be assigned \n "
346
346
if color == "" or color == " " :
347
- color = getRandColor ()
347
+ color = getRandomColor ()
348
348
if textcolor == "" or textcolor == " " :
349
- textcolor = getRandColor ()
349
+ textcolor = getRandomColor ()
350
350
351
351
f .write ("simundump kenz /kinetics/" + trimPath (enz ) + " " + str (int (0 ))+ " " +
352
352
str (concInit ) + " " +
@@ -421,9 +421,9 @@ def writeReac(modelpath,f,sceneitems):
421
421
y = 0
422
422
error = error + "\n x and y co-ordinates are not specified for `" + reac .name + "` zero will be assigned \n "
423
423
if color == "" or color == " " :
424
- color = getRandColor ()
424
+ color = getRandomColor ()
425
425
if textcolor == "" or textcolor == " " :
426
- textcolor = getRandColor ()
426
+ textcolor = getRandomColor ()
427
427
f .write ("simundump kreac /kinetics/" + trimPath (reac ) + " " + str (0 ) + " " + str (kf ) + " " + str (kb ) + " \" \" " +
428
428
str (color ) + " " + str (textcolor ) + " " + str (int (x )) + " " + str (int (y )) + " " + str (0 )+ "\n " )
429
429
return reacList ,error
@@ -628,9 +628,9 @@ def writePool(modelpath,f,volIndex,sceneitems):
628
628
geometryName = volIndex [float (poolsCmpt .volume )]
629
629
volume = p .volume * NA * 1e-3
630
630
if color == "" or color == " " :
631
- color = getRandColor ()
631
+ color = getRandomColor ()
632
632
if textcolor == "" or textcolor == " " :
633
- textcolor = getRandColor ()
633
+ textcolor = getRandomColor ()
634
634
f .write ("simundump kpool /kinetics/" + trimPath (p ) + " 0 " +
635
635
str (p .diffConst ) + " " +
636
636
str (0 ) + " " +
@@ -673,15 +673,15 @@ def getColorCheck(color,GENESIS_COLOR_SEQUENCE):
673
673
else :
674
674
raise Exception ("Invalid Color Value!" )
675
675
676
- def getRandColor ():
676
+ def getRandomColor ():
677
677
ignoreColor = ["mistyrose" ,"antiquewhite" ,"aliceblue" ,"azure" ,"bisque" ,"black" ,"blanchedalmond" ,"blue" ,"cornsilk" ,"darkolivegreen" ,"darkslategray" ,"dimgray" ,"floralwhite" ,"gainsboro" ,"ghostwhite" ,"honeydew" ,"ivory" ,"lavender" ,"lavenderblush" ,"lemonchiffon" ,"lightcyan" ,"lightgoldenrodyellow" ,"lightgray" ,"lightyellow" ,"linen" ,"mediumblue" ,"mintcream" ,"navy" ,"oldlace" ,"papayawhip" ,"saddlebrown" ,"seashell" ,"snow" ,"wheat" ,"white" ,"whitesmoke" ,"aquamarine" ,"lightsalmon" ,"moccasin" ,"limegreen" ,"snow" ,"sienna" ,"beige" ,"dimgrey" ,"lightsage" ]
678
678
matplotcolor = {}
679
679
for name ,hexno in matplotlib .colors .cnames .items ():
680
680
matplotcolor [name ]= hexno
681
681
682
682
k = random .choice (list (matplotcolor .keys ()))
683
683
if k in ignoreColor :
684
- return getRandColor ()
684
+ return getRandomColor ()
685
685
else :
686
686
return k
687
687
def writeCompartment (modelpath ,compts ,f ):
0 commit comments