From: Simon L. <sim...@wu...> - 2010-03-08 17:33:49
|
Dear all, Unfortunately I'm not really familiar with programming in Python (yet) but I've encountered a problem with MacPyMol in running the script that can be found here: http://cavanagh-lab.bch.ncsu.edu/bobay/intranet/pymol/data2bfactor.py I've tried a couple of things to get the script running, and in the end I managed to narrow the problem down to the fact that the file that contains the data for the new b-factors is not imported correctly. I have made a text file, containing four columns that I've copied from excel; the Chain, the residue number, the residue name, and the b-factor. These columns are separated by tabs. In the script this code is used to determine the number of columns in my file: words = line.split() # check number of columns of data if len(words) == 4: etc Apparently, this is where it goes wrong because if I print the words variable. I get the total number 'words' in my input file instead of the number of columns... Does anybody know the solution to this problem? Cheers, Simon |