-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSubprocess.py
More file actions
47 lines (38 loc) · 1.52 KB
/
Copy pathSubprocess.py
File metadata and controls
47 lines (38 loc) · 1.52 KB
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
37
38
39
40
41
42
43
44
45
46
47
import os
import sys
import subprocess
import shutil
class ExecuteFilter:
""" Subprocess call to the Filter program written in Java.
Specific to the Ion Environments project. """
def __init__ (self, inPath, chain, outPath, ppPath = None):
self.inPath = inPath
self.chain = chain
self.outPath = outPath
def Filter(self):
arglist = ["java", "Filter", "-f", self.inPath, "-c", self.chain, "-o", self.outPath, "-v"]
process = subprocess.Popen(arglist, stdout=subprocess.PIPE)
stdout, stderr = process.communicate()
class ExecutePotentialProfile:
""" Subprocess call to the Potential Profile program written in Java.
Specific to the Ion Environments project. """
def __init__ (self, inPath, chain, outPath, ppPath = None):
self.inPath = inPath
self.chain = chain
self.outPath = outPath
self.ppPath = ppPath
def PotentialProfile(self):
arglist = ["java", "PotentialProfile", "-p", self.ppPath, "-f", self.inPath, "-c", self.chain, "-o", self.outPath]
process = subprocess.Popen(arglist, stdout=subprocess.PIPE)
stdout, stderr = process.communicate()
class ExecuteSimplex:
""" Subprocess call to the Simplex program written in Java.
Specific to the Ion Environments project. """
def __init__ (self, inPath, chain, outPath, ppPath = None):
self.inPath = inPath
self.chain = chain
self.outPath = outPath
def Simplex(self):
arglist = ["java", "Simplexn", "-f", self.inPath, "-c", "@", "-o", self.outPath]
process = subprocess.Popen(arglist, stdout=subprocess.PIPE)
stdout, stderr = process.communicate()