Enter "reverse Monte Carlo" section of discus. This part of the program allows to "fit" a model atom configuration to measured diffuse scattering data. The difference between calculated scattering and observed scattering is minimised. Moves minimising this difference are always accepted, other moved only with a probability of exp (-diff**2).
(Nield et al., Acta Cryst A51 (1995), 763-771 for more information)
Valid commands at this sub level are:
@ ! Executes a macro (see main help) = ! Algebra (see main help) data ! read experimental data for RMC fit dese ! Deselects the atomtypes allowed for RMC moves/switches (-> sele) echo ! Echos a string, just for interactive check eval ! Evaluates an expression (see main help) exit ! Terminates the rmc sub level, returns to the main DISCUS level. help ! Gives on-line help for 'rmc' (see main help) rese ! reset RMC settings (i.e. reset plane counter) run ! start RMC fit save ! saves structure or intensity to given file sele ! selects the atomtypes allowed for RMC moves/switches (-> dese) set ! sets most RMC parameters show ! show current RMC settings system ! executes operating system command (see main help) wait ! Waits for user input (see main help)
This command reads the experimental data stored in <file>. The parameter "x-ray" / "neutron" selects what kind of scattering data are stored in the file. The second parameter is the wavelength which can be given as <name> (like cua1 ..) or as value (line 1.23). After the filename <file> the weighting scheme to be used can be specified. The parameter <wic> can take the following values:
"one" : w(Int) = 1.0 "squa" : w(Int) = Int**2 "sqrt" : w(Int) = SQRT(Int) "inv" : w(Int) = 1/Int "log" : w(Int) = LOG(Int) "isq" : w(Int) = 1/SQRT(Int) "lin" : w(Int) = Int
All other values for <wic> are taken as the name of a file containing the weights. This file and the data file have to be the same type ! Finally the three corners of the input data plane are given in the following order:
<e11>,<e12>,<e13> : hkl's of the lower left corner <e21>,<e22>,<e23> : hkl's of the lower right corner <e31>,<e32>,<e33> : hkl's of the upper left corner
The format of the input file is set by the 'set data' command. For more information about the supported data file formats see help for the 'set data' command.
By repeating the data command you can read several planes with exp. data for the RMC fit. To start again use the 'rese' command.
This command deselects atomtypes given either by <name> or <number> for the RMC moves, i.e. 'dese' those atomtypes which should not be moved or switched.
This command resets the RMC parameters. In this version only the 'plane counter' is reset and the 'data' command will start reading plane 1 again.
Start the RMC fit. After the run is finished, the following values are stored in the res[i] variables:
res[1] : last value of CHI2 res[2] : number of tried moves res[3] : number of accepted 'good' moves res[4] : number of accepted 'bad' moves res[5] : DELTA CHI2 average during the last run res[6] : DELTA CHI2 standard deviation during the last run res[7] : DELTA CHI2 maximum value during the last run res[8] : elapsed time / cycle in seconds
This command is for saving the calculated intensities or the resulting structure. Valid subcommands are:
This command saves the current structure to the file named <name>. The format is identical to the unit cell or structure file. Each atom is written in format A4,3(2X,F11.6),5X,F6.4. The filename can be created by an formatstring and one or more numbers -> filenames.
save "scat" saves the current computed intensities of plane <plane> in the following format: h,k,l,skal*(a**2+b**2)+back (= intensity).
Does the same as 'save scat,..', but the user can save also the resulting intensities of symmetric equivalent planes by giving the number of the sym.-transformation (1=data corresponding to input data).
This command selects atomtypes given either by <name> or <number> for the RMC moves, i.e. 'sele' those atomtypes which should be moved or switched during the RMC cycles.
This command allows to set most of the RMC parameters. The following "subcommands" are valid:
Valid subcommands are:
"aver" : sets the portion of the crystal to be used for <F> calc. "back" : controls if background is calculated during RMC cycles "const" : sets possible constrains for scaling factor/background "cycl" : sets number of RMC cycles to be calculated "data" : sets data type of input/output diffuse scattering files "dbw" : ignore/use temperature factor "disp" : sets output interval "log" : controls if "rmc.log" will be created during calculation "mdis" : sets minimal allowed distances between atoms "mode" : sets RMC mode (relaxation/switch atoms) "move" : sets sigma for generated RMC shifts "range" : sets Q-range of data used for RMC refinement "scal" : controls if scalingfactor is calculated during RMC cycles "sigm" : sets SIGMA for CHI2 calculation "sym" : controls if symmetric equivalent planes of input data should be used for RMC calculations.
This command sets the portion of the crystal, that should be used to calculate <F>. The variable <per> is given in %. The average structure factor <F> is calculated and subtracted from the overall structure factor calculated at the beginning of the RMC refinement. Starting from these values the contributions of the changes atoms during the RMC cycles are calculated and the structure factor adjusted. There is no check weather <F> changes significantly during the refinement.
To switch the use of <F> off, just set the value of <per> to zero. After setting the value of <per> the structure factor will be recalculated. This can also be used to recalculate the Fourier transform and the average from time to time during the RMC refinement if the average structure is changing.
This command controls if a background parameter should be calculated and used for the RMC fits. If the calculation of the background parameter is switched off its value can be set to <value> otherwise the default is 0. The second optional parameter allows to specify the plane the current value of <value> is set for. If the parameter <plane> is omitted, the value of <value> is set for ALL experimental data planes.
This command allows to constrain the scaling factor and background parameter of the two input data planes number <p1> and <p2>. If <p1> and <p2> are equal, no constrain is set, and the planes have their individual scaling factor/background. If two planes should have the same values for scaling factor/background, the constrain is set by <p1> not equal <p2>. The value of <p1> is the plane which should take the values for scaling factor/background of plane <p2>. Not, that the value of <p1> has to be smaller than <p2>.
If for example scaling factor/background for plane 2 should be the same as for plane 1, use the command 'set const,2,1'. If there are more than two planes to constrain use the command several times. Plane 1 to 3 can be constrained by 'set const,2,1' and 'set const,3,2'. to unconstrain the planes again type 'set const 1,1', 'set const,2,2' and 'set const,3,3'.
This command sets the number of RMC cycles to be done after the 'run' command.
This commands sets the data type of the experimental data files used as input for RMC and the corresponding output files. There are currently two file formats supported:
"nipl" : An ASCII file containing the Z-values in the following format: nx ny ! # pixels in x- and y direction xmin xmax ymin ymax ! dimensions in x- and y-direction (ignored) data ! ny rows of nx intensity values
"pgm" : PGM file (pbmplus package). In the current version, only ASCII PGM files are supported. To convert the binary files into the ASCII PGM version, use the 'pnmnoraw' program, which is part of the 'pbmplus' package.
This command sets the update interval of the output.
This command controls whether the Debye-Waller factor is ignored or used when the scattering amplitude is calculated. If no parameter <plane> is given, the setting affects ALL read data planes.
This command controls if in the RMC main loop the screen output should also be logged to the file "rmc.log". This file contains only the last output and should give the possibility to watch the programs progress because cached output redirection might not update often enough.
This command sets the minimal allowed distance between two atom types to the value of <dist> A. A generated move will only be accepted if the moved atom is not closer than <dist> to the others. The atomtypes to be selected can be specified by either name or number or all atomtypes can be selected by typing "all".
This command allows to select one of the three RMC operation modes:
"shift" : The selected atoms are displaced by a random move. The max. size of a move can be specified via "set move .." command. "swchem" : Here two atoms are selected at random and their chemistry is switched (if the atoms are selected via "sel" command). If your structure consists of only ONE atom type this mode will just waste computer time :-) "swdisp" : Here the displacement from the average structure of two selected atoms of the SAME type are switched. The mode can only properly work, if there are initial displacements generated e.g. by the "therm" command. "external" : The modification of the structure for each RMC move is done using an user supplied external subroutine. Check the source file 'extrmc.f' for details how to supply such a subroutine.
The second optional parameter specifies if the pair of the atoms to be selected for the SWCHEM and SWDISP mode should be restricted in any way. The following settings are valid, the setting "all" is the default, which will be taken if no second parameter is entered.
"all" : Any atom within the crystal can be chosen as second atom. "local" : Only atoms within +-1 unit cell from the first selected atom will be chosen. "slocal" : Same as "local" only the second atom must be on the same site within the unit cell as the first one. "site" : Atom on the same site in any unit cell are allowed as second atom.
Sets an user defined sigma for the generates moves. The created shifts are gaussian distributed. The default is a sigma of 0.2 unit cell. Note that the values of <sx>, <sy> and <sz> are given in unit cell units to speed up the RMC runs.
This command allows to set a range in Q which will be used for the RMC refinements. This can be useful if e.g. occupational disorder should only be refined based on the low Q part of the input data whereas the displacements should be refined using the complete diffuse scattering data set.
There are 3 ways to specify the Q range: "all" will use the complete input data set for the fit. The Q-range can be given as <qmin>, <qmax> ( in reciprocal A) or as hkl's (<hmin>,...,<lmax>).
This command controls if a scalingfactor should be calculated and used for the RMC fits. If the calculation of the scaling factor is switched off it can be set to the value given by <value>. If no value is given, the default is 1. The second optional parameter allows to specify the plane the current value of <value> is set for. If the parameter <plane> is omitted, the value of <value> is set for ALL experimental data planes.
This command sets the value for SIGMA. CHI2 is calculated by CHI2 = SUM (Fobs-Fcalc)**2/SIGMA**2
The value of SIGMA is important for the calculation. A too large value will allow nearly every move and a too small value will drive the fit in the nearest local minimum. The default value is 0.01 If the value of SIGMA is set to zero, only moved improving the fit will be accepted.
This commands controls the use of symmetric equivalent planes to the read data-planes for the RMC calculations. If this flag is set to "off", only the experimental data are used for CHI2 calculation, if the flag is "on" the symmetry of the measured data is taken iinto account.
Shows the current parameter settings of the RMC subsection. The following subcommands allow to select certain parameters of interest. The allowed subcommands are:
"all" : show all settings (same as calling 'show' without parameter) "atom" : show selected atoms, minimal distances, ... "data" : show information about experimental data "mode" : show general RMC calculation settings "rval" : show R-values for current refinement "sym" : show information about using symmetry information of read planes