Hi Simon,

On Mon, 08 Mar 2010 18:09:31 +0100 Simon Lindhoud <simon.lindh...@wur.nl>
wrote:

> 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

That is a slightly older version of my script, although I don't believe that
is the problem.

> 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?

It sounds like the file as it is read by the script is completely on one
line. I wonder if this is the old UNIX vs MSDOS line ending problem.  Did the
data file happen to come from a Windows computer?

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821            Fax: 613-533-2497
<robert.campb...@queensu.ca>    http://pldserver1.biochem.queensu.ca/~rlc

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to