From bb1f0b5823a2792b65600505934979367c8a6028 Mon Sep 17 00:00:00 2001 From: lucaszhao19 Date: Thu, 20 Feb 2020 15:07:10 +0530 Subject: DockWidgets and NodeItems positioning fixed --- Simulator/Databases/Databases.py | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'Simulator/Databases/Databases.py') 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 -- cgit