Hi!
Sorry for the very basic question, but again I'm facing issues with MODELLER.

When I run MODELLER I got the following error:

"_modeller.ModellerError: read_al_373E> Protein specified in ALIGN_CODES(i) was not found in the alignment file; ALIGN_CODES(       1) =  6KG7.pdb"

But my structure file is present in my directory:

(base) [medfpo@uol-pc-301925 hPIEZO2_structure]$ ls -l 6KG7.pdb
-rw-r--r--. 1 medfpo Domain Users 1177728 Mar 31 13:25 6KG7.pdb


I don't have any idea what's the problem. I didn't misspell any name and the structure file is present.  I included one line: env.io.atom_files_directory = ['.'], but It didn't change the output error. I included below my script file and alignment file. 
Thank you in advance.


This is my script below:

from modeller import *
from modeller.automodel import *
import sys

log.verbose()
env = environ()
aln = alignment(env)
aln.append(file='align.pir', align_codes=('target', 'template1'))

# directories for input atom files
env.io.atom_files_directory = ['.']

a = automodel(env,
              alnfile        = 'align.pir',        # alignment filename
              knowns         = ('6KG7.pdb'), # codes of the templates
              sequence       = 'target',
              assess_methods = (assess.DOPE, assess.GA341))

a.starting_model = 1
a.ending_model = 5
a.make()

# RANK MODELS ACCORDING DOPE score
# Get a list of all successfully built models from a.outputs

ok_models = [x for x in a.outputs if x['failure'] is None]

# Rank the models by DOPE score

key = 'DOPE score'

if sys.version_info[:2] == (2,3):
    # Python 2.3's sort doesn't have a key argument
    ok_models.sort(lambda a,b: cmp(a[key], b[key]))
else:
    ok_models.sort(key=lambda a: a[key])

# Get top model

m = ok_models[0]

print("Top model: %s (DOPE score %.3f)" % (m['name'], m[key]))


and the first 5 lines of my alignment file:

(base) [medfpo@uol-pc-301925 hPIEZO2_structure]$ head -5 align.pir
>P1;template1
structure:6KG7.pdb:8:A:2822:A:::-1.00:-1.00
-------GLIFRLLLPICLAVACAFRYNGLSFVYLIYLLLIPLFSEPTKATMQGHTGRLLQSLCITSLSFLLLHI
IFHI------------------------------------------VFVPDIGMFIASLTIWLVCRT--------
--------------------------------------------------LRRFASVASKLKEFIGNMITTAGKV


--
Frederico José de S. Pontes
PDRA at LICAMM
University of Leeds