haddocking / pdb-tools

A dependency-free cross-platform swiss army knife for PDB files.
https://haddocking.github.io/pdb-tools/
Apache License 2.0
372 stars 113 forks source link

Adds numbers to equal atom names in HETATM entries #71

Closed joaomcteixeira closed 3 years ago

joaomcteixeira commented 3 years ago

A user requested:

Fix atom names in Het Groups - ie where all carbons are called 'C',
they should be renamed 'C1', 'C2', etc, and the same for other elements.

Developers, do you feel is there a tool already to accommodate this, or should we go for: pdb_numhetatoms?

@JoaoRodrigues @amjjbonvin @brianjimenez @mtrellet

JoaoRodrigues commented 3 years ago

I'd be in favor of doing two changes related to this issue:

  1. Add a check to pdb_validate to throw a warning on duplicate atom names in the same residue. Or maybe add a new tool?
  2. Add a new tool that fixes this by renaming atoms with their original name + a number - and throw and error if the name grows beyond 4 characters: pdb_rename?

Also comes to mind that our names are maybe not super intuitive. For instance pdb_reres should maybe be pdb_numres or pdb_reatom should be pdb_reserial. What do you think?

amjjbonvin commented 3 years ago

Add a check to pdb_validate to throw a warning on duplicate atom names in the same residue. Or maybe add a new tool? Add a new tool that fixes this by renaming atoms with their original name + a number - and throw and error if the name grows beyond 4 characters: pdb_rename? Probably need a new tool for this. pdf_rename could work.

Also comes to mind that our names are maybe not super intuitive. For instance pdb_reres should maybe be pdb_numres or pdb_reatom should be pdb_reserial. What do you think?

Less intuitive to me I would keep the old names. pdb_reres -> renumber residues and it is consistent with pdf_reatom. They do the same on atoms or residues.

And now that we are the server up let’s try to keep the names rather constant.

joaomcteixeira commented 3 years ago

So, the new pdb_rename would work only on HETATM as requested by the user, right? Or do you want to perform the whole action in all ATOM and HETATM?

amjjbonvin commented 3 years ago

Good question. I would assume that for standard proteins/nucleic acids the naming is correct. So probably only doing it on HETATM should be fine (and simpler)

JoaoRodrigues commented 3 years ago

I'd leave it more generic because anyway, ATOM names should be unique but, just in case...

A new tool it is then: pdb_rename ! I'll handle it, need to exercise some Python muscles :)

joaomcteixeira commented 3 years ago

welcome back :wink: :+1: