コード例 #1
0
def hssp_uptodate(pdbid):
    in_path = mmcif_path(pdbid)
    out_path = hssp1_path(pdbid)

    return os.path.isfile(out_path) and \
        os.path.getmtime(out_path) >= os.path.getmtime(in_path) and \
        not is_empty_file(out_path)
コード例 #2
0
def find_input(pdbid):
    cif_path = mmcif_path(pdbid)
    p_path = pdb_path(pdbid)
    if os.path.isfile(p_path):
        return p_path
    else:
        return cif_path
コード例 #3
0
    def run(self):
        in_path = mmcif_path(self._pdbid)
        out_path = dssp_mmcif_path(self._pdbid)

        if os.path.isfile(in_path):
            log_command(_log, 'dssp-from-mmcif',
                        "%s %s %s" % (MKDSSP, in_path, out_path))
コード例 #4
0
ファイル: pdbfinder2.py プロジェクト: cmbi/databanks
def pdbfinder2_obsolete(pdbid):
    in_path = mmcif_path(pdbid)
    out_path = dat_path(pdbid)
    return os.path.isfile(out_path) and not os.path.isfile(in_path)
コード例 #5
0
ファイル: pdbfinder2.py プロジェクト: cmbi/databanks
def pdbfinder2_uptodate(pdbid):
    in_path = mmcif_path(pdbid)
    out_path = dat_path(pdbid)
    return os.path.isfile(out_path) and \
            os.path.getmtime(out_path) >= os.path.getmtime(in_path) and \
            os.path.getmtime(out_path) >= os.path.getmtime(PDBFINDER2_SCRIPT)
コード例 #6
0
ファイル: structurefactors.py プロジェクト: cmbi/databanks
def structurefactors_obsolete(pdbid):
    out_path = structurefactors_path(pdbid)
    in_path = mmcif_path(pdbid)
    return os.path.isfile(out_path) and not os.path.isfile(in_path)
コード例 #7
0
def pdb_obsolete(pdbid):
    return os.path.isfile(pdb_path(pdbid)) and not os.path.isfile(mmcif_path(pdbid))
コード例 #8
0
def hssp_obsolete(pdbid):
    out_path = hssp1_path(pdbid)
    in_path = mmcif_path(pdbid)
    return os.path.isfile(out_path) and not os.path.isfile(in_path)
コード例 #9
0
def yesno(boolean):
    if boolean:
        return "yes"
    else:
        return "no"


def s_mtime(path):
    return strftime("%Y %B %d, %H:%M:%S", gmtime(os.path.getmtime(path)))


if len(sys.argv) == 2:
    pdbid = sys.argv[1]

    print("mmcif:")
    path = mmcif_path(pdbid)
    print("\tpath:", path)
    if os.path.isfile(path):
        print("\tmodification time:", s_mtime(path))
    else:
        print("\t<absent>")

    print("pdb:")
    for path in [pdb_path(pdbid), pdb_flat_path(pdbid)]:
        print("\tpath:", path)
        if os.path.isfile(path):
            print("\tmodification time:", s_mtime(path))
        else:
            print("\t<absent>")

    print("bdb:")
コード例 #10
0
def dssp_mmcif_uptodate(pdbid):
    in_path = mmcif_path(pdbid)
    out_path = dssp_mmcif_path(pdbid)
    return os.path.isfile(out_path) and \
        os.path.getmtime(out_path) >= os.path.getmtime(in_path)