Skip to content

Commit

Permalink
fix another QChem tweaking bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xhqu1981 committed Dec 3, 2015
1 parent 23530a3 commit 1cf03d7
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions custodian/qchem/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,24 @@ def _modify_qchem_according_to_version(cls, qchem_cmd):
cur_version = get_qchem_version()
except:
cur_version = parse_version("4.3.0")
if cur_version >= parse_version("4.3.0"):
if (cmd2 is not None) and (cmd2[0] == "qchem"):
if "-dbg" not in cmd2:
cmd2.insert(1, "-dbg")
if "-seq" in cmd2:
cmd2.remove("-seq")
if "PBS_JOBID" in os.environ and \
("hopque" in os.environ["PBS_JOBID"] or
"edique" in os.environ["PBS_JOBID"]):
if "-pbs" not in cmd2:
cmd2.insert(2, "-pbs")
else:
if "-dbg" in cmd2:
cmd2.remove("-dbg")
if "-pbs" in cmd2:
cmd2.remove("-pbs")
if cmd2 is not None:
if cur_version >= parse_version("4.3.0"):
if cmd2[0] == "qchem":
if "-dbg" not in cmd2:
cmd2.insert(1, "-dbg")
if "-seq" in cmd2:
cmd2.remove("-seq")
if "PBS_JOBID" in os.environ and \
("hopque" in os.environ["PBS_JOBID"] or
"edique" in os.environ["PBS_JOBID"]):
if "-pbs" not in cmd2:
cmd2.insert(2, "-pbs")
else:
if "-dbg" in cmd2:
cmd2.remove("-dbg")
if "-pbs" in cmd2:
cmd2.remove("-pbs")
print("CMD2 is, ", cmd2)
return cmd2

def _set_qchem_memory(self, qcinp=None):
Expand Down

0 comments on commit 1cf03d7

Please sign in to comment.