Ejemplo n.º 1
0
def parse_energy_from_DLG( dlg_filename ):
    """Parse the AutoDock DLG, and return the intermolecular and internal
    energies as a tuple."""
    parser = DlgParser()
    dlg = test_output_directory + os.sep + dlg_filename
    parser.parse( dlg )
    docked = parser.clist[0]  #dictionary of results
    intermol_energy = docked['intermol_energy']  #-6.17
    internal_energy = docked['total_internal']  # -1.58
    return ( intermol_energy, internal_energy )
Ejemplo n.º 2
0
def parse_energy_from_DLG( dlg_filename, energy_list):
    """Parse the AutoDock DLG, and return the intermolecular and internal
    energies as a tuple."""
    parser = DlgParser()
    dlg = test_output_directory + os.sep + dlg_filename
    parser.parse( dlg )
    docked = parser.clist[0]  #dictionary of results
    result = []
    for energy_type in energy_list:
        newVal = docked.get(energy_type, 'ERROR')
        print energy_type, ' is now ', newVal
        result.append(docked.get(energy_type, 'ERROR'))
    #intermol_energy = docked['intermol_energy']  #-6.17
    #internal_energy = docked['total_internal']  # -1.58
    #print "docked[binding_energy]=", docked['binding_energy']
    #print "docked[electrostatic_energy]=", docked['electrostatic_energy']
    #print "docked[intermol_energy]=", docked['intermol_energy']
    #print "docked[total_internal]=", docked['total_internal']
    #unbound_energy = docked['unbound_energy']
    #print "unbound_energy=", unbound_energy
    #return ( intermol_energy, internal_energy )
    return result