Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #
- # VR
- if (@ARGV != 1) {
- print "usage\n";
- }
- #print $ARGV[0];
- open (PDB, $ARGV[0]) or die ("Could not open $ARGV[0].\n");
- open (INFO, 'hexanol_rec.crd') or die ("Could not open hexanol_rec.crd\n");
- $count = 0;
- foreach $line (<INFO>) {
- $atomnr=$line if ($count == 1);
- if ($count > 1) {
- push @pradzia, substr($line, 0, 21);
- push @galas, substr($line, -22);
- #print "$pradzia-53.2370 -19.9980 -27.4870$galas\n";
- }
- $count++;
- }
- close(INFO);
- foreach $pdbline (<PDB>) {
- if ($pdbline =~ /AT/) {
- push @x, substr($pdbline, 30, 8);
- push @y, substr($pdbline, 38, 8);
- push @z, substr($pdbline, 46, 8);
- }
- }
- close(PDB);
- print "*\n$atomnr";
- $linenr = 0;
- while ($linenr != $atomnr) {
- print "$pradzia[$linenr]$x[$linenr]0";
- print " $y[$linenr]0";
- print " $z[$linenr]0$galas[$linenr]";
- $linenr++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement