ProSHADE  0.6.5 (NOV 2018)
Protein Shape Descriptors and Symmetry Detection
All Classes Namespaces Files Functions Variables Pages
getDistances.py
1 
4 
5 
7 import sys;
8 import os;
9 
10 cwd = os.getcwd ( );
11 proshadePath = cwd + "/../install/python3";
12 
13 sys.path.append ( proshadePath );
14 import proshade3 as proshade;
15 
16 
18 setUp = proshade.ProSHADE_settings ();
19 
20 
21 setUp.mapResolution = 8.0;
22 setUp.bandwidth = 0;
23 setUp.glIntegOrder = 0;
24 setUp.theta = 0;
25 setUp.phi = 0;
26 
27 # ... Settings regarding B factors
28 setUp.bFactorValue = 80.0;
29 setUp.bFactorChange = 0.0;
30 
31 # ... Settings regarding concentric shells
32 setUp.shellSpacing = 0.0;
33 setUp.manualShells = 0;
34 
35 # ... Settings regarding phase
36 setUp.usePhase = True;
37 
38 # ... Settings regarding map with phases
39 setUp.useCOM = True;
40 setUp.maskBlurFactor = 500.0;
41 setUp.maskBlurFactorGiven = False;
42 
43 # ... Settings regarding weighting the distances
44 setUp.alpha = 1.0;
45 setUp.mPower = 1.0;
46 
47 # ... Settings regarding bands to be ignored
48 setUp.ignoreLsAddValuePy ( 0 );
49 
50 # ... Settings regarding which distances to compute
51 setUp.energyLevelDist = True;
52 setUp.traceSigmaDist = True;
53 setUp.fullRotFnDist = True;
54 
55 # ... Settings regarding hierarchical distance computation
56 setUp.enLevelsThreshold = -999.9;
57 setUp.trSigmaThreshold = -999.9;
58 
59 # ... Settings regarding the task
60 setUp.taskToPerform = proshade.Distances;
61 
62 # ... Settings regarding loudness
63 setUp.verbose = -1;
64 setUp.htmlReport = False;
65 
66 # Get command line info
67 if len(sys.argv) < 3:
68  print ( "Usage: python getDistances.py [filename1] [filename2] ... [filenameX] to get distances from [filename1] to all other files. Minimum of two files." );
69  quit ( -1 );
70 else:
71  hlpPyStrVec = proshade.StringList ( len(sys.argv)-1 );
72  for it in range ( 1, len(sys.argv) ):
73  hlpPyStrVec[ it-1 ] = str(sys.argv[it]);
74 
75 # ... set the file list
76 setUp.structFiles = hlpPyStrVec;
77 
78 
80 runProshade = proshade.ProSHADE ( setUp );
81 
82 
84 crossCorrDists = runProshade.getCrossCorrDists ( );
85 traceSigmaDists = runProshade.getTraceSigmaDists ( );
86 rotationFunctionDists = runProshade.getRotFunctionDists ( );
87 
88 
90 print ( "ProSHADE module version: " + runProshade.getProSHADEVersion() );
91 print ( "" );
92 if len(crossCorrDists) > 0:
93  ccOut = "Cross-correlation distances : " + "%1.5f" % crossCorrDists[0];
94  for it in range ( 1, len(crossCorrDists) ):
95  ccOut = ccOut + "\t" + "%1.5f" % crossCorrDists[it];
96  sys.stdout.write ( ccOut + "\n" );
97 sys.stdout.flush ( );
98 
99 if len(traceSigmaDists) > 0:
100  tsOut = "Trace sigma distances : " + "%1.5f" % traceSigmaDists[0];
101  for it in range ( 1, len(traceSigmaDists) ):
102  tsOut = tsOut + "\t" + "%1.5f" % traceSigmaDists[it];
103  sys.stdout.write ( tsOut + "\n" );
104 sys.stdout.flush ( );
105 
106 if len(rotationFunctionDists) > 0:
107  rfOut = "Rotation function distances : " + "%1.5f" % rotationFunctionDists[0];
108  for it in range ( 1, len(rotationFunctionDists) ):
109  rfOut = rfOut + "\t" + "%1.5f" % rotationFunctionDists[it];
110  sys.stdout.write ( rfOut + "\n" );
111 sys.stdout.flush ( );
112 
113 
115 quit ( );