atom serial_number is inconsistent with PDB serial numbers in multi-chain structure

Hi all, I’ve been debugging an off-by one error in a ChimeraX script I’m working on, which I’ve traced to a apparent inconsistency between the serial_number reported by ChimeraX for an atom and the actual serial number of that atom read/written in PDB format. To reproduce: open 5MJ7 select #1/B:6@CA info atoms sel attribute serial_number ==> atom id /B:6@CA serial_number 2548 but the correct serial number for this atom in 5MJ7.pdb is 2549. Maybe this is because the TER record for chain A takes up one serial number in the PDB file, but ChimeraX doesn’t include it as a numbered atom? Regardless, how can I query ChimeraX for the actual serial number that will be written if I write out a PDB file? Thanks, Daniel

OK, it seems like a (the?) solution to this is to read/write in mmCIF format which doesn’t have TER entries.
On Apr 25, 2024, at 12:43 PM, Daniel David Richman <ddrichma@stanford.edu> wrote:
Hi all,
I’ve been debugging an off-by one error in a ChimeraX script I’m working on, which I’ve traced to a apparent inconsistency between the serial_number reported by ChimeraX for an atom and the actual serial number of that atom read/written in PDB format.
To reproduce: open 5MJ7 select #1/B:6@CA info atoms sel attribute serial_number
==> atom id /B:6@CA serial_number 2548
but the correct serial number for this atom in 5MJ7.pdb is 2549.
Maybe this is because the TER record for chain A takes up one serial number in the PDB file, but ChimeraX doesn’t include it as a numbered atom?
Regardless, how can I query ChimeraX for the actual serial number that will be written if I write out a PDB file?
Thanks, Daniel

Hi Daniel,
On Apr 25, 2024, at 12:44 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all,
I’ve been debugging an off-by one error in a ChimeraX script I’m working on, which I’ve traced to a apparent inconsistency between the serial_number reported by ChimeraX for an atom and the actual serial number of that atom read/written in PDB format.
To reproduce: open 5MJ7
The default is to open a PDB entry from its mmCIF-format file. To open from its PDB-format file, the command would need to be: open 5MJ7 format pdb
select #1/B:6@CA info atoms sel attribute serial_number
==> atom id /B:6@CA serial_number 2548
When opened from the PDB-format file, the above command reports: atom id /B:6@CA serial_number 2549 --Eric Eric Pettersen UCSF Computer Graphics Lab
but the correct serial number for this atom in 5MJ7.pdb is 2549.
Maybe this is because the TER record for chain A takes up one serial number in the PDB file, but ChimeraX doesn’t include it as a numbered atom?
Regardless, how can I query ChimeraX for the actual serial number that will be written if I write out a PDB file?
Thanks, Daniel
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Thanks Eric! What about the command alphafold fetch Which format does that open? It doesn’t seem to have the format option available. Daniel
On Apr 25, 2024, at 3:14 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Daniel,
On Apr 25, 2024, at 12:44 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all,
I’ve been debugging an off-by one error in a ChimeraX script I’m working on, which I’ve traced to a apparent inconsistency between the serial_number reported by ChimeraX for an atom and the actual serial number of that atom read/written in PDB format.
To reproduce: open 5MJ7
The default is to open a PDB entry from its mmCIF-format file. To open from its PDB-format file, the command would need to be: open 5MJ7 format pdb
select #1/B:6@CA info atoms sel attribute serial_number
==> atom id /B:6@CA serial_number 2548
When opened from the PDB-format file, the above command reports:
atom id /B:6@CA serial_number 2549
--Eric
Eric Pettersen UCSF Computer Graphics Lab
but the correct serial number for this atom in 5MJ7.pdb is 2549.
Maybe this is because the TER record for chain A takes up one serial number in the PDB file, but ChimeraX doesn’t include it as a numbered atom?
Regardless, how can I query ChimeraX for the actual serial number that will be written if I write out a PDB file?
Thanks, Daniel
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Daniel, Alphafold fetch is in mmcif format only. I guess that the Alphafold database does not provide multiple formats. You can see this from the info given in the Log with command "open formats" and in the fetch-sources table in the HTML docs: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#fetch-table> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2024, at 3:50 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thanks Eric!
What about the command alphafold fetch
Which format does that open? It doesn’t seem to have the format option available.
Daniel
On Apr 25, 2024, at 3:14 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Daniel,
On Apr 25, 2024, at 12:44 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all,
I’ve been debugging an off-by one error in a ChimeraX script I’m working on, which I’ve traced to a apparent inconsistency between the serial_number reported by ChimeraX for an atom and the actual serial number of that atom read/written in PDB format.
To reproduce: open 5MJ7
The default is to open a PDB entry from its mmCIF-format file. To open from its PDB-format file, the command would need to be: open 5MJ7 format pdb
select #1/B:6@CA info atoms sel attribute serial_number
==> atom id /B:6@CA serial_number 2548
When opened from the PDB-format file, the above command reports:
atom id /B:6@CA serial_number 2549
--Eric
Eric Pettersen UCSF Computer Graphics Lab
but the correct serial number for this atom in 5MJ7.pdb is 2549.
Maybe this is because the TER record for chain A takes up one serial number in the PDB file, but ChimeraX doesn’t include it as a numbered atom?
Regardless, how can I query ChimeraX for the actual serial number that will be written if I write out a PDB file?
Thanks, Daniel

Thanks Elaine for the reply. This is causing me some trouble because I’m trying to use Chimera in a script. It sounds as if - when Chimera opens mmCIF files and saves in PDB format, the numbering may change and there’s not a way to get the new numbering - but when I repeatedly save mmCIF files, Chimera crashes (I submitted a bug report earlier today) Best, Daniel
On Apr 25, 2024, at 4:15 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Daniel, Alphafold fetch is in mmcif format only. I guess that the Alphafold database does not provide multiple formats.
You can see this from the info given in the Log with command "open formats" and in the fetch-sources table in the HTML docs: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#fetch-table>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2024, at 3:50 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thanks Eric!
What about the command alphafold fetch
Which format does that open? It doesn’t seem to have the format option available.
Daniel
On Apr 25, 2024, at 3:14 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Daniel,
On Apr 25, 2024, at 12:44 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all,
I’ve been debugging an off-by one error in a ChimeraX script I’m working on, which I’ve traced to a apparent inconsistency between the serial_number reported by ChimeraX for an atom and the actual serial number of that atom read/written in PDB format.
To reproduce: open 5MJ7
The default is to open a PDB entry from its mmCIF-format file. To open from its PDB-format file, the command would need to be: open 5MJ7 format pdb
select #1/B:6@CA info atoms sel attribute serial_number
==> atom id /B:6@CA serial_number 2548
When opened from the PDB-format file, the above command reports:
atom id /B:6@CA serial_number 2549
--Eric
Eric Pettersen UCSF Computer Graphics Lab
but the correct serial number for this atom in 5MJ7.pdb is 2549.
Maybe this is because the TER record for chain A takes up one serial number in the PDB file, but ChimeraX doesn’t include it as a numbered atom?
Regardless, how can I query ChimeraX for the actual serial number that will be written if I write out a PDB file?
Thanks, Daniel

Hi Daniel, Would it be possible for you to use some specification that doesn't change from mmCIF input -> PDB output (e.g.. chain ID, residue number, atom name) insetad of the serial number? Either way, hopefully the crash can be fixed. Thanks for reporting the bug so that we can investigate. Best, Elaine
On Apr 25, 2024, at 4:20 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thanks Elaine for the reply.
This is causing me some trouble because I’m trying to use Chimera in a script. It sounds as if - when Chimera opens mmCIF files and saves in PDB format, the numbering may change and there’s not a way to get the new numbering - but when I repeatedly save mmCIF files, Chimera crashes (I submitted a bug report earlier today)
Best, Daniel
On Apr 25, 2024, at 4:15 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Daniel, Alphafold fetch is in mmcif format only. I guess that the Alphafold database does not provide multiple formats.
You can see this from the info given in the Log with command "open formats" and in the fetch-sources table in the HTML docs: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#fetch-table>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2024, at 3:50 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thanks Eric!
What about the command alphafold fetch
Which format does that open? It doesn’t seem to have the format option available.
Daniel
On Apr 25, 2024, at 3:14 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Daniel,
On Apr 25, 2024, at 12:44 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all,
I’ve been debugging an off-by one error in a ChimeraX script I’m working on, which I’ve traced to a apparent inconsistency between the serial_number reported by ChimeraX for an atom and the actual serial number of that atom read/written in PDB format.
To reproduce: open 5MJ7
The default is to open a PDB entry from its mmCIF-format file. To open from its PDB-format file, the command would need to be: open 5MJ7 format pdb
select #1/B:6@CA info atoms sel attribute serial_number
==> atom id /B:6@CA serial_number 2548
When opened from the PDB-format file, the above command reports:
atom id /B:6@CA serial_number 2549
--Eric
Eric Pettersen UCSF Computer Graphics Lab
but the correct serial number for this atom in 5MJ7.pdb is 2549.
Maybe this is because the TER record for chain A takes up one serial number in the PDB file, but ChimeraX doesn’t include it as a numbered atom?
Regardless, how can I query ChimeraX for the actual serial number that will be written if I write out a PDB file?
Thanks, Daniel
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

That’s probably a better strategy. Thanks.
On Apr 25, 2024, at 4:55 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Daniel, Would it be possible for you to use some specification that doesn't change from mmCIF input -> PDB output (e.g.. chain ID, residue number, atom name) insetad of the serial number?
Either way, hopefully the crash can be fixed. Thanks for reporting the bug so that we can investigate.
Best, Elaine
On Apr 25, 2024, at 4:20 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thanks Elaine for the reply.
This is causing me some trouble because I’m trying to use Chimera in a script. It sounds as if - when Chimera opens mmCIF files and saves in PDB format, the numbering may change and there’s not a way to get the new numbering - but when I repeatedly save mmCIF files, Chimera crashes (I submitted a bug report earlier today)
Best, Daniel
On Apr 25, 2024, at 4:15 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Daniel, Alphafold fetch is in mmcif format only. I guess that the Alphafold database does not provide multiple formats.
You can see this from the info given in the Log with command "open formats" and in the fetch-sources table in the HTML docs: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#fetch-table>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2024, at 3:50 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thanks Eric!
What about the command alphafold fetch
Which format does that open? It doesn’t seem to have the format option available.
Daniel
On Apr 25, 2024, at 3:14 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Daniel,
On Apr 25, 2024, at 12:44 PM, Daniel David Richman via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all,
I’ve been debugging an off-by one error in a ChimeraX script I’m working on, which I’ve traced to a apparent inconsistency between the serial_number reported by ChimeraX for an atom and the actual serial number of that atom read/written in PDB format.
To reproduce: open 5MJ7
The default is to open a PDB entry from its mmCIF-format file. To open from its PDB-format file, the command would need to be: open 5MJ7 format pdb
select #1/B:6@CA info atoms sel attribute serial_number
==> atom id /B:6@CA serial_number 2548
When opened from the PDB-format file, the above command reports:
atom id /B:6@CA serial_number 2549
--Eric
Eric Pettersen UCSF Computer Graphics Lab
but the correct serial number for this atom in 5MJ7.pdb is 2549.
Maybe this is because the TER record for chain A takes up one serial number in the PDB file, but ChimeraX doesn’t include it as a numbered atom?
Regardless, how can I query ChimeraX for the actual serial number that will be written if I write out a PDB file?
Thanks, Daniel
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (3)
-
Daniel David Richman
-
Elaine Meng
-
Eric Pettersen