schrodinger.application.matsci.bandshape_utils module

class schrodinger.application.matsci.bandshape_utils.BandshapeSpectrumFile(data_file_name, spm_file_name)

Bases: object

Manage a bandshape spectrum file.

COLUMNS = OrderedDict([('r_j_Excitation_Energy_(eV)', 'Excitation Energy (eV)'), ('r_j_Intensity', 'Intensity'), ('s_j_Symmetry', 'Symmetry')])
DEFAULT_TRIM_PCT = 5.0
ENERGY_KEY = 'r_j_Excitation_Energy_(eV)'
ENERGY_TITLE = 'Excitation Energy (eV)'
EXT = '.uvv.spm'
HEADERS = OrderedDict([('s_j_spectrum_type', 'Electronic Transition w/ Bandshape'), ('s_j_x_label', 'r_j_Excitation_Energy_(eV)'), ('s_j_y_label', 'r_j_Intensity')])
INTENSITY_KEY = 'r_j_Intensity'
INTENSITY_TITLE = 'Intensity'
SPECTRUM_KEY = 's_j_spectrum_type'
SPECTRUM_TITLE = 'Electronic Transition w/ Bandshape'
SYMMETRY_KEY = 's_j_Symmetry'
SYMMETRY_TITLE = 'Symmetry'
X_ALIAS = 'r_j_Excitation_Energy_(eV)'
X_KEY = 's_j_x_label'
Y_ALIAS = 'r_j_Intensity'
Y_KEY = 's_j_y_label'
static getData(data_file_name)

Return the data from the given data file.

Parameters:data_file_name (str) – the text file containing whitespace separated energies and intensities, one pair per line, energies in eV
Return type:list
Returns:contains (energy, intensity) tuples
static getTrimmedTable(filepath, trim_pct=None)

Return a table of trimmed data for the given file path and trim percent.

Parameters:
  • filepath (str) – the file path to the file with the data
  • trim_pct (float) – the trim percent, it is the percent of the maximum y-value, i.e. intensity value, that is used when trimming
Raises:

ValueError – if there isn’t any data

Return type:

table.Table

Returns:

table of trimmed data

static isBandshapeTable(atable)

Return True if the given table is a bandshape table.

Parameters:atable (table.Table) – the table to check
Return type:bool
Returns:True if the given table is a bandshape table
write()

Write the *spm file.

schrodinger.application.matsci.bandshape_utils.get_bs_spectrum_file_temps_keys(struct)

Return the bandshape spectrum file structure property keys and associated temperatures for the given structure.

Parameters:struct (schrodinger.structure.Structure) – the structure with the property keys
Return type:list
Returns:pair tuples of temperatures in K and bandshape spectrum file structure property keys
schrodinger.application.matsci.bandshape_utils.get_temp_from_bs_spectrum_file_key(key)

Return the temperature from the given bandshape spectrum file structure property key.

Parameters:key (str) – the structure property key containing the temperature
Return type:float
Returns:the temperature in K
schrodinger.application.matsci.bandshape_utils.is_bs_spectrum_file_key(key)

Return True if the given structure property key is a bandshape spectrum file key.

Parameters:key (str) – the structure property key to check
Return type:bool
Returns:True if the given key is a bandshape spectrum file key