[gmx-developers] 4-letter residue codes in PDB files

Mark Abraham Mark.Abraham at anu.edu.au
Wed Mar 10 06:38:01 CET 2010

On 10/03/2010 1:14 PM, Justin MacCallum wrote:
> Hi,
> As you may know, using the ffamber port of the Amber forcefields requires that the terminal residue codes are transformed by prepending an 'N' or a 'C' for the N- and C-Terminal residue, respectively. I.e., THR ->  NTHR. The PDB routines in gromacs appear to be able to read PDB files containing these residue codes without any problems. However, they are not able to write PDBs with four-letter residue codes. Instead, the residue name is truncated to three characters, i.e, NTHR ->  NTH. This can be annoying when trying to use tools such as pdb2gmx and editconf to prepare files. In particular, I am using the gromacs tools in a scripted way and the output PDB file from mdrun cannot be used as input for another simulation without hacking the PDB file to fix the termini names each time.
> Attached is a simple patch that allows for four-letter residue names in PDB files. This has not been tested extensively, but appears to work.

Unless PDB with 4-letter residue names is required for some external 
program, choosing to write .gro files would circumvent the problem. This 
approach should be preferred where possible, rather than add to the 
chaos of standards-incompatible pseudo-PDB-format there is out there.


More information about the gromacs.org_gmx-developers mailing list