[Chimera-users] Error in SASA calculation

Eric Pettersen pett at cgl.ucsf.edu
Fri Jan 28 11:58:05 PST 2011

Hi Aditya,
	I think the issue here is that you don't do anything to specify what  
folder you are writing "sas111.txt" in.  For instance, on the Mac if  
you start Chimera by double-clicking then the "current folder" is /,  
which you almost certainly don't have write permission for.  So  
instead of opening just "sas111.txt" you need to specify the full path  
to the file, e.g.:

out = open("/Users/aditya/sas111.txt", "a")

Along the same lines, this code will always write sas111.txt in your  
home folder:

from os import expanduser
out = open(expanduser("~/sas111.txt"), "a")


                         Eric Pettersen
                         UCSF Computer Graphics Lab

On Jan 28, 2011, at 4:04 AM, Aditya Padhi wrote:

> Hi Elaine,
>     Hope you are fine. If you remember I was calculating per residue  
> SASA using Chimera for my MD simulated protein. At that time it was  
> working fine. But I did some more simulation run and now I want to  
> calculate SASA for the entire trajectory but unfortunately Its  
> showing the following error.
> Error
> Problem in per-frame script:
> IOError: [Errno 13] Permission denied: 'sas111.txt'
>   File "<string>", line 3, in <module>
> See reply log for Python traceback.
> For your reference, I am giving the script also. It was working fine  
> previously but with the same procedure which I followed this script  
> is not working and showing the above mentioned error.
> Script
> from chimera import openModels, Molecule
> out = open("sas111.txt", "a")
> x 
> = 
> '---------------------------------------------------------------------------------'
> for m in openModels.list(modelTypes=[Molecule]):
>     for r in m.residues:
>         try:
>             sas = r.areaSAS
>         except AttributeError:
>             continue
>         print>>out, r, sas
> print>>out,x
> out.close()
> Kindly help me.
> Thank you.
> Aditya.
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20110128/df56d826/attachment.html>

More information about the Chimera-users mailing list