schrodinger.application.matsci.bandshape_utils module¶
Utilities for bandshape calculations.
Copyright Schrodinger, LLC. All rights reserved.
-
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
-
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.
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
-
class
schrodinger.application.matsci.bandshape_utils.
BandshapeSpectrumFile
(data_file_name, spm_file_name)¶ Bases:
object
Manage a bandshape spectrum file.
-
ENERGY_KEY
= 'r_j_Excitation_Energy_(eV)'¶
-
ENERGY_TITLE
= 'Excitation Energy (eV)'¶
-
INTENSITY_KEY
= 'r_j_Intensity'¶
-
INTENSITY_TITLE
= 'Intensity'¶
-
SYMMETRY_KEY
= 's_j_Symmetry'¶
-
SYMMETRY_TITLE
= 'Symmetry'¶
-
SPECTRUM_KEY
= 's_j_spectrum_type'¶
-
SPECTRUM_TITLE
= 'Electronic Transition w/ Bandshape'¶
-
X_KEY
= 's_j_x_label'¶
-
X_ALIAS
= 'r_j_Excitation_Energy_(eV)'¶
-
Y_KEY
= 's_j_y_label'¶
-
Y_ALIAS
= 'r_j_Intensity'¶
-
HEADERS
= {'s_j_spectrum_type': 'Electronic Transition w/ Bandshape', 's_j_x_label': 'r_j_Excitation_Energy_(eV)', 's_j_y_label': 'r_j_Intensity'}¶
-
COLUMNS
= {'r_j_Excitation_Energy_(eV)': 'Excitation Energy (eV)', 'r_j_Intensity': 'Intensity', 's_j_Symmetry': 'Symmetry'}¶
-
EXT
= '.uvv.spm'¶
-
DEFAULT_BIN_WIDTH
= 400.0¶
-
__init__
(data_file_name, spm_file_name)¶ Create an instance.
Parameters: - data_file_name (str) – the text file containing whitespace separated energies and intensities, one pair per line, energies in eV
- spm_file_name (str) – the name of the *spm file to create
-
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
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
-
static
getTrimmedTable
(filepath, bin_width=None)¶ Return a table of trimmed data for the given file path and bin width.
Parameters: - filepath (str) – the file path to the file with the data
- bin_width (float) – the bin width in wavenumbers (cm-1) used for binning
Raises: ValueError – if there isn’t any data
Return type: Returns: table of trimmed data
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.matsci.bandshape_utils', '__doc__': '\n Manage a bandshape spectrum file.\n ', 'ENERGY_KEY': 'r_j_Excitation_Energy_(eV)', 'ENERGY_TITLE': 'Excitation Energy (eV)', 'INTENSITY_KEY': 'r_j_Intensity', 'INTENSITY_TITLE': 'Intensity', 'SYMMETRY_KEY': 's_j_Symmetry', 'SYMMETRY_TITLE': 'Symmetry', 'SPECTRUM_KEY': 's_j_spectrum_type', 'SPECTRUM_TITLE': 'Electronic Transition w/ Bandshape', 'X_KEY': 's_j_x_label', 'X_ALIAS': 'r_j_Excitation_Energy_(eV)', 'Y_KEY': 's_j_y_label', 'Y_ALIAS': 'r_j_Intensity', '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')]), 'COLUMNS': OrderedDict([('r_j_Excitation_Energy_(eV)', 'Excitation Energy (eV)'), ('r_j_Intensity', 'Intensity'), ('s_j_Symmetry', 'Symmetry')]), 'EXT': '.uvv.spm', 'DEFAULT_BIN_WIDTH': 400.0, '__init__': <function BandshapeSpectrumFile.__init__>, 'getData': <staticmethod object>, '_setUp': <function BandshapeSpectrumFile._setUp>, '_buildTable': <function BandshapeSpectrumFile._buildTable>, '_createFile': <function BandshapeSpectrumFile._createFile>, '_tearDown': <function BandshapeSpectrumFile._tearDown>, 'write': <function BandshapeSpectrumFile.write>, 'isBandshapeTable': <staticmethod object>, 'getTrimmedTable': <staticmethod object>, '__dict__': <attribute '__dict__' of 'BandshapeSpectrumFile' objects>, '__weakref__': <attribute '__weakref__' of 'BandshapeSpectrumFile' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.matsci.bandshape_utils'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-