#!/usr/bin/perl # # Perl script to write one file of PDB coordinates # starting from a set of files coming from CNS calcs # while ( <> ) { next if ( / ANI 500 / ); # avoid ANI residue if ($_ =~ /.*FILENAME*/) { @Name=split('.pdb',$_); @Campo=split('_',$Name[0]); print "MODEL $Campo[2]\n"; $model++ ; } elsif ($_ =~ /.*overall*/ ) { print "$_" ; } elsif ($_ =~ /^REMARK/ ) { print "$_"; } elsif ($_ =~ /END/ ) { print "ENDMDL\n" ; } else { print "$_"; } }