projects
/
django_unres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
052b4b0
)
reading SSBOND corrected
author
Cezary Czaplewski
<czarek@chem.univ.gda.pl>
Tue, 9 Jan 2018 22:27:32 +0000
(23:27 +0100)
committer
Cezary Czaplewski
<czarek@chem.univ.gda.pl>
Tue, 9 Jan 2018 22:27:32 +0000
(23:27 +0100)
TODO
patch
|
blob
|
history
django_simple/todo/templates/changelog.html
patch
|
blob
|
history
django_simple/todo/templates/input.html
patch
|
blob
|
history
django_simple/todo/views.py
patch
|
blob
|
history
diff --git
a/TODO
b/TODO
index
91e3c61
..
7cd4ad6
100644
(file)
--- a/
TODO
+++ b/
TODO
@@
-28,7
+28,8
@@
homology restraints input
other restrains input
other restrains input
-SAXS input
+# SAXS input
+# done
automatic secondary structure restrains (psipred)
automatic secondary structure restrains (psipred)
diff --git
a/django_simple/todo/templates/changelog.html
b/django_simple/todo/templates/changelog.html
index
49d1e6b
..
885d7fc
100644
(file)
--- a/
django_simple/todo/templates/changelog.html
+++ b/
django_simple/todo/templates/changelog.html
@@
-10,11
+10,14
@@
<dd>
Autorefresh added to job status page and job index page.
</dd>
<dd>
Autorefresh added to job status page and job index page.
</dd>
-
<dd>
Changelog page added.
</dd>
<dd>
Changelog page added.
</dd>
+<dt>10.01.2018</dt>
+ <dd>
+ Reading SSBOND from multichain pdb corrected.
+ </dd>
</dl>
</dl>
diff --git
a/django_simple/todo/templates/input.html
b/django_simple/todo/templates/input.html
index
431ca85
..
1509f69
100644
(file)
--- a/
django_simple/todo/templates/input.html
+++ b/
django_simple/todo/templates/input.html
@@
-21,10
+21,8
@@
external software or online servers (for example Modeller software, Modloop
server).
<li>
Disulfide bonds are read from PDB based on SSBOND records and for multichain
server).
<li>
Disulfide bonds are read from PDB based on SSBOND records and for multichain
-protein COMPND record with propers CHAIN: tokens listing all chains in the
-PDB file. See example:
+protein proper chain records are necessary. See example:
<pre>
<pre>
-COMPND 3 CHAIN: A, B, C, D;
SSBOND 1 CYS C 107 CYS C 138
SSBOND 2 CYS C 124 CYS C 139
SSBOND 3 CYS C 137 CYS C 149
SSBOND 1 CYS C 107 CYS C 138
SSBOND 2 CYS C 124 CYS C 139
SSBOND 3 CYS C 137 CYS C 149
diff --git
a/django_simple/todo/views.py
b/django_simple/todo/views.py
index
a29ae69
..
6a244b0
100644
(file)
--- a/
django_simple/todo/views.py
+++ b/
django_simple/todo/views.py
@@
-47,32
+47,24
@@
def from_pdb(file):
chain_start = {}
chain_end = {}
unres_shift = {}
chain_start = {}
chain_end = {}
unres_shift = {}
- chain=[]
- ichain=0
+ chain_sorted=[]
newchain = True
for line in file:
newchain = True
for line in file:
- if line[0:6] == 'COMPND' and line[11:17] == 'CHAIN:':
- tmp=line[18:]
- chain_=tmp.split(', ')
- chain_[-1]=chain_[-1][0]
- chain.extend(chain_)
-
if line[0:6] == 'ATOM ' and line[13:15] == 'CA':
aa = three_to_one.get(line[17:20])
i = int(line[22:26])
if line[0:6] == 'ATOM ' and line[13:15] == 'CA':
aa = three_to_one.get(line[17:20])
i = int(line[22:26])
+ ch = line[21:22]
if newchain or i!=ires[-1]:
sequence.append(aa)
ires.append(i)
if newchain:
if newchain or i!=ires[-1]:
sequence.append(aa)
ires.append(i)
if newchain:
- if len(chain)>0:
- chain_start[chain[ichain]]=i
+ chain_start[ch]=i
+ chain_sorted.extend(ch)
newchain = False
if line[0:3] == 'TER':
sequence.append('XX')
newchain = False
if line[0:3] == 'TER':
sequence.append('XX')
- if len(chain)>0:
- chain_end[chain[ichain]]=i
- ichain=ichain+1
+ chain_end[ch]=i
newchain = True
if line[0:6] == 'SSBOND':
b=[]
newchain = True
if line[0:6] == 'SSBOND':
b=[]
@@
-85,6
+77,8
@@
def from_pdb(file):
ssbond_ch.append(c)
if line[0:3] == 'END':
break
ssbond_ch.append(c)
if line[0:3] == 'END':
break
+ if not sequence[-1] == 'XX':
+ chain_end[ch]=i
while sequence[-1] == 'XX':
del sequence[-1]
if sequence[0] != 'G':
while sequence[-1] == 'XX':
del sequence[-1]
if sequence[0] != 'G':
@@
-96,7
+90,7
@@
def from_pdb(file):
# if ires[0] != 1:
# ssbond=[ [e[0]-ires[0]+1,e[1]-ires[0]+1] for e in ssbond]
i=0
# if ires[0] != 1:
# ssbond=[ [e[0]-ires[0]+1,e[1]-ires[0]+1] for e in ssbond]
i=0
- for c in chain:
+ for c in chain_sorted:
unres_shift[c]=i+chain_start[c]
i=i-(chain_end[c]-chain_start[c])-3
ssbond=[ [e[0]-unres_shift[c[0]]+1,e[1]-unres_shift[c[1]]+1] for e,c in zip(ssbond,ssbond_ch)]
unres_shift[c]=i+chain_start[c]
i=i-(chain_end[c]-chain_start[c])-3
ssbond=[ [e[0]-unres_shift[c[0]]+1,e[1]-unres_shift[c[1]]+1] for e,c in zip(ssbond,ssbond_ch)]