def test_form(self): wlist = [] for i in range(4): wlist.append( ui.String(name='Name%s' % i, description='', value='Description of #%s' % i)) f = ui.Form(wlist, name='My Form') assert f.disabled is False for w in wlist: assert w.disabled is False f.disabled = True assert f.disabled is True for w in wlist: assert w.disabled is True f.disabled = False assert f.disabled is False for w in wlist: assert w.disabled is False
value=PARADIM['USER']) PARADIM_UI['s0']['folder'] = ui.String(description='Working folder', name='Working folder', value=GetInputFile()) PARADIM_UI['s0']['button'] = Button(description='Connect') PARADIM_UI['s0']['button'].w = Box([PARADIM_UI['s0']['button']]) PARADIM_UI['s0']['status'] = ui.String(name='Status', description='Status', value='') PARADIM_UI['s0']['status'].dd.layout = Layout(width='100%') PARADIM_UI['s0']['status'].disabled = True PARADIM_UI['s0']['display'] = ui.Form([ PARADIM_UI['s0']['user'], PARADIM_UI['s0']['pwd'], PARADIM_UI['s0']['code'], PARADIM_UI['s0']['folder'], PARADIM_UI['s0']['button'], PARADIM_UI['s0']['status'], ], name='MARCC Credentials') ''',PARADIM_UI['s0']['commands']''' ################################################## # First ################################################## PARADIM_UI['s1'] = {} PARADIM_UI['s1']['ecutwfc'] = ui.String(name='ecutwfc', description='ecutwfc', value='40.0') PARADIM_UI['s1']['kpoints'] = ui.Text(description="kpoints",
SCGI_UI['s0'] = {} SCGI_UI['s0']['pwd'] = MyPassword('SCGI Password', SECRETS['PWD']) SCGI_UI['s0']['code'] = MyPassword('Dual AUTH Code', SECRETS['CODE']) SCGI_UI['s0']['user'] = ui.String('SCGI User name', SECRETS['USER']) SCGI_UI['s0']['folder'] = ui.String( 'Working folder', SECRETS['ID'] + "/" + SECRETS['USER'] + "/" + GetInputFile()) SCGI_UI['s0']['button'] = Button(description='Connect') SCGI_UI['s0']['status'] = ui.String('Status', '') SCGI_UI['s0']['status'].dd.layout = Layout(width='100%') SCGI_UI['s0']['status'].disabled = True SCGI_UI['s0']['display'] = ui.Form([ SCGI_UI['s0']['user'], SCGI_UI['s0']['pwd'], SCGI_UI['s0']['code'], SCGI_UI['s0']['folder'], HBox([SCGI_UI['s0']['button']]), SCGI_UI['s0']['status'], ], name='Credentials') SCGI_UI['s_0'] = {} SCGI_UI['s_0']['pwd1'] = MyPassword('TACC Password', SECRETS['PWD']) SCGI_UI['s_0']['pwd2'] = MyPassword('PURDUE Password', SECRETS['PWD']) SCGI_UI['s_0']['code'] = MyPassword('TACC AUTH Code', SECRETS['CODE']) SCGI_UI['s_0']['user1'] = ui.String('TACC User name', SECRETS['USER']) SCGI_UI['s_0']['user2'] = ui.String('PURDUE User name', SECRETS['USER']) SCGI_UI['s_0']['folder1'] = ui.String( 'TACC Working folder', SECRETS['ID'] + "/" + SECRETS['USER'] + "/" + GetInputFile()) SCGI_UI['s_0']['folder2'] = ui.String(
name='alpha1', description="Longitudinal Thermal Expansion Coefficient", min=10e-6, max=100e-6, value=1e-6 ) alpha2 = ui.Number( name='alpha2', description="Transverse Thermal Expansion Coefficient", min=10e-6, max=100e-6, value=30e-6 ) material = ui.Form([e1, e2, nu12, g12, alpha1, alpha2], name='Material') h0 = ui.Number( name='h0', description="Lamina Thickness", units='m', min=0, max=10e-3, value='0.2286 mm' ) theta = ui.String( name='theta', description='Lamina Angle', value='[45, -45, -45, 45]' )
PARADIM_UI['s0']['folder'] = ui.String(description='Working folder', name='Working folder', value=PARADIM['TUTORIAL_NAME']) PARADIM_UI['s0']['button'] = Button(description='Connect') PARADIM_UI['s0']['button'].w = Box([PARADIM_UI['s0']['button']]) PARADIM_UI['s0']['status'] = ui.String(name='Status', description='Status', value='') PARADIM_UI['s0']['status'].dd.layout = Layout(width='100%') PARADIM_UI['s0']['status'].disabled = True PARADIM_UI['s0']['display'] = ui.Form([ PARADIM_UI['s0']['user'], PARADIM_UI['s0']['pwd'], PARADIM_UI['s0']['code'], PARADIM_UI['s0']['folder'], PARADIM_UI['s0']['button'], PARADIM_UI['s0']['status'], ], name='MARCC Credentials') ################################################## # First ################################################## PARADIM_UI['s1'] = {} PARADIM_UI['s1']['base_mat'] = { 'La3Ni2O7': { "calculation": "scf", 'prefix': 'La3Ni2O7',
]) PXTAL_UI["a2"] = VBox([PXTAL_UI["lmpdata_file"]]) PXTAL_UI["a"] = Accordion(children=[PXTAL_UI["a1"], PXTAL_UI["a2"]]) PXTAL_UI["a"].set_title(0, "Structure") PXTAL_UI["a"].set_title(1, "Output") PXTAL_UI["l1"] = VBox( [PXTAL_UI["a"], PXTAL_UI["button"], PXTAL_UI["sim_progress"]]) PXTAL_UI["l2"] = Tab(children=[]) PXTAL_UI["bs"] = HBox([PXTAL_UI["l1"], PXTAL_UI["l2"]]) PXTAL_UI["l1"].layout = Layout(width="500px", border="1px") PXTAL_UI["l2"].layout = Layout(width="100%", border="1px") PXTAL_UI["bs"].layout = Layout(width="100%", border="1px") PXTAL_UI["display"] = ui.Form([PXTAL_UI["bs"]], name="PolymerXtal - Polymer Helix Chain Builder") def fig_Structure(execution): pdbFile = execution.read("PDBview", raw=True) return imolecule.draw(pdbFile[7:]) # helix_name = execution.db.read('Helix Name') # return imolecule.draw(execution.outdir + "/" + helix_name + ".pdb") #, camera_type="orthographic") def fig_PDB(execution): pdbFile = execution.read("PDB", raw=True) out_data = "" with open(pdbFile[7:], "r") as input_text: out_data = input_text.read() out_fig = Textarea(value=out_data)
max=500, value=5.86) alpha1 = ui.Number(name='alpha1', description="Longitudinal Thermal Expansion Coefficient", min=10e-6, max=100e-6, value=1e-6) alpha2 = ui.Number(name='alpha2', description="Transverse Thermal Expansion Coefficient", min=10e-6, max=100e-6, value=30e-6) material = ui.Form([e1, e2, nu12, g12, alpha1, alpha2], name='Material') h0 = ui.Number(name='h0', description="Lamina Thickness", units='m', min=0, max=10e-3, value='0.2286 mm') theta = ui.String(name='theta', description='Lamina Angle', value='[45, -45, -45, 45]') layup = ui.Form([h0, theta], name='Layup') nx = ui.Number(name='Nx',