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

Mark Abraham Mark.Abraham at anu.edu.au
Thu Mar 11 01:24:07 CET 2010

On 11/03/2010 10:25 AM, Justin MacCallum wrote:
>> 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.
>> Mark
> This is indeed the case. I'm working with external programs that require PDB files. As it stands, if I take a pdb file and run it through gromacs and my external utility, I then have to edit the file before gromacs will accept it again. Ideally gromacs should be willing to eat its own output.

Sure. Sometimes the unix head, tail, cut and paste tools can do the job. 
Send the header and footer to files so named, grep out the middle lines, 
chop the middle into columns 1-x and x-80. Now paste a corrected columns 
1-x that you prepared earlier to the appropriate positions in x-80. Then 
concatenate that to the header and footer and you're done.

sed or perl solutions are also possible, and necessary if you have 
pseudo-trajectories in your PDB files.


More information about the gromacs.org_gmx-developers mailing list