Hello, we are attempting to align two separate PDB files through python for highthroughput processing.
One file is an NMR structure, the other is a crystal. So far we have the following code:
#!/usr/bin/python
import __main__
__main__.pymol_argv = ['pymol', '-c'] # PyMol: no GUI
import time
from time import sleep
import pymol
from pymol import cmd
pymol.finish_launching()
#fetch = 'fetch'
#reinitialize = 'reinitialize'
#super = 'super'
#space = ','
#sleep = 'sleep(0.6)'
file = open("answer_paired", "r")
for raw_line in file:
raw_line = str(raw_line)
#print fetch, raw_line[-10:-5], raw_line[-5:-1], "async=0"
a = raw_line[-10:-6]
b = raw_line[-6:-1]
cmd.fetch(a, b, async=0)
cmd.load(a + ".pdb")
cmd.load(b + ".pdb")
#print sleep
sleep(0.3)
#print super, raw_line[-10:-5],',',raw_line[-5:-1]
print a + "*"
print b + "*"
print ""
#cmd.super(a, b)
l = cmd.super(b, a)
print l[0]
print ""
#print sleep
sleep(0.3)
#print reinitialize
cmd.reinitialize()
sleep(0.3)
#print sleep
when we run this code, we receive the following error:
ExecutiveProcessPDBFile-Error: Unable to open file '2LC9.pdb'. Traceback (most recent call last): File "clfp.py", line 25, in <module> cmd.load(a + ".pdb") File "/usr/lib/python2.7/dist-packages/pymol/importing.py", line 878, in load if _self._raising(r,_self): raise pymol.CmdException pymol.CmdException: <pymol.cmdexception instance="" at="" 0x1857f80="">
From what I have read, this is a problem with python and it's standard library not a pymol problem, but how this might be overcome I can't figure out. Any help/ solutions will be much appreciated. Our program is set up to pull pairs of PDB ID's from a list we have created, however for troubleshooting purposes the two files we are trying to fetch, load, and superimpose are 2LC9 and 102L.
0 answers
No answers yet.
Log in to answer this question.
the error seems to indicate something very simple, the pdb file is not where the program thinks it is