Author: Holger Gohlke Date: 01/30/03 Programs: mm_pbsa.pl Description: pdb file was parsed as space-separated column file, not as fixed column file. Severity: mm_pbsa.pl fails if non-space-separated columns exist Fix: apply the following patch to amber7/src/mm_pbsa/mm_pbsa.pl *** mm_pbsa.pl Thu Jan 30 08:41:20 2003 --- mm_pbsa.pl Thu Jan 30 15:09:30 2003 *************** *** 1311,1334 **** chomp($line); my $rad; if($line =~ /(ATOM|HETATM)/){ ! # ATOM 1 N MET 1 19.192 38.199 15.560 ! # $1 $2 $3 $4 $5 $6 $7 ! $line =~ /(ATOM +|HETATM +)(\d+ +)(\S+)( +)(\S+)( +\d+)( +-?\d+\.\d+ +-?\d+\.\d+ +-?\d+\.\d+)/; ! my $card = $1; ! my $atnum = $2; ! my $atm = $3; ! my $spc = $4; ! my $res = $5; ! my $resnum = $6; ! my $crd = $7; ! ! # Special treatment of H's not necessary -> done by atm-pattern # Caveat: He, Hf, Hg not recognized as such ! my $found = 0; my $r_arr; foreach $r_arr (@$r_pat){ ! if($res =~ /$r_arr->[0]/ && $atm =~ /$r_arr->[1]/){ $rad = $exp_h ? $r_exp_rad->{$r_arr->[2]} : $r_unit_rad->{$r_arr->[2]}; $found = 1; last; --- 1311,1331 ---- chomp($line); my $rad; if($line =~ /(ATOM|HETATM)/){ ! my( $card, $atnum, $atm1, $atm2, $alt, $resname, $resno, $x, $y, $z) = ! unpack("a6 a5 x a a3 a a3 x2 a4 x4 a8 a8 a8", $line); ! ! # Special treatment of H's not necessary -> done by atm-pattern # Caveat: He, Hf, Hg not recognized as such ! my $atm = $atm1 . $atm2; ! my $restmp = $resname; ! $restmp =~ s/\s//g; # Remove leading and trailing white spaces because patterns below ! my $atmtmp = $atm; # are of the type /^\S+$/ ! $atmtmp =~ s/\s//g; ! my $found = 0; my $r_arr; foreach $r_arr (@$r_pat){ ! if($restmp =~ /$r_arr->[0]/ && $atmtmp =~ /$r_arr->[1]/){ $rad = $exp_h ? $r_exp_rad->{$r_arr->[2]} : $r_unit_rad->{$r_arr->[2]}; $found = 1; last; *************** *** 1336,1350 **** } if(! $found){ ! print " No radius found for $atnum $res $atm\n"; die(); } ! print PQR $card,$atnum,$res,$spc,$atm,$resnum,$crd," 00.000 ",$rad,"\n"; ! } ! else{ ! print PQR $line,"\n"; } } close(PQR); close(PDB); --- 1333,1351 ---- } if(! $found){ ! print " No radius found for $atnum $resname $atm\n"; die(); } ! $line = sprintf("%-6s%5d %1s%-3s%1s%-3s %4d %8.3f%8.3f%8.3f%6.2f%6.2f", ! $card, ! $atnum, ! $atm1, $atm2, ! $alt, ! $resname, ! $resno,$x, $y, $z, "00.000", $rad); } + print PQR $line,"\n"; } close(PQR); close(PDB); ------------------------------------------------------------------------------ Temporary workarounds: none