CCL Home Page
Up Directory CCL README
spectrum.c takes vibrational frequencies and intensities and
plots a realistic-looking spectrum.  It is written in strict ANSI
C and should compile painlessly with

    cc spectrum.c -o spectrum -lm

Paul Soper                        All the usual disclaimers apply
DuPont Central Research     
P.O. Box 80328                                 Tel (302)-695-1757  
Wilmington, DE 19880-0328                      FAX (302)-695-2112  

            This program takes a set of transtion frequencies and
        intensities and produces a data set suitable for plotting.  By
        choosing a reasonable valueof HWHM you can create a 
        realistic-looking specturm.

            The input file should have one transition frequency and 
        intensity per line.

         -i     Input file name of transition frequencies and intensities
         -o     Output file of a plottable spectrum

        [-l]            Lineshape
                             0 (Lorentzian),
                             1 (Gaussian),
                          or 2 (Delta function - default)
        [-h]    HWHM (Half-Width at Half-Maximum).  Ignored if the
                          lineshape is the delta function
        [-sc]   Frequency scale factor.  Multiply all input frequencies
                          by this value.  (does not scale HWHM)
        [-sf]   Starting frequency of the output file
        [-ef]   Ending frequency
        [-fs]   Frequency step size.  Ignored if the lineshape
	                  is the delta function
        [-d]            Sort output by decreasing frequency
                          (default is by increasing frequency)
        [-n]            Normalize intensities to 100
        [-nf]   Normalization factor.  Divide all output intensities
                          by this value.
        [-wnf]          Write the normalization factor to a file.  (This allows
                          a factor to be shared among spectra for consistent
                          normalization.)  The name of the file is that of the
                          output file with \".nf\" appended.
        [-w]            After generating the spectrum from frequencies in wavenumbers,
                             write the ouput file with wavelengths in nanometers.

    Quantum mechanics programs such as Gaussian 92, DGAUSS, MNDO91, and MOPAC
    can calculate vibrational and other transition frequencies.  However, these
    are given as (frequency, intensity) pairs.  They have no width and cannot
    even be plotted directly as a delta function.  This program takes those data 
    and creates a more realistic spectrum which is suitable for plotting.
    The input file should have one frequency and one intensity per line, 
    separated by whitespace (spaces or tabs).  The output file has the same 

    This program uses only functions included in the ANSI C specification.

    Paul D. Soper
    Central Research & Development
    DUCOM 695-1757

Modified: Tue Feb 11 17:00:00 1997 GMT
Page accessed 7000 times since Sat Apr 17 21:32:19 1999 GMT