forked from lkwagner/autogenv2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PropertiesRunner.py
36 lines (30 loc) · 1.03 KB
/
PropertiesRunner.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from __future__ import print_function
import os
import numpy as np
import subprocess as sub
import shutil
from submitter import LocalSubmitter
class LocalPropertiesRunner(LocalSubmitter):
""" Runs a crystal properties job defined by CrystalWriter. """
_name_='LocalPropertiesRunner'
def __init__(self, BIN='~/bin/'):
self.BIN=BIN
self.np=1
self.nn=1
self.jobname='ag_properties'
self._queueid=None
#-------------------------------------------------
def check_status(self):
# This is only for a queue, so just never return 'running'.
return 'ok'
#-------------------------------------------------
def run(self,propinpfn,propoutfn):
""" Submits executibles using _qsub. """
exe = self.BIN+"properties < %s"%propinpfn
# Not needed for nonparallel.
#final_commands = ["rm *.pe[0-9]","rm *.pe[0-9][0-9]"]
prep_commands = []
final_commands = []
loc = os.getcwd()
qids=self._qsub(exe,prep_commands,final_commands,self.jobname,propoutfn,loc)
self._queueid=qids