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

Allow wider MODEL field to increase maximum number of models #342

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

akors
Copy link
Contributor

@akors akors commented Nov 22, 2024

Increases the maximum model sequence number to 99999999 (almost 100 million).

The format of a MODEL record in a PDB file is specified as the string "MODEL ", some spaces and a 4-digit serial number. Due to the field width of four, the highest model number can only be 9999. However, this causes issues for some generated PDB files, such as converted MD trajetories with more than 9999 frames.

This change "extends" the PDB format specification. This should be safe because previous behaviour is preserved for model numbers <= 9999 and only uses the space currently occupied by spaces between the MODEL string and the model sequence number.

Increases the maximum model sequence number to 99999999
(almost 100 million).

The format of a MODEL record in a PDB file is specified as the string
"MODEL ", some spaces and a 4-digit serial number. Due to the field
width of four, the highest model number can only be 9999.

However, this causes issues for some generated PDB files, such as converted MD
trajetories with more than 9999 frames.

This change "extends" the PDB format specificuation and uses the available
space currently occupied by spaces.
@wojdyr wojdyr merged commit d3c0776 into project-gemmi:master Nov 22, 2024
8 of 9 checks passed
@wojdyr
Copy link
Member

wojdyr commented Nov 22, 2024

Looks good, thanks!

@akors akors deleted the pdb-extend-model-field branch November 22, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants