Programs to fit neutron reflectivity data to a model of a monolayer of molecules partially mixed with solvent

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

Last modified 09 July 2015.

Programs yacht, jakt, myacht and mjakt


  1. Introduction
  2. Model of Interface
  3. Starting Parameters
  4. Installing, Downloading and Running the Programs
  5. Hints
  6. Legal Notice
  7. Acknowledgement

1. Introduction

This document describes four similar programs that can be used to fit neutron reflectivity data for adsorbed surfactant monolayers or spread films at a solution/vapour interface. The model consists of hydrophobic tails and hydrophilic heads that are hydrated by a number of solvent molecules. Two programs, yacht and jakt can be used for analysis of individual reflectivity curves or sequences of data. Another two programs myacht and mjakt are used to make combined fits to multiple data sets, for example with different contrasts of solvent or interfacial molecules. These programs are intended to complement the program mono that models the surface as a single layer without internal structure.

Programs yacht and jakt are parameterised slightly differently as regards the thickness of layers that are fitted. With yacht the thickness of the tail region is used as a parameter and in the program jakt, the total thickness of the interfacial structure is used. In both programs the thickness of the solvated head region is calculated from the volume of the head group, the number and volume of solvent molecules and the area per molecule at the interface. The choice of program is determined by whether the data (taking in to account the contrasts of the molecules) is likely to better determine the overall thickness or the tail region thickness.

These programs are designed to constrain the thickness and density of a two layer model to sensible physical values for molecules adsorbed or spread at an interface. For this reason, input is defined in terms of molecular parameters such as volumes, areas and number of solvating molecules. These are described in more detail below.

An overview of other programs that are designed for models of other systems, including solid/liquid interfaces, diffuse profiles and general multilayer and repeating structures will provide guidance as to whether other software may be more appropriate if you are dealing with systems that are not as described in the previous paragraphs.

2. Model of Interface

The model in the programs is shown schematically in Figure 1. The molecular parameters are used to define the density and composition of the two interfacial layers.

Figure 1. Schematic diagram of model that is calculated.


The parameters that are used in the programs are:

Parameter Number Set Name in program Symbol Unit
Scattering length density of medium with incident beam 1 S Rho (top) ρT 10-6 Å-2
Experimental Scale Factor 2 S Scale FS None
Roughness between layer and incident beam medium 3   Rough ξa Å
Experimental Background 4 S Bgd B None
Scattering length of tail of molecules forming interfacial layer 5 S b(tail) btail fm (or 10-15 m)
Volume of tail of molecules forming interfacial layer 6   V(tail) Vtail Å3
Scattering length of head of molecules forming interfacial layer 7 S b(head) bhead fm (or 10-15 m)
Volume of head of molecules forming interfacial layer 8   V(head) Vhead Å3
Scattering length of solvent molecule forming subphase 9 S b(sol) bsol fm (or 10-15 m)
Volume of solvent molecule forming subphase 10   V(sol) Vsol Å3
Thickness of interfacial layer (see note) 11   t tail or t tot ttail or ttot Å
No. of solvent molecules hydrating head group 12   n(sol) nsol None
Roughness between tail and head layers 13   Rough 1 ξ1 Å
Roughness between layer and solvent subphase 14   Rough 2 ξ2 Å
Area per molecule 15   A A Å2


In yacht and myacht parameter 11 is the tail region thickness, ttail, and in the programs jakt and mjakt, it is the total thickness of the interfacial layer, ttot.

The designation S in the column headed 'Set' indicates that the variable can be allowed to vary between data sets (or be held constant at a different value) in the versions of the programs that fit multiple data sets.

Relations between Parameters for the layers

As in most other programs the reflectivity is calculated using layers of defined thickness and scattering length density. The parameters that describe the interface structure are combined with the scattering lengths (that are often known and can be kept constant) so as to calculate ρ and t for two layers at the interface. The numner of solvent molecules in the head group region is assummed to fill the available space and is, nsol = (A thead - Vhead) / Vsol. The parameter nsol is an average value of the solvation number for the head groups and does not have to be an integer.

The thickness and scattering length density of the two interfacial layers are then calculated with the following equations that relate the defined parameters. ttail (or t1) is the thickness of the tail region (layer 1). This is related to the total layer thickness ttot and thead (or t2), the thickness of the head region (layer 2) by:

t2 = thead = ( Vsol . nsol + Vhead ) / A


t1 = ttail = ttot - thead

where A is the area per molecule at the interface. The scattering length density of the two layers is calculated as:

ρ1 = btail / (A ttail )

ρ2 = bhead + nsol bsol / (A thead )

The interfacial roughness are taken directly as input or fittable parameters.


The following constraints are applied to the values of the parameters:

If parameters are chosen that conflict with these constraints, they will be changed automatically when a calculation of reflectivity is attempted. As constraints on the parameters are applied, the derivatives calculated in the minimisation can be perturbed near the limits. If parameter values are close to the limits it may be useful to try further iterations with a small step size in order to find the best fit.

3. Starting Parameters

It is always helpful to have good values for star parameters when attempting to fit data. The program is intended to be used with many of the parameters used as fixed constants. For example, if data is placed on an absolute scale of reflectivity, the scale factor (parameter 2) can be held constant (i.e. with step size 0.0) at a value of 1.0. Many other parameters may be known from information about molecular size and density. The volume of a molecule or part of a molecule, V, is calculated simply as:

V = M / ( ρ NA)

where M is the molecular mass, ρ is the density and NA is Avogadro's constant. If ρ is given in g cm-3 and M in g mol-1 then the result in cm3 must be multiplied by 1024 to provide input to the program in the required units of Å3. The scattering lengths can be determined by adding the contributions for individual atoms. Neutron scattering lengths for atoms and particular isotopes are tabulated. A useful calculator for neutron scattering length density is available on the NIST www site.

Example of typical parameters that might be used for the solvent are:

Material Chemical Formula Formula Volume / Å3 Scattering Length / 10-15m (fm)
Water H2O 30 -1.68
Heavy Water D2O 30 19.15
Air matched Water D2O 30 0.0

In assessing suitable start parameters for the thickness, a guide may be obtained from the approximate formula suggested by Tanford (C. J. Tanford, J. Phys. Chem., 76, (1972), 3020-3024.) for the length in Ångström, l, of hydrocarbon chains of nc carbon atoms in surfactant micelles:

l = 1.5 + 1.265 nc

Surface structures can give rise to different packing to that in micelles and so values should be taken only as a guide. The difference between structures at a flat interface and in micelles is often a point of considerable interest.

4. Installing, Downloading and Running the Programs

The programs are available for download as Windows executables in a zip file ( For Macintosh computers, versions have been placed in Both these files contain other software designed 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 either clickfit or clickfit_m that are available from the Institut Laue Langevin. Although prop is installed, it is necessary only to copy clickfit_m and the programs to suitable directories. It is possible to run the programs from a command line if the enviroment variables for PGPLOT are set appropriately. The programs for fitting single data sets (yacht and jakt) should be run with clickfit as this will allow automatic treatment of sequences of data. Programs for combined fitting of multiple data sets (myacht and mjakt) need to be run with clickfit_m.

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 the programs are described on the www at

Figure 2. Interface to select parameters and initiate fits

The data are plotted and the calculated reflectivity is shown in a separate graphics window (Figure 3).

Figure 3. Result of a fit showing the differences and the residual.

Figure 4. Example of a single fit with mjakt using the RQ4 versus Q plot.

5. Hints

6. 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 program and this documentation is © Copyright of Adrian R. Rennie, 2015.


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.