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)
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
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))
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)
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)
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)
def pdb_obsolete(pdbid): return os.path.isfile(pdb_path(pdbid)) and not os.path.isfile(mmcif_path(pdbid))
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)
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:")
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)