|
13 | 13 | ** copyright (C) 2003-2017 Upinder S. Bhalla. and NCBS |
14 | 14 | Created : Friday May 27 12:19:00 2016(+0530) |
15 | 15 | Version |
16 | | -Last-Updated: Fri 30 Nov 15:15:10 2018(+0530) |
| 16 | +Last-Updated: Tue 3 Dec 15:15:10 2018(+0530) |
17 | 17 | By: HarshaRani |
18 | 18 | **********************************************************************/ |
19 | 19 | /**************************** |
20 | 20 | 2018 |
| 21 | +Dec 03: add diff and motor constants to pool |
21 | 22 | Nov 30: group id is changed from name to moose_id and group.name is added along with annotation for group listing |
22 | 23 | Nov 22: searched for _xfer_ instead of xfer |
23 | 24 | Nov 12: xfer cross compartment molecules are not written to SBML instead written the original molecule also for connecting Reaction and Enzyme |
@@ -978,39 +979,39 @@ def writeSpecies(modelpath, cremodel_, sbmlDoc, sceneitems,speGroup): |
978 | 979 |
|
979 | 980 | element = moose.element(spe) |
980 | 981 | ele = getGroupinfo(element) |
981 | | - if element.className == "Neutral" or Anno.color or Anno.textColor or sceneitems or Anno.x or Anno.y: |
982 | | - speciannoexist = True |
983 | | - if speciannoexist: |
984 | | - speciAnno = "<moose:ModelAnnotation>\n" |
985 | | - if ele.className == "Neutral": |
986 | | - #speciAnno = speciAnno + "<moose:Group>" + ele.name + "</moose:Group>\n" |
987 | | - if ele not in speGroup: |
988 | | - speGroup[ele]=[spename] |
989 | | - else: |
990 | | - speGroup[ele].append(spename) |
991 | | - |
992 | | - |
993 | | - if sceneitems: |
994 | | - #Saved from GUI, then scene co-ordinates are passed |
995 | | - speciAnno = speciAnno + "<moose:xCord>" + \ |
996 | | - str(sceneitems[spe]['x']) + "</moose:xCord>\n" + \ |
997 | | - "<moose:yCord>" + \ |
998 | | - str(sceneitems[spe]['y'])+ "</moose:yCord>\n" |
| 982 | + |
| 983 | + speciAnno = "<moose:ModelAnnotation>\n" |
| 984 | + if ele.className == "Neutral": |
| 985 | + #speciAnno = speciAnno + "<moose:Group>" + ele.name + "</moose:Group>\n" |
| 986 | + if ele not in speGroup: |
| 987 | + speGroup[ele]=[spename] |
999 | 988 | else: |
1000 | | - #Saved from cmdline,genesis coordinates are kept as its |
1001 | | - # SBML, cspace, python, then auto-coordinates are done |
1002 | | - #and coordinates are updated in moose Annotation field |
1003 | | - speciAnno = speciAnno + "<moose:xCord>" + \ |
1004 | | - str(Anno.x) + "</moose:xCord>\n" + \ |
1005 | | - "<moose:yCord>" + \ |
1006 | | - str(Anno.y)+ "</moose:yCord>\n" |
1007 | | - if Anno.color: |
1008 | | - speciAnno = speciAnno + "<moose:bgColor>" + Anno.color + "</moose:bgColor>\n" |
1009 | | - if Anno.textColor: |
1010 | | - speciAnno = speciAnno + "<moose:textColor>" + \ |
1011 | | - Anno.textColor + "</moose:textColor>\n" |
1012 | | - speciAnno = speciAnno + "</moose:ModelAnnotation>" |
1013 | | - s1.setAnnotation(speciAnno) |
| 989 | + speGroup[ele].append(spename) |
| 990 | + |
| 991 | + |
| 992 | + if sceneitems: |
| 993 | + #Saved from GUI, then scene co-ordinates are passed |
| 994 | + speciAnno = speciAnno + "<moose:xCord>" + \ |
| 995 | + str(sceneitems[spe]['x']) + "</moose:xCord>\n" + \ |
| 996 | + "<moose:yCord>" + \ |
| 997 | + str(sceneitems[spe]['y'])+ "</moose:yCord>\n" |
| 998 | + else: |
| 999 | + #Saved from cmdline,genesis coordinates are kept as its |
| 1000 | + # SBML, cspace, python, then auto-coordinates are done |
| 1001 | + #and coordinates are updated in moose Annotation field |
| 1002 | + speciAnno = speciAnno + "<moose:xCord>" + \ |
| 1003 | + str(Anno.x) + "</moose:xCord>\n" + \ |
| 1004 | + "<moose:yCord>" + \ |
| 1005 | + str(Anno.y)+ "</moose:yCord>\n" |
| 1006 | + if Anno.color: |
| 1007 | + speciAnno = speciAnno + "<moose:bgColor>" + Anno.color + "</moose:bgColor>\n" |
| 1008 | + if Anno.textColor: |
| 1009 | + speciAnno = speciAnno + "<moose:textColor>" + \ |
| 1010 | + Anno.textColor + "</moose:textColor>\n" |
| 1011 | + speciAnno = speciAnno + "<moose:diffConstant>" + str(spe.diffConst) + "</moose:diffConstant>\n" |
| 1012 | + speciAnno = speciAnno + "<moose:motorConstant>" + str(spe.motorConst)+ "</moose:motorConstant>\n" |
| 1013 | + speciAnno = speciAnno + "</moose:ModelAnnotation>" |
| 1014 | + s1.setAnnotation(speciAnno) |
1014 | 1015 | return True |
1015 | 1016 |
|
1016 | 1017 |
|
|
0 commit comments