I want to know whether the following ERROR/warning matters when I mutate amino acids in pyrosetta:
core.import_pose.import_pose: File '/data2/rjli/test_dataset/1amk/1amk_protein.pdb' automatically determined to be of type PDB
core.io.pdb.HeaderInformation: [ WARNING ] Deposition day not in range [1, 31]: 0
core.io.pdb.HeaderInformation: [ WARNING ] Unrecognized month in HEADER deposition date
core.io.pdb.HeaderInformation: [ ERROR ] Malformed Compound record found: ' 1AMK_PROTEIN'
core.io.pose_from_sfr.PoseFromSFRBuilder: [ WARNING ] discarding 4 atoms at position 1 in file /data2/rjli/test_dataset/1amk/1amk_protein.pdb. Best match rsd_type: SER:NtermProteinFull
import os
from pyrosetta import *
from pyrosetta.rosetta.protocols.simple_moves import MutateResidue
init()
source_folder = '/data2/rjli/test_dataset'
for id in os.listdir(source_folder):
folder_path = os.path.join(source_folder, id)
if os.path.isdir(folder_path):
for file in os.listdir(folder_path):
if file.endswith('protein.pdb'):
protein_file = os.path.join(folder_path, file)
pose = pose_from_pdb(protein_file)
n_res = pose.total_residue()
# loop over all residues
for i in range(1, n_res + 1):
res = pose.residue(i)
if res.name() == "ASN":
# create a MutateResidue mover to mutate Asn to Leu
mut = MutateResidue(i, "LEU")
mut.apply(pose)
if res.name() == "GLN":
# create a MutateResidue mover to mutate GLN to Leu
mut = MutateResidue(i, "LEU")
mut.apply(pose)
output_file = os.path.join(folder_path, f'{id}_mutate0_protein.pdb')
pose.dump_pdb(output_file)