File tree Expand file tree Collapse file tree 3 files changed +4
-25
lines changed Expand file tree Collapse file tree 3 files changed +4
-25
lines changed Original file line number Diff line number Diff line change 11
11
import warnings
12
12
13
13
from pymatgen .io .qchem .inputs import QCInput
14
+ from pymatgen .command_line .critic2_caller import Critic2Caller
14
15
from monty .serialization import loadfn , dumpfn
15
16
16
17
from custodian import Custodian
@@ -77,29 +78,7 @@ def run_task(self, fw_spec):
77
78
input_script += ["" ]
78
79
input_script = "\n " .join (input_script )
79
80
80
- with open ('input_script.cri' , 'w' ) as f :
81
- f .write (input_script )
82
- args = ["critic2" , "input_script.cri" ]
83
-
84
- rs = subprocess .Popen (args ,
85
- stdin = subprocess .PIPE ,
86
- stdout = subprocess .PIPE ,
87
- stderr = subprocess .PIPE ,
88
- close_fds = True )
89
-
90
- stdout , stderr = rs .communicate ()
91
- stdout = stdout .decode ()
92
-
93
- if stderr :
94
- stderr = stderr .decode ()
95
- warnings .warn (stderr )
96
- with open ('stdout.cri' , 'w' ) as f :
97
- f .write (stdout )
98
- with open ('stderr.cri' , 'w' ) as f :
99
- f .write (stderr )
100
-
101
- if rs .returncode != 0 :
102
- raise RuntimeError ("critic2 exited with return code {}." .format (rs .returncode ))
81
+ caller = Critic2Caller (input_script )
103
82
104
83
if compress_at_end :
105
84
compress_file (cube )
Original file line number Diff line number Diff line change 10
10
from fireworks import LaunchPad
11
11
from pymongo import MongoClient
12
12
13
- from pymatgen import SETTINGS
13
+ from pymatgen . settings import SETTINGS
14
14
15
15
__author__ = "Kiran Mathew"
16
16
__credits__ = "Anubhav Jain"
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ tqdm==4.58.0
8
8
pybtex == 0.24.0
9
9
ruamel.yaml == 0.16.12
10
10
pandas == 1.2.2
11
- pymatgen == 2021.2.16
11
+ pymatgen == 2021.3.3
12
12
custodian == 2021.2.8
13
13
networkx == 2.5
14
14
pydash == 4.9.2
You can’t perform that action at this time.
0 commit comments