Closed zjp closed 4 years ago
So I just tested this, and both versions give identical output - both the original and your commit output all file types, starting with the first. The original actually splits at double spaces ' ', rather than single space ' ', so the quoted substrings are honoured. I do agree that your version is probably more robust and definitely more pleasing to look at, so I'm merging it, thanks.
Thanks!
But also, I think maybe the lines have shifted in some new version of Tinker, as there was definitely an off-by-one error on my machine. Regardless, the code shouldn't be vulnerable to that.
This fixes a bug where the first line (or first lines, I did not test how many were missing) of the atom types did not get pulled into atomtypes/atomnums properly.
Since the original logic also split the line on spaces within quoted substrings, a negative list index is a more reliable way to pull data from the end of the list-ified line.