IUBio GIL .. BIOSCI/Bionet News .. Biosequences .. Software .. FTP

PDB conversion

Dr. Randy Zauhar zauhar at SHIVA.PSU.EDU
Tue Mar 16 17:17:24 EST 1993

Duc asked how to convert ".ent to .pdb" files in the Brookhaven database -
I think he just wants to convert all the file names to a new format. This
is something I've had to do, because most modeling programs expect to see
names of the form "6lyz.ent", not "pdb6lyz.ent" as supplied on the tape.

My inelegant solution was to stick all the filenames in the brookhaven
directory into a file -

  find ./ -name \*\.ent -print > pdb_list

then edit pdb_list with ed and do a global replace to get rid of the leading
pdb and trailing .ent of each file name (I confess I don't remember the 
exact editor commands I used), then use this script:

# Start
   set file = ($<)
   if ($#file == 0) then
   mv pdb{$file}.ent {$file}.pdb
# Finish

with input redirected from pdb_list. Probably not how a "guru" would do it, 
but it worked. (Could someone post a simpler way of doing it??) If some 
smarty says to put all the file names in a shell variable instead of a file,
he should be aware that the list of names is too long to fit in a shell 
variable on my system. 

  Randy Zauhar
  Penn State

More information about the Bio-soft mailing list

Send comments to us at archive@iubioarchive.bio.net