From cab19b03645d65ee9d55a07a00e29b89d901559e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Dawid=20Jagie=C5=82a?= Date: Tue, 14 Jul 2015 23:02:50 +0200 Subject: [PATCH] added basic MREMD form fields --- qcg/forms.py | 27 +++++++++++++++++++-------- qcg/templates/qcg/job_submit.html | 4 ++-- qcg/templates/qcg/job_submit_form.html | 16 +++++++++++++--- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/qcg/forms.py b/qcg/forms.py index 5e93416..d53569d 100644 --- a/qcg/forms.py +++ b/qcg/forms.py @@ -75,13 +75,7 @@ class JobDescriptionForm(forms.Form): CHOICES = ( CHOICES_PLACEHOLDER, - (GALERA, u'Galera'), - (HYDRA, u'Hydra'), (INULA, u'Inula'), - (MOSS, u'Moss'), - (NOVA, u'Supernova'), - (REEF, u'Reef'), - (ZEUS, u'Zeus'), ) class Process(object): @@ -98,10 +92,9 @@ class JobDescriptionForm(forms.Form): APPLICATION_CHOICES = ( CHOICES_PLACEHOLDER, ('bash', 'BASH'), - ('gromacs/4.6.3', 'GROMACS 4.6.3'), - ('matlab', 'MATLAB'), ('python', 'Python'), ) + QUEUE_CHOICES = ( CHOICES_PLACEHOLDER, ('plgrid', 'plgrid'), @@ -118,6 +111,21 @@ class JobDescriptionForm(forms.Form): ('xmpp', u'XMPP'), ) + FORCE_FIELD_CHOICES = ( + ('GAB', u'GAB'), + ('E0LL2Y', u'E0LL2Y'), + ) + + nstep = forms.IntegerField(label=u"NSTEP", help_text=u"Liczba kroków w trajektorii", min_value=1, initial=500000, required=False) + ntwe = forms.IntegerField(label=u"NTWE", help_text=u"Częstość zapisu energii w krokach", min_value=0, initial=100, required=False) + ntwx = forms.IntegerField(label=u"NTWX", help_text=u"Częstość zapisu współrzędnych w krokach", min_value=0, initial=1000, required=False) + dt = forms.DecimalField(label=u"DT", help_text=u"Krok czasowy. Wartość kroku równa jedności to 48.9 fs", max_digits=5, decimal_places=2, min_value=0.01, initial=0.1, required=False) + damax = forms.DecimalField(label=u"DAMAX", help_text=u"Maksymalna dopuszczalna zmiana przyspieszenia podczas jednego kroku czasowego", max_digits=5, decimal_places=2, min_value=0.01, initial=1.0, required=False) + force_field = forms.ChoiceField(choices=FORCE_FIELD_CHOICES, label=u"Pole siłowe", required=False) + nrep = forms.IntegerField(label=u"NREP", help_text=u"Liczba replik", min_value=2, initial=16, required=False) + nstex = forms.IntegerField(label=u"NSTEX", help_text=u"Liczba kroków po których następuje wymiana replik", min_value=2, initial=1000, required=False) + pdb_file = forms.CharField(label=u"Plik PDB", max_length=500, required=False) + application = forms.ChoiceField(choices=APPLICATION_CHOICES, label=u"Aplikacja", required=False) # TODO choices master_file = forms.CharField(label=u"Plik główny", max_length=500, required=False) executable = forms.CharField(label=u"Plik wykonywalny", max_length=500, required=False) @@ -230,6 +238,9 @@ class JobDescriptionForm(forms.Form): def clean_postprocess_script(self): return self._gsiftp_suffix(self.cleaned_data['postprocess_script']) + def clean_pdb_file(self): + return self._gsiftp_suffix(self.cleaned_data['pdb_file']) + @staticmethod def _gsiftp_suffix(url): if url: diff --git a/qcg/templates/qcg/job_submit.html b/qcg/templates/qcg/job_submit.html index a9ca868..61c56e9 100644 --- a/qcg/templates/qcg/job_submit.html +++ b/qcg/templates/qcg/job_submit.html @@ -34,7 +34,7 @@ return res; } - $('#id_master_file,#id_executable,#id_input,#id_preprocess_script,#id_postprocess_script').before(function() { + $('#id_master_file,#id_pdb_file,#id_executable,#id_input,#id_preprocess_script,#id_postprocess_script').before(function() { var target = this; return gridftpButton.clone().click(function() { $('#select-btn').off().click(function() { @@ -77,7 +77,7 @@ }); }).wrap('
'); - $('#id_application').selectize(); + $('#id_application,#id_force_field').selectize(); $('#id_arguments,#id_properties,#id_native').selectize({ plugins: ['remove_button'], create: true, diff --git a/qcg/templates/qcg/job_submit_form.html b/qcg/templates/qcg/job_submit_form.html index e9b5289..f8c4200 100644 --- a/qcg/templates/qcg/job_submit_form.html +++ b/qcg/templates/qcg/job_submit_form.html @@ -2,7 +2,7 @@