fixed a (mostly performance) bug in ReadXYZ and ReadPDB