From: Martin H. <ma...@bl...> - 2010-08-26 15:07:15
|
Dear all I am using the script of Robert Campell to collect hydrogen bonds and the essential part looks like this: [collect pairs in hb by cmd.find_pairs] for pairs in hb: cmd.iterate("%s and index %s" % (pairs[0][0], pairs[0][1]), 'print "%1s/%3s`%s/%-4s " % (chain, resn, resi, name),') cmd.iterate("%s and index %s" % (pairs[1][0],pairs[1][1]), 'print "%1s/%3s`%s/%-4s " % (chain, resn, resi, name),') print "%.2f" % cmd.distance(hb_list_name, "%s and index %s" % (pairs[0][0], pairs[0][1]), "%s and index %s" % (pairs[1][0], pairs[1][1])) This nicely lists three columns, where the interacting pairs are shown together with the length of the hydrogen bond. I have now started various unsuccessfull attempts to direct the output of 'cmd.iterate(...)' to a file which I would like to process further (sorting for largest change for two different configurations, etc.). How do I direct the output from iterate to a file? Suggestions would be appreciated. Martin |