Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #kievienam atomui prideti unikalu nr.
- #
- # VR
- #print STDERR $ARGV[0];
- if (@ARGV != 1) {
- die "usage ./unikalus_atomai.pl file.pdb > file_fix.pdb"
- }
- open (FILE, "@ARGV[0]") or die $!;
- while (<FILE>) {
- #print STDERR $_;
- push (@lines, $_) if ($_ =~ "ATOM" || $_ =~ "HETATM");
- }
- $x = 10;
- foreach (@lines) {
- @char = split (//, $_);
- #print STDERR $char[0];
- @nr = split (//, $x);
- #print STDERR $nr[0];
- $char[14] = $nr[0];
- $char[15] = $nr[1];
- $newline = join ('' , @char);
- print "$newline";
- $x++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement