Beispiel #1
0
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)
Beispiel #2
0
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)
Beispiel #3
0
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)
Beispiel #4
0
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)
Beispiel #5
0
def createHtmlWhatif(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

    mol = project.molecule
#    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] = [ WHATIF_STR,          QUACHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  QUACHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          RAMCHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  RAMCHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          BBCCHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  BBCCHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowAlte = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          C12CHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowAlte[ KEY_LIST_STR] = [ WHATIF_STR,          ROTCHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  C12CHK_STR ]
    plotAttributesRowAlte[ YLABEL_STR]   = shortNameDict[  ROTCHK_STR ]
#        plotAttributesRowMain[ USE_ZERO_FOR_MIN_VALUE_STR]   = True
    keyLoLoL.append( [ [plotAttributesRowMain], [plotAttributesRowAlte] ] )

#    printLink = os.path.join(
#                project.rootPath( project.name )[0],
#                project.molecule.name,
#                project.moleculeDirectories.whatif,
#                mol.name + wiPlotList[-1][0] + ".pdf" )

#gv
    printLink = project.moleculePath( 'whatif', mol.name + wiPlotList[0][0] + ".pdf" )

    moleculePlotSet = MoleculePlotSet(project=project, ranges=ranges, keyLoLoL=keyLoLoL )
    moleculePlotSet.renderMoleculePlotSet( printLink, createPngCopyToo=True  )

#    wiPlotList.append( ('_02_bond_angle','BND/ANG/NQA/PLNCHK') )
    keyLoLoL = []
    plotAttributesRowMain = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          BNDCHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  BNDCHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          ANGCHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  ANGCHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          NQACHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  NQACHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowAlte = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          PLNCHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowAlte[ KEY_LIST_STR] = [ WHATIF_STR,          PL2CHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  PLNCHK_STR ]
    plotAttributesRowAlte[ YLABEL_STR]   = shortNameDict[  PL2CHK_STR ]
#        plotAttributesRowMain[ USE_ZERO_FOR_MIN_VALUE_STR]   = True
    keyLoLoL.append( [ [plotAttributesRowMain], [plotAttributesRowAlte] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          PL3CHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  PL3CHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )

#    printLink = os.path.join(
#                project.rootPath( project.name )[0],
#                mol.name,
#                project.moleculeDirectories.whatif,
#                mol.name + wiPlotList[-1][0] + ".pdf" )
#gv
    printLink = project.moleculePath( 'whatif', mol.name + wiPlotList[1][0] + ".pdf" )

    moleculePlotSet = MoleculePlotSet(project=project, ranges=ranges, keyLoLoL=keyLoLoL )
    moleculePlotSet.renderMoleculePlotSet( printLink, createPngCopyToo=True  )


#    wiPlotList.append( ('_03_steric_acc_flip','BMP/ACC/FLP/CHI') )
    keyLoLoL = []
    plotAttributesRowMain = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          BMPCHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  BMPCHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowAlte = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          ACCLST_STR,         VALUE_LIST_STR ]
    plotAttributesRowAlte[ KEY_LIST_STR] = [ WHATIF_STR,          INOCHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  ACCLST_STR ]
    plotAttributesRowAlte[ YLABEL_STR]   = shortNameDict[  INOCHK_STR ]
#        plotAttributesRowMain[ USE_ZERO_FOR_MIN_VALUE_STR]   = True
    keyLoLoL.append( [ [plotAttributesRowMain], [plotAttributesRowAlte] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          FLPCHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  FLPCHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )

    plotAttributesRowMain = NTdict()
    plotAttributesRowMain[ KEY_LIST_STR] = [ WHATIF_STR,          CHICHK_STR,         VALUE_LIST_STR ]
    plotAttributesRowMain[ YLABEL_STR]   = shortNameDict[  CHICHK_STR ]
    keyLoLoL.append( [ [plotAttributesRowMain] ] )


#    printLink = os.path.join(
#                project.rootPath( project.name )[0],
#                mol.name,
#                project.moleculeDirectories.whatif,
#                mol.name + wiPlotList[-1][0] + ".pdf" )
#gv
    printLink = project.moleculePath( 'whatif', mol.name + wiPlotList[2][0] + ".pdf" )

    moleculePlotSet = MoleculePlotSet(project=project, ranges=ranges, keyLoLoL=keyLoLoL )
    moleculePlotSet.renderMoleculePlotSet( printLink, createPngCopyToo=True  )