-
Notifications
You must be signed in to change notification settings - Fork 4
/
crystalplan.py
executable file
·36 lines (30 loc) · 1.24 KB
/
crystalplan.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env/ python
# whether or not to use vglrun
import os
os.environ['ETS_TOOLKIT'] = 'wx'
#VGLRUN=""
#if os.environ.get('NXSESSIONID') is not None:
# os.system('command -v vglrun >/dev/null 2>&1 || { echo >&2 "CrystalPlan requires VirtualGL but it is #not installed. Aborting."; exit 1; }')
# VGLRUN="vglrun"
#elif os.environ.get('TLSESSIONDATA') is not None:
# os.system('command -v vglrun >/dev/null 2>&1 || { echo >&2 "CrystalPlan requires VirtualGL but it is #not installed. Aborting."; exit 1; }')
# VGLRUN="vglrun"
VGLRUN="vglrun"
"""The CrystalPlan application.
CrystalPlan is an experiment planning tool for crystallography.
You can choose an instrument and supply your sample's lattice
parameters to simulate which reflections will be measured,
by which detectors and at what wavelengths.
Author: Janik Zikovsky, zikovskyjl@ornl.gov
Version: $Id$
"""
# Author: Janik Zikovsky, zikovskyjl@ornl.gov
# Version: $Id$
#Simply import and launch the GUI
#os.system(VGLRUN +" python <<END\n"\
#"import CrystalPlan.gui.main\n"\
#"CrystalPlan.gui.main.handle_arguments_and_launch(InstalledVersion=True)\n"\
#"END")
import CrystalPlan.gui.main
if __name__ == '__main__':
CrystalPlan.gui.main.handle_arguments_and_launch(InstalledVersion=False)