Exemplo n.º 1
0
 def restart(self):
     log('Restart clicked')
     self.gdb.quit()
     self.pdb.quit()
     self.gdb = gdb.gdb(self.python_file_gdb, self.cpp_file, self.cpp_start_line)
     self.pdb = pdb.pdb(self.python_file_pdb, self.python_start_line)
     self.button_step_over.setEnabled(True)
     self.updateView()
Exemplo n.º 2
0
 def restart(self):
     log('Restart clicked')
     self.gdb.quit()
     self.pdb.quit()
     self.gdb = gdb.gdb(self.python_file_gdb, self.cpp_file,
                        self.cpp_start_line)
     self.pdb = pdb.pdb(self.python_file_pdb, self.python_start_line)
     self.button_step_over.setEnabled(True)
     self.updateView()
Exemplo n.º 3
0
    def __init__(self,pdb_folder,modeldir,pdb_file,seq_ali):
        self.seq_ali = modeldir + seq_ali
        self.pdb_folder = pdb_folder
        self.modeldir = modeldir
        self.pdb_file = pdb.pdb(modeldir + pdb_file)
        self.template = modeldir + pdb_file
        self.strname = self.pdb_file.NomedaEstrutura()

        # self.hmmresults = None
        # self.betterid = None
        # self.hmm = None
        self.fasta_aligned_file = None
        self.template_pir = None
Exemplo n.º 4
0
    def __init__(self,
                 mixedText,
                 python_file_gdb,
                 cpp_file,
                 cpp_start_line,
                 python_file_pdb,
                 python_start_line,
                 next_dict,
                 cpp_offset_lines=0,
                 python_offset_lines=0,
                 parent=None,
                 watches=[],
                 cpponly=False):
        self.python_file_gdb = python_file_gdb
        self.cpp_file = cpp_file
        self.cpp_start_line = cpp_start_line
        self.next_dict = next_dict
        self.python_file_pdb = python_file_pdb
        self.python_start_line = python_start_line
        self.cpp_offset_lines = cpp_offset_lines
        self.python_offset_lines = python_offset_lines
        self.watches = watches
        self.cpponly = cpponly

        self.fontFamily = "Courier"
        super(Form, self).__init__(parent)
        self.setWindowTitle("SEJITS Integrated Debugger")
        self.resize(1920, 1024)
        self.textedit = QTextEdit()
        self.textedit.setReadOnly(True)
        self.textedit.setLineWrapMode(QTextEdit.NoWrap)
        self.button_step_over = QPushButton("Step over")
        self.button_step_over.clicked.connect(self.stepOver)
        self.button_restart = QPushButton("Restart")
        self.button_restart.clicked.connect(self.restart)
        self.button_close = QPushButton("Close")
        self.button_close.clicked.connect(self.accept)

        self.lang_colors = dict()
        self.lang_colors['C++'] = '#ff0000'
        self.lang_colors['Python'] = '#0000ff'

        if self.cpponly:
            self.watches = [x for x in watches if x[0] == 'C++']
        self.watch_layout = QGridLayout()
        self.watch_values = dict()

        self.button_add_watch = QPushButton("Add watch")
        self.button_add_watch.clicked.connect(self.add_watch)

        self.right_panel = QVBoxLayout()
        self.right_panel.addLayout(self.watch_layout)
        self.right_panel.addWidget(self.button_add_watch)
        self.right_panel.addStretch()

        self.button_hlayout = QHBoxLayout()
        self.button_hlayout.addWidget(self.button_step_over)
        self.button_hlayout.addWidget(self.button_restart)
        self.button_hlayout.addWidget(self.button_close)

        self.edit_watch_hlayout = QHBoxLayout()
        self.edit_watch_hlayout.addWidget(self.textedit)
        self.edit_watch_hlayout.addLayout(self.right_panel)
        self.edit_watch_hlayout.setStretch(0, 3)
        self.edit_watch_hlayout.setStretch(1, 1)

        self.vlayout = QVBoxLayout()
        self.vlayout.addLayout(self.edit_watch_hlayout)
        self.vlayout.addLayout(self.button_hlayout)

        self.setLayout(self.vlayout)
        self.mixedText = mixedText
        self.gdb = gdb.gdb(self.python_file_gdb, self.cpp_file,
                           self.cpp_start_line)
        self.pdb = pdb.pdb(self.python_file_pdb, self.python_start_line)
        self.updateView()
        self.update_watch_widgets()
Exemplo n.º 5
0
Arquivo: run.py Projeto: yentyu/ibp-ng
# loop over the identifiers.
for ident in ids:
  # skip existing directories.
  if os.path.exists(ident):
    continue

  # create the directory.
  os.mkdir(ident)
  uc = ident.upper()

  # download the pdb file.
  url = 'https://files.rcsb.org/download/' + uc + '.pdb'
  response = urllib2.urlopen(url)
  data = response.read()

  # write the result to disk.
  fpdb = os.path.join(ident, 'input.pdb')
  f = open(fpdb, 'w')
  f.write(data)
  f.close()

  # open and parse the pdb file.
  struct = pdb.pdb(fpdb)

  # write the required input files.
  write.runfile(os.path.join(ident, 'run'))
  write.fasta(struct, os.path.join(ident, 'input.fa'))
  write.params(struct, os.path.join(ident, 'input.par'))
  write.restraints(struct, os.path.join(ident, 'input.res'))

Exemplo n.º 6
0
# if supplied, get the dihedral expansion value.
eps = 0
if len(sys.argv) >= 2:
    eps = float(sys.argv[1])

# if supplied, get the distance restraint limit.
dmax = 10
if len(sys.argv) >= 3:
    dmax = float(sys.argv[2])

# build the output filenames.
fres = 'loops-{}-{}.res'.format(eps, dmax)
frun = 'loops-{}-{}.run'.format(eps, dmax)

# parse the target pdb file (from ../talos/talos.dcd).
s = pdb.pdb('loops.pdb')

# get the residue index extents.
(rmin, rmax) = minmax([atom['resSeq'] for atom in s.models[0]])

# initialize the lines of output.
lines = ['', '{{* loops.res: eps = {}, dmax = {} *}}'.format(eps, dmax)]

# add dihedral restraints.
for resid in range(rmin, rmax + 1):
    h = resid - rmin
    i = resid - rmin + 1
    j = resid - rmin + 2

    lines.append('')
    lines.append('{{* resid {} *}}'.format(i))
Exemplo n.º 7
0
    def __init__(self, mixedText, python_file_gdb, cpp_file, cpp_start_line, python_file_pdb, python_start_line, next_dict, cpp_offset_lines=0, python_offset_lines=0, parent=None, watches=[], cpponly=False):
        self.python_file_gdb = python_file_gdb
        self.cpp_file = cpp_file
        self.cpp_start_line = cpp_start_line
        self.next_dict = next_dict
        self.python_file_pdb = python_file_pdb
        self.python_start_line = python_start_line
        self.cpp_offset_lines = cpp_offset_lines
        self.python_offset_lines = python_offset_lines
        self.watches = watches
        self.cpponly = cpponly

        self.fontFamily = "Courier"
        super(Form, self).__init__(parent)
        self.setWindowTitle("SEJITS Integrated Debugger")
        self.resize(1920, 1024)
        self.textedit = QTextEdit()
        self.textedit.setReadOnly(True)
        self.textedit.setLineWrapMode(QTextEdit.NoWrap)
        self.button_step_over = QPushButton("Step over")
        self.button_step_over.clicked.connect(self.stepOver)
        self.button_restart = QPushButton("Restart")
        self.button_restart.clicked.connect(self.restart)
        self.button_close = QPushButton("Close")
        self.button_close.clicked.connect(self.accept)

        self.lang_colors = dict()
        self.lang_colors['C++'] = '#ff0000'
        self.lang_colors['Python'] = '#0000ff'

        if self.cpponly:
            self.watches = [x for x in watches if x[0] == 'C++']
        self.watch_layout = QGridLayout()
        self.watch_values = dict()

        self.button_add_watch = QPushButton("Add watch")
        self.button_add_watch.clicked.connect(self.add_watch)

        self.right_panel = QVBoxLayout()
        self.right_panel.addLayout(self.watch_layout)
        self.right_panel.addWidget(self.button_add_watch)
        self.right_panel.addStretch()

        self.button_hlayout = QHBoxLayout()
        self.button_hlayout.addWidget(self.button_step_over)
        self.button_hlayout.addWidget(self.button_restart)
        self.button_hlayout.addWidget(self.button_close)

        self.edit_watch_hlayout = QHBoxLayout()
        self.edit_watch_hlayout.addWidget(self.textedit)
        self.edit_watch_hlayout.addLayout(self.right_panel)
        self.edit_watch_hlayout.setStretch(0, 3)
        self.edit_watch_hlayout.setStretch(1, 1)

        self.vlayout = QVBoxLayout()
        self.vlayout.addLayout(self.edit_watch_hlayout)
        self.vlayout.addLayout(self.button_hlayout)

        self.setLayout(self.vlayout)
        self.mixedText = mixedText
        self.gdb = gdb.gdb(self.python_file_gdb, self.cpp_file, self.cpp_start_line)
        self.pdb = pdb.pdb(self.python_file_pdb, self.python_start_line)
        self.updateView()
        self.update_watch_widgets()