From: Josh Vermaas (vermaas2_at_illinois.edu)
Date: Wed Feb 20 2013 - 19:27:45 CST

Hi Hamid,
With some scripting, this is eminently doable. From the tkconsole (under
extensions), you'd want to do something like this:

#Load your files
set initid [mol new initial.pdb]
set finid [mol new final.pdb]
#Make atom selections.
set initial [atomselect $initid "all"]
set final [atomselect $finid "all"]
#Set the chain, resname, and resid
$final set chain [$initial get chain]
$final set resname [$initial get resname]
$final set resid [$initial get resid]
#Write a new file
$final writepdb newfinal.pdb

This should work so long as whatever generated the final pdb didn't
change the order of the atoms. If you wind up doing this sort of thing
alot, I'd recommend making a script to make your life easier.

Good luck!
-Josh Vermaas

On 02/20/2013 06:03 PM, hamid mosaddeghi wrote:
> Dear all
>
> I run system with other software and need to edit residue name in
> final config and trajectory for viewing in VMD correctly
>
>
> my intial file as pdb format is:
> --------------------------------------------------------
> ATOM 1 N MET A 1 65.790 57.783 56.121 1.00
> 0.00 N
> ATOM 2 H MET A 1 66.269 57.783 56.976 1.00
> 0.00 H
> ..
> ATOM 18 N PRO A 2 68.775 58.307 55.730 1.00
> 0.00 N
> ..
> ..
> ATOM 34 CA ILE A 3 71.916 60.622 53.014 1.00
> 0.00 C
> ..
> ATOM 26 H22 PRO A 2 70.325 56.443 57.858 1.00
> 0.00 H
> ..
>
> . to 2500 atoms
> ---------------------------------------
> and final file as pdb is:
> ------------------------------------------
> ATOM 1 NH1 DL_ D 1 21.058 -20.202 13.409 0.00 0.00
> ATOM 2 H DL_ D 1 20.132 -19.926 13.154 0.00 0.00
> ..
> ATOM 18 N DL_ D 1 22.137 -19.790 12.636 0.00 0.00
> ..
> ..
> ATOM 34 CA DL_ D 1 22.800 -19.323 13.327 0.00 0.00
> ..
> ATOM 26 H22 DL_ D 1 23.399 -21.551 12.838 0.00 0.00
> ..
> ..
> . to 2500 atoms
> ----------------------------------
>
> I need change atome name,DL_D residue name and number in final file
> to intial file. do some bod help to me?
>
> I used pdbeditor but this work is not possible. have vmd tools for
> this pupose?
>
> any suggestion will be appreciated.
>
> Thanks