Hi all,

Can anyone show me a good way to select all residues that are <2Å from zinc atoms, then rename any selected CYS and HIS, to CYM and HIN respectively ... I'm trying to write a script to do this on ~300 files.

Thanks!!
Mike

Here's what I have so far

import os
from chimera import runCommand as rc
from chimera import replyobj

# gather the names of .pdb files in the folder
file_names = [fn for fn in os.listdir(".") if fn.endswith(".pdb")]

# loop through the files, opening, processing, and closing each in turn
for fn in file_names:
    replyobj.status("Processing " + fn) # show what file we're working on

    rc("open " + fn)

    rc("select :ZNB zr<2")
    rc("writesel "reslist + fn")
    
    rc("close all")

rc("stop now")