projects
/
django_unres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8664852
)
printout as on etoh
author
Cezary Czaplewski
<czarek@chem.univ.gda.pl>
Sat, 26 Aug 2017 11:02:56 +0000
(13:02 +0200)
committer
Cezary Czaplewski
<czarek@chem.univ.gda.pl>
Sat, 26 Aug 2017 11:02:56 +0000
(13:02 +0200)
django_simple/todo/templates/base.html
patch
|
blob
|
history
django_simple/todo/templates/index.html
patch
|
blob
|
history
django_simple/todo/views.py
patch
|
blob
|
history
files/pbs.csh
patch
|
blob
|
history
files/pbs8.csh
patch
|
blob
|
history
files/pbs_md.csh
patch
|
blob
|
history
diff --git
a/django_simple/todo/templates/base.html
b/django_simple/todo/templates/base.html
index
9509dae
..
b84f074
100644
(file)
--- a/
django_simple/todo/templates/base.html
+++ b/
django_simple/todo/templates/base.html
@@
-20,6
+20,10
@@
<div class="page-header">
<h1><a href="/">UNRES server</a> <small> (beta version)</small></h1>
<div class="page-header">
<h1><a href="/">UNRES server</a> <small> (beta version)</small></h1>
+ Lab. of Simul. of Polym. & Lab. of Mol. Model, Faculty of Chemistry, University of Gdansk, 2017
+ <br><span class="fa fa-envelope-o"></span>
+ cezary.czaplewski<span class="fa fa-at"></span>ug.edu.pl
+
<div class="user-name">
{% if not user.is_anonymous %}
<strong>Logged as: </strong> {{user}}
<div class="user-name">
{% if not user.is_anonymous %}
<strong>Logged as: </strong> {{user}}
diff --git
a/django_simple/todo/templates/index.html
b/django_simple/todo/templates/index.html
index
2af565b
..
22a4db2
100644
(file)
--- a/
django_simple/todo/templates/index.html
+++ b/
django_simple/todo/templates/index.html
@@
-65,5
+65,7
@@
{% csrf_token %}
<input type="submit" class="btn" value="Refresh" name="refreshbtn">
</form>
{% csrf_token %}
<input type="submit" class="btn" value="Refresh" name="refreshbtn">
</form>
+<h6 style="text-align:right;float:right;">
+{{ variable }} </h6>
{% endblock %}
\ No newline at end of file
{% endblock %}
\ No newline at end of file
diff --git
a/django_simple/todo/views.py
b/django_simple/todo/views.py
index
62a5034
..
f1fb202
100644
(file)
--- a/
django_simple/todo/views.py
+++ b/
django_simple/todo/views.py
@@
-5,6
+5,7
@@
from .forms import *
from .models import Task
import datetime
import os
from .models import Task
import datetime
import os
+import subprocess
res_codes = [
# 20 canonical amino acids
res_codes = [
# 20 canonical amino acids
@@
-14,6
+15,8
@@
res_codes = [
('LEU', 'L'), ('ARG', 'R'), ('TRP', 'W'), ('ALA', 'A'),
('VAL', 'V'), ('GLU', 'E'), ('TYR', 'Y'), ('MET', 'M'),
('HSD', 'H'),('HSE', 'H'),('HSP', 'H'),
('LEU', 'L'), ('ARG', 'R'), ('TRP', 'W'), ('ALA', 'A'),
('VAL', 'V'), ('GLU', 'E'), ('TYR', 'Y'), ('MET', 'M'),
('HSD', 'H'),('HSE', 'H'),('HSP', 'H'),
+ ('HIE', 'H'), ('HID', 'H'),('HIP', 'H'),
+ ('CYX', 'C'),
]
three_to_one = dict(res_codes)
]
three_to_one = dict(res_codes)
@@
-45,7
+48,7
@@
def from_pdb(file):
if line[0:3] == 'END':
break
if line[0:3] == 'END':
break
- if sequence[-1] == 'XX':
+ while sequence[-1] == 'XX':
del sequence[-1]
if sequence[0] != 'G':
sequence.insert(0,'X')
del sequence[-1]
if sequence[0] != 'G':
sequence.insert(0,'X')
@@
-60,6
+63,7
@@
def from_pdb(file):
def index(request):
user = request.user
tasks = Task.objects.filter(owner=user)
def index(request):
user = request.user
tasks = Task.objects.filter(owner=user)
+ variable = ''
return render(request, "index.html", {
'tasks': tasks
})
return render(request, "index.html", {
'tasks': tasks
})
@@
-432,8
+436,25
@@
def refresh_done(request):
last = line.split()[0]
else:
last = 0
last = line.split()[0]
else:
last = 0
- task.running=1+int(last)*100.0/task.md_nstep
+ task.running=int(1+int(last)*100.0/task.md_nstep)
if task.running>100:
task.running=100
task.save()
if task.running>100:
task.running=100
task.save()
- return redirect('/')
+
+ proc = subprocess.Popen('/opt/torque/bin/qstat', stdout=subprocess.PIPE)
+ njob=0
+ nq=0
+ for line in proc.stdout:
+ if 'piasek4' in line:
+ if line.split()[1]=='test_server':
+ njob+=1
+ if line.split()[-2]=='Q':
+ nq+=1
+ variable='Idle jobs='+str(nq)+' Total jobs='+str(njob)
+
+ return render(request, "index.html", {
+ 'tasks': tasks ,
+ 'variable' : variable
+ })
+
+# return redirect('/')
diff --git
a/files/pbs.csh
b/files/pbs.csh
index
b23e8a7
..
fc5e1e2
100755
(executable)
--- a/
files/pbs.csh
+++ b/
files/pbs.csh
@@
-1,4
+1,4
@@
-#PBS -N test
+#PBS -N test_server
#PBS -q express
#PBS -l nodes=1:ppn=4
#PBS -q express
#PBS -l nodes=1:ppn=4
diff --git
a/files/pbs8.csh
b/files/pbs8.csh
index
b672bb1
..
32055ca
100755
(executable)
--- a/
files/pbs8.csh
+++ b/
files/pbs8.csh
@@
-1,4
+1,4
@@
-#PBS -N test
+#PBS -N test_server
#PBS -q nowy
#PBS -l nodes=4:ppn=4
#PBS -q nowy
#PBS -l nodes=4:ppn=4
diff --git
a/files/pbs_md.csh
b/files/pbs_md.csh
index
19b6780
..
00e3840
100755
(executable)
--- a/
files/pbs_md.csh
+++ b/
files/pbs_md.csh
@@
-1,4
+1,4
@@
-#PBS -N test
+#PBS -N test_server
#PBS -q express
#PBS -l nodes=1:ppn=4
#PBS -q express
#PBS -l nodes=1:ppn=4