-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocalCC.py
More file actions
83 lines (60 loc) · 2.13 KB
/
Copy pathlocalCC.py
File metadata and controls
83 lines (60 loc) · 2.13 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# localCC.py
#
# Copyright 2017 Taylor <taylor@taylor-PC>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
import structureTools_TaylorArnaud as st
if __name__ == '__main__':
if (len(sys.argv)== 2):
prot=sys.argv[1]
print("Default mode !")
else:
print("Le format d'entrée attendu est : structureTools_TaylorArnaud.py fichier_1.PDB fichier_2.PDB [atomes.txt]")
exit()
########################################
#~ prot=sys.argv[1]
ct=dict()
## Pour chaque conformation données : de 0 à 5000 (automatiser la lecture des confs)
for i in range(0,5000,10) :
l=st.lecture_dossier("./","A?_"+str(i)+".PDB") #Lecture dossier ref
l2=st.lecture_dossier("./","B_"+str(i)+".PDB") #Lecture dossier dyn
# Fusion des listes pour faire
l2=l2[0]+l2[1]
l=l[0]+l[1]
#### On a la liste des fichiers (A1,A2,A3,A4) à comparer au fichier ref(B)
p2=st.lirePDB(l2[0]) # Lecture du PDB de référence
st.cdm(p2)
for p1 in l: # On parcours la liste des fichiers à lire
#~ print(p1) #ok
p1= st.lirePDB(p1)
st.cdm(p1)
st.contact(p1,p2,ct)
print(len(ct))
###########
for i in ct.keys():
for j in ct[i].keys():
ct[i][j]= {'freq':0, 'tps':0, 'val':ct[i][j]}
ct[i][j]['freq'] = (ct[i][j]['val'])/500
ct[i][j]["tps"]=(ct[i][j]['val'])*(10/500)
for l in ct.keys():
for j in ct[l].keys():
if int(j[2:4]) in list(range(23,38)):
print(l," : ",j)