def getStructure(id,path, modelChoose=None): # This function returns a Structure that will be from PDB file. # If there isn't PDB file, it will be obtained from PDB site pdbid = str(id) + ".PDB" F = FcfrpFile(path,pdbid) if not F.existsFile(): pdbFile = getPDBFromSite(id) savePDBFile(pdbFile, F._path) isPDBFile(F._path) errors, vs = checkPDBFile(id, F.getPath()) if len(errors) == 0: structure = loadStructure(id, F.getPath(), True) return structure else: s = FcfrpShowErrosDetails(vs, errors) s.showErrors() return loadStructure(id, F.getPath(), True)