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

pdb_tidy discards ENDMDL statements for HETATM ensembles #160

Closed
amjjbonvin opened this issue Dec 12, 2023 · 0 comments · Fixed by #161
Closed

pdb_tidy discards ENDMDL statements for HETATM ensembles #160

amjjbonvin opened this issue Dec 12, 2023 · 0 comments · Fixed by #161
Assignees
Labels

Comments

@amjjbonvin
Copy link
Member

Describe the bug

Running pdb_tidy on an ensemble of molecules defined as HETATM discards the ENDMDL statement, generating effectively a wrong PDB file.

To Reproduce
Steps to reproduce the behavior. Preferrably, a code snippet.

pdb_tidy test-ensemble.pdb

Expected behavior
The output PDB file should contain the ENDMDL statements after each model in the ensemble.

Desktop (please complete the following information):
-Mac OS

  • Python Version 3.9 (same issue on 2.7)

Example PDB file:

MODEL        1
HETATM    1  C1  G39 B 500     -30.374 -53.143   6.122  1.00 31.18           C  
HETATM    2  O1A G39 B 500     -31.439 -52.533   5.850  1.00 30.30           O  
HETATM    3  O1B G39 B 500     -29.257 -52.625   5.879  1.00 31.23           O  
HETATM    4  C2  G39 B 500     -30.437 -54.486   6.725  1.00 30.48           C  
HETATM    5  C3  G39 B 500     -29.159 -55.188   7.132  1.00 30.04           C  
HETATM    6  C4  G39 B 500     -29.380 -56.162   8.294  1.00 30.37           C  
HETATM    7  N4  G39 B 500     -28.195 -56.994   8.430  1.00 30.09           N1+
HETATM    8  C5  G39 B 500     -30.627 -57.033   8.097  1.00 29.53           C  
HETATM    9  N5  G39 B 500     -30.803 -57.955   9.206  1.00 28.16           N  
HETATM   10  C6  G39 B 500     -31.883 -56.178   7.937  1.00 30.53           C  
HETATM   11  C7  G39 B 500     -31.632 -55.093   6.901  1.00 30.75           C  
HETATM   12  O7  G39 B 500     -33.007 -56.989   7.531  1.00 31.80           O  
HETATM   13  C8  G39 B 500     -34.158 -56.905   8.398  1.00 30.52           C  
HETATM   14  C9  G39 B 500     -34.879 -55.553   8.283  1.00 31.36           C  
HETATM   15  C10 G39 B 500     -30.683 -59.283   9.087  1.00 27.13           C  
HETATM   16  O10 G39 B 500     -30.629 -59.863   8.010  1.00 26.14           O  
HETATM   17  C11 G39 B 500     -30.611 -60.040  10.380  1.00 26.05           C  
HETATM   18  C81 G39 B 500     -35.153 -58.020   8.079  1.00 29.88           C  
HETATM   19  C82 G39 B 500     -34.654 -59.395   8.467  1.00 28.23           C  
HETATM   20  C91 G39 B 500     -35.425 -55.279   6.891  1.00 32.33           C  
ENDMDL
MODEL        2
HETATM    1  C1  G39 B 500     -30.374 -53.143   6.122  1.00 31.18           C  
HETATM    2  O1A G39 B 500     -31.439 -52.533   5.850  1.00 30.30           O  
HETATM    3  O1B G39 B 500     -29.257 -52.625   5.879  1.00 31.23           O  
HETATM    4  C2  G39 B 500     -30.437 -54.486   6.725  1.00 30.48           C  
HETATM    5  C3  G39 B 500     -29.159 -55.188   7.132  1.00 30.04           C  
HETATM    6  C4  G39 B 500     -29.380 -56.162   8.294  1.00 30.37           C  
HETATM    7  N4  G39 B 500     -28.195 -56.994   8.430  1.00 30.09           N1+
HETATM    8  C5  G39 B 500     -30.627 -57.033   8.097  1.00 29.53           C  
HETATM    9  N5  G39 B 500     -30.803 -57.955   9.206  1.00 28.16           N  
HETATM   10  C6  G39 B 500     -31.883 -56.178   7.937  1.00 30.53           C  
HETATM   11  C7  G39 B 500     -31.632 -55.093   6.901  1.00 30.75           C  
HETATM   12  O7  G39 B 500     -33.007 -56.989   7.531  1.00 31.80           O  
HETATM   13  C8  G39 B 500     -34.158 -56.905   8.398  1.00 30.52           C  
HETATM   14  C9  G39 B 500     -34.879 -55.553   8.283  1.00 31.36           C  
HETATM   15  C10 G39 B 500     -30.683 -59.283   9.087  1.00 27.13           C  
HETATM   16  O10 G39 B 500     -30.629 -59.863   8.010  1.00 26.14           O  
HETATM   17  C11 G39 B 500     -30.611 -60.040  10.380  1.00 26.05           C  
HETATM   18  C81 G39 B 500     -35.153 -58.020   8.079  1.00 29.88           C  
HETATM   19  C82 G39 B 500     -34.654 -59.395   8.467  1.00 28.23           C  
HETATM   20  C91 G39 B 500     -35.425 -55.279   6.891  1.00 32.33           C  
ENDMDL
END
@amjjbonvin amjjbonvin added the bug label Dec 12, 2023
joaomcteixeira added a commit to joaomcteixeira/pdb-tools that referenced this issue Dec 12, 2023
@joaomcteixeira joaomcteixeira self-assigned this Dec 12, 2023
@joaomcteixeira joaomcteixeira linked a pull request Dec 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants