Coverage for /builds/kinetik161/ase/ase/io/nomad_json.py: 87.50%

8 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-12-10 11:04 +0000

1from ase.nomad import read as _read_nomad_json 

2 

3 

4def read_nomad_json(fd, index): 

5 # wth, we should not be passing index like this! 

6 from ase.io.formats import string2index 

7 if isinstance(index, str): 

8 index = string2index(index) 

9 

10 d = _read_nomad_json(fd) 

11 images = list(d.iterimages()) 

12 return images[index]