Ilia Guzei Notes On OLEX2
Ilia Guzei Notes On OLEX2
5-dev
Updated on 17 April 2025, at 17:12.
Ilia A. Guzei
2124 Chemistry Department, University of Wisconsin-Madison, 1101 University Ave., Madison,
WI 53706 USA. Email: [email protected].
These Notes are for the development version, thus some features
described herein may not be available in the release version.
New:
I have decided to create a MAILING LIST for those who would like to get an e-mail every time this
manual gets updated. This would probably happen a few times a year. To join the list e-mail me
at [email protected]. I will keep the “Notes on OLEX2 e-mail list” private and will not share
it with anyone.
OLEX2 Manual April 17, 2025
2
OLEX2 Manual April 17, 2025
Table of Contents
3
OLEX2 Manual April 17, 2025
Under Advanced System Settings click on Environment Variables. Under System Variables select
Path, and add to the (rather long) line the following:
;c:\saxi
Save and close. Now OLEX2 will list the supported programs in its structure solution and structure
refinement drop-down menus.
0. Close OLEX2.
3. Download the PLATON for Windows Taskbar and PLATON executable and check.def from
http://www.chem.gla.ac.uk/~louis/software/PLATON/ and put them into
C:\PWT\
Make sure you put all PLATON-related files into this folder.
4
OLEX2 Manual April 17, 2025
System Properties choose the Advanced tab and click on the “Environment Variables…” button.
It may look something like this:
Under “User variables for username” click on “New…” and in the “Variable Name” type
CHECKDEF and in the “Variable value” type c:\pwt\check.def as shown:
Click OK.
5
OLEX2 Manual April 17, 2025
If there is no PATH variable in the “User variable for username” section - click on the “New…”
button again and in the “Variable name” type:
PATH
and for the “Variable value:” type
c:\saxi\;c:\pwt\
as shown below
Click OK and close the windows you opened while navigating to the Advanced System Settings.
5. Start OLEX2. Let’s check if the procedure worked. Open a structure. Go to Work→Refine and
expand the Refinement Program dropdown menu. If you installed the programs correctly, you
should see, at a minimum, SHELXL and OLEX2.refine there:
If you are not seeing SHELXL – go back to the Advanced System Settings and modify the PATH
System variable (rather than User variable) to include c:\saxi\. To do so, highlight the PATH
variable, click Edit, navigate to the end of this rather long line, and append ;c:\saxi\ to the
end of the line. Note the leading semicolon – it is needed to separate the values on the line:
OLEX2 should be restarted for the changes to take effect. If this does not work – move the
c:\saxi\; part to the beginning of the “Variable value” line (note the semicolon). OLEX2
should be restarted for the changes to take effect.
Once SHELXL is visible, select it in the dropdown menu and run a refinement.
6
OLEX2 Manual April 17, 2025
Now click on the PLATON button located in the very top row:
PLATON should launch and you should see PLATON’s interface with all the buttons.
If it does not work – modify the PATH environment variable for the System, similarly to the
suggestions for the c:\saxi above.
Important: if you launched PLATON successfully, you need to close the PLATON interface and
PLATON-generated windows before you can return to OLEX2, otherwise OLEX2 will hang and
PLATON will run in the background (in which case it must be killed as a process in the Task
Manager).
Optional: Another good structure solution program, Superflip, can be downloaded from
http://superflip.fzu.cz/,and it too should be placed in the C:\SAXI folder.
7
OLEX2 Manual April 17, 2025
In general, it is helpful to refer to a list of commands for the OSX terminal, such as the one found
here: http://ss64.com/osx/. The terminal will be used throughout the installation process.
OLEX2
Download OLEX2 from http://www.olexsys.org/. You need OLEX2 version 1.5 or later. Open
the downloaded .dmg file and drag the olex2.app icon to your system Applications folder. Do not
attempt to run OLEX2 from within the .dmg folder.
SHELX
1. Register (free) as a new SHELX user at https://shelx.uni-goettingen.de/.
2. Once you have registered, a password will be emailed to you. Navigate to the Downloads tab.
Click the link at the bottom of the page that says, “download the programs”. When prompted,
supply the username “shelx” and the password emailed to you.
3. You should now be looking at a web page that says “Index of /~gsheldr/bin”. Click the Mac
folder. Then download the .bz2 files you need. For Ilia’s class, you will at least need shelxl,
shelxt, shelxs and shredcif. Note that the latest version of shelxl is not present as a .bz2 file;
just download the executable file “shelxl” directly.
4. Navigate to your Downloads folder, or whatever folder you have designated to usually
receive downloads, and double-click on the .bz2 files you downloaded. This will extract your
SHELX executable files to your Downloads folder. Note that the download may result in file
names such as “2018_shelxl” rather than the needed “shelxl”; make sure the file names do
not have a year by renaming them to “shelxl”.
5. Open the application folder for OLEX2, but do not run the program. To open the folder,
right-click on the installed OLEX2 application icon in the Applications folder, i.e. olex2.app,
and select "Show Package Contents". Then in the window that appears, open the sub-folders
Contents and MacOS.
6. Place all the SHELX executables you plan to use, plus shredcif, in this folder.
7. In this step, please type exactly as written, including any spaces, dots and all forward
slashes. Open a MacOS Terminal window (located in Applications/Utilities) or XQuartz to
make sure these files are executable:
type: cd /Applications/olex2.app/Contents/MacOS (“cd” stands for change
directory) – this navigates to the place where you just put the SHELX executables.
8
OLEX2 Manual April 17, 2025
"chmod" changes the permissions of the SHELX programs and shredcif to become
executable files and gives all users permission to run them.
"xattr" bypasses Apple's security that blocks running an app from an unknown developer the
first time. Alternatively, one can right click on the SHELX or shredcif icon, select open from
the popup and allow the app to be opened when a security popup appears, as one normally
does with unknown apps in the Finder. In that case, the app will subsequently crash as it is
not designed to run under Finder, but that is OK. Running the SHELX programs from within
OLEX2 might fail until this step has been completed. Just needed the very first time you
install any SHELX program.
8. Start OLEX2 by double-clicking on the installed OLEX2 application icon. The first time,
Apple security might not allow you to open OLEX2 because it was downloaded from the
internet. You can force it to open by right-clicking on the icon and selecting "Open" from the
drop-down menu, then selecting "Open" from the pop-up. It is safe to do that.
9. Click the Work tab. Then click the drop-down arrow for the Solve menu. Verify that
OLEX2.solve, ShelXT and ShelXS are listed as structure solution programs.
10. Click the drop-down arrow for the Refine menu. Verify that OLEX2.refine and ShelXL are
listed as refinement programs.
11. The first time you run a process like structure solution or refinement in OLEX2, Apple
security might ask if you want to allow OLEX2 access to certain folders, such as the Desktop
or Documents folder. It is safe to agree to that.
12. You can verify that shelxt, shelxs and shelxl work by running them on a structure data set
that you have opened, or by using the built-in sucrose example accessed from the Home
pane.
XPREP (This is for Chemical Crystallography at UW–Madison only. XPREP is not freeware.)
9
OLEX2 Manual April 17, 2025
7. Your terminal’s directory should still be the folder that contains XPREP. Run XPREP by
typing “./xprep” into your terminal. If it works, it will list some information about
XPREP and prompt you to a reflection file.
8. To run XPREP on a structure, copy the executable into a folder that contains the
structurename.hkl and structurename.p4p files . Navigate to that folder and then type
./XPREP structurename
XPREP should load the .hkl and .p4p files and show statistics about lattice centering.
However, XPREP can be installed in the /usr/local/bin folder and then be called for
anywhere. This way, users never have to worry about moving the XPREP executable and can
use it more easily.
Once XPREP has been installed, it can easily be moved into the /usr/local/bin folder the same
way that PLATON is moved, using the command:
sudo mv xprep /usr/local/bin
10
OLEX2 Manual April 17, 2025
Here is how to get PLATON running on a Mac. PLATON uses X11 for its GUI, so you need the
X11 libraries and tools and you then need a Fortran compiler. Ton Spek does not create compiled
versions of PLATON with static libraries, hence you must compile it yourself and the need for
all this.
The instructions below should work with Mac OS 12 (Monterey), 13 (Ventura), 14 (Sonoma),
and 15 (Sequoia) on both Intel and M1/M2/M3/M4 chipset Macs. The procedure sometimes
changes a little for each new Mac OS version, mainly because X11 libraries sometimes change
location and a PLATON executable compiled under one OS does not always work under
another. Once you get this set up for one OS, it usually works from then on at least until the next
OS is installed, so you usually only need to do the actual compile step when updating PLATON.
It is advisable to update and recompile PLATON regularly, because it is constantly being
improved.
If you are familiar with Unix/Linux, the following is probably clear to you. If not, please try to
follow the instructions exactly. Please read and type carefully, as there are important spaces,
dots and dashes within some commands. All line commands typed are case sensitive. Unix
commands usually do not give any feedback when they work correctly. Messages often mean
something might not have worked.
This looks long, but is quite quick if all goes well. Don’t be discouraged! Please reach out if
confused.
Note: In early 2024, some people experienced difficulties with compilation because of errors
during the final link (ld) stage concerning missing library definitions, or similar. Apparently a
previously installed version of Command Line Tools and/or gfortran had become incompatible
with the MacOS after an upgrade or update. If this happens to you when you have previously
been compiling PLATON successfully, try steps 3a and 4.
If needed, there is a stripped Fortran only version of PLATON (without graphics) available
(special) that usually compiles without problems. It allows for easy validation of jobs such as
'platon -U name.cif'.
11
OLEX2 Manual April 17, 2025
1 - Download and install the latest XQuartz (2.8.5 or later) from https://xquartz.macosforge.org,
unless you have installed it already. XQuartz is needed and will start automatically when running
PLATON later on, because it acts as an X11 server for the PLATON graphics.
2 - Start XQuartz or open Terminal (either can be used here; both are located in
Applications/Utilities). When the window opens, you are in the top level directory (folder) for
your Mac user account. To return to this folder at any time, type 'cd'. To find out which folder
you are in at any time, type 'pwd'.
3a - If you want to update an existing version of Command Line Tools, type in the XQuartz
window:
cd /Library/Developer/
sudo rm -rf CommandLineTools
(enter your password, then give it a little time)
xcode-select –install
Alternatively, you can install Homebrew from https://brew.sh, then enter in XQuartz or Terminal
the command: brew install gcc.
5 - Create a temporary folder named 'platon' at a convenient location. I use Desktop for now. If
you use uppercase letters for any part of the folder name, you must type it exactly the same way
from now on.
8 - gunzip the files platon.f.gz and xdrvr.c.gz (the Mac probably has done that automatically). If
not:
gunzip platon.f.gz
gunzip xdrvr.c.gz
9 - Compile PLATON. This is the most critical and often troublesome step. Type carefully and
exactly:
12
OLEX2 Manual April 17, 2025
Note that in the above, the character after the dash in -I/opt is an uppercase i. For -lX11, the
character before the uppercase X is a lowercase L. X11 is "Xeleven".
If nothing appears to be happening, just wait. The compiler takes a minute or two. If the
command prompt reappears after a while without any messages, you have succeeded; go to Step
10.
If this step fails with error messages after the long wait, either you did not type the compile
instruction exactly as above (a common mistake, so try again carefully), or Command Line Tools
or gfortran are not the latest versions; see the Note before Step 1 on the previous page.
If you have an earlier version of the Mac OS, e.g. Yosemite or Mavericks, the X11 libraries
might not be where they are expected to be and one of the following might work instead (these
will certainly not work if you use El Capitan or later):
gfortran -o platon platon.f xdrvr.c -L/opt/X11/lib -lX11
gfortran -o platon platon.f xdrvr.c -L/usr/X11/lib -lX11
10 - Copy the newly created file 'platon' (the executable) to /usr/local/bin or any other location
you like your executables, such as shelxl, etc., to be. I recommend not putting these in the system
Applications folder, nor should you leave them in the temporary platon folder used for the
compilation.
If you have already installed PLATON once before or want to use a location other than
/usr/local/bin for the executable, go to Step 10a, otherwise type:
sudo mkdir -m 755 /usr/local/bin
Then enter your password, if requested. If a 'File exists' message appears, you can ignore it.
10a - Type the two instructions below. If you prefer to use a different folder of your choice, use
the path to it instead of /usr/local/bin in the following; for example, the OLEX2 installation
instructions suggested putting the SHELX programs inside the OLEX2 app at
/Applications/olex2.app/Contents/MacOS, so you could use that location for PLATON, too.
Note that the dot at the end of the 'cp' line is important.
sudo cp platon /usr/local/bin/.
sudo chmod -R 755 /usr/local/bin/platon
Quit XQuartz (or Terminal) and start it again so the system knows about the new program (or
type 'hash -r' if in the default bash shell, 'rehash' if in tcsh or csh). Only needed the first
time you install PLATON.
11 - Test: type 'platon sucrose.spf' in the XQuartz window (you have to be in the
temporary platon folder again if you moved away), click on ORTEP in the main PLATON menu
window for an ORTEP plot.
13
OLEX2 Manual April 17, 2025
If all is well, you have a working version of PLATON that you can now use quite independently
of any other program simply by using the command line in XQuartz or a Terminal window with
any CIF, for example by typing 'platon structurename.cif'. Similarly, if the SHELX
programs are on a known path, you can run them manually from there too. All you need to do is
'cd' to the folder containing your current structure files.
To update PLATON at any time, repeat steps 6-10. The availability of a new version is indicated
on the PLATON opening window (red text starting with WEB:) and you can download the new
version by clicking on that information. The compilation and installation steps can be simplified
by creating a makefile with the relevant instructions. See hints at
https://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/. A makefile for compiling
PLATON is below. Remove the # from the first two lines if your Mac does not automatically
unzip the downloads. <tab> means insert the tab character on those lines. Save this as a file
called 'makefile' in the same place as the platon.f and xdrvr.c files and run it in XQuartz or
Terminal with the command 'make' to compile and then, if no errors, 'make install' to move
things to the right place.
platon:
#<tab> gunzip -f platon.f.gz
#<tab> gunzip -f xdrvr.c.gz
<tab> gfortran -o platon platon.f xdrvr.c -I/usr/X11/include -
L/opt/X11/lib -lX11
install:
<tab> mv platon /usr/local/bin/.
<tab> chmod 755 /usr/local/bin/platon
To get OLEX2 to know that PLATON exists, and thus show the 'Pton' button at the top of the
main GUI instruction panel, and to start PLATON, you need to do the steps below.
1 - Install PLATON as described above. Make a note of the full path to where you put the
PLATON executable. For example, /usr/local/bin if you put it there. It is convenient if you also
put the executables for SHELXT, SHELXL, SHREDCIF, etc. in the same location. The OLEX2
installation instructions suggest putting the SHELX programs in
/Applications/olex2.app/Contents/MacOS, so you could use that location for PLATON, too.
14
OLEX2 Manual April 17, 2025
3 - To test everything, run OLEX2. Select the sucrose demo structure on the Home panel. Go to
the Work tab then click on the down arrow beside the solve tab. The dropdown at the program
line should show ShelXT (and ShelXS if installed). Click on the down arrow beside the refine
tab and again you should see ShelXL in the program dropdown. OLEX2's own routines are
displayed by default, but some people prefer to use the SHELX programs. At the very top right
of the OLEX2 screen, there should be a Pton button if OLEX2 knows that PLATON exists. If all
this is OK, then you are ready to go!
PLATON might not know where check.def is, but that is no longer a problem, because if
PLATON cannot find check.def, it creates the file each time in the current working directory and
uses that.
This free alternative to XPREP is available both for PC and for Mac from
https://gitlab.ethz.ch/trappn/zsgh. The installation instructions and tutorial are available from that
site. For me, I downloaded the installer, ran it on a Windows 11 PC, started OLEX2, and ZSGH
was listed under Work→Refine:
15
OLEX2 Manual April 17, 2025
from https://orcaforum.kofo.mpg.de/app.php/dlext/?cat=25
I unzipped them in the order listed into D:\ORCA6 as I did not want to install this space-
demanding program on my C drive. It is probably wise to uninstall ORCA5 first if you have it.
You should now be able to refine structure with olex2.refine with non-spherical atom models.
16
OLEX2 Manual April 17, 2025
17
OLEX2 Manual April 17, 2025
Q: I have just downloaded OLEX2-1.5. How do I transfer my settings from the current OLEX2-
1.3? I don’t want to redo all the customizations.
A: This is not difficult and will only take few minutes.
4. From the ORIGINAL_DIRECTORY copy all .phil files (these contain settings) and .options.
In my case, there are four files:
.options
gui.phil
OLEX2.phil
user.phil
5. Navigate from the ORIGINAL_DIRECTORY into folder db. In my case there are only two
files there:
OLEX2.sqlite
user-fragment-database.sqlite
6. Copy these two files into the corresponding db folder in the DESTINATION_DIRECTORY.
18
OLEX2 Manual April 17, 2025
19
OLEX2 Manual April 17, 2025
Keyboard shortcuts
F2 - toggles the solid background color.
F3 - toggles atom labels.
F4 - toggles the gradient background color.
F5 - activates the work tab.
F6 - activates the view tab.
F7 - activates the tools tab.
F8 - activates the info tab.
ESC - deselects selected atoms or quits the current MODE of operation (such as atom labeling).
ctrl-A - select everything.
ctrl-G - launch the grow mode.
ctrl-H - toggles displaying the H atoms.
ctrl-I - inverts the selection. If nothing is selected, works as ctrl-A. (to deselect the bond after
inversion, type sel atom bonds -u
ctrl-M – displays the difference Fourier map
ctrl-O - launches the Open File dialog.
ctrl-Q - cycles through "no Q peaks", "show isolated Q peaks", and "show connected Q peaks".
ctrl-R - runs a refinement.
ctrl-T - cycles through "hide molecule/show text", "hide text/show molecule", and "show text
and molecule".
ctrl-Z - undo the last action. It works whenever possible.
TAB - expands the command (when typing in OLEX's console).
mode off (not a shortcut, but a quick way to exit a current mode)
“↑” key brings the previously issued commands from the console.
PAGE UP and PAGE DOWN buttons will scroll the content of the command line window inside
OLEX2.
ALT-BACKSPACE – reselects the last selection
20
OLEX2 Manual April 17, 2025
Mouse traps
Left click and drag rotates the model
Right click and drag – zooms the view
Left and right buttons down – translates the molecule
CTRL + left click – rotates the model around the axis perpendicular to the screen
ALT + left click – zooms the view
CTRL + SHIFT + left button down – translates the molecule
21
OLEX2 Manual April 17, 2025
addins [text]
inserts text into the ins file. Great for including additional commands. Synonym: “/ “
(forward slash with a space). For example, to add an extinction card EXTI to the INS file one can
type either of the two:
addins exti
/ exti
angle
draws an arch to show an angle and creates a label with the angle value.
Usage: select three atoms and type
angle
22
OLEX2 Manual April 17, 2025
asr
(Absolute Structure Refinement). Adds TWIN and BASF instructions to the INS file in the case of a
non-centrosymmetric structure.
basis
toggles the basis vectors.
Examples:
Select a C–C bond in the GUI. Type
brad 0.8
All C–C bonds in the GUI will change to a radius of 0.8. Of course, bonds of different types can
be selected simultaneously.
brad 0.5 C-H
changes the radii of all C–H bonds to half the default thickness. Note that the elements in this
notation are case-sensitive.
brad 3 hbonds
sets all hydrogen bonding interactions displayed in the GUI to be three times as thick as their
default (note: the default for the hydrogen bonding interactions is unity, but this unity is 1/10 of
the value of a regular C–H bond). But at least one hbond should be selected.
calcpatt
calculates the Patterson map. The map’s features can be adjusted in the typical manner with the
Level slider and Tools→Maps.
23
OLEX2 Manual April 17, 2025
cell
toggles the view of the unit cell boundaries. There are two different modes in which you can
render the unit cell: lines and tubes. You can choose the type under Home-→Settings→Unit cell
style. Or you can right-click on it and then use Draw style to change the drawing style (when
using cylinders, make sure you choose the correct Primitive to which the style is applied). The
same goes for the labels - make sure also that the plane has 0 transparency if you do not want to
display it.
center
centers the model in the GUI
chemdraw
inserts circles in six-membered rings:
The circles can be deleted by rotating the mouse wheel or typing undo or fuse.
close
closes current structure.
compaq [switch]
repositions atoms and/or fragments in the asymmetric unit as close to each other as possible.
possible switches: -a, -c, -m, -q.
compaq
all fragments assemble around the largest fragment.
compaq -a
joins incomplete fragments
compaq -c
similar to the default, but takes into account the atom-to-atom distances and moves all
atoms into the closest possible positions to the largest fragment in the structure
compaq –m
disconnects metals, then does compaq -a and then reattaches the metals.
compaq -q
moves the electron density peaks closer to existing atoms.
24
OLEX2 Manual April 17, 2025
Examples:
Also possible:
1. Select the atom(s) for which you want to set a new radius with the mouse in the GUI
2. type
conn value1
value1 will be applied as the new radius to the selected atoms
25
OLEX2 Manual April 17, 2025
26
OLEX2 Manual April 17, 2025
default
restores all program defaults.
datadir()
To see where OLEX2 keeps all variables and logs type
echo datadir()
To open a shell in that folder type
shell datadir()
degen
prints the list of atoms on special positions
27
OLEX2 Manual April 17, 2025
deltai [value]
specifies the connectivity delta for forming hydrogen bonds (and short interactions). Value is
distance in Angstroms. For example, an undesirable hydrogen bonding interaction O-H···S shown
below
Typing deltai with no parameters outputs the current value of the delta. It may be a good idea
to change delta back to the default value after generating figures.
direction
prints the current orientation (vector perpendicular to the screen) of the model in fractional
coordinates. If the selected direction is close to a principal direction, the program also reports the
direction of the current projection.
Example:
select two atoms in the GUI and type
direction
produces the following output:
Direction: (-1.000*A, 7.846*B, 9.246*C)
View along 000-011 (normalized deviation: 0.045A)
View along 100-111 (normalized deviation: 0.045A)
The first line of the output prints the equation of the direction. The two “View” lines refer to the
direction (projection) perpendicular to the screen; in this case, the viewer is “almost” looking
down the [011] direction. This is NOT the direction specified by the two selected atoms.
28
OLEX2 Manual April 17, 2025
matr 011
the view is adjusted to look down exactly along the [011] direction.
To determine what direction is specified by the two selected atoms, do the following:
with the two atoms selected (I know it’s a redundant statement but bear with me), type
line –n
direction
The program will print out the direction equation and, if it is close to a primary direction, the
deviation from the primary direction.
Echoing
By default, successfully executed commands are not displayed on the console. To see the issued
commands on the console type
silent off
to enable echoing.
file filename.oxm
saves the current view with whatever is showing in OLEX2. Loading this file should re-create
the exact same view you had when the file was saved.
File saving. If you have read in a cif into OLEX2 and need to save it as an ins file you cannot do
“File→Save As”, but must type
file filename.ins
Type help file for additional information on file formats.
fit
see mode fit
fixhl
re-labels the H atoms consistently with the atoms they are attached to.
29
OLEX2 Manual April 17, 2025
fixunit [Z’]
updates the formula using the contents of the asymmetric unit. The Z’ value is unity by default.
If the symmetry-independent unit contains a number of molecules different from unity, the Z’
should be specified. It will be updated on the ZERR line in the INS file.
The OK button works similarly.
Example: the asymmetric unit contains one-half of a molecule. To update the formula with the
correct Z on the ZERR line type
fixunit 0.5
fmol
Displays all fragments
fuse
Resets the view to the symmetry-independent unit and quits some of the MODEs.
grad [switch]
allows customizing the GUI background.
switch: -p [removes or inserts a picture as the GUI background]
grad
30
OLEX2 Manual April 17, 2025
invokes a menu in which you can select the four colors for the four corners of the GUI canvas;
the background will then be colored with the proper gradient transitions.
To set a picture as your background use the switch -p with the full path to the picture file:
grad -p='c:\xray\mypicture.jpg'
and now F4 will toggle this new background. If it does not - restart OLEX2 (I know, I know).
To remove the picture and return to the default gradient background, type
grad -p
group
combines the selected atoms into a collective. It is convenient for coloring a disorder component.
1. Select the atoms individually by clicking on them
2. type
group
to combine the atoms without bonds between them.
To group the atoms and the bonds between them, select the atoms and type
sel atom bonds –a
group
31
OLEX2 Manual April 17, 2025
Now the selected atoms and their bond are grouped and colored. To change the color right-click
→Graphics→DrawStyle and adjust the material parameters as needed.
A B C D
32
OLEX2 Manual April 17, 2025
history
opens Notepad with the last 1000 commands
Examples:
htab
will insert HTAB cards (and the necessary EQIV cards) for the detected hydrogen bonds in the INS
file.
switch -t
allows the use of additional elements in hydrogen bond searches
htab 3.2 -t=Br,I
will ensure that in addition to the default donor/acceptor atoms all Br and I atoms will also be
considered and all H-bonding interactions shorter than 3.2 Å will be listed.
htab -g
produces an expanded structure if any hydrogen bonds are generated with a symmetry operation.
33
OLEX2 Manual April 17, 2025
If too many bonds are generated and inserted into the instruction file and some of them are to be
removed, the HTAB commands should be edited manually in the INS file.
Sometimes hydrogen bonds are not displayed in the OLEX2 interface, for example, when the
donor–donor distance is too long, e.g., 3.08 Å. This can be resolved in at least two ways.
1. Execute
htab 3.1 140
fuse
The fuse command forces OLEX2 to recalculate the bonds. In general, all H-bonds
listed in the RES file with HTAB commands should be displayed.
2. Alternatively, you can adjust the delta for interactions:
deltai 1.3
Known issue. Sometimes CTRL-H will not display hydrogen bonds; for me that happens with
iodine atoms for N–H···I interactions. This is corrected by changing the default atoms for H-
bonding interactions. Type
app.SetOption interactions_to N,O,F,Cl,S,Br,Se,I
and then type
restart
to restart the program.
info
provides information about the selected molecule, such as formula, electron count, and mass.
Especially useful to troubleshoot an uncooperative match procedure to detect the differences
between molecules expected to be identical.
kill [object]
removes the specified atoms from the model.
To delete atoms C1 and C2, either type
kill C1 C2
or select C1 and C2 in the GUI and type
kill
or type
sel C1 and C1
kill
If atom labels have been placed for diagrams, as in Tools→Images→Label selected atoms, then
kill labels
34
OLEX2 Manual April 17, 2025
will remove them. The labels can also be removed as described in Working with Molecular
Graphics.
label [atoms]
generates moveable atom labels for diagrams.
Examples:
label o1 o2 [will create movable labels for atoms o1 and o2].
label $o [will create movable labels for all oxygen atoms].
Atom label length: it is possible to use atom names that are longer than four characters
(SHELXL limit) in OLEX2. To change the maximum label length limit, open the options file
(type options in the GUI) and insert the following command with the desired length limit. In
the example below the limit is 6.
max_label_length=6
Labeling atoms in residues may present a problem because the labels that contain the residue
number are too long and make figures crowed. Horst has a video explaining a work around
(https://go.screenpal.com/watch/cZi3rRVPOoh). In short, the labels of atoms in residues can be
formatted from the command line. Syntax,
label -resi=[modifier]
For example,
label -resi=.#
will label atoms as C1.1, C1.2, etc., where the number after the period is the residue number.
label -resi=_#
will label atoms as C1_1, C1_2, etc.
To label atoms without the residue number, just select the atoms you want to label and type
label
This latter approach is great if the residue number is to be omitted. Sometimes atoms may be
labelled without the residue numbers, but the residue number may be listed in the vicinity of the
molecule, e.g. “RESI X”.
labels [switches]
displays non-printable labels for the atoms according to the switch. These options are also
available under Work→Toolbox Work→Labels.
To display all non-H labels (equivalent to F3), either of the following will work:
labels
labels -l
H atoms labels are normally not displayed. To display all H atoms labels as well:
labels -l -h
The Q peaks are treated as atoms as far as labeling is concerned, except for the unique command
35
OLEX2 Manual April 17, 2025
labels –qi
which displays the Q peak heights in e/Å3.
To display the free variable number for the occupancy of non-H atoms:
labels –v
To display the free variable number for the occupancy of H atoms:
labels –h –v
legend
36
OLEX2 Manual April 17, 2025
displays an insert showing atom types. Typing legend toggles the display of the insert. The
insert can be moved within the GUI by holding down the SHIFT key and dragging the left mouse
button. If typing legend does not work, type legend –r (to reset it) and then do the
following twice: type legend and press ENTER.
Example of a legend in the main window:
Examples:
1. Select two atoms in the GUI and type
line
The atoms are connected with a line and its length is displayed.
37
OLEX2 Manual April 17, 2025
log
displays the content of the log file containing all information about the OLEX2 run.
38
OLEX2 Manual April 17, 2025
To see how well the molecules fit on the right-hand panel, select Tools→Overlay to see the RMS
table. The table will refer to individual molecules as A, B, C…, which do not reflect the way
your molecules are labeled.
To un-match the molecules type
fuse
It is possible to match only selected atoms in two or more molecules. Select four or more atoms
in one molecule, then four or more atoms (in the matching sequence) in another molecule (and
other molecules if necessary) and type
match sel
Or
match –i sel
A convenient way to show the superimposed molecules is with the “stick” drawing style
(achieved by typing tubes in the console) and different colors.
matr [parameters]
orients the molecular projection according to the parameters.
Parameters can be supplied as
1. a [uvw] lattice line from the origin
2. a lattice line from lattice point u1v1w1 to lattice point u2v2w2
3. a full Cartesian matrix
39
OLEX2 Manual April 17, 2025
the uvw values should be either space-separated or have the same number of digits.
Examples:
1. To orient the view along the crystallographic a-axis any of the following will work:
matr 1
matr 100
matr 1 0 0
To orient the view along [5,12,1] the following would work (note that if the values have different
numbers of digits either spaces or preceding zeros are necessary to ensure that each value has the
same number of characters):
matr 5121 / would not work
matr 5 12 1
matr 051201
To orient the view along [0-12] it is necessary to either use spaces or supply the signs for each
value or supply preceding zeros to ensure that each index has the same number of characters.
Any of the following three would work.
matr 0 -1 2
matr 00-1+2
matr 00-102
2. To orient the view along the vector from 010 to 12,2,4 use two numbers without spaces
between indices (note the use of preceding zeros):
matr 010 120204
matr 010 12 2 4 /would not work
Example: The program incorrectly assigns one of the water molecule’s H atoms to atom
O10, diagram below. Atom H10B is placed correctly, whereas atom H10A needs to be
40
OLEX2 Manual April 17, 2025
moved to coincide with Q1. The four steps needed to move H10A are outlined in the
diagram.
The four stages of atom fitting. From left to right: original situation; atom H10A
selected; atom H10A moved to a new position coincident with Q1; the operation
completed.
(2) A group of atoms can be rotated about a bond. This is handy, for example, for –CF3
groups and H atoms.
The goal is to rotate the water molecule about the Mn1–O4 bond to bring
the H atoms into the correct positions. Importantly, this rotation operation
will not destroy any AFIX commands imposed on the geometry of the
water molecule.
The first step is to decide which of the H atoms is in the wrong location. To determine this,
display the Fourier difference map by Work→Toolbox Work→Electron density map:
The green color shows areas with an excess of electron density (it
overlaps with Q1), whereas the brown-purple meshwork indicates holes.
Atom H4A is in an incorrect position.
We will rotate the water molecule about the Mn1–O4 vector so that H4A
will move to the position of H4B, and H4B will take the position of Q1.
41
OLEX2 Manual April 17, 2025
Select atoms O4, H4A, and H4B in that order. The first selected atom will be on the axis of
rotation.
The selection will change the colors. Note that the Mn1–O4 bond is also
highlighted. This is the axis of rotation and the reason it was important to
select atom O4 first.
Right-click on the Mn1–O4 bond. Then left-click and drag on the Mn1–
O4 bond. The water molecule will rotate about the Mn1–O4 axis. The
final position may look like the diagram on the left. It is a little crowded
because both the starting and final positions of the H atoms are shown.
Type mode off in the console to exit the fit mode and produce the desired outcome:
42
OLEX2 Manual April 17, 2025
The colors change somewhat, but importantly, the C1–C2 bond is highlighted:
43
OLEX2 Manual April 17, 2025
When you find suitable positions for the new F atoms, press ESC. The
anisotropic F atoms have been split into two sets of isotropic atoms:
FVAR 0.20168 0.75
PART 1
F1 5 0.27260 0.87054 0.57380 21.00000 0.07766
F2 5 0.31045 0.91385 0.76109 21.00000 0.10564
F3 5 0.22327 0.78921 0.69629 21.00000 0.11074
PART 2
F2a 5 0.32353 0.93217 0.71783 -21.00000 0.05000
F3a 5 0.24159 0.81252 0.75254 -21.00000 0.05000
F1a 5 0.24608 0.83512 0.57664 -21.00000 0.05000
Note that the F atoms are assigned to two parts with occupancies 21 and -21 and that the
second free variable with a value of 0.75 has been added to the FVAR line.
mode grow –a
Allows for conveniently repositioning atoms to symmetry-related sites within the same molecule.
It is exceptionally handy when a molecule occupies a special position. [But try
compaq -m
compaq
first. It may do what you wish to achieve.]
To display clickable bonds to generate symmetry-related atoms that can be used in the
refinement with PART -1:
mode grow –p
The new atoms generated thereby behave as independent atoms and can be used in FRAG
commands, but the occupancy of these atoms and their source atoms should be adjusted.
44
OLEX2 Manual April 17, 2025
mode grow -s
mode grow -v
Example: mode grow -v=3
The mode will be used with the user-provided delta for connectivity analysis; the default is 2 Å.
mode off
exits the current mode and returns the cursor to the default “arrow”.
mode pack
displays clickable pyramids that allow the generation of additional asymmetric units:
1. mpln
computes the best-fitting LS plane through the atoms selected in the GUI or through all
visible atoms if no atoms are selected. The atoms are in the corners of the plane.
2. mpln -n
computes the best least-squares plane and orients the molecule so that the normal to this
plane is perpendicular to the screen. Convenient for showing the best molecular
orientation. The -n switch, here and in general, instructs the program not to create the
object.
3. mpln -r
similar to mpln -n, but the created plane is rectangular and the atoms are no longer at
the corners of the plane.
Example:
1. mpln C1 C2 C3
computes the LS plane through atoms C1, C2, and C3
2. mpln C1 C2 C3 -r
computes a rectangular plane through C1, C2, and C3
45
OLEX2 Manual April 17, 2025
name [value]
renames the selected atoms or modifies their labels.
Example:
1. Select a number of atoms and type
name 1
to have the atoms labeled sequentially, starting with the number 1.
2. Select a number of atoms and type
name N
to rename all selected atoms to be nitrogens.
3. Select a number of atoms and type
name –s=d
to have the trailer “d” to be added to all the atom labels.
4. Select a number of atoms and type
name –s=
to have the trailer removed from all the atom labels.
options
Typing options will open your local file .options that contains a few commands that you
modify to improve the program performance. You may not be aware of these commands because
the defaults usually work. All options are listed at
http://sourceforge.net/p/OLEX2/code/HEAD/tree/trunk/options.txt
Any of these commands can be changed.
Examples:
If you are experiencing difficulty with atom selection (too difficult to select an atom by clicking
on it) you can insert
gl_stereo=false
into your .options file. Restart OLEX2 and the problem should go away.
If H atoms cannot be assigned in tricky situations (such as when PART -1 is involved) – insert
safe_afix=false
into your .options file. Restart OLEX2 and the problem should go away.
Currently, my .options files looks like this in its entirety:
gl_stereo=false
confirm_on_close=false
model.center_on_update=false
interactions_to=N,O,F,Cl,S,Br,Se,I
external_explicit_same=false
preserve_restraint_defaults=true
gl_multisample=true
safe_afix=false
After you have made your changes restart OLEX2 by typing restart. No splash screen will be
shown and no updates will be installed.
46
OLEX2 Manual April 17, 2025
panel [value]
The command sets up the width of the menu panel in the GUI. The default is 400 pixels, which
works well. A typical problem is that some buttons on the menu panel cannot be seen if the panel
width is smaller (sometimes upon the initial installation). This usually results from a suboptimal
menu panel width. Type
panel 400
Wait several seconds and the default should be restored.
47
OLEX2 Manual April 17, 2025
An e-mail with an activation link will be sent to you. Once you follow the link and activate it, go
back to the Extension modules, select 3D Plus - Install and click on Install to actually install the
software. Restart OLEX2, and the pictCODE command will be functional.
To prepare the created STL file for printing, download the Autodesk Meshmixer from
123AutoDESK on your computer: http://apps.123dapp.com/3dprint/install.html.
Install Meshmixer in a typical fashion, start the program, and load in the STL file prepared by
OLEX2. The molecule can be moved under the Print tab.
March 30, 2016. Richard Staples shared the following instructions to fix some errors in the
OLEX2-generated STL file. In Meshmixer:
pim [-l]
generates a metal-π bond. The thickness of the bond is set to 50% that of a normal bond, as if
BRAD 0.5 had been issued for these metal-centroid bonds.
When the switch [-l] is used, the metal-centroid bond length is also shown.
Example.In a metallocene complex, issuing
pim
will remove the ten metal-C(Cp) bonds and create two dashes bonds to the centroids (fig).
48
OLEX2 Manual April 17, 2025
PLATON button
Clicking the button launches PLATON.If this function does not work the first time, there is an
easy fix.In the PATH for your system environment variable insert the location of the
PLATON.exe; in my case, it is C:\pwt.It may help to insert it toward the left end of the PATH
line.Restart OLEX2, and it should work.See the installation notes at the beginning of the
document.
reap
opens the Open Dialog in the directory of the current project.Shortcut: CTRL-O.
resi
Please see section E on page 87 for several examples of effective resi usage. (Press
ctrl+shift+N to get a page dialog box and enter 87.)
RTAB – checking the “Report RTABs” check box in the Report module will make the program
run
This command allows one to issue multiple commands on the same line; these commands will be
executed consecutively.
Example:
To execute telp, brad 0.3, sel $H, tubes, brad 0.2 in one command, type
run telp>>brad 0.3>> sel $h>>tubes>>brad 0.2
49
OLEX2 Manual April 17, 2025
This makes sense if you plan to perform these commands several times because the line can be
reproduced with the ↑ key.
rsa
will print out the absolute configuration for the chiral atoms in the structure with the relative
priority of the substituents. There will be no output if there are no chiral centers.
Example:
Type
rsa
The output will be analogous to
C2 : S (H1 < C1 < C3 < F1)
The automated mode will impose the selected geometry to all fragments with matching atomic
sequences.
Example: impose SAME on all phenyl rings in the structure.
Implementation: Select six atoms in a template phenyl ring in the correct order and type
sel sel
to identify all six-membered rings in the structure to ensure that the restraint will be imposed
correctly.
Deselect all atoms.
Select the same six atoms in the correct order and type
same -all
The program will impose SAMEs on all the groups highlighted by sel sel.
50
OLEX2 Manual April 17, 2025
These SAMEs will be typed in the GUI and inserted in front of the template Ph ring in the INS
file.
same –s
generates a 'self' SAME restrain so that the fragment matches itself in the reverse order
There are other options for same; just type help same to see them.
save model
saves both crystallographic and graphics information of the current model, including the labels.
So, you can “save model name” and later “load model name”.
save scene
saves the properties of the scene, such as background, light parameters, etc.This is equivalent to
right-clicking on the GUI background and selecting Draw Style→Scene Properties→Save.
save style
saves the properties of atom graphics, such as atom colors The overall visual appearance depends
on the combination of the style and scene properties. Equivalent to right-clicking on an atom and
Graphics→Draw Style.
save view
saves the current projection.
Example:
To save the current projection:
save view projection1
To load projection1:
load view projection1
same adp
This is a clever command for refining two or more atoms with identical atomic displacement
ellipsoids (like EADP) that can be oriented differently in space (unlike EADP). This option is
only available with olex2.refine. The program automatically determines an axis of rotation as the
51
OLEX2 Manual April 17, 2025
symmetry element about which the atomic ellipsoids are rotated. First, the procedure looks for a
pivot bond (for example C–CMe3 bond if the tBu group is disordered), and if it fails to find one it
treats the atoms as a ring and rotates the ellipsoids about the normal to that plane.
Application: Select the atoms you want to constrain and type
same adp
This command will insert several lines into the INS file, e.g. for three carbon atoms:
REM <constraints
REM <item "olex2.direction normal nC3C2C1 C3 C2 C1">
REM <item "olex2.constraint.rotated_adp C2 C1 nC3C2C1 240 false">
REM <item "olex2.constraint.rotated_adp C2 C3 nC3C2C1 120 false">
REM >
The lines describe how the axis is defined and how the ellipsoids are rotated. The ellipsoids may
also be scaled with the shape retained. The scaling is controlled by the last word on the line
describing the rotation. “False” means there is no scaling, “true” allows the selected ellipsoid to
change size.
As of August 5, 2024 same esd command fails for ferrocene when five atoms of a Cp group are
selected. Oleg is working on it.
Example:
with three atoms selected
sel
displays the computed angle defined by the three atoms in the console window.
Examples:
sel C1 – selects atom C1; convenient when one needs to highlight a specific atom in a
crowded structure
sel $c $n - selects all C and N atoms.
sel $m - selects all metals
52
OLEX2 Manual April 17, 2025
An extended syntax include keyword 'where' and 'rings' which allow selecting atoms and bonds
according to their properties, like type and length, or rings of particular connectivity like C6 or
NC5.
Example:
sel rings C5 - selects all rings formed by five carbon atoms.
If the 'where' keyword is used, logical operators, like and (&&), and or (||) can be used to refine
the
selection. For example:
sel atoms where xatom.bai.z > 2 - to select all atoms heavier than H
sel bonds where xbond.length > 2 - to select all bonds longer than 2 Å
sel bonds where xbond.b.bai.z == 1 - to select all bonds where the lightest atom is
H
Switches:
a - select all
c - copies printed values to the clipboard
i - invert selection
l - consider the list of bonds as independent
u - unselect all
53
OLEX2 Manual April 17, 2025
sel $c
sel atoms -i
To mark bond distances or angles in the CIF as “to be tabulated in print” for Acta
Crystallographica purposes, the following commands are useful.
To include all bonds to the halogen atoms:
sel CIF bonds $X
In general, X designates halogen, M designates metal.
To report all angles involving all nitrogen atoms
sel cif angles $* $n $*
or
sel cif angle $n
For a specific atom (e.g. C4):
sel cif angle c4
I believe merging CIF from the REPORT section of the GUI is required.
shell
starts a DOS window in the project directory
54
OLEX2 Manual April 17, 2025
skin name
allows one to customize the uppermost banner of the GUI with a custom image. The name is the
name of the new “skin”. Create a png or jpg file (115 x 800 pixels), place it in the
C:\Program Files\OLEX2-1.2-beta\etc\skins
folder. Let’s call it myskin.png.
Then create a new binary file myskin.phil with this content:
gui {
skin {
name = uw
logo_name= etc/skins/myskin.png
}
}
standardise
repositions every atom inside the IUCr-recommended asymmetric unit. Use compaq to
reassemble the molecule. Note that you can type the first four-five letters of the command (any
command) and use the TAB key to complete the word.
text
displays the DOS prompt text in a separate window
uniq atomname
displays the fragment containing the named atom while hiding all other fragments.
wbox
55
OLEX2 Manual April 17, 2025
draws a rectangular Wrapping BOX around the chemical moieties on the screen. The vdW radii
employed in the computation are provided as console output.
Example:
typing wbox produces this drawing
xp
launches the proprietary molecular graphics program XP written by George Sheldrick. While
OLEX2 can perform many “xp” commands, not all of these commands are implemented in
OLEX2. You can manipulate your structure in XP and then save the changes with the “file”
command. The changes will be reflected in the OLEX2 GUI, provided the file name is the same.
56
OLEX2 Manual April 17, 2025
Q: How do I convert space group P1 with two symmetry-related molecules into P1� with one
molecule?
A: If a structural solution fails with one program, it may be easiest to try and solve the structure
with another program (XS, OLEX2.solve, Superflip, XT). If, however, you must solve the
structure in P1 and then convert it to P1� here is the procedure. Let us use the following Cr complex
(C6H5C6H4Br)Cr(CO)3 (I) as an example (Acta Cryst., 2003, C59, m499-m500).
Figure 1. The Cr(0) complex (I) used to illustrate the P1→P1� switch.
This structure of (I) could not be solved in P1� and had to be solved in P1 with two molecules,
Figure 2.
57
OLEX2 Manual April 17, 2025
Figure 2. The
structure of (I)
solved in P1. The
two molecules are
related by an
inversion center.
58
OLEX2 Manual April 17, 2025
Sometimes the resultant merged molecule contains extra atoms near the expected positions (Figure
4). This is because some symmetry-equivalent atoms were not perfectly related by an inversion
center. These redundant atoms should be eliminated. In the case of (I) there are four extra sp2
carbons, two extra carbonyl carbons, and one extra oxygen atom.
The extra atoms can be deleted manually (it does not matter which one of the two you delete at
each site) or by issuing
8. fuse 0.4
This command will “fuse together” all atoms that are closer to each other than 0.4 Å.
Figure 5. The finished structure of (I) in the correct space group P1� .
59
OLEX2 Manual April 17, 2025
60
OLEX2 Manual April 17, 2025
To go back to the previous display, delete the dashed line and then type
conn 9 Cr1
to force the metal center to make nine bonds.
To compute the dihederal angle between the ring planes, one needs to rerun refinement with card
MORE -1
in the INS file. This card can be added to the INS file manually or from the OLEX2 GUI by typing
/ more -1
The forward slash tells OLEX2 to add a command into the INS file.
Note that more -1 is incompatible with the wpdb card.
This writes out a variance-covariance matrix into a file that OLEX2 uses for further
computations.
61
OLEX2 Manual April 17, 2025
Select the rings by clicking on the selectors (selected rings turn green) and type
esd
to show some statistics with standard deviations on the screen. The dihedral angle of interest is
58.86(1)°.
This is a sample output on the OLEX2 GUI (the rings are labeled C1-C6 and C7-C12):
esd
Using SHELXL matrix for the calculation
Plane C7 C8 C9 C10 C11 C12 to plane angle: 58.86(10)
Plane centroid to plane centroid distance: 4.343(2) A
Plane [C7 C8 C9 C10 C11 C12 ] to plane centroid distance: 0.092(5) A
Plane [C7 C8 C9 C10 C11 C12 ] to plane shift: 4.342(2) A
Plane [C1 C2 C3 C4 C5 C6 ] to plane centroid distance: -0.027(5) A
Plane [C1 C2 C3 C4 C5 C6 ] to plane shift distance: 4.343(2) A
62
OLEX2 Manual April 17, 2025
But if you are like me, I am more inclined to do telp, followed by a brad 0.3 (to make the
radius thinner), selecting the hydrogens and making them smaller as well, and, finally,
deselecting the hydrogen atoms. This process results in a display that looks better for
publications:
The commands telp, brad 0.3, followed by selecting the hydrogens and making them
smaller, can all be combined into one macro:
1. Open OLEX2
2. Type emf
This will open the custom.xld file; where the custom macros reside.
3. You can start adding commands, if you know the style. Alternatively, copy one of the
already existing macros, paste it at the end, and modify the commands in the new macro.
e.g.,
63
OLEX2 Manual April 17, 2025
<cmd1 "telp">
<cmd2 "brad 0.3">
<cmd3 "sel $H">
<cmd4 "arad 0.08">
<cmd5 "sel -u">
>
>
>
Q: Is it possible to show only one or more (selected) “parts” of the disordered atoms?
A: Absolutely, only selected “part” numbers can be shown by using
showp 0 1
the parts under part 0 (zero and not “oh”), and 1 are shown.
For example:
64
OLEX2 Manual April 17, 2025
There are several ways to model molecular disorder. One of them is to constrain the geometry of
an entire molecule or fragment with an idealized geometry. This is based on the FRAG/FEND cards
of SHELXL, but a lot will happen behind the scenes in OLEX2. Some concrete examples are
given below.
In the structure on the right, we want to constrain the toluene geometry with
an idealized geometry. The electron density peaks (golden spheres) are fairly
consistent with the geometry. All you need for this procedure are three non-
colinear peaks, regardless of the total number of atoms in the molecule.
1. Prepare an idealized geometry of the molecule of choice (toluene in this case). It should look
like a typical FRAG/FEND command:
FRAG 17
C1 1 1.198402 -0.033739 3.629224
C2 1 1.201835 -0.000101 2.122450
C3 1 0.001012 -0.000301 1.398484
C4 1 0.000813 -0.000261 0.002140
C5 1 1.208427 0.001721 -0.699221
C6 1 2.412741 0.006115 0.007778
C7 1 2.406015 0.006056 1.404106
FEND
2. Copy the entire frag/fend list (including the frag and fend commands) and paste them
with CTRL-V into the GUI.
The idealized molecule will be inserted in green (on the right in the diagram below) and OLEX2
goes into the MATCH mode (the cursor is no longer an arrow).
65
OLEX2 Manual April 17, 2025
3. Match at least three atoms. We start with the Me carbons by clicking on the Me carbon of the
green molecule and then on the Q peak corresponding to the toluene Me carbon:
Now that a good match is obtained, keep pressing the ESC key until you are out of the MATCH
mode (the cursor becomes an arrow and the toluene molecule turns grey) or type mode off:
66
OLEX2 Manual April 17, 2025
Once the inserted molecule is close to the proper location, its position can be fine-tuned in the
MATCH mode, by pairwise matching of the atoms and Q peaks:
4. We are ready for refinement. Note that this idealized toluene molecule has been incorporated
into the ins file as a fixed geometry moiety:
AFIX 6
C1 C 0.21400 0.32710 0.26920 1.00000 0.05000
C2 C 0.23497 0.37425 0.18633 1.00000 0.05000
C3 C 0.15957 0.32139 0.14236 1.00000 0.05000
C4 C 0.18136 0.36307 0.06565 1.00000 0.05000
C5 C 0.27935 0.45902 0.03133 1.00000 0.05000
C6 C 0.35491 0.51286 0.07436 1.00000 0.05000
C7 C 0.33263 0.47074 0.15105 1.00000 0.05000
AFIX 0
The actual atom labels will depend on the content of your structure.
5. If the refinement goes well, re-label the toluene atoms, add the H atoms and make sure the
occupancies of the atoms are correct.
EXAMPLE 2. Imposing an idealized geometry using atoms from a poorly behaved molecule.
The procedure is essentially the same, and the “old” atoms of the fragment being modeled will
be deleted if they are within 0.5 Å from an atom from the FRAG unit.
When the default of 0.5 Å does not work, try deleting the atoms of the molecule being modeled
after the idealized molecule has been matched, leaving the idealized molecule. If the “old”,
poorly behaved molecule remains, then there will be two molecules in the same space –an
obvious problem.
67
OLEX2 Manual April 17, 2025
The original molecule has been deleted, the idealized one is left in the proper orientation, and we
can proceed with steps 4 and 5.
EXAMPLE 3.
2. The refinement reveals, among other things, four residual peaks higher than the rest:
3. Optional: the four residual peaks can be reassembled with compaq –c.
In the GUI, make sure only the Pd complex and the four highest Q peaks are shown. Type
grow to generate the symmetry-related Q peaks:
68
OLEX2 Manual April 17, 2025
4. Prepare an idealized geometry of the molecule of choice (ethyl acetate in this case). It
should look like a typical FRAG/FEND command:
FRAG 17
O1 3 -0.787135 1.361478 -1.826069
O2 3 -1.250238 2.162490 0.179184
C1 1 -0.072846 0.126000 0.077980
C2 1 -0.733637 1.268944 -0.645662
C3 1 -1.903975 3.293234 -0.386436
C4 1 -2.401190 4.153250 0.753379
FEND
5. Copy the entire frag/fend list (including the frag and fend command) and paste it with
CTRL-V into the GUI.
The idealized molecule will be inserted (greenish molecule on the right in the diagram below)
and OLEX2 goes into the MATCH mode (the cursor is no longer an arrow).
The inserted molecule can be overlaid on the Q peaks in the MATCH mode. Prior to doing so, it
may be beneficial to move the inserted molecule manually as follows:
Left-click on the molecule and keep the left mouse button depressed to rotate the molecule.
Hold down the SHIFT key to drag the molecule with the left mouse button depressed.
You can rotate the entire structure as usual if you click elsewhere on the GUI.
Once the inserted molecule is close to the proper place, its position can be fine-tuned in the
MATCH mode, by pairwise matching of the atoms and Q peaks:
69
OLEX2 Manual April 17, 2025
To exit from the MATCH mode either keep pressing the ESC button or type mode off:
Because the solvent molecule is disordered over an inversion center, it should be refined with
PART -1 and an occupancy of 50%.
70
OLEX2 Manual April 17, 2025
Another way is to select the molecule by double clicking on it and then clicking on the “atom
edit” button to modify the instructions in the context menu:
Prior to modification:
FVAR 0.38625
PART -1 ! the line to be modified
AFIX 6
O7 O 0.98336 0.46279 0.43296 11.00000 0.05000
O8 O 0.98510 0.56586 0.51732 11.00000 0.05000
C7 C 1.10254 0.28937 0.50910 11.00000 0.05000
C8 C 1.01760 0.44680 0.48150 11.00000 0.05000
C9 C 0.90473 0.72118 0.49622 11.00000 0.05000
C10 C 0.88189 0.83477 0.54498 11.00000 0.05000
AFIX 0
Only the occupancy must be modified, and that is achieved by addition 10.5 to the PART line:
Upon modification:
FVAR 0.38625
PART -1 10.5 ! modified line
AFIX 6
O7 O 0.98336 0.46279 0.43296 11.00000 0.05000
O8 O 0.98510 0.56586 0.51732 11.00000 0.05000
C7 C 1.10254 0.28937 0.50910 11.00000 0.05000
C8 C 1.01760 0.44680 0.48150 11.00000 0.05000
C9 C 0.90473 0.72118 0.49622 11.00000 0.05000
C10 C 0.88189 0.83477 0.54498 11.00000 0.05000
AFIX 0
71
OLEX2 Manual April 17, 2025
Click OK and run a refinement. If the resultant structure looks “strange” and some solvent atoms
are missing, type fuse. A proper view should be restored.
The refinement indicators have improved, but the ellipsoid of the carbonyl carbon looks
somewhat enlarged. In this case, it is a good idea to remove the idealized geometry constraint:
-double click on the solvent molecule to select it.
-type afix 0.
Run a refinement. Then position H atoms on this molecule and run another refinement:
72
OLEX2 Manual April 17, 2025
The solvent molecule looks much better and the overall refinement is stable. The R factor is
2.04%.
73
OLEX2 Manual April 17, 2025
[Solvent accessible voids can be displayed with Mercury. For an introduction to crystal porosity
I recommend “Crystal porosity and the burden of proof” by Len Barbour, Chem. Commun.,
2006, 1163-1168. But I digress.]
Let us proceed with the previous example, Disorder Example 3 with ethyl acetate. In this case,
the solvent is known, and thus the structure provides a good test.
1. Delete the ethyl acetate solvent molecule and run a refinement.
2. Go to Tools→Maps→Mask and click on the Mask button to run a computation with the
default parameters.
The program draws the solvent accessible voids in the GUI (unit cell drawing below)
and generates a numerical output (also available in file name-mask.log), the bottom
portion of which is copied here:
Void Vol/Ang^3 #Electrons
1 152.2 51.7
2 152.2 51.7
OLEX2 has identified two voids of volume 152.2 Å3 with 51.7 electrons in each. Ethyl
acetate contains 48 electrons and the estimated volume of the molecule is 124 Å3. For
comparison, PLATON (with the default settings) estimates the volume of each of the two voids
at 145 Å3 with 48 electrons in each. Similarly to this case, in my experience, PLATON’s
algorithm frequently works better than OLEX2’s, with electron counts, anyway.
74
OLEX2 Manual April 17, 2025
To proceed with the refinement, return to the Work menu (F5), expand the Refine menu,
mark the “Use solvent mask” checkbox and run a refinement. You can also elect to “Recompute
mask” by checking its box.
You can proceed to completion in this fashion, or you can select file name-mask.hkl from
Work→Refine→hkl file and uncheck the “Use solvent mask” and “Recompute mask” boxes.
It goes without saying that this type of refinement should be documented in the
experimental section of a publication.
75
OLEX2 Manual April 17, 2025
To remove the six Cr–C bonds and generate a dashed line to the
center of the coordinated Ph ring type
pim
To change the thickness of the C–H bonds select one of the C–H
bonds by clicking on it and type
brad 0.5
to make the C–H bonds 50% thinner. [For more on pim, brad,
and other commands see the “Alphabetical list of commands.”]
76
OLEX2 Manual April 17, 2025
Note that these labels differ from the green working labels that can
be toggled off by F3.
To position the labels so that they don’t overlap with the atoms, hold down the SHIFT key and move
the atom label with the left mouse button.
77
OLEX2 Manual April 17, 2025
To save a high-quality image, go to Tools→Images→Bitmap Images, enter the name of your file,
select the file type (png works well), resolution, and size, then click on the Go! button. A file with
the specified name and extension will be generated in your structure folder.
78
OLEX2 Manual April 17, 2025
Q: Can I show the minor disorder component with a faint color scheme?
A: Yes. Example: in the molecule below, positional disorder exists
2. Draw a box around all atoms of part 2 to select them. Right-click on any of the atoms and
“group” the selection:
79
OLEX2 Manual April 17, 2025
Showing all fragments (click on the “All” button next to the “0 | 2” button) results in this depiction
of the entire molecule:
3. Now for the heart of the matter. We want to see part 2 in faint, translucent color, but to
ensure that the molecule is still colored according to the atom types. Right-click on any atom of
the group and select Graphics→Draw style...:
80
OLEX2 Manual April 17, 2025
The resultant diagram with a faintly colored part 2 looks like this:
Of course, you can modify the colors of the Ambient front and Diffuse front to your liking and
adjust the blend and translucent percentages as you see fit.
81
OLEX2 Manual April 17, 2025
Open the Primitives menu by right-clicking on the plane and selecting Graphics→Primitives…
There are four options in the Primitives dialog box to toggle the display of the plane, centroid,
ring, and plane normal. The Ring and Normal options are illustrated below:
If you need the normal to point the other way, select the normal and type inv to invert it.
These dialog box commands can be executed from the command line. Select a plane and type
mask 1 [generates a plane]
82
OLEX2 Manual April 17, 2025
A clever feature of the plane normal is that it can be extended to an adjacent plane in order to
measure the distance between the planes as the length of a perpendicular to the second plane.
For example, if you have two mean planes (shown below) and you want to drop a perpendicular
from one to the other,
Select the plane with the normal (bottom one in the figure above) by left-clicking on it, then select
the top plane by left-clicking on it, and type
scalen
(short for “scale the normal”)
to produce this figure:
The length of the perpendicular (shown as a vector) is printed on the last line in the OLEX2 GUI:
Scaled to: 3.244
The length of the normal vector (in Å) can be set by the user. For example, to set the vector length
to 2 Å simply type
scalen 2
83
OLEX2 Manual April 17, 2025
For example, to change metal bonding for all metals in current structure you can do any of these:
conn $M 6 (sets max number of bonds)
conn $M 1.7 (sets bonding radius)
conn $M 1.7 6 (sets the bonding radius and the maximum number of bonds)
You can override the default bonding radii 'globally' by loading them from a file:
load radii bonding
This will keep them for the OLEX2 session and if needed you can load them when OLEX2 starts.
The file format is an "element R" on each line.
You can also adjust the connectivity table by adding custom bonds (select 2 atoms and type
addbond) and/or removing existing ones (select bond(s) and type delbond).
84
OLEX2 Manual April 17, 2025
85
OLEX2 Manual April 17, 2025
Go to the Home tab→Extension Modules, enter a valid e-mail address, select DrawPlus from the
dropdown menu, and click on Install Offline.
Follow the installation procedure and activate the license – you will get an e-mail from the OLEX2
system.
Next, get Mplayer (download the file corresponding to your system), unzip it in a folder, and set a
PATH system environment variable to point to this folder (go to Control Panel\System and
Security\System, choose Advanced system setting, Environment variable, choose Path, click on
Edit:
86
OLEX2 Manual April 17, 2025
You are almost ready to generate an animation. Note that the directory to your structure must not
contain empty spaces, for example:
C:\xray\my structures\structureA would not work because of the space in “my structures”, but
C:\xray\my_structures\structureA would work just fine.
The video will show a molecule rotated sequentially about three perpendicular axes. The movie is
created from an image series saved in subfolder “celrot” (short for cell rotation). If you want a
rotation about two axes the following settings may be used:
and look for “overlay_image” under drawplus in the “Edit parameters” window:
drawplus {
gview = ""
bond_mask = ""
bond_which = 1
group_colour_scheme = "original"
current {
style = "neptune"
scene = "neptune"
}
animation {
write_frames = True
make_movie = True
overlay_image = "default"
tmp_folder = ""
}
Change it to:
87
OLEX2 Manual April 17, 2025
overlay_image = False
and click OK. Note that if OLEX2 is restarted, the overlay image will return.
The final .mpg file can be used in a PowerPoint presentation.
88
OLEX2 Manual April 17, 2025
Structure matching
For the match operation to work properly, it is important to eliminate all the Q peaks prior to
running it. Thus, it is necessary to execute
kill $q
fuse
Note that ctrl-Q will not work because it hides the Q peaks rather than eliminating them.
It is possible to superimpose molecules based on five or more atoms. The atoms should be selected
in the respective MATCHing order, for example, by clicking on C1,C2,C3,C4,C5 in one molecule,
and C1a,C2a,C3a,C4a,C5a in another. Then type
match sel [to match the selected atoms].
89
OLEX2 Manual April 17, 2025
A B
Figure 1. a) Two superimposed symmetry-independent molecules of S8 shown with the "tubes"
drawing style; b) two superimposed symmetry-independent molecules of vitamin C shown with
the "ellipses and sticks" drawing style. One molecule is colored, whereas the other shows atomic
identities.
The commands below should be typed in the OLEX2 GUI; the text after “!” explains the action.
90
OLEX2 Manual April 17, 2025
Comment about ofileswap: The number that follows ofileswap specifies the molecule that
become active. The molecules are numbered from 0 onwards, C++ style. Thus, in this case the
active molecule is number 0 and the inactive molecule is number 1. To make the latter molecule
active, one types ofileswap 1. This is important if one overlays more than two molecules. In
the case of three molecules, ofileswap 2 makes the third molecule active.
91
OLEX2 Manual April 17, 2025
Q: Is there an easy way to label several symmetry-independent molecules (with the same
composition) similarly?
A: Yes. The following procedures work well on structures with two independent molecules, but I
have not tested it on structures with Z'>2. It is important to eliminate all the Q peaks prior to the
match operation. It is necessary to execute kill $q rather than ctrl-Q, because the latter will
only hide them.
Option B
The GUI alternative to the procedure in Option A is now available:
1. Label one molecule (let's call it molecules A) to your liking. Maybe you have O1,O2,C1,C2...
atoms with suffixless labels.
2. Select any atom in molecule A (by left-clicking on it).
3. Select any atom in molecule B (by left-clicking on it).
4. Go to Work→Naming, type the letter "a" in the Suffix box next to Equivalent Fragments (Z'>1).
5. Click on the Equivalent Fragments (Z'>1).
Option C
But perhaps you want your two molecules to have suffixes "a" and "b". [Since the atom names
cannot be longer than four characters in XL the procedure above may not work. This is because if
92
OLEX2 Manual April 17, 2025
you have a molecule with names such as C1a and want to mimic the other molecule with suffix
"b" you will end up with names such as C1ab.] Here is the correct procedure.
1. Label one molecule (let's call it molecule A) to your liking. Maybe you have O1,O2,C1,C2...
atoms with labels but no suffixes.
2. Select any atom in molecule A (by left-clicking on it).
3. Select any atom in molecule B (by left-clicking on it).
4. Now to label molecule B similarly with suffix "a" type
match sel -n=b [n stands for "name of the suffix"]
5. Select any atom in molecule A (by left-clicking on it).
6. Isolate this molecule by typing
uniq sel
7. Select the molecule with ctrl-a.
8. Add the suffix to the atom labels with
name sel -s=a [s stand for "suffix"].
9. Bring back the other molecule with
fmol
Option D
Suppose you have an organometallic complex with two identical ligands that you would like to
label similarly, such as two molecules in Section A. The procedure described in Options A-C are
valid, but the trick is to isolate each ligand first by disconnecting the central atom from it.
conn 0 Ti
[connects the specified central atom (here, Ti) to exactly 0 atoms; in this case, Ti will be
disconnected from all other atoms].
or, click on the central metal atom to select it and type
conn 0
Now you can follow any routine from Options A-C to label the atoms to your liking. Re-refine the
structure to restore connectivity.
Option E
OLEX2 allows for the facile use of “residues” as implemented in SHELXL. Suppose you have
two molecules A and B in the asymmetric unit and you want the atom labels in molecule B to be
exactly the same as in molecule A. This requires the introduction of RESI cards to the INS file.
The procedure is straightforward.
1. Select molecule A.
2. Think of a name for this “residue”, for example DCM, and type
resi dcm
This will put the selected molecule into residue
RESI DCM 1
in the INS file. Note that OLEX2 will automatically add the residue number.
3. Select molecule B and type
resi dcm
to put the second molecule into residue #2, demarcated in the INS file with
RESI DCM 2
93
OLEX2 Manual April 17, 2025
94
OLEX2 Manual April 17, 2025
The GUI alternative to ctrl-H: Work→Toolbox Work, click the green H button:
The GUI alternative to telph: View (or F6)→Quick Drawing Styles→click on the ellipsoid
button with the H symbol to show scaled H atoms. Click on the plain ellipsoid button to
return to the regular ellipsoid view.
95
OLEX2 Manual April 17, 2025
where 3 is the D…A distance in Angstroms, 120 is the D-H…A angle in degrees, and –t=C,N
will add additional atom types that can serve as donors and acceptors (the default atom types are
N, O, F, S, Br and Cl).
Q: How do I remove all the H atom constraints? My data are that good!
A: In the console, type
afix 0 $h
free uiso $h
and run a refinement. The first command removes the constraints, the second frees the thermal
displacement parameter.
Q: How do I select, e.g., all N–H distances? I have refined the H atoms freely, but want to
constrain (restrain) this distance?
A: Right click on an N–H bond, Graphics→Select the group(s). Then navigate to Tools→Shelx
Compatible Constraints Constraints (Restraints).
96
OLEX2 Manual April 17, 2025
This will display the constraint type on the H atoms. In the diagram below, there are three types:
43, 137, and 13.
RefineHDist
updates the H atom constraint type. In the diagram below, the types are now 44, 138, and 14.
Run a refinement.
Check the X–H distances.
Revert the labels to the “normal” mode with
labels -l
Method 2. Refine the structure using neutron X–H distances and geometric constraints.
NeutronHDist
Run a refinement and watch your X–H distances elongate. In the diagram below, the new C7–H
distances and idealized tetrahedral angles are inside the red rectangle.
97
OLEX2 Manual April 17, 2025
98
OLEX2 Manual April 17, 2025
Then just generate the report (Work→Report) and these parameters will appear in the selected
bonds/angles/torsions table.
For angles/torsions you can also specify the atom position using '$*' as a placeholder. For
example:
sel cif angles $* $O $*
will select only those angles with an oxygen at the vertex.
99
OLEX2 Manual April 17, 2025
If you have two identical molecules with labels such as C1, C2… and C1a, C2a... it is good idea
to sort them first by Suffix. Then the first molecule will have consistent labels.
One has a lot of control over sorting if the command line is used. For example
sort +szl
Will sort atoms by suffix, then mass, then label.
Q: How can I adjust the unit cell content in the UNIT card of the SHELXL INS file?
A: The command of choice is
fixunit [Z’] [Z’ must be supplied if different from 1]
example:
fixunit 3 [for the case with three symmetry-independent molecules].
fixunit 0.5 [for the case with a molecule on a special position].
Note that the number of formula units on the ZERR card in the INS file will be updated
accordingly.
Q: How do I reposition the molecules to be inside the unit cell and to show H-bonding
interactions?
A: The following two commands are handy:
compaq –a [to reposition molecules to form H-bonds]
move [to move the molecule(s) inside the asymmetric unit]
Q: I have a warning indicating that the structure should be inverted. How do I go about that?
A: The entire structure can be inverted by typing
inv [inverts the structure].
Other inverting commands include
inv –f [forces the inversion of the non-centrosymmetric structures]
100
OLEX2 Manual April 17, 2025
inv sel [inverts the specified molecule; inv -f can also be used for a selected molecule]
101
OLEX2 Manual April 17, 2025
Follow by defining your second plane. Then click on each plane to select it (the plane color will
change to green) and type
sel [when two planes are defined, sel will show the angle between the plane normals, the
distance between the planes’ centroids, and other geometric information].
102
OLEX2 Manual April 17, 2025
ctrl-r [to run a refinement; note that currently you can’t simultaneously have cards “WPDB -
2” and “MORE -1” in your INS file].
Define the planes or select atoms as you would for sel, but now type
esd [computes metric parameters similarly to sel, only with s.u.’s].
Thus, sel and esd are congeners and work in the same fashion, only esd will also produce
standard uncertainties if the structure has been refined with the MORE -1 card.
An advantage of this approach is that the centroids grow as any other atoms - so it should be easier
to create packing diagrams.
103
OLEX2 Manual April 17, 2025
In X-ray diffraction, the atomic scattering factor is described by f = f0 + f' + if". These
parameters are programmed into SHELXL for commonly used radiation sources such as Cu, Mo,
Ga, and Ag. Structural refinements based on data collected at other wavelengths require the use
of additional DISP cards in the instruction INS file.
There are several ways to incorporate the correct DISP instructions into the INS file.
One can use PLATON to calculate f', f", and mu values based on S. Brennan & P.L. Cowan
(1992) Rev.Sci.Instr., 63, 850-853.
In order to do that, start PLATON by clicking the “Pton” button in OLEX2, or launch PLATON
in any other way you find useful.
anom 0.30996
as illustrated below:
104
OLEX2 Manual April 17, 2025
Press the Enter button, and you will see the outcome for all elements down to uranium(#92).
PLATON will write an output file named “ANOM_Brennan_Cowan.lis” in your project folder.
This is an ASCII text file that looks like this:
Note: depending on the version of PLATON, operating system, whether you are in a PLATON
GUI mode, and other variations and personal computer setup, you may not get the
ANOM_Brennan_Cowan.lis file automatically created in the project folder. In such a case, either
launch PLATON from the command prompt or, if your output is displayed on your screen,
simply copy the outcome of the “anom [wavelength]” command into Notepad and save it
as a text file.
Next, assuming data were collected at 40 keV, to incorporate the necessary DISP commands
into the initial ins file (shown below with the default Mo radiation)
105
OLEX2 Manual April 17, 2025
Note that the default 0.71073 (Mo radiation wavelength) should be replaced with 0.30996, and a
DISP instruction for each element should be manually inserted between the SFAC and UNIT
instructions.
This covers all modifications needed in order to use synchrotron data collected at any
wavelength.
Q: What if you collected data at wavelengths for which data are not tabulated and incorporated
into OLEX2 or prefer to use values calculated by PLATON or use your own values?
A: Note that the dispersion parameters extracted by OLEX2 from tabulated materials and those
calculated by PLATON (and consequently by checkCIF during the validation procedure) are
106
OLEX2 Manual April 17, 2025
slightly different. If PLATON-calculated values are preferred, the user can let OLEX2 pull
dispersion values from a separate file.
Let’s say we would like to use a PLATON-generated ANOM_Brennan_Cowan.lis file (vide
supra). This file must be copied into the folder where the OLEX2 program is installed. In my
case it is
D:\OLEX2\OLEX2_1_3\OLEX2-1.3\etc\anom\
After the file is copied, rename it so that its name includes the wavelength used. In our case of 40
keV data, the file name is “0.30996” and so the list of files with data for different wavelengths in
the folder looks like:
Note that “0.30996” is the full file name: the “0” is the file name and “30996” is the file
extension.
Next, open the 0.30996 file in a text editor and add “#” before the first comment lines. Your file
should look like this:
--------------
# f', f" and Mu values based on:
# S. Brennan & P.L. Cowan (1992). Rev.Sci.Instr., 63, 850-853
That is all! From now on, anytime you change the wavelength in the ins file to 0.30996, OLEX2
will check its OLEX2-1.3\etc\anom\ folder to see whether a file with such a name exists,
and if so, OLEX2 will use it. Note that the file name can be given to within 0.01 Å of the
wavelength in the INS file. This means that if you change the wavelength in the INS file to, say,
0.315 Å, OLEX2 would still pull the DISP data from the “0.30996” file.
107
OLEX2 Manual April 17, 2025
Q: How do I generate the symmetry-related parts when my molecule occupies a special position?
A: Let’s say you have a structure with a molecule residing on a special position. To generate the
symmetry-related parts you can type
grow
However, if your asymmetric unit contains moieties located on both special and general positions,
grow will only complete the fragments on special positions. To correctly multiply the content of
the asymmetric unit (for example, when you have a complex on an inversion center and a solvent
molecule in a general position) two commands are necessary:
grow
grow -w
This sequence is equivalent to a properly executed command SGEN in program XP.
Q: How can I keep the Refine panel from closing after each refinement?
A: By default the panel closes. If you want to change this setting type
spy.EditParams(user)
and set the auto_close_settings_panel to False as in
auto_close_settings_panel = False
A: In the RES file remove the symm cards. Introduce a new atom at the origin, for example a
phosphorus, and pack the new atoms:
xf.au.newatom(P,0,0,0)
xf.endupdate()
pack P
It is likely the P atoms would have to be manually connected with addbond.
Q: How can I force OLEX2 not to rearrange lines in the RES/INS files?
A: To force OLEX2 to leave some lines as they are, include the lines between the following
REM lines:
REM OLEX2.stop_parsing
......
REM OLEX2.resume_parsing
Q: Is there a way to extract the RES and HKL file from the SHELXL-produced CIF file, for
example by running SHREDCIF from within OLEX2?
A: Yes. Close OLEX2. Launch Notepad as the Administrator and open the file
C:\Program Files\OLEX2-1.3\macro.xld
Save the file and re-open OLEX2 to get it to work. SHREDCIF will now run if you type
shredcif within the OLEX2’s GUI.
Or from the GUI, Work→Refine tool tab→Extract res/hkl will extract the .res and .hkl files into
the directory containing the CIF file.
Q: Can I transfer the settings from my installation of OLEX2 to a new computer with a fresh
OLEX2 install?
A: Yes. OLEX2 keeps its settings in the directory that pops up when you type this in the OLEX2
command line:
shell DataDir()
109
OLEX2 Manual April 17, 2025
If you copy the content to the corresponding directory to the other PC (make sure OLEX2 is not
running, as it will overwrite some settings on exit!) – the copies should have identical settings.
However, note that this does not apply to any extensions as they will need to be reinstalled (their
settings still could be copied).
Q: Can the thermal probability ellipsoid percentage be automatically reset to 50% every time the
program starts?
A: Yes. Type
emf
Paste the following lines at the end of the file that will open:
Restart OLEX2.
110
OLEX2 Manual April 17, 2025
will generate an atom with an “EXYZ” band. The band indicates that two atoms share the site.
Note that the atoms are now isotropic, as is typical in OLEX2 when disorder is introduced; see
the diagram below.
If the atom with the “EXYZ band” is double-clicked, the other atom from this site will be
displayed, as in the middle diagram above. Double-clicking either atom will “merge” them back
to the original position. Separating the atoms is convenient because hovering the mouse over
them will show the occupancy factors, see the rightmost image in the diagram above.
Q: How can an atom be placed at the center of a bond or a ring for the purpose of geometrical
calculations?
A: Select the atoms defining your object and type
cent
to generate an atom. It will be a carbon atom labeled Cnt#.
←A dummy atom Cnt3 generated in the middle of the P–C bond with
cent.
111
OLEX2 Manual April 17, 2025
This atom will be inserted in the INS file and refined should you run a refinement without
deleting it.
The more flexible option below allows one to specify an atom type and coordinates. In this
example a chromium atom will be generated at the origin:
xf.au.NewAtom(Cr,0,0,0)
xf.EndUpdate
112
OLEX2 Manual April 17, 2025
1. Prepare a metadata CIF file with the instrument and typical data collection parameters
metadata. Two examples (A and B) of my complete CIF files are below.
A. A complete CIF file for a Bruker APEX2 sealed tube Cu instrument with an APEX2 detector
called Bucky. You are welcome to copy it into a new ASCII file and modify it according to your
specifications.
#=========================================================================
#Single-crystal diffractometer Bucky,
#Molecular Structure Laboratory,
#Chemistry Department, UW-Madison
#Updated January 12, 2015
_diffrn_detector_area_resol_mean 7.9
_diffrn_detector 'charge-coupled device (CCD) area detector'
_diffrn_detector_type 'Bruker APEX II'
_diffrn_radiation_detector 'Bruker APEX II'
_diffrn_radiation_collimation '0.5 mm double-pinhole'
_diffrn_radiation_monochromator 'equatorially mounted graphite'
_diffrn_standards_number .
_diffrn_standards_interval_count .
_diffrn_standards_interval_time .
_diffrn_standards_decay_% .
113
OLEX2 Manual April 17, 2025
_exptl_absorpt_correction_type multi-scan
_exptl_absorpt_process_details
;
SADABS-2016/2 (Krause et al., 2015) was used for absorption correction.
;
_publ_section_references
;
Bruker-AXS (2016). APEX3. Version 2016.5-0. Madison, Wisconsin, USA.
Dolomanov, O.V., Bourhis, L.J., Gildea, R.J, Howard, J.A.K. & Puschmann, H.
"OLEX2: a complete structure solution, refinement and analysis program".
(2009), J. Appl. Cryst. 42, 339-341.
B. The following is a file for a Bruker microsource Mo Kα radiation source diffractometer with
an APEX2 detector called Gromit. Copy it into a brand new ASCII file and modify it according
to your specifications.
#=========================================================================
#Single-crystal diffractometer Gromit,
#Molecular Structure Laboratory,
#Chemistry Department, UW-Madison
#Updated August 9, 2016
_diffrn_standards_number .
_diffrn_standards_interval_count .
114
OLEX2 Manual April 17, 2025
_diffrn_standards_interval_time .
_diffrn_standards_decay_% .
_exptl_absorpt_correction_type multi-scan
_exptl_absorpt_process_details
;
SADABS-2016/2 (Krause et al., 2015) was used for absorption correction.
;
_publ_section_references
;
Bruker-AXS (2016). APEX3. Version 2016.5-0. Madison, Wisconsin, USA.
Dolomanov, O.V., Bourhis, L.J., Gildea, R.J, Howard, J.A.K. & Puschmann, H.
"OLEX2: a complete structure solution, refinement and analysis program".
(2009), J. Appl. Cryst. 42, 339-341.
115
OLEX2 Manual April 17, 2025
2. Place the files into the ETC\SITE folder of the OLEX2 install folder as follows:
3. Now, you are ready to use it for the final report. From the Work→Report module in OLEX
expand the Diffraction tool tab and from the drop-down menu select the instrument on which the
data were collected. In the example below, the data were collected on the instrument called
Gromit, and the location of the definition file is shown. If you are doing this for the first time,
you may have to locate the instrument CIF file from the “Definition file” menu.
3. After you prepare a merged CIF file using the button, the data
from the selected CIF (Gromit.CIF in the example above) will be incorporated in the final
structure CIF.
116
OLEX2 Manual April 17, 2025
117
OLEX2 Manual April 17, 2025
The sphere can be deleted by right-clicking on it and selecting Hide from the menu. If the option
is unavailable, you need to modify your options as follows.
Type
options
and file .options will be open in Notepad. Add a new line:
gl_selection = true
Save the file, restart OLEX2, and this problem should be resolved.
118
OLEX2 Manual April 17, 2025
Q: I can’t seem to display hydrogen bonds to atoms such as Se or I. What should I do?
A: OLEX2 should display hydrogen bonds with one of the ctrl-H toggles; at the very least, it
should display the bonds specified with HTAB commands in the RES file. If not, type
options
and add a line
interactions_to=N,O,F,Cl,S,Br,Se,I.
The .options file is an editable ASCII file located in the directory displayed with command:
shell datadir()
typed within the OLEX2 interface.
119
OLEX2 Manual April 17, 2025
A: You will find a solution if you google "mac retina compatibility mode":
https://support.apple.com/en-us/HT202471
Q: Why are my labels touching atoms in images when they looked well-separated when I
initially positioned them?
A: The problem with labels is that fonts are rendered as bitmaps and do not scale uniformly, so
they may occasionally end up in a slightly different position.
Q: Why is the Hooft y parameter calculated by OLEX2 is different from what I see in PLATON?
A: The value depends on the FCF source. You may want to change the source in
120
OLEX2 Manual April 17, 2025
To be FCF rather than OLEX2. Then it should be consistent with that in PLATON.
Q: When I click on the “Report” button, I get the usual tables, but after the last table, instead of
the short summary paragraph Table 1 is partially reproduced. It looks like the report table loop
starts repeating.
A: Make sure that Start of the report is 'Default' and End is "Footer".
Q: Is there a way to modify an individual bond? In general, when I modify a bond, OLEX2
modifies all bonds of the same type, but is a way to change individual bonds?
A: Right click the bond, then select Graphics, then Primitives... There is an option at the top of
the Primitives dialog labeled “Apply to:” From the dropdown menu, choose 'Individual
Atom/Bond' to modify only the selected bond.
121