Beispiel #1
0
    def setup_layout(self):
        play_box = HBox(tuple(self.play_widgets.values()))

        particles_hboxes = []
        for k in self.particles_widgets:
            self.particles_labels[k].layout = Layout(width='200px')
            self.particles_widgets[k].layout = Layout(width='200px')

            particles_hboxes.append(
                HBox([self.particles_labels[k], self.particles_widgets[k]]))

        particles_label = HTML(value='<b>Particles parameters</b>')
        particles_box = VBox(particles_hboxes)
        particles_box.layout = Layout(grid_gap='6px')

        toposim_hboxes = []
        for k in self.toposim_widgets:
            self.toposim_labels[k].layout = Layout(width='200px')
            self.toposim_widgets[k].layout = Layout(width='200px')

            toposim_hboxes.append(
                HBox([self.toposim_labels[k], self.toposim_widgets[k]]))

        toposim_label = HTML(
            value='<b>Landscape evolution model parameters</b>')
        toposim_box = VBox(toposim_hboxes)
        toposim_box.layout = Layout(grid_gap='6px')

        control_box = VBox((play_box, particles_label, particles_box,
                            toposim_label, toposim_box))
        control_box.layout = Layout(grid_gap='10px')

        self.main_box = HBox((self.canvas, control_box))
        self.main_box.layout = Layout(grid_gap='30px')
#PARADIM_UI['s1']['button_status'].layout = Layout(width='99%')

PARADIM_UI['s1']['l1'] = VBox([
    PARADIM_UI['s1']['ecutwfc'].w,
    PARADIM_UI['s1']['kpoints'].w,
    PARADIM_UI['s1']['button'].w,
    PARADIM_UI['s1']['job_id'].w,
    PARADIM_UI['s1']['status'].w,
])
PARADIM_UI['s1']['l2'] = VBox([
    PARADIM_UI['s1']['input'].w,
    PARADIM_UI['s1']['commands'].w,
])
PARADIM_UI['s1']['bs'] = HBox([PARADIM_UI['s1']['l1'], PARADIM_UI['s1']['l2']])
PARADIM_UI['s1']['bs'].w = Box([PARADIM_UI['s1']['bs']])
PARADIM_UI['s1']['l2'].layout = Layout(width='100%', border='1px')
PARADIM_UI['s1']['bs'].layout = Layout(width='100%', border='1px')

s1_tab0 = ui.Form([PARADIM_UI['s1']['bs']], name='Crystal Inputs')
s1_tab1 = ui.Form([PARADIM_UI['s1']['stdin']], name='stdin')
s1_tab2 = ui.Form([PARADIM_UI['s1']['stdout']], name='stdout')
s1_tab3 = ui.Form([PARADIM_UI['s1']['stderr']], name='stderr')


def UpdateStep1(event):
    global PARADIM_UI, PARADIM
    change = {
        'k_points': PARADIM_UI['s1']['kpoints'].value,
        'prefix': 'gaas',
        'calculation': 'scf',
        'crystal': 'crystal',
Beispiel #3
0
SCGI_UI['s1']['button_status'] = Button(description='Update Status')
SCGI_UI['s1']['button_status'].layout = Layout(width='99%')

SCGI_UI['s1']['l1'] = VBox([
    SCGI_UI['s1']['ecutwfc'],
    SCGI_UI['s1']['kpoints'],
    SCGI_UI['s1']['button'],
    SCGI_UI['s1']['job_id'],
    SCGI_UI['s1']['status'],
])
SCGI_UI['s1']['l2'] = VBox([
    SCGI_UI['s1']['input'],
    SCGI_UI['s1']['commands'],
])
SCGI_UI['s1']['bs'] = HBox([SCGI_UI['s1']['l1'], SCGI_UI['s1']['l2']])
SCGI_UI['s1']['l2'].layout = Layout(width='100%', border='1px')
SCGI_UI['s1']['bs'].layout = Layout(width='100%', border='1px')

s1_tab0 = ui.Form([SCGI_UI['s1']['bs']], name='Crystal Inputs')
s1_tab1 = ui.Form([SCGI_UI['s1']['stdin']], name='stdin')
s1_tab2 = ui.Form([SCGI_UI['s1']['stdout']], name='stdout')
s1_tab3 = ui.Form([SCGI_UI['s1']['stderr']], name='stderr')


def UpdateStep1(event):
    global SCGI_UI, SCGI
    change = {
        'k_points': SCGI_UI['s1']['kpoints'].value,
        'prefix': 'gaas',
        'calculation': 'scf',
        'crystal': 'crystal',
Beispiel #4
0
    PARADIM_UI['s1']['l2_' + mat] = ui.Form(
        [PARADIM_UI['s1']['input_' + mat].dd], name=mat + '.in')

PARADIM_UI['s1']['l2'] = ui.Tab([
    PARADIM_UI['s1']['l2_' + mat]
    for mat, params in PARADIM_UI['s1']['base_mat'].items()
])

PARADIM_UI['s1']['bs'] = VBox([
    PARADIM_UI['s1']['l2'],
    PARADIM_UI['s1']['bc'],
    PARADIM_UI['s1']['commands'].dd,
])
PARADIM_UI['s1']['bs'].w = Box([PARADIM_UI['s1']['bs']])
PARADIM_UI['s1']['l2'].layout = Layout(width='99%', border='1px')
PARADIM_UI['s1']['bs'].layout = Layout(width='100%', border='1px')

s1_tab0 = ui.Form([PARADIM_UI['s1']['bs']], name='Crystal Inputs')
s1_tab1 = ui.Form([PARADIM_UI['s1']['stdin']], name='stdin')
s1_tab2 = ui.Form([PARADIM_UI['s1']['stdout']], name='stdout')
s1_tab3 = ui.Form([PARADIM_UI['s1']['stderr']], name='stderr')


def UpdateStep1(event):
    global PARADIM_UI, PARADIM
    for mat, params in PARADIM_UI['s1']['base_mat'].items():
        change = {
            'prefix': params["prefix"],
            'calculation': params["calculation"],
            'celldm': params['celldm'],
            'nat': params['nat'],
Beispiel #5
0
    PXTAL_UI["monomers"],
    PXTAL_UI["tacticity"],
    PXTAL_UI["chiriality"],
    PXTAL_UI["defect"],
])

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):