Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1import pickle 

2import sys 

3 

4 

5def main(): 

6 import matplotlib.pyplot as plt 

7 task, data = pickle.load(sys.stdin.buffer) 

8 if task == 'eos': 

9 from ase.eos import plot 

10 plot(*data) 

11 elif task == 'neb': 

12 forcefit = data 

13 forcefit.plot() 

14 elif task == 'reciprocal': 

15 from ase.dft.bz import bz_plot 

16 bz_plot(**data) 

17 elif task == 'graph': 

18 from ase.gui.graphs import make_plot 

19 make_plot(show=False, *data) 

20 else: 

21 print('Invalid task {}'.format(task)) 

22 sys.exit(17) 

23 

24 # Magic string to tell GUI that things went okay: 

25 print('GUI:OK') 

26 sys.stdout.close() 

27 

28 plt.show() 

29 

30 

31if __name__ == '__main__': 

32 main()