Protein specified in ALIGN_CODES(i) was not found in the alignment file; ALIGN_CODES( 1)

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 syslog.verbose()env = environ()aln = alignment(env)aln.append(file='align.pir', align_codes=('target', 'template1'))# directories for input atom filesenv.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;template1structure:6KG7.pdb:8:A:2822:A:::-1.00:-1.00-------GLIFRLLLPICLAVACAFRYNGLSFVYLIYLLLIPLFSEPTKATMQGHTGRLLQSLCITSLSFLLLHIIFHI------------------------------------------VFVPDIGMFIASLTIWLVCRT----------------------------------------------------------LRRFASVASKLKEFIGNMITTAGKV*

Hi Fred, I think you'll need to change the name of your known to match what's in your .pir alignment file, and make them match between the header lines. Try leaving off the .pdb extension
>P1;6KG7 structureX:6KG7:8:A ... etc
see https://salilab.org/modeller/10.6/manual/node501.html#alignmentformat
Jed Goldstone Woods Hole Oceanographic Institution

On 3/31/25 6:21 AM, Fred Pontes via modeller_usage wrote: > "/_modeller.ModellerError: read_al_373E> Protein specified in > ALIGN_CODES(i) was not found in the alignment file; ALIGN_CODES( > 1) = 6KG7.pdb/"
Jed is correct here. The align code is the thing after ">P1;" in your alignment file (in this case you called it 'template1') not the thing after "structure:" (that's the name of the PDB file). You can call an alignment sequence anything you want (including the name of the PDB if you like).
Ben Webb, Modeller Caretaker

Fixed! Thank you so much for the explanations.
On Mon, Mar 31, 2025 at 9:18 PM Modeller Caretaker < modeller-care@salilab.org> wrote:
> On 3/31/25 6:21 AM, Fred Pontes via modeller_usage wrote: > > "/_modeller.ModellerError: read_al_373E> Protein specified in > > ALIGN_CODES(i) was not found in the alignment file; ALIGN_CODES( > > 1) = 6KG7.pdb/" > > Jed is correct here. The align code is the thing after ">P1;" in your > alignment file (in this case you called it 'template1') not the thing > after "structure:" (that's the name of the PDB file). You can call an > alignment sequence anything you want (including the name of the PDB if > you like). > > Ben Webb, Modeller Caretaker > -- > modeller-care@salilab.org https://salilab.org/modeller/ > Modeller mail list: https://salilab.org/mailman/listinfo/modeller_usage > >
participants (3)
-
Fred Pontes
-
jgoldstone@whoi.edu
-
Modeller Caretaker