Brookhaven awk script?

Mike Smith mikes at bioch.ox.ac.uk
Thu Aug 10 04:27:57 EST 1995


Here is a litle perl script I once wrote to convert xplor PDB to Brookhaven PDB.
Mind, I don't know if it works in every case, it's rather simple!

Usgae:  xpltopdb file.xpl file.pdb (kind of thing)


#!/usr/local/bin/perl

$h=0;
$from=$ARGV[0];
$to=">".$ARGV[1];
$op=$from;
if (-e $op.".gz") {$op="gunzip -c $op |"};
if (open(INP,$op)) {
  open(OUT,$to);
  while (<INP>) {
    if (!(/^REMARK/i)) {
      $x=substr($_,72,1);
      $_=substr($_,0,21).$x.substr($_,22,50);
      print "$_\n";
      }
    }
  }

-- 
---------------------------------------------------------------------
Michael Smith,              |      Phone: (+44) (0)1865 275981/275720
Department of Biochemistry, |            e-mail: mikes at bioch.ox.ac.uk
Oxford University.          | URL:  http://nmra.ocms.ox.ac.uk/~mikes/



More information about the X-plor mailing list