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

Write PDB with mmCIF resseq and without icode #4335

Open
EdwardTran121 opened this issue Jun 19, 2023 · 1 comment · May be fixed by #4390
Open

Write PDB with mmCIF resseq and without icode #4335

EdwardTran121 opened this issue Jun 19, 2023 · 1 comment · May be fixed by #4390

Comments

@EdwardTran121
Copy link

Hello, I am trying to write PDB file with new resseq (not author resseq) from mmcif file. Because of the new resseq, icode is not needed for me. I used FastMMCIFParser(auth_residues = False, QUIET = True) to get structure, and tried to write pdb with PDBIO(). However, the icode is still inserted into the resseq in the file. Can this be removed during the reading or writing?
I am using biopython version 1.81.
This is my code:

parser = FastMMCIFParser(auth_residues = False, QUIET = True)
structure = parser.get_structure('1adq','1adq.cif')
io = PDBIO()
io.set_structure(structure)
io.save('test.pdb')

This is the result at the end of chain H:

ATOM   3302  N   VAL H 223      20.852  57.112  63.569  1.00 68.80           N  
ATOM   3303  CA  VAL H 223      21.846  57.383  62.539  1.00 68.80           C  
ATOM   3304  C   VAL H 223      22.286  58.838  62.735  1.00 68.80           C  
ATOM   3305  O   VAL H 223      21.502  59.664  63.217  1.00 68.80           O  
ATOM   3306  CB  VAL H 223      21.228  57.215  61.122  0.00 68.80           C  
ATOM   3307  CG1 VAL H 223      22.314  57.097  60.070  0.00 68.80           C  
ATOM   3308  CG2 VAL H 223      20.322  55.995  61.077  0.00 68.80           C  
ATOM   3309  N   PRO H 224A     23.563  59.157  62.446  1.00 68.80           N  
ATOM   3310  CA  PRO H 224A     24.043  60.536  62.608  1.00 68.80           C  
ATOM   3311  C   PRO H 224A     23.350  61.529  61.661  1.00 68.80           C  
ATOM   3312  O   PRO H 224A     22.268  61.242  61.132  1.00 68.80           O  
ATOM   3313  CB  PRO H 224A     25.539  60.410  62.314  0.00 68.80           C  
ATOM   3314  CG  PRO H 224A     25.601  59.251  61.375  0.00 68.80           C  
ATOM   3315  CD  PRO H 224A     24.664  58.275  62.029  0.00 68.80           C  
ATOM   3316  N   LEU H 225B     23.962  62.697  61.469  1.00 68.80           N  
ATOM   3317  CA  LEU H 225B     23.395  63.728  60.602  1.00 68.80           C  
ATOM   3318  C   LEU H 225B     24.182  63.864  59.302  1.00 68.80           C  
ATOM   3319  O   LEU H 225B     23.722  64.623  58.423  1.00 68.80           O  
ATOM   3320  CB  LEU H 225B     23.339  65.080  61.329  0.00 68.80           C  
ATOM   3321  CG  LEU H 225B     24.642  65.784  61.725  0.00 68.80           C  
ATOM   3322  CD1 LEU H 225B     24.357  67.244  62.032  0.00 68.80           C  
ATOM   3323  CD2 LEU H 225B     25.291  65.101  62.919  0.00 68.80           C  
ATOM   3324  OXT LEU H 225B     25.245  63.217  59.178  0.00 68.80           O  
TER    3325      LEU H 225B                                                      
END   

Thank you

@speleo3
Copy link
Contributor

speleo3 commented Jul 27, 2023

Seems reasonable. The docstring of MMCIFParser actually says:

auth_residues [...] If false, use the mmCIF "label" residue numbering, which has no insertion codes, and strictly increments residue numbers.

So I would also expect that auth_residues=False implies no insertion codes.

speleo3 added a commit to speleo3/biopython that referenced this issue Jul 27, 2023
speleo3 added a commit to speleo3/biopython that referenced this issue Jul 27, 2023
@speleo3 speleo3 linked a pull request Jul 27, 2023 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

2 participants