I am trying to read Atoms objects from the file "data.txt", which contains multiple configurations. Each configuration has a different cell.

a = ase.io.read('data.txt', format = 'vasp')

But my code only reads the first configuration in the file.

What do I do?


1 Answer 1


Simply add index=':':

images = ase.io.read('data.txt', format = 'vasp', index=':')
  • $\begingroup$ Thank you. It happened that my collaborator directly copied the data from a pdf file. The data had different delimiter, so index=':' wasn't working. Should always check the data file first. $\endgroup$
    – user174967
    Oct 10, 2023 at 2:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .