File: summary.py

package info (click to toggle)
pdb2pqr 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,576 kB
  • sloc: python: 24,897; sh: 12,005; cpp: 9,831; xml: 9,098; makefile: 355; ansic: 36
file content (35 lines) | stat: -rw-r--r-- 944 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
    Summary extension

    Print protein summary file. 
    Currently prints a list of all residue in protein.
"""

__date__ = "21 October 2011"
__author__ = "Kyle Monson"

import extensions

def usage():
    """
    Returns usage text for summary.
    """
    return 'Print protein summary information to {output-path}.summary.'

def create_summary_output(routines, outfile):
    """
    Output the interaction energy between each possible residue pair.
    """
    routines.write("Printing protein summary...\n")
    
    output = extensions.extOutputHelper(routines, outfile)
    
    output.write(routines.protein.getSummary() + '\n')
    
    for residue in routines.protein.getResidues():
        output.write(str(residue)+'\n')

def run_extension(routines, outroot, options):
    outname = outroot + ".summary"
    with open(outname, "w") as outfile:
        create_summary_output(routines, outfile)