Olex2_integration.txt 2.84 KB
Newer Older
trappn's avatar
trappn committed
1
2
3
4
5
NOTE:
For Olex2-1.2 and earlier, you need to add a macro to run ZSGH.
1.3 and later find it automatically when installed, so you don't have to do
anything.

trappn's avatar
trappn committed
6
7
### DO NOT POST THE COMMENT LINES INTO THE macro.xld FILE
### OLEX DOES NOT PARSE THESE COMMENTS AND WILL CRASH.
trappn's avatar
trappn committed
8
### MACRO FOLLOWS:
trappn's avatar
trappn committed
9
10
11
12
13
14
15
16
17
18

<zsgh help="Starts the Zurich Space Group Helper if installed on your machine"
  <body
    <args
      <arg1 name="file" def='filename()'>
    >
    <cmd
      <cmd1 "exec -o zsgh %1">
    >
  >
trappn's avatar
trappn committed
19
20
> 

trappn's avatar
trappn committed
21
# EDIT 18.02.2019 (Nils) --- INSTRUCTIONS FOR OLEX2 ON MAC OSX:
trappn's avatar
trappn committed
22
# This was tested on OSX 10.14 (NT) & 10.12 (TL)
trappn's avatar
trappn committed
23
24
25
26
27
28
29
30
31
32
33
34
35
# 1. copy zsgh-wrapper.sh and zsgh to some directory (I use /usr/local/bin)
#    and make sure both files are executable (chmod +x zsgh*)
# 2. in Olex2 "Home" tab, open "Settings" and go to PATH, enter the directory
#     containing the zsgh files there. If there is already one entry, separate
#     the entries with ";". Click once outside the field and close Olex2.
# 3. right-click the olex2.app in the "Programs" tab of OSX, and select
#    "show package contents". In Contents/MacOS, add the following macro to
#    "macro.xld" (neither at top nor bottom, a good place is right below the
#    "xprep" macro). Then restart Olex.

<zsgh help="Starts the Zurich Space Group Helper if installed on your machine"
  <body
    <args
36
37
      <arg1 name="dir" def='filepath()'>
      <arg2 name="file" def='filename()'>
trappn's avatar
trappn committed
38
39
    >
    <cmd
40
      <cmd1 "exec bash 'zsgh-wrapper.sh' %1 %2">
trappn's avatar
trappn committed
41
    >
42
  >
43
44
45
46
47
>

# EDIT 20.02.2019 (Nils) --- INSTRUCTIONS FOR OLEX2 ON MAC OSX (tcsh as shell):
# Tony sent me two script variations to use with tcsh instead of bash
# (as installed on the classroom PCs). I uploaded the variants he describes as
trappn's avatar
trappn committed
48
# zsgh-wrapper_TL1.sh and zsgh-wrapper_TL2.sh (don't forget to ajust above
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# macro accordingly). Here's his description:
# "I was able to change the default shell on the classroom computers to tcsh.
# However it did not help directly, as it seems when the script is run on those
# computers, the Terminal window has not learnt the path to where zsgh is stored
# (learnt form .cshrc), so can cd OK, but does not know zsgh.  I store the X-ray
# programs in ~/Applications/bin.  I cannot access /usr/local/bin on those
# computers, which is on the default path, because that folder seems not to be
# owned by the user.  Probably a legacy from the way the room was set up and I
# don't want to have to sort that out.
# I found two ways to overcome this.  One is to put an extra line in your script
# to start a new tcsh shell (I worked out how to avoid a second window opening)
# and by doing this my path definitions now get read from .cshrc.
# The other way is to explicitly define the path on a line in your script.  The
# attached <scripts> show both possibilities.  Probably the first is simpler as
# a generic solution, even if the opening of a new shell is not needed for most
# people."