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

1"""This is a module to handle generic ASE (gui) defaults ... 

2 

3... from a ~/.ase/gui.py configuration file, if it exists. It is imported when 

4opening ASE-GUI and can then be modified at runtime, if necessary. syntax for 

5each entry: 

6 

7gui_default_settings['key'] = value 

8""" 

9import runpy 

10 

11 

12gui_default_settings = { 

13 'gui_graphs_string': 'i, e - E[-1]', # default for the graph command 

14 'gui_foreground_color': '#000000', 

15 'gui_background_color': '#ffffff', 

16 'covalent_radii': None, 

17 'radii_scale': 0.89, 

18 'force_vector_scale': 1.0, 

19 'velocity_vector_scale': 1.0, 

20 'show_unit_cell': True, 

21 'show_axes': True, 

22 'show_bonds': False, 

23 'shift_cell': False, 

24 'swap_mouse': False, 

25} 

26 

27 

28def read_defaults(): 

29 import os 

30 # should look for .config/ase/gui.py 

31 #if 'XDG_CONFIG_HOME' in os.environ: 

32 # name = os.environ['XDG_CONFIG_HOME'] + '/ase/gui.py' 

33 name = os.path.expanduser('~/.ase/gui.py') 

34 config = gui_default_settings 

35 if os.path.exists(name): 

36 runpy.run_path(name, init_globals={'gui_default_settings': 

37 gui_default_settings}) 

38 return config