- fit neutron reflectivity data to a model of a mixed monolayer of molecules

Adrian R. Rennie, Department of Physics and Astronomy, Uppsala University, Sweden

Documentation last modified 29 May 2018.


  1. Model of Interface
  2. Starting Parameters
  3. Installing, Downloading and Running the Program
  4. Fitting Sequences of Data Files
  5. Hints
  6. Multiple Contrast Measurements
  7. Examples
  8. Legal Notice
  9. Acknowledgement

1. Model of Interface

The model is intended to allow simple evaluation of the surface excess of a monolayer of adsorbate at an interface. In particular the program was designed to allow kinetics of changes in interfacial layer to be followed. Such experiments often generate a sequence of many data sets that are slowly changing. The choice of parameters that will minimise deviations between the model and the experimental data readily without manual intervention is thus important. In many cases the data will adequately described by a single layer (that is assumed to be uniform). Although a single layer could be fitted with many analysis programs these are normally parameterised by a scattering length density and thickness. In contrast, the simple model model used in mono uses the area per molecule at the interface and the thickness as fittable parameters. The scattering length density of the interfacial layer is derived from the scattering length of the molecules that initially form the layer (which is usually a known parameter).

The parameters that are used in the program are:

Parameter No. Name in program Symbol Unit
Scattering length density of medium with incident beam 1 Rho (top) ρT 10-6 Å-2
Scattering length density of substrate 2 Rho (sub) ρS 10-6 Å-2
Experimental Scale Factor 3 Scale FS None
Roughness between layer and incident beam medium 4 Rough ξa Å
Experimental Background 5 Bgd B None
Thickness of Interfacial layer 6 Thick t Å
Roughness between layer and subphase 7 Rough la ξl Å
Scattering length of component 1 forming interfacial layer 8 b1 b1 fm (or 10-15 m)
Number of molecules per unit area component 1 9 n 1 n1 Å-2
Scattering length of component 2 forming interfacial layer 10 b2 b2 fm (or 10-15 m)
Number of molecules per unit area component 2 11 n 2 n2 Å-2
Multiplicative factor for component 2 12 f f None

These units assume that the input data to be modelled is reflectivity as a function of momentum transfer, Q given in Å-1. If alternative units for Q are used, the values for the thickness, Area, roughness etc. will also need to be scaled. These parameters are related to the physical model shown in Figure 1.

Figure 1. Schematic diagram of the layer and parameters used in catamaran.

The advantage of using the number of molecules per unit area, n, is two fold. In many systems the surface excess, Γ, in molecules per unit area is related to the scattering length density, ρl, the area per molecule, Am, and the thickness, t of the interfacial layer by:

Γ = ρl t / ba = 1 / Am

Equation 1.

This program is calculating directly Γ for each component (n1 and n2) internally, in order to calculate the reflectivity for the interfacial layer, the program calculates ρl from the current parameters as:

ρl = (b1 n1 + f b2 n2) / t

Equation 2.

but the derivatives for the minimisation are calculated with respect to n1, n2 and t. This model assumes that the contrast from the single interfacial layer arises solely from the adsorbate molecules described by b, A and t without significant mixing with the adjacent bulk phases except as described by the interfacial roughness at each boundary. The additional factor f is included for ease of use but care needs to be taken in not trying to fit equivalent parameters. In some cases the number fraction (or mole fraction) of components 1 and 2 is well-defined, perhaps from the contents of a spreading solution for layers on a Langmuir trough, but the absolute amount (n1 and n2 are not known. In this case it may be useful to fix the value of f and let the values n1 and n2 vary together. This is done by setting the initial values to be identical and setting the step size for n2 to be -9 (the parameter number of n1). The step size for n1 should be set normally if it is to be minimised in a least squares fit (typical value 0.1). This permits the unknown surface excess to be determined if the composition is defined.

The values for the layer thickness, t and the surface excess of each component, n1 and n2, are constrained to be positive by the program.

In many cases during an experiment the surface excess changes but the thickness is relatively constant. There is then little correlation between the parameters Am and t. This definition of variables helps in the minimisation are correlated or inversely correlated parameters are difficult to determine. A further advantage is that the parameter Γ (or Am) is usually the quantity of primary interest for further interpretation and so obtaining directly the statistical uncertainy on this quantity is useful.

2. Starting Parameters

It is common that most of the parameters in the model can be defined and held constant in a fit from prior knowledge of the system that is to be studied. For example, adsorbed or spread monolayers are often found at the surface of aqueous solutions. The scattering length density of common bulk media are:

Material Chemical Formula Scattering Length Density / 10-6 Å-2
Air   0.0
Water H2O -0.56
Heavy Water D2O 6.35
Null reflecting water 8% D2O / 92% H2O (volume) 0.0

A simple means of determining scattering length densities for other materials from their chemical composition and density is provided at the NCNR, NIST web site. If a known material forms the surface layer, the scattering length of a molecule is readily found by summing the individual atomic scattering lengths of all the component atoms. Data for scattering lengths is available in tables and on the WWW. Some examples are provided below:

Material Chemical Formula Scattering Length / 10-15m (fm)
Water H2O -1.68
Stearic acid deuterated C18D35OOH 361.0
Stearic acid hydrogenous C18H35OOH -3.64
Oleic acid deuterated C18D33OOH 347.6
Oleic acid hydrogenous C18H33OOH 4.05
Dodecanol deuterated C12D25OH 248.6

The area per molecule is sometimes known (at least approximately) at the start of an experiment from, for example, the known amount of material added to a Langmuir trough or from a surface excess determined from surface tension measurements and Gibbs adsorption equation for soluble surfactants. In the first case if a volume, V of a spreading solution of molar concentration, c is added to a trough of area Atrough then the area per molecule is:

Am = Atrough / ( c V NA )

Equation 3.

where NA is Avogadro's constant.

The effect of roughness on reflectivity is calculated according to the method of L. Nevot and P. Croce J. Phys. Appl. 15, T61 (1980). This uses an approximation that is valid for values of the roughness that are small compared to the thickness of the adjacent layer. The roughness generally reduces the reflectivty by exp(-ξ2Q2/2). At a liquid interface the roughness is often dominated by capillary waves. For pure water at 25 C these are about 3Å. The interface roughness can be used to model a small extent of mixing of the interfacial molecules with solvent in a bulk phase but the calculations will not represent a physically valid model if the roughness is large.

3. Installing, Downloading and Running the Program

The programs catamaran and mcatamaran are available for download as a zip file ( with other software designed for both for general modelling of interfaces as well as for other specific structures. The program uses PGPLOT (T. J. Pearson, Caltech) graphics as modified by R. E. Ghosh from the Institut Laue Langevin, Grenoble, France. It is convenient to run the the program using the graphical user interfaces (GUI) provided by Prop and clickfit that are available from the Institut Laue Langevin. Although prop is installed, it is necessary only to copy clickfit and catamaran to suitable directories. It is possible to run catamaran from a command line if the enviroment variables for PGPLOT are set appropriately.

Further information about general aspects of running the program and the user interface is documented in the links provided in the previous paragraph and in the descriptions of a range of other reflectivity fitting programs which will not be repeated here. The data formats that can be read by catamaran are described on the www at

After starting the program and selecting appropriate options for the input data format, plotting and resolution the following interface will appear.

Figure 2. Interface to select parameters and initiate fits

The data are plotted and the calculated reflectivity is shown in a separate graphics window. It is interesting to note that the uncertainty (shown under % Deviation) in Am for this example fit is only 2.2% although alternate fit programs showed large uncertainty in thickness and scattering length density for the layer ( more than 20 %) because of the correlations of parameters. Parameters with a step size of zero are held constant during the least squares minimisation.

Figure 3. Result of a single fit showing the difference and the residual.

4. Fitting sequences of Data Files

It is necessary to read and to perform a fit on a single data set before trying to fit a sequence of data files. This will ensure that the program has reasonable starting values of the parameters. When a suitable fit to an initial dat file is ready it is simple to select a sequence by using 'Make Sequence' in clickfit. The following interface will then appear:

Figure 4. Interface to files for a sequence of fits.

In this example the name of the output file has been chosen as fitseq.csv. The files will be fitted using updated start parameters from the previous fit for each subsequent file (option 'u'). The range of files chosen to be analysed is selected by choosing accept in the next interface after selecting a filter (here 85*.aft).

Figure 5. Selection of files for a sequence of fits.

The results of fits are now in the comma separated variable file cataseq1.out. This can be readily input to plotting and spread sheet programs. It is useful to check that the fits have minimised by looking at the report variable in the third column (this will be zero if a minimum has been correctly found). All the parameters are reported and there is an estimate of the statistical uncertainty (in per cent of the parameter value) for those parameters that have been minimised in the fit.

5. Hints

Here are some ideas on how to use the program effectively and some examples of relations between parameters:

6. Multiple Data Sets

A common challenge in studies of mixed layers at interfaces is to determine the composition with respect to the different components. This is readily achieved using isotopic labelling in neutron reflection experiments with separate measurements made using, for example, deuterated and normal hydrogenous materials. In this case it is convenient to perform simultaneous fits to these data sets applying constraints with the known different scattering lengths. A version of the program called MCATAMARAN can read and fit simultaneously such data with different contrasts.

The graphical user interface (gui), Figure 7, for using mcatamaran is clickfit_m13 rather than clickfit13. The major distinction is that repeated data reads will result in multiple data sets being avaialble for plotting and fitting. To start with completely new data, it is necessary to 'Clear all data'. The parameters marked with an 'S' can be different for each data set while the others are the same and so provide consistency of the model for the various data sets. The fits to all data sets are shown in the plot window, Figure 8.

Figure 7. GUI for simultaneous fitting of multiple data sets.

Figure 8. Plot of fit to multiple data sets.

It is possible to constrain further parameters to be fixed, or to be the same in different data sets. Further documentation about the mfitfun program is available at

7. Examples

The following papers provide examples of studies where the program catamaran has been used to analyse data:

8. Legal Notice

The program is made available for non-commercial use without charge. The use should be acknowledged in any publication by reference to the author and this web page. No guarantee is provided that the results of the programs are correct. It is the reponsibility of the user to check all results. Download and use of the program represents acceptance of this condition.

The programs and this documentation are © Copyright of Adrian R. Rennie, 2018.


I am very grateful to Dr Ron Ghosh (ILL, Grenoble and Department of Chemistry, University College London) who has provided the FITFUN and clickfit software and co-operated in the development of the program.