Opened 7 years ago

Closed 7 years ago

#1118 closed defect (fixed)

deleting residues from a chain leads to erroneous PDB

Reported by: Tristan Croll Owned by: Eric Pettersen
Priority: moderate Milestone:
Component: Input/Output Version:
Keywords: Cc: Elaine Meng
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

If I open a PDB file, select some set of residues in the middle of a chain, then delete selAtoms and save xxx.pdb #1, the PDB file will have a TER line at the new break. This causes an error if the file is used in phenix.refine. Additionally, secondary structure annotations in the PDB header are not updated - if any of the deleted atoms come from an assigned secondary structure element, then this too leads to an error in phenix.refine if secondary structure restraints are enabled.

Change History (4)

comment:1 by Eric Pettersen, 7 years ago

Status: assignedfeedback

The paradigm in ChimeraX is that a connected chain must either be covalently bonded together and/or have missing-structure pseudobonds spanning the gaps. Therefore, when reading a PDB file with missing structure in a chain and no TER card in that gap, ChimeraX will form a missing-structure pseudobond to indicate the presence of connecting structure with no 3D coordinates. Conversely, when writing out a file, if there is a gap in a chain and no missing-structure pseudobond then ChimeraX will drop in a TER card to indicate the chain is -- as far as ChimeraX knows -- actually disconnected. Reading that PDB back in will produce the same state (i.e. no pseudobond) as what when it was written.

If you are deleting structure, ChimeraX doesn't know your "intent" -- whether you want the deleted part treated as completely non-existent or simply as not specifically located in 3D. A workaround if you are doing this deletion programmatically is to form that missing-structure pseudobond before writing the PDB. Another possibility is to add an option to the "delete" command to treat the structure as having unspecified 3D location rather than as non-existent (i.e. form the pseudobond). What is your usage scenario?

The secondary structure issue is a bug. When porting the code from Chimera 1 I missed the part that updates the HELIX/SHEET records because it occurs in another section of code (before the actual writing). I will be opening a separate ticket for that issue.

in reply to:  2 ; comment:2 by tic20@…, 7 years ago

I think it would make more sense (and follow the PDB standard more closely) if ChimeraX were to assume that if the deletion occurs within a chain then it’s missing rather than nonexistent structure. PDB files aren’t supposed to have TER cards inside a chain.

In any case, the usage scenario is bringing ISOLDE towards full structure editing (not just re-fitting). It’s not uncommon to come across scenarios where someone has built nonsensical loops through mostly empty space, where the most sensible move is to delete them. This came up in 3h0g (a particularly egregious case with problems far beyond that - but that’s another story).

 
 
Tristan Croll
Research Fellow
Cambridge Institute for Medical Research
University of Cambridge CB2 0XY
 

 


comment:3 by Eric Pettersen, 7 years ago

Status: feedbackaccepted

After discussion with Elaine, we've decided that mid-chain deletions will automatically add a missing-structure pseudobond across the gap, which will alleviate the TER card issue. This will probably take me a month or two to get to, since I first want to work on shoring up connectivity for incoming structures (#904).

comment:4 by Eric Pettersen, 7 years ago

Cc: Elaine Meng added
Resolution: fixed
Status: acceptedclosed

mid-chain deletions now form a missing-structure pseudobond as appropriate

Note: See TracTickets for help on using tickets.