schrodinger.application.matsci.spectra module¶
Copyright Schrodinger, LLC. All rights reserved.
-
schrodinger.application.matsci.spectra.
convert_nm_and_wavenumber
(value)¶ Convert value in wavenumbers to nanometers or vice versa, the conversion is the same.
Parameters: value (int or float) – Number to convert Return type: float Returns: value converted from wavenumbers to nanometers or vice versa
-
schrodinger.application.matsci.spectra.
get_file_data
(filename)¶ Read the data from the file
Parameters: name (str) – The name for the spectrum. If none, it will be derived from the file name. Return type: tuple of (str, str, schrodinger.infra.table.Table) Returns: First two members of the tuple are the s_j_x_lable and s_j_y_label properties. The third member of the tuple is a Table object from the schrodinger.infra.table module. This object holds the actual data.
-
schrodinger.application.matsci.spectra.
generate_curve
(mytable, line_width, xprop, intensity, x_scale=1.0, uvvis=False, smin=None, smax=None, stride=None, function='Lorentzian', line_width_nm=False)¶ Generate a full curve for a series of frequency/intensity lines. The curve is generated by broadening the lines with Gaussian or Lorentzian curves centered on each line, and summing the curves together.
Parameters: - mytable (table.Table object) – table of raw data
- line_width (float) – the half-bandwidth to use when generating spectrum
- x_scale (float) – the x-axis scale factor
- intensity (str) – The label of the intensity property in mytable
- xprop (str) – The label of the x-axis property in mytable
- uvvis (bool) – True if this is a uv/vis spectrum, False if not (default is False, vibrational spectrum)
- smin (int) – The minimum x-value in wavenumbers.
- smax (int) – The maximum x-value in wavenumbers.
- stride (int) – Compute the intensity every stride values of x
- function (str) – The function used to broaden singular intensity values to a full spectrum curve. Default is Lorentzian, other option is Gaussian. Use the LORENTZIAN or GAUSSIAN module constants.
- line_width_nm (bool) – Linewidth is given in nm. Default is wavenumbers. Not used for non-UV/Vis spectra.
Return type: tuple of 1-D numpy arrays
Returns: (xvalues, yvalues) with xvalues running from smin to smax with Xn = X(n-1) + stride. Note that the X unit will be wavenumbers for all spectra.