コード例 #1
0
 def molrep(self, f, m, keys=""):
     job = Job(self, utils.cbin("molrep"))
     job.args += ["-f", f, "-m", m]
     if keys:
         job.args.append("-i")
         job.std_input = keys.strip() + "\nend"
     return job
コード例 #2
0
ファイル: workflow.py プロジェクト: ccp4/dimple
 def molrep(self, f, m, keys=""):
     job = Job(self, utils.cbin("molrep"))
     job.args += ["-f", f, "-m", m]
     if keys:
         job.args.append("-i")
         job.std_input = keys.strip() + "\nend"
     return job
コード例 #3
0
 def molrep(self, f, m, keys=''):
     job = Job(self, utils.cbin('molrep'))
     job.args += ['-f', f, '-m', m]
     if keys:
         job.args.append('-i')
         job.std_input = keys.strip() + '\nend'
     return job
コード例 #4
0
def find_path():
    if os.name == 'nt':
        for path in [
                "C:/WinCoot/wincoot.bat",  # since WinCoot 0.8.8
                "C:/WinCoot/runwincoot.bat",  # WinCoot prior to 0.8.8
                utils.cbin("coot.bat")
        ]:  # CCP4 script added in 2018
            if os.path.exists(path):
                return path
        utils.comment("\nNote: WinCoot not found.\n")
    else:
        return utils.syspath("coot")
コード例 #5
0
ファイル: workflow.py プロジェクト: ccp4/dimple
def ccp4_job(workflow, prog, logical=None, ki="", parser=None, add_end=True):
    """Handle traditional convention for arguments of CCP4 programs.
    logical - dictionary with where keys are so-called logical names.
    ki (string or list of lines) - Keyworded Input to be passed through stdin.
    add_end - adds "end" as the last line of stdin

    Note: "colin" and "labin" mean the same (column label),
    but different programs use different keywords.
    """
    job = Job(workflow, utils.cbin(prog))
    if logical:
        for a in ["hklin", "hklout", "hklref", "xyzin", "xyzout", "libin"]:
            if logical.get(a):
                job.args += [a.upper(), logical[a]]
    lines = ki.splitlines() if isinstance(ki, basestring) else ki
    stripped = [a.strip() for a in lines if a and not a.isspace()]
    if add_end and not (stripped and stripped[-1].lower() == "end"):
        stripped.append("end")
    job.std_input = "\n".join(stripped)
    job.parser = parser
    return job
コード例 #6
0
def ccp4_job(workflow, prog, logical=None, ki="", parser=None, add_end=True):
    """Handle traditional convention for arguments of CCP4 programs.
    logical - dictionary with where keys are so-called logical names.
    ki (string or list of lines) - Keyworded Input to be passed through stdin.
    add_end - adds "end" as the last line of stdin

    Note: "colin" and "labin" mean the same (column label),
    but different programs use different keywords.
    """
    job = Job(workflow, utils.cbin(prog))
    if logical:
        for a in ["hklin", "hklout", "hklref", "xyzin", "xyzout", "libin"]:
            if logical.get(a):
                job.args += [a.upper(), logical[a]]
    lines = ki.splitlines() if isinstance(ki, basestring) else ki
    stripped = [a.strip() for a in lines if a and not a.isspace()]
    if add_end and not (stripped and stripped[-1].lower() == "end"):
        stripped.append("end")
    job.std_input = "\n".join(stripped)
    job.parser = parser
    return job
コード例 #7
0
 def gemmi_blobs(self, hklin, xyzin, sigma=1.0):
     job = Job(self, utils.cbin('gemmi'))
     job.name += ' ' + 'blobs'
     job.args += ['blobs', '--dimple', '--sigma=%g' % sigma, hklin, xyzin]
     job.parser = '_gemmi_blobs_parser'
     return job