-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfraglets.py
More file actions
40 lines (30 loc) · 1008 Bytes
/
Copy pathfraglets.py
File metadata and controls
40 lines (30 loc) · 1008 Bytes
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
#
# fraglets.py:
#
# TOP INTERFACE: DEFINITION OF PYTHON WRAPPING CLASS FOR C++ `Fraglets` CLASS.
#
#
try:
import cFraglets
except:
strErr = "\n\n`cFraglets` module not found, "
strErr += "run `$ make car_py_module`! \n"
raise RuntimeError(strErr)
class fraglets():
def __init__(self):
# Construct the `Car` object and store a Python capsule with
# a C++ pointer to the object
#
# Take a look at function `construct` in `car2py.cpp` file
self.cfraglets = cFraglets.construct()
self.unimolTags = cFraglets.getUnimolTags(self.cfraglets)
self.iter = 0
def run(self, iter,size,quiet=False):
cFraglets.run(self.cfraglets,iter,size,quiet)
self.iter = cFraglets.getIter(self.cfraglets)
def parse(self, line):
cFraglets.parse(self.cfraglets,line)
def drawGraphViz(self):
cFraglets.drawGraphViz(self.cfraglets)
def __delete__(self):
cFraglets.delete_object(self.cfraglets)