33 #include <basic/datacache/BasicDataCache.hh>
39 #include <utility/exit.hh>
40 #include <basic/prof.hh>
41 #include <basic/Tracer.hh>
49 static basic::Tracer
TR(
"protocols.SurfaceDocking.SurfaceOrientMover");
54 namespace surface_docking {
57 using namespace protocols::moves;
58 using namespace protocols::surface_docking;
74 Vector ProteinCG, SurfaceCG;
77 TR<<
"Number of Jumps:"<<pose.
num_jump()<<std::endl;
79 TR<<
"Initial Protein Centroid:"<<ProteinCG<<std::endl;
80 TR<<
"Surface Centroid:"<<SurfaceCG<<std::endl;
110 Vector surfacePointIntersection=
113 TR<<
"SurfacePointIntersection:"<<surfacePointIntersection<<std::endl;
117 Real ProteinZdistance=surfacePointIntersection.distance(ProteinCG);
126 TR<<
"AC_Intersect:"<<AC_Intersect<<std::endl;
127 TR<<
"AB_Intersect:"<<AB_Intersect<<std::endl;
132 Real ProjectionDistanceAC= AC_Intersect.distance(surfacePointIntersection);
134 Real ProjectionDistanceAB= AB_Intersect.distance(surfacePointIntersection);
137 Real ABdistance=surfaceVectors.
A.distance(surfaceVectors.
B);
138 Real ACdistance=surfaceVectors.
A.distance(surfaceVectors.
C);
139 TR<<
"AC Distance:"<<ACdistance<<std::endl;
140 TR<<
"AB Distance:"<<ABdistance<<std::endl;
141 Vector Trans_AB_Vec,Trans_AC_Vec;
143 if (ProjectionDistanceAB <= ABdistance/2.0
144 && ProjectionDistanceAC <= ACdistance/2.0) {
145 ProteinCG = ProteinCG;
151 ABdistance,surfaceVectors.
vecAB);
153 ACdistance,surfaceVectors.
vecAC);
155 TR<<
"Trans AC Vec:"<<Trans_AC_Vec<<std::endl;
156 TR<<
"Trans AB Vec:"<<Trans_AB_Vec<<std::endl;
157 TR<<
"ProteinZdistance:"<<ProteinZdistance<<std::endl;
161 NewProteinCG.x()=Trans_AB_Vec.x()+SurfaceCG.x();
162 NewProteinCG.y()=Trans_AC_Vec.y()+SurfaceCG.y();
163 NewProteinCG.z()=ProteinZdistance+SurfaceCG.z();
170 Real ZCord4ProteinOnSurface=-((a*NewProteinCG.x())+(b*NewProteinCG.y())+d)/
c;
171 NewProteinCG.z()=ZCord4ProteinOnSurface;
173 TR<<
"Projection of Protein CG on Plane (test)"<<NewProteinCG<<std::endl;
174 NewProteinCG=NewProteinCG+(ProteinZdistance*UnitNormal);
176 TR<<
"Translated ProteinCG:"<<NewProteinCG<<std::endl;
178 Vector surfaceNewProteinCGIntersection=
180 TR<<
"Intersection point of Translated ProteinCG on the plane:"
181 <<surfaceNewProteinCGIntersection<<std::endl;
184 Real trans_magnitude=ProteinCG.distance(NewProteinCG);
187 TransMover->trans_axis(NewProteinCG-ProteinCG);
189 TransMover->step_size( trans_magnitude );
190 TransMover->apply(pose);
193 TR<<
"Translated ProteinCGIntersection:"<<
194 surfaceNewProteinCGIntersection-NewProteinCG<<std::endl;
195 surfaceVectors.
slideaxis=surfaceNewProteinCGIntersection-NewProteinCG;
196 TR<<
"SlideAxis:"<<surfaceVectors.
slideaxis<<std::endl;
200 TransMover->trans_axis(UnitNormal);
201 TransMover->step_size( 10.0 );
204 surfaceContact.
apply(pose);
210 Real bb,ibb,floor_ceil_ibb;
213 if ( ProjectionDistance > VectorDistance/2.0 ){
214 bb = ProjectionDistance / VectorDistance ;
216 floor_ceil_ibb = bb - ibb;
218 if (floor_ceil_ibb <= 0.5){
219 TransVec=floor_ceil_ibb*
Vec;
222 TransVec=floor_ceil_ibb*
Vec;
230 return "SurfaceOrientMover";