Manuals/RMCProfile v4

From RMCProfile
Jump to navigationJump to search
RMCProfile User Guide
(Version 4.0)
cover picture


by
Matt Tucker
&
RMCProfile users

Introduction

RMCProfile is an extension of RMCA specifically for the study of disordered crystalline materials, although some of the new features may also be useful for studying amorphous materials. The main features are: fitting the Bragg profile directly; the incorporation of data based polyhedral constraints; swap moves for studying systems with site disordered - such as cation disorder or vacancies; and now magnetic structures can also be modelled.

In addition to a new program there is also a new methodology, which aims to supply the RMC algorithm with as much information as possible to ensure a physically sensible model. To this end you should aim to use RMCProfile to fit all aspects of the data simultaneously, i.e. the structure factor F(Q), the radial distribution function G(r) and the Bragg profile all at the same time. In this way the atomic configuration that RMCProfile produces will be consistent with the long and short range order information contained in the data; and be a true holistic representation of the structure.

As with any RMC method the configuration of atoms produced is not unique. This is not surprising when you consider we are using a model with ~104 atoms to describe a sample that contains of the order 1023 atoms. If the fit is consistent with all the data available then the configuration will have the characteristic of the sample being studied, and can be considered to be a snapshot in time of the atom positions. If RMCProfile is run again from scratch or for a length of time at equilibrium, then a different snapshot will be produced, where the atoms will have moved but within the constraints of the data being fitted. Many configurations should be collected to ensure a local false minimum has not be arrived at, as could be the case if the weighting of the data is not suitable. If the true minimum has been achieved then collecting many configurations can be a powerful tool for extracting the maximum amount of information for what is essentially a 1D powder technique. Recently this technique has even been used to extract dynamical information from the static RMCProfile snapshots.

The aim of this manual is to explain the practical issues of how to run the program and the various files you need and how to format them. For now there is no theory section, but the program is based on the RMCA code, so please read the RMCA manual for the theoretical background of the RMC method.

Installation

The main RMCProfile program is a single executable, so no installation is required. It can be put on a central area, such as C:/rmcprofile and this folder added to your path, or just put in the folder with the run files described below.

There are various other programs supplied as tools to help with preparation and analysis of the RMCProfile files. As with the main program most of these are standalone programs, however some are supplied zipped up in folders. In this case all the files in the folder need to be kept together and the program ran from its own folder.

The RMCProfile files

Below is an example list of the files required to run RMC profile and the resulting output file. In the following section each file will be described and its purpose explained.

You can see that a most of the files have a common ‘stem’ name, this has to be the case and is the name supplied to RMCProfile so it knows which files to look for. To run RMCProfile on this example you would start a command prompt window and move to the directory where the files are stored. Then if you have put the program in c:\rmcprofile you would type C:\rmcprofile\rmcprofile rmcsf6_190k If however the program is in the same folder with the example files or in you path you would type rmcprofile rmcsf6_190k

Both of these commands will display the running information to the command prompt window, this is useful for the initial setting up of a run, but if the program is to be run for a long time then it is useful to send the output to a file to be examined later. This can be done using the pipe command so in the first case above you would type C:\rmcprofile\rmcprofile rmcsf6_190k > rmcsf6_190k.log Now no information will appear in the command prompt window, instead it will be written to the file rmcsf6_190k.log.

sf6190kbank1conv29p42rmc.dat sf6190kbank2conv29p42rmc.dat sf6190kbank3conv29p42rmc.dat sf6_190k.gr

rmcsf6_190k.dat rmcsf6_190k.cfg

rmcsf6_190k.poly rmcsf6_190k.sf rmcsf6_190k.fs

rmcsf6_190k.bragg rmcsf6_190k.back rmcsf6_190k.hkl rmcsf6_190k.inst

rmcsf6_190k.amp rmcsf6_190k.his

rmcsf6_190k.braggout rmcsf6_190k.out

Data files

The first four files in the list are data files and they can have any name and extension, however .dat and .gr are good standard extensions to use. RMCProfile data files have the same format as previous RMC data files. They are simple ascii files where the first line contains the number of points in the file, the second line is a title line. These are followed by two columns where the first column is the x values and the second the y values of the data.

i.e.

2000 My data 1 10 2 20 ... ... Etc

The .dat file

This is main control file, from here everything you want RMCProfile to do is defined. An example is given below, the text after the ! explains what that line is for:

SF6_at_190K
0.0685951           ! number density
4.0 1.2 1.8         ! cut offs
0.05 0.1            ! maximum move
0.020               ! r spacing
.false.             ! whether to use moveout option
.false.             ! collect configurations 
1000                ! step for printing
2400 60             ! Time limit, step for saving
1 3 0               ! No. of g(r), neutron, X-ray
sf6_190k.gr
1 1500
0.0
.00165 .03942
      .23486
0.05
.false.
sf6190kbank1conv29p42rmc.dat
1 3000
0.
.00165 .03942
      .23486
0.01
.false.
.false.
sf6190kbank2conv29p42rmc.dat
1 3000
0.
.00165 .03942
      .23486
0.01
.false.
.false.
sf6190kbank3conv29p42rmc.dat
1 3000
0.
.00165 .03942
      .23486
0.01
.false.
.false.
0                       ! no. of coordination constraints
0                       ! no. of average coordination constraints
.true.                  ! whether to use a polyhedra restraint
4                       ! which restraint to use
.true.                  ! whether to use bragg intensities
gsas2                   ! Which gsas profile function to use
10 10 10                ! Number of unit cell in each direction
S                       ! Symbol for first atom (use spaces to !)
F                       ! Symbol for second atom(use spaces to !)
y                       ! whether to calculate from cfg at start
0.001                     ! weighting factor
.false.                  ! Convolute with profile function  
.false.                  ! Calculate the magnetic scattering
0.0 .false.              ! Probability of swap moves, auto-tune                 
                           percentage if greater than 0.0
1 2                      ! Atom types to swap during swap moves 


The first line is a title, then the number density of the configuration is given. The next line contains the closest approach cut-offs. These are not necessarily the atomic radii, since the crystal structure will define the nearest neighbours etc. The closest approach constraint is a powerful constraint and caution should be used to ensure the cut-offs are not set too high, as this may prevent the atoms moving enough to produce a true representation of the structure.

On the next line the r spacing to be used for histogram calculation is supplied, this number should be the same as the r spacing of any g(r) data supplied.

Then a true of false is supplied to define whether to use the move out option. This should be avoided for crystalline systems where the starting configuration should not have atoms that violate the closest approach cut-offs. It has been left in to be consistent with RMCA and for use with amorphous systems.

The next logical defines whether a configuration should be written at each print/summary cycle. This can be used to collect many configurations once a suitable equilibrium has been reached. It can also be used to collect configuration up to equilibrium for movie making purposes.

The number of generated moves between each print/summary statements is then supplied. This is not the same as accepted moves, since these depend on the data weighting and other constraints.

Then next two numbers are the total run time and time between saves (in minutes). The last number determines how often RMCProfile saves a copy of the files, this will determine how much time will be lost if the program or the computer crashes and how often the results are updated. Setting this number too low will put a heavy work load on the machine’s hard disk, typically for long runs 60 minutes is a good value to use.

On the following line the type and number of data sets to be used are defined. Currently three types of data are supported: neutron g(r)’s, neutron total scattering F(Q)’s and X-ray total scattering. The file format is described in the RMCA manual and for the time being only 1 X-ray data set is allowed and up to 5 neutron g(r)’s and F(Q)’s.

The information on the following lines in the .dat files depends on the data specified in the previous line. For each g(r) data set the following information is specified: the filename of the data, the first and last data points to be used, a constant to be subtracted from the data, the Faber Zimmer partial weighting factors (i.e. the components of ∑(cibi)2), the sigma weighting of the data and a logical determining whether RMCPfile should rescale the data to give the best fit.

The same information is required for each neutron and X-ray F(Q), but also an additional logical is required to define whether RMCProfile should calculate an offset of the data to give the best fit.

With all data types these rescaling and offset options should not normally be used, only when the fit seems to have a scale problem should this option be used and then only so the program can assess the rescaling required. The data should be corrected before continuing with RMCProfile refinements.

The next two lines in the .dat file define the number of coordination constraints and number of average coordination constraints. These tend not to be used for crystalline system so are set to zero in the example given above and will not be discussed here. If you would like to use them please refer to the RMCA manual.

The next two lines define the polyhedral restraint option, first a logical tells RMCProfile whether to use a restraint and only if this is set to .true. the following line contains the number of the restraint type to use. The allowed values and addition files required are described in the restraints section below.

The next seven lines in the example .dat file define the Bragg profile fitting options. The first line is a logical indicating whether to fit the Bragg profile, if this were set to .false the follow six lines would be omitted. Here it is set to .true. so it is followed by the code for gsas profile function to be used. At the moment only time of flight functions 2 and 3 are supported (so gsas2 or gsas3). More profile functions will be adding in the next release of RMCProfile. The following line defines the number of unit cells in each direction the RMCProfile super cell is composed of, this is explained in more detail in the following .cfg section. Then the chemical symbol for each atomic species in the configuration is listed one per line. The next line contains a ‘y’ or ‘n’ to tell RMCProfile to re-calculate the Bragg scattering from the .cfg each time the program is started. This should always be set to ‘y’ except when debugging runs and the time taken for the program to initialise is an issue. Finally the sigma weight for the Bragg profile is supplied.

The next line in the .dat file is logical to determine if RMCProfile will convolute the neutron F(Q) data with its profile function. This is only useful for time of flight neutron data and at the moment is at the ‘experimental’ stage. So for now it should be set to .false. and will not be described further here. It will hopefully be a functioning option in the next release of the program and if you are interested in this option please email me.

The next line tells RMCProfile if it should calculate the magnetic scattering if the system being studied has a magnetic component. In the example here the system is not magnetic so it is set to .false. I will describe what option should be specified if the system is magnetic in the magnetic scattering section below once it has been completed.

The last two lines in the .dat file tell RMCProfile the probability of swap moves and if not zero whether to auto tune this probability. If the probability is not zero then the next line contains the two atom types that are to be swapped. In the example .dat file above the first and second atom types have been specified, however since the probability is set to zero this line is not required but given by way of example. Typically RMCProfile just translates a single atom during each Monte Carlo step, however for systems with site disordered, such as cation ordering or vacancies this is not completely suitable. So a swap move enables RMCProfile to switch the position of one atom with another during a Monte Carlo step. The balance between how many swap moves and then how many translations are required to relax the surrounding structure is non trivial. So with RMCProfile there are two approaches, the first is trial and error by just setting the swap probability (probably the most common option), the second option is to set the autotuning to true. This will then try to alter the swap move probability to maintain a high level of accepted moves.

The .cfg file

The .cfg file contains the information about the supercell of atoms RMCProfile will use to fit the data. This file together with the .dat file are the minimum required files, RMCProfile can be run without data but not without a configuration of atoms to move. The format of this file is the same as with RMCA and consists of some header information about the number of atoms, the configuration dimensions, the atom types and then a list of the atomic positions (in fractional coordinates from -1 to 1). The order of the information and indeed the overall format is fixed so the easiest way to produce this file is to use the crystal program supplied with RMCProfile. A description of how to use this program is given later, if however this does not meet your needs then use it to produce a template .cfg file for your system and then modify this as you need to.

The .poly, .sf and .fs files

These three files are required since the flag to use a polyhedral restraint is set to true in the .dat file and then restraint 4 has been specified. At the moment there are 14 different types of polyhedral restraints available with different combinations of polyhedra. For the full list of options and the files required please see the polyhedral restraints section below. The .sf and .fs files contain a list of neighbours for sulphur and fluorine respectively, the neighbours file required, their file extension and how they are produced is also described in the polyhedral restraints section below.

The .bragg, .back, .hkl and .inst files

If the Bragg profile is to be fitted then these four files are required. The .bragg file contains the raw Bragg profile data to be fitted. The .back file contains the coefficients of the shifted Chebyschev polynomial used to fit the background in the GSAS refinement, at the moment this is the only background function allowed in RMCProfile. The .hkl file defines the h k l range of values of the reflections to be used in the fit up to a minimum d spacing range. Finally the .inst file contains the peak profile parameters used in the GSAS refinement. The format of these file can seen by examing the sample files provided. However the simplest way to obtain these files is to use the get_gsas_bragg program supplied with RMCProfile and described in the tools section below.

The .amp and .his files

These files are intermediate stores of the Bragg amplitudes and configuration histogram. They are produced every time RMCProfile saves its state at the interval set in the .dat, the .cfg file is also saved at the same time. Generally you do not need to worry about these files, however, if you make a new .cfg file then you must delete the .his file since RMCProfile will read the .his file in preference to the .cfg file and this will result in the new .cfg file being ignored and indeed written over the next time RMCProfile saves its state. The .amp file needs to be present if you set the bragg option ‘calculate from cfg at start’ to ‘n’, since this is the file RMCProfile will use (otherwise this file is ignored).

The .braggout and .out files

These two file contain the RMCProfile data fits and are also saved each time RMCProfile saves its state. Not surprisingly the .braggout file contains the fit to the Bragg profile and is a simple two column ascii file. The .out file contains the partial g(r)’s and F(Q)’s calculated from the configuration and then the fits to the total G(r)’s and F(Q)’s. The format of this file is not so straight forward since it contains more information but it is basically a many column ascii file. Both of these files can be examined using the rmcplotm program supplied with RMCProfile and described in the tools section below. Alternatively you could use your favourite plotting program as long as it can read ascii files.


Polyhedral restraints

As mentioned above there are 14 different polyhedral restraints available in RMCProfile. The large number is mainly due to the fact that each restraint is for a specific type of system rather than being a generic restraint definable by the user; this has been done for simplicity of coding, use of legacy code and for speed. The 14 options are listed below and a brief description of each follows.


  1. SiO2
  2. SrTiO3
  3. CD4
  4. SF6
  5. AlPO4
  6. PZT
  7. ZrP2O7
  8. ZrW2O8
  9. Na3PO4
  10. NaNO3
  11. KCN
  12. AgCN
  13. Zn(CN)2
  14. C4F8


The names are derived from the first system to use that restraint, but the restraint is suitable for any similar system. For example, the SiO2 restraint defines a set of linked tetrahedra so could be used for any system where the first two atom types form a network of linked tetrahedra.

The weight for each restraint is set in the .poly file. The weightings are simple multipliers, so a larger number means a heavier weighting. These weightings should be chosen carefully such that the data weighting is always higher, if this is not done then the restraint will become a constraint and the data will be ignored and the resulting configuration biased.

Please note none of the restraints support swapping moves of the atoms linked by the restraint at the moment. This feature will be added in a later release of the program if required.

The SiO2 restraint

This restraint defines a network of linked tetrahedra formed from the first two atoms in the configuration, as the name suggests it was first used for phases of silica. To use this restraint option 1 needs to be specified in the .dat file and .poly, .sio and .osi files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal Si-O bond distance to be used, the weighting for this bond restraint (i.e. 100) and then the weighting for the tetrahedral angle restraint (i.e. 300). The .sio file contains a list of oxygen neighbours around each silicon atom and the .osi file contains a list of the silicon neighbours around each oxygen atom, both of these files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.


The SrTiO3 restraint

This restraint defines a network of linked octahedra formed from the first two atoms in the configuration, as the name suggests it was first used for studying strontium titanate. Since the octahedra are formed from the first two atoms in the configuration it must be set up to actually represent TiO3Sr. In this way the same constraint can be used to study CaxSrx-1TiO3 or any similar system. To use this restraint option 2 needs to be specified in the .dat file and .poly, .tio and .oti files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal Ti-O bond distance to be used , the weighting for this bond restraint (i.e. 100) and then the weighting for the tetrahedral angle restraint (i.e. 300). The .tio file contains a list of oxygen neighbours around each titanium atom and the .oti file contains a list of the titanium neighbours around each oxygen atom, both of these files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The CD4 restraint

This restraint defines a configuration of unlinked tetrahedra formed from the first two atoms in the configuration, as the name suggests it was first used for the study of deuterated methane. To use this restraint option 3 needs to be specified in the .dat file and .poly, .cd and .dc files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal C-D bond distance to be used, the weighting for this bond restraint (i.e. 100) and then the weighting for the tetrahedral angle restraint (i.e. 300). The .cd file contains a list of deuterium neighbours around each carbon atom and the .dc file contains a list of the carbon neighbours around each deuterium atom, both of these files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The SF6 restraint

This restraint defines a configuration of unlinked octahedra formed from the first two atoms in the configuration, as the name suggests it was first used for studying the molecular crystal SF6. To use this restraint option 4 needs to be specified in the .dat file and .poly, .sf and .fs files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal S-F bond distance to be used, the weighting for this bond restraint (i.e. 100) and then the weighting for the octahedral angle restraint (i.e. 300). The .sf file contains a list of fluorine neighbours around each sulphur atom and the .fs file contains a list of the sulphur neighbours around each fluorine atom, both of these files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The AlPO4 restraint

This restraint defines a network of linked tetrahedra formed from the first three atoms in the configuration, as the name suggests it was first used for phases of aluminium phosphate. This differs from the SiO2 restraint in that the network consists of tetrahedra of two sizes: one for the AlO4 and one for PO4. To use this restraint option 5 needs to be specified in the .dat file and .poly, .alo, .oal, po and .op files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal Al-O bond distance to be used , the weighting for this bond restraint (i.e. 100) and then the weighting for the tetrahedral angle restraint (i.e. 300). The following line must contain the ideal P-O bond distance to be used, the weighting for this bond restraint and then the weighting for the tetrahedral angle restraint. The .alo file contains a list of oxygen neighbours around each aluminium atom and the .oal file contains a list of the aluminium neighbours around each oxygen atom. Similarly, the .po file contains a list of oxygen neighbours around each phosphorous atom and the .op file contains a list of the phosphorous neighbours around each oxygen atom. All of these neighbour files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.


The PZT restraint

This restraint defines a network of linked octahedra formed from the second, third and fourth atoms in the configuration, as the name suggests it was first used for phases of lead zirconium titanate (PbZrxTix-1O3). This differs from the SrTiO3 restraint in that the network consists of octahedra of two sizes: one for the ZrO6 and one for TiO6. To use this restraint option 6 needs to be specified in the .dat file and .poly, .zro, .ozr, tio and .oti files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal Zr-O bond distance to be used , the weighting for this bond restraint (i.e. 100) and then the weighting for the octahedral angle restraint (i.e. 300). The following line must contain the ideal Ti-O bond distance to be used, the weighting for this bond restraint and then the weighting for the octahedral angle restraint. The .zro file contains a list of oxygen neighbours around each zirconium atom and the .ozr file contains a list of the zirconium neighbours around each oxygen atom. Similarly, the .tio file contains a list of oxygen neighbours around each titanium atom and the .oti file contains a list of the titanium neighbours around each oxygen atom. All of these neighbour files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The ZrP2O7 restraint

This restraint defines a network of linked octahedra and tetrahedra formed from the first three atoms in the configuration, as the name suggests it was first used for phases of ZrP2O7. To use this restraint option 7 needs to be specified in the .dat file and .poly, .zro, .ozr, po and .op files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal Zr-O bond distance to be used , the weighting for this bond restraint (i.e. 100) and then the weighting for the octahedral angle restraint (i.e. 300). The following line must contain the ideal P-O bond distance to be used, the weighting for this bond restraint and then the weighting for the tetrahedral angle restraint. The .zro file contains a list of oxygen neighbours around each zirconium atom and the .ozr file contains a list of the zirconium neighbours around each oxygen atom. Similarly, the .po file contains a list of oxygen neighbours around each phosphorous atom and the .op file contains a list of the phosphorous neighbours around each oxygen atom. All of these neighbour files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The ZrW2O8 restraint

This restraint defines a network of linked octahedra and tetrahedra formed from the first three atoms in the configuration, as the name suggests it was first used for phases of ZrW2O8. This restraint differs from the ZrP2O7 version since one of the tetrahedral oxygens is non-bridging. To use this restraint option 8 needs to be specified in the .dat file and .poly, .zro, .ozr, wo and .ow files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal Zr-O bond distance to be used , the weighting for this bond restraint (i.e. 100) and then the weighting for the octahedral angle restraint (i.e. 300). The following line must contain the ideal W-O bond distance to be used, the weighting for this bond restraint and then the weighting for the tetrahedral angle restraint. The .zro file contains a list of oxygen neighbours around each zirconium atom and the .ozr file contains a list of the zirconium neighbours around each oxygen atom. Similarly, the .wo file contains a list of oxygen neighbours around each tungsten atom and the .op file contains a list of the tungsten neighbours around each oxygen atom. All of these neighbour files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The Na3PO4 restraint

This restraint defines a configuration of unlinked tetrahedra formed from the second and third atoms in the configuration, as the name suggests it was first used for studying the molecular crystal Na3PO4. To use this restraint option 9 needs to be specified in the .dat file and .poly, .po and .op files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal P-O bond distance to be used, the weighting for this bond restraint (i.e. 100) and then the weighting for the octahedral angle restraint (i.e. 300). The .po file contains a list of oxygen neighbours around each phosphorous atom and the .op file contains a list of the phosphorous neighbours around each oxygen atom, both of these files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The NaNO3 restraint

This restraint defines a configuration of unlinked triangular molecules formed from the second and third atom types in the configuration, as the name suggests it was first used for studying the molecular crystal NaNO3. To use this restraint option 10 needs to be specified in the .dat file and .poly, .no and .on files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal N-O bond distance to be used, the weighting for this bond restraint (i.e. 100) and then the weighting for the angle restraint (i.e. 300). The .no file contains a list of oxygen neighbours around each nitrogen atom and the .op file contains a list of the nitrogen neighbours around each oxygen atom, both of these files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The KCN restraint

This restraint defines a configuration of unlinked binary molecules formed from the second and third atom types in the configuration, as the name suggests it was first used for studying the molecular crystal potassium cyanide. To use this restraint option 11 needs to be specified in the .dat file and .poly, .cn and .nc files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal C-N bond distance to be used and the weighting for this bond restraint (i.e. 100). The .cn file contains a list of nitrogren neighbours around each carbon atom and the .nc file contains a list of the carbon neighbours around each nitrogen atom, both of these files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.


The AgCN restraint

This restraint defines a configuration of atoms linked in a chain structured formed from the first three atom types in the configuration, as the name suggests it was first used for studying the molecular crystal AgCN. To use this restraint option 12 needs to be specified in the .dat file and .poly, .agc, .cag, cn, .nc, .nag, and .agn files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal Ag-C bond distance to be used and the weighting for this bond restraint (i.e. 100). The following line must contain the ideal C-N bond distance to be used and the weighting for this bond restraint. The next line must contain the ideal N-Ag bond distance to be used and the weighting for this bond restraint. The .agc file contains a list of carbon neighbours around each silver atom and the .cag file contains a list of the silver neighbours around each carbon atom. The .cn file contains a list of nitrogren neighbours around each carbon atom and the .nc file contains a list of the carbon neighbours around each nitrogen atom. The .nag file contains a list of silver neighbours around each nitrogen atom and the .agn file contains a list of the nitrogren neighbours around each silver atom. All of these neighbour files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The Zn(CN)2 restraint

This restraint defines a network of linked tetrahedra formed from the first three atoms in the configuration, as the name suggests it was first used for phases of zinc cyanide. This differs from the SiO2 restraint in that the network consist of tetrahedra link by two bridge atoms, in this case carbon and nitrogen with zinc at the centre of the tetrahedra. To use this restraint option 13 needs to be specified in the .dat file and .poly, .zncn, .czn, .nzn, .cn and .nc files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal Zn-C bond distance to be used , the weighting for this bond restraint (i.e. 100) and then the weighting for the tetrahedral angle restraint (i.e. 300). The following line must contain the ideal C-N bond distance to be used and the weighting for this bond restraint. The next line must contain the ideal N-Zn bond distance to be used and the weighting for this bond restraint. The .zncn file contains a list of carbon and nitrogren neighbours around each zinc atom, the .czn file contains a list of the zinc neighbours around each carbon atom and the .nzn file contains a list of the zinc neighbours around each nitrogen atom. The .cn file contains a list of nitrogren neighbours around each carbon atom and the .nc file contains a list of the carbon neighbours around each nitrogen atom. Most of these neighbour files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7, however the .zncn file should be produced using the neighbour_list_two program since both c and n atoms need to be specified as neighbours.

The C4F8 restraint

This restraint defines a configuration of unlinked C4F8 molecules formed from the first two atom types in the configuration. This is a very specific restraint that defines a molecule of four carbon atoms arranged in a square with two fluorine atoms attached to each corner. Only bond distance restraints are applied to hold the molecule together. To use this restraint option 14 needs to be specified in the .dat file and .poly, .cc, .cf and .fc files supplied. The .poly file contains a title line which is ignored and the next line must contain the ideal C-F bond distance to be used and the weighting for the bond restraints (i.e. 100) and then the next line contains the ideal C-C bond distance to be used. The .cc file contains a list of carbon neighbours around each carbon atom, the .cf file contains a list of the fluorine neighbours around each carbon atom and the .fc file contains a list of the carbon neighbours around each fluorine atom. All of these neighbour files should be generated using the neighbour_list program supplied with RMCProfile and described in section 7.

The distance window constraint

The distance window constraint is an extension of the standard close approach constraint in RMC. In addition to specifying the closest two atom types can come you can also specify the furthest away two atom types are allowed to move apart. In this way you define windows or configuration space in which the atoms are allowed to move. When RMCProfile is first run a neighbour list of all the atoms that fit within the distance windows is generated and then remains the same unless deleted. This means that the window sizes can be expanded or reduced but the atoms being constrained stays the same.

To use the distance windows constraint nothing has to be changed in the .dat file instead a .dw file must be present. This file contains two lines, the first specifies the closest approach distance for each atom pair as in the .dat file (ie 1-1, 2-1, 2-2, 3-1, 3-2, 3-3,etc) and the second line has the furthest away distance in the same format. Once run RMCProfile will then write a .neigh file containing all the neighbour lists being used and a .neighlog file containing a history of what has been done. If you want to change the linkage or the configuration of atoms then the .neigh file should be deleted before running RMCProfile again.

Magnetic Structure modelling

The section will be written soon….

Tools

Together with the main program a range of small programs are also supplied as tools to help with RMCProfile. These tools fall into two main categories: those to help setup the RMCProfile files before the program is run and those to help analyse the output from RMCProfile. This section describes the programs supplied and how they can be used.

The graphical programs supplied have been compiled using Cygwin, this is a version of linux for windows. This should not concern you apart from the files in the program’s folder must all be kept together and an X server needs to be running before the graphics will be displayed. An X server handles the graphics for unix in the same way that windows does on most PC. There are many commercial versions available, such as Exceed and Xwin32, however if you don’t have one of these then I have supplied a basic version from the Cygwin distribution called basic_X_server and this should be sufficient for the RMCProfile tools.

convol_norm_new

This program is used to convolve the neutron structure factor data with the RMCProfile configuration box size function. This is necessary with all RMC methods to ensure a fair comparison of calculated to measured data. It is run on the command line and then asks for the information required, it also has options to multiple the data by a constant and subtract a constant in case the data needs to be rescaled for use with RMCProfile.

crystal

This program is used to generate the starting configuration of atoms for RMCProfile, it builds a supercell of a specific crystal structure and writes out a .cfg file with the correct format. The structure must be defined in P1 symmetry with the lattice parameter defined in a vector format. An example input file for the BCC structure of SF6 is shown below.

10   10   10
5.88677   0.00000   0.00000
0.00000   5.88767   0.00000
0.00000   0.00000   5.88767
 2
 2
0.00000   0.00000   0.00000
0.50000   0.50000   0.50000
12
0.25102   0.00000   0.00000

-0.25102 0.00000 0.00000

0.00000   0.25102   0.00000
0.00000  -0.25102   0.00000
0.00000   0.00000   0.25102
0.00000   0.00000  -0.25102
0.75102   0.50000   0.50000
0.24898   0.50000   0.50000
0.50000   0.75102   0.50000
0.50000   0.24898   0.50000
0.50000   0.50000   0.75102
0.50000   0.50000   0.24898
0

sf6_190k.cfg

The first line contains the number of unitcells required in each direction. Since this example is cubic the number in each direction is the same, however, for more complex systems the numbers should be chosen to produce a configuration box with approximately equal sides. This is due to the fact the RMCProfile calculated the partial radial distributions to a distance of the minimum box edge divided by two, so very different box edges will just produce wasted information.

The next three lines contain the unit cell parameters in vector form. Again for a cubic system or indeed any orthogonal system this is very straight forward with the diagonal of the matrix being a, b and c respectively. For non-orthogonal systems this is not so straight forward and the lattice_vectors program supplied with RMCProfile can be used to produce the vectors in the correct format for the crystal program.

The next line contains the number of different atom types. For each atom type the next lines then define the number of atoms of that time in the unit cell and then the fractional coordinates (0 to 1) for each atom. In the example shown their are 2 sulphur atoms and then 12 fluorine atoms.

The next line contains a zero, this defines the number of Euler angles and is left over from when the crystal program was used for molecular systems. The final line contains the name of the file you wish the configuration to be written to.

The crystal program is run in a command prompt window in two ways. The simplest way is to just type crystal on the command line and hit return (assuming the program is in your path or the same folder as the command prompt window) and then enter the information above, alternatively the information can be saved to a file, say sf6_190k.cfgcom, and then run by typing crystal < sf6_190k.cfgcom and hitting return (again it is a assumed here the sf6_190k.cfgcom is in the current directory or path).

data_rescale

This program can be used to rescale data to make it suitable for RMCProfile including adding a x offset if required. For example, if your data has the points defined at the bin edge and RMCProfile requires it to be defined at the bin centre then you could add or subtract half a bin width, whichever is appropriate. It is run at the command line and requests the information needed.

get_gsas_bragg

This program is used to extract the information required by RMCProfile from a GSAS refinement to enable the Bragg profile to be fitted. It requires that GSAS is installed on the same machine you are running it on. Again it is run on the command line in the same directory as the GSAS refinement files and requires at least the .EXP and required data file to be present. It will then run GSAS through once cycle of powpref and genles if this has not already been done. To run the program simply type get_gsas_bragg on the command line and hit return(assuming the program is in the current path or directory) it will then ask for the required information and produce the .bragg, .back, .hkl and .inst files. If the GSAS executable are not in C:\gsas\exe\ then their location needs to be entered after the program name before hitting return i.e. get_gsas_bragg d:\my_gsas_exe\.

lattice_vectors

This program outputs the lattice vectors required for the crystal program if supplied the lattice parameters from a GSAS refinement or elsewhere. As with the other programs it is run on the command line and asks for the required information.

neighbour_list

This program should be used to produce the neighbour files required if a polyhedral restraint is being used. Again it is run on the command file and will request the information required. The output should be given the extension described in the relevant restraint section above and should have the same ‘stem’ name as the other RMCProfile run files.

neighbour_list_two

This program is the same as the neighbour_list program apart from two surrounding atoms can be supplied at the same time as this is required by some of the polyhedral restraints

rmc_to_atomeye

This program can be used to convert RMCProfile configurations into the correct format to be displayed by the atomeye program described below. It is run on the command line and asks for the information required.

basic_x_server

As the name suggests this program provides a basic X server to enable the graphical programs supplied with RMCProfile to function. It is supplied zipped in a folder and should be unpacked and stored in its own folder. This is because it is actually a collection of programs from the cygwin distribution (www.cygwin.com). To run the program double click the rmc_startX.bat file. Windows security may ask for confirmation to run the program since it provide a service other programs can access, so please say yes to running it. A command prompt window will appear and will remain open as long as the X server is running, this can be minimised as it will not be need again.

This is a very cut down version of an X server and I would recommend you use a full version such as eXceed , Xwin32 or equivalent if you have them available.

rmcplotm

This a basic plotting program that can be used to plot information contained in the .out and .braggout file, produced by RMCProfile provided at least one save cycle has been completed.

Once again it is actually a collect of programs that must all be stored in the same folder. It requires an X server to be running and can be run in two ways. The first way is on the command line by typing c:\rmcprofile\tools\rmcplotm\rmcplotm.bat ‘stem name’, where ‘stem name’ is replaced by the RMCProfile run name .i.e rmcsf6_190k in the above example (again this assumes the program has be stored in c:\rmcprofile\tools\rmcplotm\ if not the correct path should be specified). The second way to run the program is to right click on the .out file, select ‘open with’ and then find and select rmcplotm.bat file. A dos prompt window will then open and can be used to select the required plot.

In the plot interface, left click allows you to zoom, right click resets the view and middle mouse button exits from cursor.

Atomeye

This program has not been written by myself or any of the other RMC developers, but is supplied with RMCProfile because I think it is very useful. It was written by J. Li at Ohio State University and can be used to display the RMCProfile configuration if they have been converted into the correct format using the rmc_to_atomeye program described above. For a full description of the program and to download the latest version if required please go to http://164.107.79.177/Archive/Graphics/A/

The version supplied here requires an X server to be running and again all the files should be stored in the same folder .i.e. c:\rmcprofile\toold\atomeye. It can then be run in two ways: e.g. the first way is on the command line by typing c:\rmcprofile\tools\atomeye\atomeye.bat ‘atomeye file’, where ‘atomeye file’ is replaced by the configuration converted by rmc_to_atomeye .i.e rmcsf6_190k.eyecfg (again this assumes the program has be stored in c:\rmcprofile\tools\atomeye\ if not the correct path should be specified), the second way to run the program is to right click on the ‘atomeye file’ file .i.e. rmcsf6_190k.eyecfg, select ‘open with’ and then find and select atomeye.bat file. A terminal window and a graphical window will then appear. If you select the graphical window and press F1 then a help file will be displayed in the terminal widow. For full instructions please look at the web address given above.


Example files

RMCProfile comes with a directory of example files, each example consists of a folder containing the folders gsas, data and rmc. The aim is to supply all the information required to get RMCProfile running on the example system. The gsas folder has the GSAS refinement and data to provide all the bragg profile information, it also includes a .cfgcom file containing the information to produce a starting configuration with the crystal program. The data folder contains time of flight neutron structure factor F(Q) data and the radial distribution g(r). These two folders provide all the information required to run RMCProfile and produce a configuration of the system. The rmc folder contains a completed run and all the output files illustrate what the result will hopefully look like and for you to modify to help run RMCProfile on your own data.

Example 1: SF6

SF6 is a disordered molecular crystal made up of SF6 octahedra arranged over the crystal lattice. Molecular crystals are often the most disordered crystalline systems and as can be seen from plotting the example data often show a large amount of diffuse scattering. The example data and files supplied are from the GEM diffractometer at ISIS and were collected at 190K. At this temperature the crystal structure has body centred cubic symmetry with one molecule on the corner of the unit cell and one in the centre. However this average structure puts the fluorine atoms of neighbouring molecules too close together, so on a local level the system tries to minimise the contact distance of these fluorine atoms by rotation of the octahedral molecules. So the system is termed a frustrated system with fluorine-fluorine repulsion driving the motion of the molecules. With the data supplied you should be able to start with the ideal ordered structure and use RMCProfile to model the local deviation within the long range average BCC structure.

The GSAS refinement

As with most RMCProfile modelling, the process actually starts with a GSAS refinement. A reasonable GSAS refinement is contained in the gsas folder and can be used to supply RMCProfile with all the information required to model the Bragg profile. It also contains a .cfgcom file with the BCC cell written out in P1 symmetry, at the moment I do not have a simple program to go from the GSAS atom positions to this P1 cell. However, GSAS supplies all the information required and it is a good exercise to try with your own system to ensure you start with a good understanding of the long range average structure. To extract the rest of the information RMCProfile needs run the get_gsas_bragg on the .EXP file and select histogram 3 to be extracted for fitting with RMCprofile.

At this point you should have 5 files for RMCProfile in the gsas folder, the .bragg, .back, .inst., .hkl and .cfgcom. Copy all of these files out of the gsas folder into the main folder using a common ‘stem name’ .i.e. sf6_190k.bragg etc.

Now in the main SF6 folder run the crystal program and enter the information in the .cfgcom file or use the pipe command (i.e. crystal < sf6_190k.cfgcom). This should produce a 10x10x10 supercell of the BCC structure that will be saved in a file called sf6_190k.cfg.

The total scattering data

The next stage is to prepare the total scattering data for RMCProfile. How to collect and produce total scattering data is beyond the scope of this simple example and so will not be covered here. The data folder contains 3 F(Q) files from 3 of the detector banks of the GEM diffractometer at ISIS. It is quite common to combine these into one data set but here I have left them separate to illustrate RMCProfile can fit many F(Q) data sets simultaneously. The data is scaled from -1 to 0, so need to be multiplied by 0.27593 (the sum of the neutron partial scattering factors) to be suitable for RMCProfile. The data also needs to be convolved with the RMCProfile configuration box function to enable a fair fitting comparison. Both of these operations can be performed using the convol_norm_new program. For a 10x10x10 super cell the truncation distance is 29.42, so you can run the program to produce the new files or use the prepared files *conv29p42rmc.dat supplied. You should reproduce at least one of these files to check you follow the procedure and know how the programs work.

Once you have produced all the data files, copy them into the main SF6 together with the sf6mcgr190k.dat file, which contains the Fourier transform of the F(Q) files the G(r). Once again the preparation of the G(r) will not be described here since it is normally obtained during the preparation of the total scattering data.

The RMCProfile files

The next file to prepare is the main .dat file, this can be copied from the example in section 3.2 or from the rmc folder. You should check that the names of the data files in the .dat file match the names you have chosen. Finally the file for the polyhedral constraint needs to be prepared and since the SF6 molecules form a octahedral polyhedral restraint 4 can be used. The .poly file can be copied from the rmc folder or produce with your favourite text editor, the format is describing in section 4.4 and the ideal S-F bond should be set to 1.56. The .sf and .fs files can be produced using the neighbour_list program, when asked for ‘a maximum distance’ enter 1.9, since this is bigger than the nearest S-F distance but not far enough to include the next nearest neighbours. When producing the .sf file the program should report that it has found an octahedra and that the average coordination number is 6, if this is not the case something is wrong with the .cfg file.

You should now have all the files you need to run RMCProfile on this system as described at the start of section 3. To run the full refinement using a 10x10x10 super cell will take many hours, so if you don’t want to wait this long check things run and that the χ2 values start to reduce, then once you are happy everything is working you can copy the final .cfg file from the rmc folder to get an idea of a final set of fits.

Other things to try

Once you are happy that RMCProfile is correctly set up and you can get it running you might like to try one or more of these suggestions: 1) Try producing a smaller configuration say 4x4x4 and the appropriate total scattering data. This will run quicker and demonstrate the minimisation process, although the configuration may not be big enough to give a good representation of the thermal distribution of atoms. 2) Try fitting just a subset of the data, i.e. just the Bragg profile or Bragg profile and g(r) etc. Again this will run more quickly and once χ2 seems to be approaching a minimum you could addanother data set back in. 3) Try replacing the polyhedral restraint with a distance window constraint. This should produce a very similar final configuration but will illustrate the different functionality. 4) Obviously the best thing is to try your own data if possible and just use the .dat file as a template.

Example 2: SrTiO3

Strontium titanate has the ABO3 perovskite structure and as such its crystal structure is made up of a network of corner sharing TiO6 octahedral with strontium atoms in the interstices. The example data and files supplied are from the GEM diffractometer at ISIS and were collected at 5K. At this temperature the crystal structure is tetragonal with the octahdera tilted from their ideal positions in the cubic high temperature structure. With the data supplied in the three folders (gsas, data and rmc) you should be able to start with the ideal ordered structure and use RMCProfile to model the local deviation within the long range average tetragonal structure. Unlike SF6 this system does not have a high level of local disorder, so the final configuration will be quite ordered in comparison. The procedure required to run RMCProfile on this data is the same as described in section 8.1 but obviously substituting the SrTiO3 files where required.