def from_pdb(file):
sequence = []
ssbond = []
+ ires = []
for line in file:
if line[0:6] == 'ATOM ' and line[13:15] == 'CA':
aa = three_to_one.get(line[17:20])
sequence.append(aa)
+ i = int(line[24:26])
+ ires.append(i)
if line[0:3] == 'TER':
sequence.append('XX')
if line[0:6] == 'SSBOND':
if sequence[-1] != 'G':
sequence.append('X')
seq=''.join(sequence)
+ if ires[0] != 1:
+ ssbond=[ [e[0]-ires[0]+1,e[1]-ires[0]+1] for e in ssbond]
+
return seq,ssbond
task.md_start=form.cleaned_data["md_start"]
task.myfile1=form.cleaned_data["file1"]
task.md_pdbref=form.cleaned_data["md_pdbref"]
+ task.md_ntwx=task.remd_nstex
task.md_seq=""
if task.md_start == "pdbstart" or task.md_pdbref:
task.md_scal_fric=form.cleaned_data["md_scal_fric"]
task.remd_nrep=form.cleaned_data["remd_nrep"]
task.remd_nstex=form.cleaned_data["remd_nstex"]
+ task.md_ntwx=form.cleaned_data["md_ntwx"]
+ task.md_ntwe=form.cleaned_data["md_ntwe"]
# task.remd_traj1file=form.cleaned_data["remd_traj1file"]
# task.remd_rest1file=form.cleaned_data["remd_rest1file"]