[Biopython] Problems with using Bio.PDB.NACCESS

Alaksh Choudhury Alaksh.Choudhury at colorado.edu
Mon Apr 6 22:31:32 UTC 2015


Hi,

Thanks a lot for your previous response. I tried to change the temppath
location, but I still get error while running the code. Please let me know
if there is a fix for the same. I really appreciate your help.

Code:

from Bio import *

from Bio.PDB import *

parser = PDBParser()

structure = parser.get_structure('1BVU','1BVU.pdb')

import Bio.PDB.NACCESS as nac

temppath_name = 'C:\Users\user\fileName'

data = nac.run_naccess(structure[0],'1BVU.pdb',temp_path = temppath_name)

C:\Users\user\Graduate Research\PDBParser_tryingNaccess.py in <module>()
      5 import Bio.PDB.NACCESS as nac
      6 temppath_name = 'C:\Users\user\Graduate Research'
----> 7 data = nac.run_naccess(structure[0],'1BVU.pdb',temp_path =
temppath_name)

C:\Users\user\AppData\Local\Enthought\Canopy\User\lib\site-packages\Bio\PDB\NACCESS.py
in run_naccess(model, pdb_file, probe_size, z_slice, naccess, temp_path)
     59
     60     p = subprocess.Popen(command, universal_newlines=True,
---> 61                          stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
     62     out, err = p.communicate()
     63     os.chdir(old_dir)

C:\Users\user\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.1.2730.win-x86_64\lib\subprocess.pyc
in __init__(self, args, bufsize, executable, stdin, stdout, stderr,
preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo,
creationflags)
    707                                 p2cread, p2cwrite,
    708                                 c2pread, c2pwrite,
--> 709                                 errread, errwrite)
    710         except Exception:
    711             # Preserve original exception in case os.close raises.

C:\Users\user\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.1.2730.win-x86_64\lib\subprocess.pyc
in _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env,
universal_newlines, startupinfo, creationflags, shell, to_close, p2cread,
p2cwrite, c2pread, c2pwrite, errread, errwrite)
    955                                          env,
    956                                          cwd,
--> 957                                          startupinfo)
    958             except pywintypes.error, e:
    959                 # Translate pywintypes.error to WindowsError, which
is

WindowsError: [Error 2] The system cannot find the file specified

Thanks and Regards,
Alaksh Choudhury

On Mon, Apr 6, 2015 at 4:10 PM, Peter Cock <p.j.a.cock at googlemail.com>
wrote:

> On Mon, Apr 6, 2015 at 9:16 PM, Alaksh Choudhury
> <Alaksh.Choudhury at colorado.edu> wrote:
> > Hi,
> >
> > I am having trouble using Bio.PDB.NACCESS.
> >
> > The following is my code:
> > import Bio.PDB.NACCES as nac
> > data = nac.run_naccess(structure[0],"1BVU.pdb")
>
> This defaults to run_naccess(..., temp_path='/tmp/') which appears
> to cause a problem on Windows - likely the Unix style path. Try
> setting this to r"C:\TEMP" or similar?
>
> If that solves this, we can make the default more Windows friendly.
>
> Thanks,
>
> Peter
>



-- 
Alaksh Choudhury
Graduate Student | Gill lab and Kaar lab
Department of Chemical Engineering
University of Colorado, Boulder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20150406/abf1ecf0/attachment.html>


More information about the Biopython mailing list