-
Notifications
You must be signed in to change notification settings - Fork 1
/
tcr_docking_angle.cc
77 lines (72 loc) · 1.78 KB
/
tcr_docking_angle.cc
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
#include <iostream>
#include "tcr_complex.h"
using namespace std;
int main(int argc, char** argv)
{
string tcrfile = "";
string pepmhcfile = "";
int mhc_type = 0;
double xshift = 0.0;
double crossshift = 0.0;
double angleshift = 0.0;
bool shift_set = false;
if (argc < 2)
{
cout << "usage:\n" <<
"tcr_docking_angle tcr_complex_file" << endl << "OR" << endl <<
"tcr_docking_angle tcr_file mhcpep_file" << endl << "OR" << endl <<
"tcr_docking_angle tcr_complex_file mhc_type" << endl << "OR" << endl <<
"tcr_docking_angle tcr_file mhcpep_file mhc_type" << endl <<
"MHC Type: 0 = Class I; 1 = Class II; 2 = CD1d, CD1b; 3 = MR1; 4 = CD1d (4EI5); 5 = CD1c" << endl;
exit(0);
}
else if (argc == 2)
{
tcrfile = argv[1];
}
else if (argc == 3)
{
tcrfile = argv[1];
pepmhcfile = argv[2];
if (pepmhcfile.length() == 1)
{
mhc_type = atoi(argv[2]);
pepmhcfile = "";
}
}
else if (argc == 4)
{
tcrfile = argv[1];
pepmhcfile = argv[2];
mhc_type = atoi(argv[3]);
}
else if (argc == 6)
{
tcrfile = argv[1];
mhc_type = atoi(argv[2]);
xshift = atof(argv[3]);
crossshift = atof(argv[4]);
angleshift = atof(argv[5]);
shift_set = true;
}
else if (argc == 7)
{
tcrfile = argv[1];
pepmhcfile = argv[2];
mhc_type = atoi(argv[3]);
xshift = atof(argv[4]);
crossshift = atof(argv[5]);
angleshift = atof(argv[6]);
shift_set = true;
}
TCRComplex comp(tcrfile, pepmhcfile, mhc_type);
if (shift_set)
{
comp.SetXShift(xshift);
comp.SetCrossShift(crossshift);
comp.SetTiltShift(angleshift);
}
//comp.SetZShift(8.0); // trying this for start3 position
comp.CalcDockingAngle();
return 0;
}