From: Cezary Czaplewski Date: Tue, 30 Jan 2018 00:16:37 +0000 (+0100) Subject: long job names (40 char) no respa for D amino X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=4e20166e24578902a411d288474a5079dfc981a2;p=django_unres.git long job names (40 char) no respa for D amino plot_saxs larger font --- diff --git a/django_simple/todo/forms.py b/django_simple/todo/forms.py index 8bf9db1..c279f08 100644 --- a/django_simple/todo/forms.py +++ b/django_simple/todo/forms.py @@ -108,11 +108,11 @@ class MultiExampleField(forms.fields.MultiValueField): 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, @@ -141,7 +141,7 @@ class TaskForm_min(forms.Form): 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') @@ -190,7 +190,7 @@ class TaskForm_min_a(forms.Form): 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') @@ -246,7 +246,7 @@ class TaskForm_md(forms.Form): 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') @@ -335,7 +335,7 @@ class TaskForm_md_a(forms.Form): 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') @@ -388,7 +388,7 @@ class TaskForm_remd(forms.Form): 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') @@ -497,7 +497,7 @@ class TaskForm_remd_a(forms.Form): 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): diff --git a/django_simple/todo/views.py b/django_simple/todo/views.py index 33276ac..118de52 100644 --- a/django_simple/todo/views.py +++ b/django_simple/todo/views.py @@ -314,6 +314,9 @@ def add_md(request,task_id): if task.md_start != "pdbstart": task.ssbond='' + if any(c.islower() for c in seq): + task.md_respa=False + task.ready=True task.save() @@ -382,6 +385,8 @@ def add_md_a(request,task_id): 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"] @@ -443,6 +448,9 @@ def add_remd(request,task_id): task.md_nstep=form.cleaned_data["md_nstep"] + if any(c.islower() for c in seq): + task.md_respa=False + task.ready=True @@ -665,6 +673,9 @@ def add_remd_a(request,task_id): 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"] diff --git a/files/plot_saxs.py b/files/plot_saxs.py index d1ff7f6..834e842 100755 --- a/files/plot_saxs.py +++ b/files/plot_saxs.py @@ -9,6 +9,9 @@ import numpy as np 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) @@ -18,7 +21,7 @@ x5,y5= np.loadtxt('MODEL5_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')