30 #include <basic/Tracer.hh>
32 #include <utility/vector1.hh>
39 static basic::Tracer
TR(
"core.scoring.constraints.FabConstraint");
43 namespace constraints {
59 out <<
"FabConstraint is an AmbiguousConstraint containing the following " <<
member_constraints().size() <<
" constraints: " << std::endl;
64 out <<
" ...all member constraints of this FabConstraint shown." << std::endl;
82 while(getline(data, line)){
84 std::istringstream line_stream(line);
86 line_stream >> entry1 >> entry2 >> entry3;
90 line_stream >> cstname >> entry1 >> entry2 >> entry3;
92 TR.Info <<
"Entry1:" << entry1 <<
" Entry2:" << entry2 <<
" Entry3:" << entry3 << std::endl;
93 tempres1.push_back(entry1);
94 tempres2.push_back(entry2);
98 for (
Size n=1; n<= tempres1.size(); ++n){
103 TR.Info <<
"Penalizing residues which are not in range "
104 << res1[1] <<
"-" << res2[1] <<
", "
105 << res1[2] <<
"-" << res2[2] <<
", "
106 << res1[3] <<
"-" << res2[3] <<
", "
107 << res1[4] <<
"-" << res2[4] <<
", "
108 << res1[5] <<
"-" << res2[5] <<
", "
109 << res1[6] <<
"-" << res2[6]
110 <<
" and at interface with antigen chains " << antchains << std::endl;
116 while( data.good() && (data.get() !=
'\n') ) {}
117 if (!data.good()) data.setstate( std::ios_base::eofbit );
131 char chain = tempres[tempres.length()-1];
134 if (isdigit(tempres[tempres.length()-2])){
135 residue = tempres.substr(0,tempres.length()-1);
136 resnum = atoi(residue.c_str());
137 pose_resnum = pose.
pdb_info()->pdb2pose(chain,resnum);
140 ins_code = tempres[tempres.length()-2];
141 residue = tempres.substr(0,tempres.length()-2);
142 resnum = atoi(residue.c_str());
143 pose_resnum = pose.
pdb_info()->pdb2pose(chain,resnum, ins_code);
159 for (
Size m = 1 ; m <= stop_res ; ++m){
160 if (m >= start_res && m <= stop_res){
161 penalty.push_back(1.5);
165 penalty[res1[n]-2] = 0.5;
166 penalty[res1[n]-1] = 0.5;
167 penalty[res2[n]+1] = 0.5;
168 penalty[res2[n]+2] = 0.5;
169 for (
Size p = res1[n] ; p <= res2[n] ; ++p){
172 if(n < res2.size()) n++;
176 penalty.push_back(0);
197 Size ab_start_chain = pose.
chain(res1[1]);
198 Size ab_stop_chain = pose.
chain(res1[res1.size()]);
215 for (
Size i = ab_start_res ; i <= ab_stop_res ; ++i){
218 for (
Size j = ant_start_res ; j <= ant_stop_res ; ++j){
221 TR.Info <<
"Residue " << pose.
residue(i).
name3() <<
" " << pose.
pdb_info()->pose2pdb(i) <<
" is at interface" << std::endl;
223 runtime_assert(atom1.valid() && atom2.valid());
224 if (abpenalty[i] == 1.5){
227 else if (abpenalty[i] == 0.5){