
10 Jun
2010
10 Jun
'10
4:36 a.m.
Friends, I wrote a small script to calculate the distance between two atoms in a list of pdb files. I would like to know how i can redirect the message that appears in replyobj to a text file. Some chimera commands like findhbon has option to save the result in file. But distance command dosent have the same. import glob from chimera import runCommand as rc filenames=[ fn for fn in glob.glob('*.pdb.*')] for fn in filenames: rc("open " + fn) * rc("distance :1@CA :166@CA") # I have to write this distance to a file.* rc("close all") Thank you, Bala