From: Vermaas, Josh (
Date: Sun Sep 19 2021 - 15:10:03 CDT

Hi Kiana,

It’s a little tough to know what you want to do, but if you wanted to change resname WORST to resname BEST in a pdb file, you could do it as follows:

mol new molecule.pdb
set sel [atomselect top “resname WORST”]
$sel set resname BEST
set asel [atomselect top “all”]
$asel writepdb renamed.pdb

If you are trying to build structures with psfgen, that is done with aliases, as demonstrated in the psfgen user guide.


From: <> on behalf of Kiana Jahani <>
Date: Saturday, September 18, 2021 at 8:00 AM
To: VMD Mailing List <>
Subject: vmd-l: Changing residue name for a resid

Dear Users,

A residue name in PDB file, found in topology file in some different names. I want to provide translations from residue name found in PDB file to the names read in topology file, for different resids in PDB. (different names for different resids). I tried with different commands in tk console but I couldn't solve it. Does anyone know it is possible to do that?