class TaskForm(forms.Form):
- name = forms.CharField(max_length=20)
+ name = forms.CharField(max_length=40,widget=forms.TextInput(attrs={'size':40, 'maxlength':40}))
class TaskForm_min(forms.Form):
- name = forms.CharField(max_length=20)
+ name = forms.CharField(max_length=40,widget=forms.TextInput(attrs={'size':40, 'maxlength':40}))
file1 = forms.FileField(label='Upload a PDB file',required=False,
help_text='continuous (without breaks) protein chains,use TER to divide chains')
pdbid = forms.CharField(min_length=4,max_length=6,required=False,
class TaskForm_min_a(forms.Form):
- name = forms.CharField(max_length=20)
+ name = forms.CharField(max_length=40,widget=forms.TextInput(attrs={'size':40, 'maxlength':40}))
unres_ff = forms.ChoiceField(choices=FF_CHOICE,widget=forms.RadioSelect,
label='Force Field',initial='FF2')
class TaskForm_md(forms.Form):
- name = forms.CharField(max_length=20)
+ name = forms.CharField(max_length=40,widget=forms.TextInput(attrs={'size':40, 'maxlength':40}))
md_start = forms.ChoiceField(choices=MD_START,widget=forms.RadioSelect,
label='starting structure',initial='extconf')
class TaskForm_md_a(forms.Form):
- name = forms.CharField(max_length=20)
+ name = forms.CharField(max_length=40,widget=forms.TextInput(attrs={'size':40, 'maxlength':40}))
unres_ff = forms.ChoiceField(choices=FF_CHOICE,widget=forms.RadioSelect,
label='Force Field',initial='FF2')
self.add_error('md_2d',msg)
class TaskForm_remd(forms.Form):
- name = forms.CharField(max_length=20)
+ name = forms.CharField(max_length=40,widget=forms.TextInput(attrs={'size':40, 'maxlength':40}))
md_start = forms.ChoiceField(choices=MD_START,widget=forms.RadioSelect,
label='starting structure',initial='extconf')
class TaskForm_remd_a(forms.Form):
- name = forms.CharField(max_length=20)
+ name = forms.CharField(max_length=40,widget=forms.TextInput(attrs={'size':40, 'maxlength':40}))
unres_ff = forms.ChoiceField(choices=FF_CHOICE,widget=forms.RadioSelect,
label='Force Field',initial='FF2')
class TaskForm_list(forms.Form):
- name = forms.CharField(max_length=20,disabled=True,required=False)
+ name = forms.CharField(max_length=40,disabled=True,required=False)
nrep = forms.IntegerField(disabled=True,required=False,label='NREP')
def __init__(self, count, *args, **kwargs):
if task.md_start != "pdbstart":
task.ssbond=''
+ if any(c.islower() for c in seq):
+ task.md_respa=False
+
task.ready=True
task.save()
task.md_mdpdb=form.cleaned_data["md_mdpdb"]
task.unres_ff=form.cleaned_data["unres_ff"]
task.md_respa=form.cleaned_data["md_respa"]
+ if any(c.islower() for c in seq):
+ task.md_respa=False
task.boxx=form.cleaned_data["boxx"]
task.boxy=form.cleaned_data["boxy"]
task.boxz=form.cleaned_data["boxz"]
task.md_nstep=form.cleaned_data["md_nstep"]
+ if any(c.islower() for c in seq):
+ task.md_respa=False
+
task.ready=True
task.md_ntwx=form.cleaned_data["md_ntwx"]
task.md_ntwe=form.cleaned_data["md_ntwe"]
task.md_respa=form.cleaned_data["md_respa"]
+ if any(c.islower() for c in seq):
+ task.md_respa=False
+
# task.remd_traj1file=form.cleaned_data["remd_traj1file"]
# task.remd_rest1file=form.cleaned_data["remd_rest1file"]
import sys
import os.path
+matplotlib.rc('font', size=15)
+matplotlib.rc('legend', fontsize=15)
+
x,y= np.loadtxt('saxs.data',usecols=(0,1),unpack=True)
x1,y1= np.loadtxt('MODEL1_saxs.data',usecols=(0,2),unpack=True)
x2,y2= np.loadtxt('MODEL2_saxs.data',usecols=(0,2),unpack=True)
plt.clf()
-plt.xlabel('r')
+plt.xlabel(r'r [$\AA$]')
plt.ylabel('P(r)')
plt.xlim(x[0], x[-1])
plt.plot(x,y,'-',color='black')