Example #1
0
def clicked_solve():
    values = [x[:] for x in cells]
    for i in range(9):
        for j in range(9):
            if cells[i][j].get() != "":
                values[i][j] = int(cells[i][j].get())
                cells[i][j].config(state='disabled')
            else:
                values[i][j] = 0
    response, new_values = main.Run(values)
    if response:
        for i in range(9):
            for j in range(9):
                result_string_sheet[i][j].set(new_values[i][j])
                cells[i][j].config(validate="key")
                cells[i][j].config(
                    validatecommand=(cells[i][j].register(checkVal), '%d',
                                     '%P', '%S'))
    else:
        messagebox.showwarning('Attention', 'Unsolvable')
        for i in range(9):
            for j in range(9):
                cells[i][j].config(state='normal')
Example #2
0
    def bash_peints(self, xds_dir_model):
        xds_dir = xds_dir_model["xds_dir"]
        model = xds_dir_model["model"]

        os.chdir(xds_dir)

        main.Run(self.logger,
                 self.version,
                 self.progdir,
                 xds_dir,
                 self.data_name,
                 self.new_coot_lines,
                 self.targetsite,
                 self.targetsite_for_coot,
                 model,
                 self.sequence,
                 self.beamtime_dir,
                 self.spacegroup,
                 self.cutoff_ios,
                 self.flag_molrep,
                 self.flag_coot,
                 self.flag_overwrite,
                 self.flag_pr,
                 self.flag_sa,
                 self.flag_water,
                 self.cpu_num,
                 self.xds_dir_model_list,
                 self.run_date)

        os.chdir(self.beamtime_dir)
        peints_result.result(self.logger, self.progdir,
                             self.run_date, self.version,
                             self.beamtime_dir, self.template,
                             self.sequence, self.targetsite,
                             self.spacegroup,
                             self.cutoff_ios, self.flag_pr)
Example #3
0
import main

if __name__ == "__main__":
    main.Run()
Example #4
0
#!/usr/bin/env python3
from __future__ import absolute_import
from __future__ import print_function
import sys
import os

directory = os.path.dirname(os.path.abspath('__file__'))
sys.path.append(str(directory))
import main

main.Run(sys.argv)

Example #5
0
import main

main.Run("./")
Example #6
0
        #rotation = [math.pi/4,math.pi/8]
        rotation = str(-math.pi / 4) + ',' + str(-math.pi / 8)

    if x == 1 and y == 1:
        #rotation = [math.pi/4,-(math.pi/8)]
        rotation = str(-math.pi / 4) + ',' + str(math.pi / 8)

    program.write('R ' + rotation)
    program.write('\n')
    program.write('M 0')
    program.write('\n')
    program.write('M 1')
    program.write('\n')
    program.close()

    output = main.Run()
    state = 0
    a = 0
    b = 0
    for i in range(0, len(output)):
        if output[i] >= 1:
            state = i
    if state == 0:
        a = 0
        b = 0
    elif state == 1:
        a = 1
        b = 0
    elif state == 2:
        a = 0
        b = 1