#!/usr/bin/perl # the above is the standard linux/unix path for perl: change if your computer is nonstandard sub print_help{ print STDERR <){ s/^\s*//; # remove leading spaces @li = split('\s+'); if($#li==0 && $count!=1){ $count=0; $frames++; @ato=(); @atpo=(); $natom=$li[0]+0; print; } if($count==1){ $comment=$_; $comment=~s/\n//;; print $comment," stretched by ",$stretch,"\n"; } if($count>1){ if($norm==0.){ print $li[0],"\t",$li[1]*$stretch,"\t",$li[2]*$stretch,"\t",$li[3]*$stretch,"\n"; }else{ $pro=$li[1]*$a[0]+$li[2]*$a[1]+$li[3]*$a[2]; print $li[0]; for($i=0;$i<3;$i++){ print "\t",$li[$i+1]+$a[$i]*$pro*($stretch-1); } print "\n"; } } $count++; } close(INPUT); }