/usr/share/python-ase/doc/development/writepngs.py is in python-ase-doc 3.9.1.4567-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from ase import io
t = io.read('mytrajectory.traj')
for i, s in enumerate(t):
# rotate to the desired direction
s.rotate('z', 'x', rotate_cell=True)
# repeat with keeping old cell
cell = s.get_cell()
s = s.repeat((1, 3, 3))
s.set_cell(cell)
ofname = str(i) + '.png'
print('writing', ofname)
io.write(ofname, s,
show_unit_cell=True,
bbox=[-3, -5, 50, 22]) # set bbox by hand, try and error
|