Hi Rayees,
ChimeraX creates new PDB header records for some record types (HELIX, SHEET, and a few others) but COMPND and DBREF aren’t among the types that that happens for.  For other header types, ChimeraX just passes through the headers that came from the input PDB file (if there was one).  That header information is in the “metadata” attribute of the structure, which (for PDB files) is a dictionary keyed on record type whose values are lists of records of that types.  For example, the DBREF part of the metadata dictionary for 2gbp is:

 'DBREF': ['DBREF  2GBP A    1   309  UNP    P02927   DGAL_ECOLI      24    332             ‘],

So in theory you could add lines to metadata attribute of your structure, but ChimeraX isn’t really helping you in any way there since you have to put in the correctly formatted PDB record.  You might as well edit the output file afterward and add the records.
I have added you to the recipient list for the ticket we have open for outputting computed COMPND/DBREF records to PDB files, but that isn’t really going to help that much immediately.  Sorry.

—Eric

On Jun 23, 2025, at 10:59 AM, Rayees Mattoo via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Eric,
Thanks for the response.
I want to include the chain description and UniProt accession to my pdb output. To be precise, I have built a new model, and I want to include those details.

Best
Rayees  

From: Eric Pettersen <pett@cgl.ucsf.edu>
Sent: Friday, June 20, 2025 1:40 PM
To: Rayees Mattoo <rmattoo@stanford.edu>
Cc: Alexis Rohou via ChimeraX-users <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] Adding chain description and Uniprot accession number to a pdb file
 
Hi Rayees,
Do you mean you want a PDB file that you're reading to include chain descriptions and UniProt codes, or that you want PDBs that you output to include that info?  I'm going to guess you mean input, but if you meant output let me know.
ChimeraX gets chain descriptions from the PDB file's COMPND records.  For instance, the chain description (D-GALACTOSE/D-GLUCOSE BINDING PROTEIN) for 2gbp's chain A come from these COMPND records:

COMPND    MOL_ID: 1;                                                            
COMPND   2 MOLECULE: D-GALACTOSE/D-GLUCOSE BINDING PROTEIN;                     
COMPND   3 CHAIN: A;                                                            
COMPND   4 ENGINEERED: YES                                                      

Similarly, ChimeraX gets UniProt accession codes from DBREF records.  The DBREF record that provides 2gbp's UniProt reference (DGAL_ECOLI 1-309) is:

DBREF  2GBP A    1   309  UNP    P02927   DGAL_ECOLI      24    332

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jun 19, 2025, at 5:31 PM, Rayees Mattoo via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi,
I want to add chain description and Uniprot accession ID to my PDB file which contains many chains (chain IDs from A-M). Please suggest a way to add those details in chimeraX?

Best
_______________________________________________
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/

_______________________________________________
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/