number of cluster > 9
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Thu, 3 Sep 2020 22:52:29 +0000 (00:52 +0200)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Thu, 3 Sep 2020 22:52:29 +0000 (00:52 +0200)
django_simple/todo/views.py

index 4db3747..7a541dc 100644 (file)
@@ -1188,7 +1188,7 @@ def refresh_done0(task):
          
           for i in range(1,task.remd_cluster_n+1):
            try:
-            with open(task.jobdirname+'/file_wham_T'+str(int(task.remd_cluter_temp))+'K_000'+str(i)+'.pdb', 'r') as f:
+            with open(task.jobdirname+'/file_wham_T'+str(int(task.remd_cluter_temp))+'K_'+str(i).zfill(4)+'.pdb', 'r') as f:
                  line=f.readline()
                  remd_models.append('Cluster'+str(i)+' '+' '.join(line.split()[-3:]))
            except EnvironmentError: