# Title (CHARACTER*80)
Fluorapatite, Ca5F(PO4)3

NBEAM = 0! Neutron powder diffraction.
NBEAM = 1: Conventional X-ray powder diffraction with characteristic X rays.
NBEAM = 2! Synchrotron X-ray powder diffraction.

NMODE = 0: Rietveld analysis of powder diffraction data.
NMODE = 1! Calculation of powder diffraction intensities (plus simulation).
NMODE = 2! Total-pattern fitting where structure factors are fixed at Fc(MEM)'s.
NMODE = 3! The same as NMODE = 2 but refine |Fc|'s for relaxed reflections.
NMODE = 4! Conventional Le Bail analysis.
NMODE = 5! Le Bail analysis using a partial structure.
NMODE = 6! Individual profile fitting.

NPRINT = 0! Minimal output.
NPRINT = 1! Standard output.
NPRINT = 2! Detailed output.
NPRINT = 0

Select case NBEAM
case 0
   XLMDN = 1.5401: Neutron wavelength/Angstrom.
   RADIUS = 0.5: Radius/cm of the cylindrical cell.
   ABSORP =  1.0! Positive --> Density/g.cm-3 of the sample.*
   ABSORP =  0.0: Zero --> Neglect absorption.
   ABSORP = -1.0! Negative --> -(Linear absorption coefficient)*(radius).
   # * Calculated from the inner diameter, height, and mass of the sample.
case 1
   NTARG = 1! Ag K_alpha radiation.
   NTARG = 2! Mo K_alpha radiation.
   NTARG = 3! Cu K_beta radiation.
   NTARG = 4: Cu K_alpha radiation.
   NTARG = 5! Co K_alpha radiation.
   NTARG = 6! Fe K_alpha radiation.
   NTARG = 7! Cr K_alpha radiation.

   R12 = 0.5: R12 = Intensity(K_alpha2)/Intensity(K_alpha1) for K_alpha radiation, and R12 = 0.0 for Cu K_beta radiation.
   CTHM1 = 0.7998: (cos(2*alpha))**n for the monochromator.*
   # * alpha: Bragg angle of the monochromator. CTHM1 = 1.0 if no monochromator is installed.

   NSURFR = 0: Do not correct for surface roughness.
   NSURFR = 1! Correct for surface roughness by combining NSURFR = 2 and 3.
   NSURFR = 2! Correct for surface roughness with Sparks et al.'s model.
   NSURFR = 3! Correct for surface roughness with Suortti's model.
   NSURFR = 4! Correct for surface roughness with Pitschke et al.'s model.

   NTRAN = 0: Bragg-Brentano geometry (conventional divergence slit).
   NTRAN = 1! Bragg-Brentano geometry (automatic divergence slit*).
   NTRAN = 2! Transmission geometry (e.g., Guinier diffractometer).
   NTRAN = 3! Debye-Scherrer geometry.
   # * This slit gives variable divergence angles and a fixed irradiation width.
   
   Select case NTRAN
   case 1
      DSANG = 0.5: Angle/degree of the divergence slit at the minimum 2-theta.
      RGON = 185.0: Goniometer radius/mm.
      SWIDTH = 20.0: Irradiation width/mm for the sample.
   case 2
      PCOR1 = 0.5: Fraction of the perfect crystal contribution.
      SABS = 1.0: (Linear absorption coefficient)*(effective thickness).
   case 3
      XMUR1 = 0.0: (Linear absorption coefficient)*(radius).
   end select
case 2
   XLMDX = 1.5401: X-Ray wavelength/Angstrom.
   PCOR2 = 0.05: I0(perpendicular)/I0(parallel). I0: incident intensity.
   # Refer to D.E. Cox, "Synchrotron Radiation Crystallography," ed by
   # P. Coppens, Academic Press, London (1992), p. 233.
   CTHM2 = 1.0: cos(2*alpha)**2 for the crystal monochromator (see above).
   XMUR2 = 0.0: (Linear absorption coefficient)*(radius).
end select

Select case NBEAM
case 0
   # Real neutral chemical species, amounts of substances, plus '/'.  Names of
   # 'real chemical species' are recorded in the database file asfdc.  The
   # amounts of substances are used to calculate absorption factors.  When
   # magnetic scattering is observed, attach '*' to magnetic atoms if any,
   # e.g., 'Fe*' and 'Mn*'.
   'O' 12.0  'P' 3.0  'Ca' 5.0  'F' 1.0 /

   # Input LCMFF (= 0) and CMFF(I) (I = 1-7) for magnetic atoms attached with
   # '*'.  LCMFF and CMFF corresponds to l and seven coefficients in Eqs.
   # (4.4.5.2) and (4.4.5.3) in "International Tables," Vol. C (1999), p. 456.
   # The total number of these lines equals the number of magnetic atoms.
   # The following line is input for Fe2+ (l = 0):
   # 0 0.0263 34.960 0.3668 15.943 0.6188 5.594 -0.0119
   # '}' is unnecessary because the number of atoms attached with '*." has
   # already been known.
case default
   # Real chemical species plus '/'.
   # Refer to the data base file asfdc for chemical species to be input here.
   'O-'  'P'  'Ca2+'  'F-' /
   
   If NBEAM = 2 or NTARG = 3 then
      # Read pairs of anomalous dispersion corrections, Delta-f' and Delta-f''.
      # Input statements in RIETAN: READ(5,*) (DELTF1(J), DELTF2(J), J=1, NREAL).
      # NREAL: Number of real chemical species.
      # Neither '/' nor '}' is required bacause the number of input data (2*NREAL)
      # has been already known.
   end if
end select