summaryrefslogtreecommitdiff
path: root/Simulator
diff options
context:
space:
mode:
authorlucaszhao192020-02-20 15:07:10 +0530
committerlucaszhao192020-02-20 15:07:10 +0530
commitbb1f0b5823a2792b65600505934979367c8a6028 (patch)
treeed725791fd3517e9b15bba645c37ff8984be0ee3 /Simulator
parentdf141f35dccc6b21fcfa575707c6435a39d0002f (diff)
downloadChemical-Simulator-GUI-bb1f0b5823a2792b65600505934979367c8a6028.tar.gz
Chemical-Simulator-GUI-bb1f0b5823a2792b65600505934979367c8a6028.tar.bz2
Chemical-Simulator-GUI-bb1f0b5823a2792b65600505934979367c8a6028.zip
DockWidgets and NodeItems positioning fixed
Diffstat (limited to 'Simulator')
-rw-r--r--Simulator/Databases/Databases.py29
1 files changed, 7 insertions, 22 deletions
diff --git a/Simulator/Databases/Databases.py b/Simulator/Databases/Databases.py
index d7dc797..4b3a4c6 100644
--- a/Simulator/Databases/Databases.py
+++ b/Simulator/Databases/Databases.py
@@ -17,16 +17,12 @@ class ChemsepDatabase():
self.name = 'chemsep'
for comp in compound:
self.compName=comp.getElementsByTagName('CompoundID')[0].getAttribute('value')
- self.comp_name_list.append(self.compName+'(' + self.name + ')')
-
- self.comp_prop_list=list()
-
+ self.comp_name_list.append(self.compName+'(' + self.name + ')')
+ self.comp_prop_list=list()
def get_comp_name_list(self):
return self.comp_name_list
-
-
#attrib:
#CAS fro CAS Number
#CompoundID for Name
@@ -35,9 +31,7 @@ class ChemsepDatabase():
#GETTING 'ATTRIBUTE''S VALUE OF THE COMPOUND 'COMPS'
-#COMP IS AN ITERATING VALUE IN THE XML TAG COMPOUND
-
-
+#COMP IS AN ITERATING VALUE IN THE XML TAG COMPOUND
def get_value(self,comps,attrib):
self.comps=comps
self.x=''
@@ -47,8 +41,7 @@ class ChemsepDatabase():
try:
self.x=comp.getElementsByTagName(attrib)[0].getAttribute("value")
except IndexError:
- self.x = "-"
-
+ self.x = "-"
return (self.x)
#CREATING comp_prop_list LIST OF THE COMPOUND SELECTED
@@ -58,9 +51,7 @@ class ChemsepDatabase():
self.comps = comps
for comp in compound:
compName = comp.getElementsByTagName("CompoundID")[0].getAttribute("value")
- if compName==self.comps:
-
-
+ if compName==self.comps:
CompName = compName.replace(" ","")
CompName = CompName.replace("-","")
CompName = CompName.replace(",","")
@@ -140,8 +131,7 @@ class ChemsepDatabase():
RacketParam = comp.getElementsByTagName("RacketParameter")[0].getAttribute("value")
except IndexError:
RacketParam = "0"
-
-
+
try:
LiqDen = comp.getElementsByTagName("LiquidDensity")[0]
LiqDenEqn = LiqDen.getElementsByTagName("eqno")[0].getAttribute("value")
@@ -358,8 +348,6 @@ class ChemsepDatabase():
except IndexError:
ChaoSeadLV = 0
-
-
#f.write('Package database')
self.comp_prop_list.append('model '+CompName)
#f.write('\n')
@@ -440,7 +428,4 @@ class ChemsepDatabase():
#return self.comp_prop_list
return self.comp_prop_list
-
-
-
- \ No newline at end of file
+ \ No newline at end of file