Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR/warning when read pdb files #91

Open
SanFran-Me opened this issue Aug 23, 2023 · 1 comment
Open

ERROR/warning when read pdb files #91

SanFran-Me opened this issue Aug 23, 2023 · 1 comment

Comments

@SanFran-Me
Copy link

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

THE PYTHON CODE :

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)
@roccomoretti
Copy link
Member

I don't see anything in the quoted warnings errors which immediately be suspect. I would suggest dumping the PDB after loading and checking if everything looks like you expect it to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants