Dear Modeller users, I am trying to mutate several aminoacids in the PDB file. I ve used the scrtipt (mutate.py) attached for this, but I get the error given below. What can be the problem? As I understand I need only PDB file for this script execution. Do I need to write path to the libraries in the explicit way or it should get it from the environment setup? I haven't specified the full path.
Sincerely yours, Andrew
:~/Mutate> mod9v7 mutate.py 'import site' failed; use -v for traceback warning: Non-ASCII character '\xe2' in file mutate.py on line 11, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details File "mutate.py", line 11 env.libs.topology.read(file=’$(LIB)/top_heav.lib’) ^ SyntaxError: invalid syntax edward@29:~/Mutate>
Скачать присоединенный файл (mutate.py): # Example for: selection.mutate() # This will read a PDB file, change its sequence a little, build new # coordinates for any of the additional atoms using only the internal # geometry, and write the mutant PDB file. It can be seen as primitive, # but rapid comparative modeling for substitution mutants. For insertion # and deletion mutants, follow the standard comparative modeling procedure. from modeller import * env = environ() env.io.atom_files_directory = ['.', '../atom_files'] # Read the topology library with non-hydrogen atoms only: env.libs.topology.read(file=’$(LIB)/top_heav.lib’) # To produce a mutant with all hydrogens, uncomment this line: #env.libs.topology.read(file=’$(LIB)/top_allh.lib’) # Read the CHARMM parameter library: env.libs.parameters.read(file=’$(LIB)/par.lib’) # Read the original PDB file and copy its sequence to the alignment array: code = ’1ijy’ aln = alignment(env) mdl = model(env, file=code) aln.append_model(mdl, atom_files=code, align_codes=code) # Select the residues to be mutated: in this case all ASP residues: sel = selection(mdl).only_residue_types(’ASP’) # The second example is commented out; it selects residues ’1’ and ’10’. #sel = selection(mdl.residues[’1’], mdl.residues[’10’]) # Mutate the selected residues into HIS residues (neutral HIS): sel.mutate(residue_type=’ASN’) # Add the mutated sequence to the alignment arrays (it is now the second # sequence in the alignment): aln.append_model(mdl, align_codes=’1ijy-1’) # Generate molecular topology for the mutant: mdl.clear_topology() mdl.generate_topology(aln[’1ijy-1’]) # Transfer all the coordinates you can from the template native structure # to the mutant (this works even if the order of atoms in the native PDB # file is not standard): mdl.transfer_xyz(aln) # Build the remaining unknown coordinates for the mutant: mdl.build(initialize_xyz=False, build_method=’INTERNAL_COORDINATES’) # Write the mutant to a file: mdl.write(file=’1ijy-1.atm’)