def createHtmlX3dna(project, ranges = None): """ Read out wiPlotList to see what get's created. """ if not getDeepByKeysOrAttributes(plugins, MATPLIB_STR, IS_INSTALLED_STR): nTdebug('Skipping createHtmlWattos because no matplib installed.') return from cing.PluginCode.matplib import MoleculePlotSet #@UnresolvedImport # The following object will be responsible for creating a (png/pdf) file with # possibly multiple pages # Level 1: row # Level 2: against main or alternative y-axis # Level 3: plot parameters dictionary (extendible). keyLoLoL = [] plotAttributesRowMain = NTdict() plotAttributesRowMain[ KEY_LIST_STR] = [ X3DNA_STR, SHIFT_STR] plotAttributesRowMain[ KEY_LIST2_STR] = [ X3DNA_STR, SLIDE_STR] plotAttributesRowMain[ KEY_LIST3_STR] = [ X3DNA_STR, RISE_STR] plotAttributesRowMain[ YLABEL_STR] = shortNameDict[ SHIFT_STR ] keyLoLoL.append([ [plotAttributesRowMain] ]) plotAttributesRowMain = NTdict() plotAttributesRowMain[ KEY_LIST_STR] = [ X3DNA_STR, TILT_STR] plotAttributesRowMain[ KEY_LIST2_STR] = [ X3DNA_STR, ROLL_STR] plotAttributesRowMain[ KEY_LIST3_STR] = [ X3DNA_STR, TWIST_STR] plotAttributesRowMain[ YLABEL_STR] = shortNameDict[ TILT_STR ] keyLoLoL.append([ [plotAttributesRowMain] ]) plotAttributesRowMain = NTdict() plotAttributesRowMain[ KEY_LIST_STR] = [ X3DNA_STR, SHEAR_STR] plotAttributesRowMain[ KEY_LIST2_STR] = [ X3DNA_STR, STRETCH_STR] plotAttributesRowMain[ KEY_LIST3_STR] = [ X3DNA_STR, STAGGER_STR] plotAttributesRowMain[ YLABEL_STR] = shortNameDict[ SHEAR_STR ] keyLoLoL.append([ [plotAttributesRowMain] ]) plotAttributesRowMain = NTdict() plotAttributesRowMain[ KEY_LIST_STR] = [ X3DNA_STR, BUCKLE_STR] plotAttributesRowMain[ KEY_LIST2_STR] = [ X3DNA_STR, PROPELLER_STR] plotAttributesRowMain[ KEY_LIST3_STR] = [ X3DNA_STR, OPENING_STR] plotAttributesRowMain[ YLABEL_STR] = shortNameDict[ BUCKLE_STR ] keyLoLoL.append([ [plotAttributesRowMain] ]) plotAttributesRowMain = NTdict() plotAttributesRowMain[ KEY_LIST_STR] = [ X3DNA_STR, MINPP_STR] plotAttributesRowMain[ KEY_LIST2_STR] = [ X3DNA_STR, MAJPP_STR] plotAttributesRowMain[ YLABEL_STR] = shortNameDict[ MINPP_STR ] plotAttributesRowMain[ USE_ZERO_FOR_MIN_VALUE_STR] = True plotAttributesRowMain[ USE_MAX_VALUE_STR] = 30.0 keyLoLoL.append([ [plotAttributesRowMain] ]) printLink = project.moleculePath(X3DNA_STR, project.molecule.name + x3dnaPlotList[0][0] + ".pdf") moleculePlotSet = MoleculePlotSet(project = project, ranges = ranges, keyLoLoL = keyLoLoL) moleculePlotSet.renderMoleculePlotSet(printLink, createPngCopyToo = True)
def createHtmlWattos(project, ranges=None): """ Read out wiPlotList to see what get's created. """ if not getDeepByKeysOrAttributes(plugins, MATPLIB_STR, IS_INSTALLED_STR): # nTdebug('Skipping createHtmlWattos because no matplib installed.') return from cing.PluginCode.matplib import MoleculePlotSet #@UnresolvedImport # wiPlotList.append( ('_01_backbone_chi','QUA/RAM/BBC/C12') ) # The following object will be responsible for creating a (png/pdf) file with # possibly multiple pages # Level 1: row # Level 2: against main or alternative y-axis # Level 3: plot parameters dictionary (extendable). keyLoLoL = [] plotAttributesRowMain = NTdict() plotAttributesRowMain[KEY_LIST_STR] = [ WATTOS_STR, COMPLCHK_STR, VALUE_LIST_STR ] plotAttributesRowMain[YLABEL_STR] = Wattos.shortNameDict[COMPLCHK_STR] plotAttributesRowMain[USE_ZERO_FOR_MIN_VALUE_STR] = True plotAttributesRowMain[USE_MAX_VALUE_STR] = 100.0 keyLoLoL.append([[plotAttributesRowMain]]) plotAttributesRowMain = NTdict() plotAttributesRowAlte = NTdict() plotAttributesRowMain[KEY_LIST_STR] = [ WATTOS_STR, OBS_COUNT_STR, VALUE_LIST_STR ] plotAttributesRowMain[KEY_LIST2_STR] = [ WATTOS_STR, EXP_COUNT_STR, VALUE_LIST_STR ] plotAttributesRowMain[KEY_LIST3_STR] = [ WATTOS_STR, MAT_COUNT_STR, VALUE_LIST_STR ] plotAttributesRowAlte[KEY_LIST_STR] = [ WATTOS_STR, OBS_ATOM_COUNT_STR, VALUE_LIST_STR ] plotAttributesRowMain[YLABEL_STR] = Wattos.shortNameDict[OBS_COUNT_STR] plotAttributesRowAlte[YLABEL_STR] = Wattos.shortNameDict[ OBS_ATOM_COUNT_STR] plotAttributesRowMain[USE_ZERO_FOR_MIN_VALUE_STR] = True keyLoLoL.append([[plotAttributesRowMain], [plotAttributesRowAlte]]) printLink = project.moleculePath( 'wattos', project.molecule.name + wattosPlotList[0][0] + ".pdf") moleculePlotSet = MoleculePlotSet(project=project, ranges=ranges, keyLoLoL=keyLoLoL) moleculePlotSet.renderMoleculePlotSet(printLink, createPngCopyToo=True)