if instance.ready and not instance.done and instance.running==0:
if (not os.path.isdir(instance.jobdirname)):
os.mkdir(instance.jobdirname)
- os.chdir(instance.jobdirname)
+# os.chdir(instance.jobdirname)
CUTOFF=7.00000 WCORR4=0.00000
"""
- with open('file.inp','w') as f:
+ with open(instance.jobdirname+'/file.inp','w') as f:
f.write(instance.name + ' UNRES server job'+ '\n')
if instance.type == 'min' :
if instance.type == 'min':
+ os.chdir(instance.jobdirname)
shutil.copy('../files/pbs.csh','.')
ret_code = subprocess.Popen(' /opt/torque/bin/qsub pbs.csh', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ os.chdir('..')
elif instance.type == 'md':
+ os.chdir(instance.jobdirname)
f1 = open('../files/pbs_md.csh', 'r')
f2 = open('pbs.csh', 'w')
for line in f1:
f1.close()
ret_code = subprocess.Popen(' /opt/torque/bin/qsub pbs.csh', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ os.chdir('..')
else:
tmp1=json.loads(instance.remd_multi_m)
nreplicas=sum(map(int, tmp1))
else:
pbs = '#PBS -l nodes='+str(nodes)+':ppn=4+1:ppn='+str(reszta)
+ os.chdir(instance.jobdirname)
f1 = open('../files/pbs8.csh', 'r')
f2 = open('pbs8.csh', 'w')
for line in f1:
tmp1=json.loads(instance.remd_multi_t)
f2.write(line.replace('$temperatures','"'+" ".join(tmp1)+'"'))
f1.close()
- f2.close()
+ f2.close()
+ os.chdir('..')
# write wham & cluster input
- with open('file_wham.inp','w') as f:
+ with open(instance.jobdirname+'/file_wham.inp','w') as f:
if instance.md_nstep/instance.remd_nstex*nreplicas<=8000:
isampl=1
else:
f.write('plik.pdb\n')
- with open('file_cluster.inp','w') as f:
+ with open(instance.jobdirname+'/file_cluster.inp','w') as f:
f.write(instance.name + ' UNRES server job'+ '\n')
f.write('nres='+str(len(seq))
+' one_letter rescale=2 PRINT_CART PDBOUT=1 iopt=1'
for i in range(0,len(seq),80):
f.write(seq[i:i+80]+'\n')
f.write(write_ssbond(instance.ssbond))
-
+
+ os.chdir(instance.jobdirname)
ret_code = subprocess.Popen(' /opt/torque/bin/qsub pbs8.csh', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ os.chdir('..')
print ret_code.stdout.readlines()
- os.chdir('..')
logger.warning("Dir \"%s\" has been saved." % instance.jobdirname)
@receiver(post_delete, sender=Task)