-
Notifications
You must be signed in to change notification settings - Fork 7
/
CleftObj.py
executable file
·45 lines (30 loc) · 1.24 KB
/
CleftObj.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
37
38
39
40
41
42
43
44
import copy
import hashlib
class CleftObj(object):
def __init__(self):
# Physical filepath
self.CleftFile = ''
# Name of object in PyMOL
self.CleftName = ''
# Name of the target it was generated from
self.UTarget = ''
# Partition flag
self.Partition = False
# Reference to a cleft object
self.PartitionParent = None
self.Color = ''
# Allows to not calculate volume twice
self.Volume = 0.000
self.Index = 0
''' ==================================================================================
FUNCTION Set_CleftMD5: Provides a unique ID to a cleft file
================================================================================== '''
def Set_CleftMD5(self):
md5 = hashlib.md5()
md5.update(self.CleftFile.encode('utf-8'))
self.CleftMD5 = md5.digest()
''' ==================================================================================
FUNCTION Copy: Copies an instance of a class
================================================================================= '''
def Copy(self):
return copy.deepcopy(self)