Unverified Commit 719f7194 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1216 from bondrewd/charmm2lammps

make topology parsing in charmm2lammps.pl more tolerant
parents 421f97e4 6f7b052e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -794,9 +794,10 @@
        $ids{$tmp[1]}           = $tmp[2];
        $masses{$tmp[1]}        = $tmp[3];
        $max_id                 = $tmp[1] if ($max_id<$tmp[1]);
      } elsif ($read&&($tmp[0] eq "ATOM")) {
        # quit reading when hitting the "ATOM" section
        last;
      }
      # $names{$tmp[1]} = $tmp[4] if ($read&&($tmp[0] eq "MASS"));
      last if ($read&&!scalar(@tmp));                   # quit reading
    }
    AddMass(HT, 1.00800);
    AddMass(OT, 15.99940);