<div dir="ltr">Hi,<div><br></div><div>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.</div><div><br></div><div>Code:</div><div><p style="margin:0px">from Bio import *</p>
<p style="margin:0px">from Bio.PDB import *</p>
<p style="margin:0px">parser = PDBParser()</p>
<p style="margin:0px">structure = parser.get_structure('1BVU','1BVU.pdb')</p>
<p style="margin:0px">import Bio.PDB.NACCESS as nac</p>
<p style="margin:0px">temppath_name = 'C:\Users\user\fileName'</p>
<p style="margin:0px">data = nac.run_naccess(structure[0],'1BVU.pdb',temp_path = temppath_name)</p></div><div><br></div><div><div>C:\Users\user\Graduate Research\PDBParser_tryingNaccess.py in <module>()</div><div> 5 import Bio.PDB.NACCESS as nac</div><div> 6 temppath_name = 'C:\Users\user\Graduate Research'</div><div>----> 7 data = nac.run_naccess(structure[0],'1BVU.pdb',temp_path = temppath_name)</div><div><br></div><div>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)</div><div> 59 </div><div> 60 p = subprocess.Popen(command, universal_newlines=True,</div><div>---> 61 stdout=subprocess.PIPE, stderr=subprocess.PIPE)</div><div> 62 out, err = p.communicate()</div><div> 63 os.chdir(old_dir)</div><div><br></div><div>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)</div><div> 707 p2cread, p2cwrite,</div><div> 708 c2pread, c2pwrite,</div><div>--> 709 errread, errwrite)</div><div> 710 except Exception:</div><div> 711 # Preserve original exception in case os.close raises.</div><div><br></div><div>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)</div><div> 955 env,</div><div> 956 cwd,</div><div>--> 957 startupinfo)</div><div> 958 except pywintypes.error, e:</div><div> 959 # Translate pywintypes.error to WindowsError, which is</div><div><br></div><div>WindowsError: [Error 2] The system cannot find the file specified </div></div><div><br></div><div>Thanks and Regards,</div><div>Alaksh Choudhury</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 6, 2015 at 4:10 PM, Peter Cock <span dir="ltr"><<a href="mailto:p.j.a.cock@googlemail.com" target="_blank">p.j.a.cock@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Apr 6, 2015 at 9:16 PM, Alaksh Choudhury<br>
<<a href="mailto:Alaksh.Choudhury@colorado.edu">Alaksh.Choudhury@colorado.edu</a>> wrote:<br>
> Hi,<br>
><br>
> I am having trouble using Bio.PDB.NACCESS.<br>
><br>
> The following is my code:<br>
> import Bio.PDB.NACCES as nac<br>
> data = nac.run_naccess(structure[0],"1BVU.pdb")<br>
<br>
</span>This defaults to run_naccess(..., temp_path='/tmp/') which appears<br>
to cause a problem on Windows - likely the Unix style path. Try<br>
setting this to r"C:\TEMP" or similar?<br>
<br>
If that solves this, we can make the default more Windows friendly.<br>
<br>
Thanks,<br>
<br>
Peter<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alaksh Choudhury<div>Graduate Student | Gill lab and Kaar lab</div><div>Department of Chemical Engineering</div><div>University of Colorado, Boulder</div><div><br></div></div></div>
</div>