- The molecule formula (ideally a z-matrix or pdb file)
one or several diffraction data sets. They are in the Fox/examples/tutorial-cimetidine directory.
If you have all this, you can launch Fox !
Create your Crystal Structure
From the top menu Objects, create a new Crystal Object.
Click on the Crystals tab to see your created crystal (in recent versions of Fox it will be selected automatically).
You can already display your crystal structure: in the Crystal, use the Display menu-> 3D Display. You can use the mouse to change the display:
- drag with the left mouse button down to change the orientation o drag with the middle button to change the distance/aspect ratio. You can also use the '+' and '-' keys to change the distance, if you have a two-mouse button.
- right-button click will display a popup menu to update the Crystal Display when you have changed some parameter (sometimes the program will try to do it by itself).
You should give your Crystal a name ("Cimetidine" or "My beautiful Molecule", "Napoleon 1er"...) in the Field just after Crystal (where it is written Change Me!). This will be useful to choose your Crystal Structures thereafter (note that if you have several Crystal structures, they must all have different names).
- At this point if you know the unit cell and spacegroup, you could enter them. In this tutorial we will determine these from the powder pattern
You're done with the Crystal structure. You can (should) save using the top Fox menu File->Save. This will save everything as an xml file, using a specific format to ObjCryst++/Fox.
Create the PowderPattern object (X-Ray)
Go to the next tab Powder Diffraction, and then use the top 'Object' menu to create a PowderPattern object. You can give this one a name, e.g. "Cimetidine X-ray"
You can import the X-Ray data using the PowderPattern object 'Data'->'Import Fullprof Pattern', and select the cime.dat file in the Fox/example/tutorial-cimetidine directory.
You can display the powder pattern using the Pattern->Show Graph menu. You can click & drag with the left button to zoom in (double-click to unzoom). You can right-click on the graph to update the graph if you have changed manually a parameter. The coordinates (2theta, intensity of the mouse pointer is displayed at the bottom).
Now would be a good time to set the correct wavelength: just input 1.52904 in the wavelength field. This is synchrotron data, so you should put ~0.98 in the linear polarization rate field.
Auto-indexing: unit cell determination
In the powder pattern graph, use right-click to open the contextual menu, and select Find Peaks. You can them zoom in with the mouse using a left-click (hold) & drag. If a peak looks supspicious, you can right-click on it and use Remove Peak. Alternatively, you can also Add Peak. In this example all peaks should be fine.
Then right-click again on the powder pattern graph, and choose Index !. The indexing window opens.
The simplest way to index is to trust Fox, and click the Find Cell ! button, which will launch the default search mode, using a range for the unit cell volume estimated from the found peak positions. Fox uses the dichotomy algorithm, and if no solution with a significant score (M20) is found, it will try again with 1, 2, 3 spurious peaks.
After clicking Find Cell ! in the Quick tab, a single solution is found in less than 1s, with a M20 score of approx 130, and a cell volume of 1280 cubic Ansgtroems. This is the correct cel for Cimetidine.
If you had doubts, you could check the option Continue exploring after solution, which would return more solutions, but the best would still be the same
Now, in the indexing window (Fox cell Explorer) click on the button with the label Choose crystal to apply selected cell to and choose the crystal structure you have entered. Then when you click on a unit cell in the list of solutions, the parameters will be copied to the corresponding crystal object.
Crystal structure description
- In the main Fox window, go back to the crystal structure description.You will now describe the contents of the structure.
Generally before adding atoms you must first create the atom types, what is called ScatteringPower in the program (see the PbSO4 tutorial for that). As we will be importing the molecule structure from a z-matrix file, this will be done automatically.
Creating the Molecule: the molecule is described using a list of atoms bound together by a list of bond lengths, bond angles and (more rarely) dihedral angle restraints. You can create one empty molecule, and add atoms and restraints manually, but the simplest way to input a molecule is to import its structure from a Fenske-Hall Z-matrix. A Z-matrix describes all atom positions from a first atom and bond distance, bond angles and dihedral angles with the other atoms (see the WikiPedia entry for z-matrices for a description). Use the Crystal Scatterer-> Import Molecule from Fenske-Hall Z-matrix menu. FOX can import Fenske-Hall Z-matrices, but it is possible to transform a wide range of molecule structures to this type of files using e.g. openbabel (http://openbabel.sourceforge.net). To do this just use: babel -ipdb cime.pdb -ofh cime.fhz -d (the -d option will get rid of the hydrogens). You can see the cime.pdb and cime.fhz files in the example/tutorial-cimetidine directory.
Check Restraints within the molecule: look at the list of restraints or, look at the displayed 3D structure if there are no extra or missing bonds (Fox tries to add bonds depending on interatomic distances and tabulated atomic radius, so it can be wrong). Normally it should be OK.
- Fox will automatically decide which bonds are free torsion angles for the Global Optimization.
Finally, in the Crystal description, there is an option near the top Use Dynamical Occupancy Correction: you should select No - this is only useful if atoms are expected to be on a special position, or if one atom will be overlapping with another (e.g. for corner-sharing between polyhedra). Generally the dynamical occupancy correction should be off for organic structures where atoms are not on special positions.
Once you have done this, save again your work in an xml/xml.gz file using the top File menu.
Powder pattern: background and crystalline phase, Le Bail fit
- Go back to the powder pattern tab, in the main Fox window.
Then add the background phase, using the Phases->Add Bayesian Background (automatic) menu. This will automatically estimate a reasonable background.
Now add the Crystalline phase, using the Phases->Add Crystalline Phase, which will prompt you to choose one crystal structure available (the one you have already defined) from its name. (NOTE: for multi-phased powders, you can add several crystalline phases).
Right-click in the powder pattern graph window, and choose Fit profile + Le Bail extraction. The profile fitting window opens, click the button Le Bail + Fit Profile ! which will perform a Le Bail fit and refine the profile parameters as well as the unit cell. You can click again once it is finished to lower again the Goodness-of-Fit.
Maybe you should save again now ?
In the Profile fitting window, click on the Spacegroup Explorer, and click the button Try all possible spacegroups - Le Bail only. Fox will calculate the Rwp and goodness-of-fit for every space group compatible with the found unit cell. After this is done, Fox will list the spacegroups for which the goodness-of-fit is at most two times the best obtained.
In this case, the best fit corresponds to the spacegroup P 1 21/c 1, which is also the choice with the largest number of extinct reflections - it is the right choice in this case.
Go to the Crystal description in the main Fox window, and enter P 1 21/c 1 for the spacegroup. You can update the 3D view to see the effect of the symmetry.
Once this is done, you should close the profile fitting window (otherwise Fox will remain in Profile fitting mode,...).
Finally, for a global optimization it is not necessary to use the entire powder pattern, so put 0.25 in the "max sin(theta)/lambda" in the powder pattern parameters. (this means Fox will not use diffraction data beyond a 2 Angs
- troem resolution, which is enough for structure solution in real space, and much faster).
Global Optimization object
Go to the last tab of the Fox window 'Global Optimization', and use the main window's 'Objects' to create a new Monte-Carlo Object.
Then we need to tell the algorithm what it is going to optimize (which objects), so we need to declare the powder pattern and the Crystal Structure. So use the 'Opptimized Objects '->'Add object to optimize' menu, and add both objects (one at a time). (This is where you see it is useful to set meaningful names for all objects). It will automatically use the powder pattern's Chi2 as a criterion for convergence.
OK, you're all set ! Normally, you should never change the choice of algorithm (Parallel Tempering is better than Simulated Annealing), nor the temperature or displacement amplitude parameters. They are supposed to work with any structure and combination of data. Now would be a good time to save using the top 'File'->'Save' menu.
Choose the number of trials to use per run: in this case 1 million trials will be enough.
there are several options, among which Automatic least squares refinement: you should choose "every 150000 trial,s and at the end"
Now you can Launch the Optimization, using the 'Run->Multiple Runs' menu of the Monte-Carlo object. If you have left the 3D Crystal structure window and the powder pattern graphs opened, they should be live-updated. Convergence is moderately fast in this case, on average 600k to 1 million trials, which should take up to a few minutes, depending on your computer speed.
You can follow the progression of the Chi2 statistics, Goodness Of Fit (Chi2/nbobs), Rwp and Rp in the powder pattern object, and also in the Tracked data window which follows the evolution of the Chi^2. But there's nothing better than the eye to tell whether the fit is good or not.
- When satisfactory, use the menu to stop the optimization. You can compare to the optimized results in the fox examples.
If you have done a "Multiple Run", you can browse the solutions using the Solutions menu. Click on any solution and it will automatically update the display of the structure and powder pattern(s). You can then choose whichever looks better.
If you have chosen to run automatically least squares, the solution will be reached when Chi2 falls below 105.
You can also use the Run/Stop-> Least Squares Fit to run manually least squares once the optimization has been stopped.
Last step: export the solved crystal Structure
You can export the atomic coordinates by going to the Crystal structure, and use the 'File'->'Save as text' menu. this will save a file with all atom fractionnal coordinates and occupancies. You can compare the structure obtained with the one already refined in the fox example directory.
You can also export to a CIF file from the same menu.
- From the powder pattern description in the main Fox window, you can also export both the structure and the diffraction data for Fulprof, using the "Export" menu in the powder pattern description.