23 #include <basic/datacache/BasicDataCache.hh>
26 #include <numeric/xyz.functions.hh>
27 #include <numeric/xyz.io.hh>
28 #include <numeric/xyzVector.hh>
31 #include <utility/vector1.hh>
32 #include <utility/exit.hh>
33 #include <basic/Tracer.hh>
40 static basic::Tracer
TR(
"protocols.surfaceDocking.SurfaceParameters");
43 namespace surface_docking {
45 using namespace numeric;
59 SURFA0=SplitSurfaceVectorString(strSURFA0);
60 SURFA1=SplitSurfaceVectorString(strSURFA1);
61 SURFA2=SplitSurfaceVectorString(strSURFA2);
62 TR<<
"Surface Vectors value inside constructor:"<<std::endl;
63 TR<<
"SURFA0:"<<SURFA0<<std::endl;
64 TR<<
"SURFA1:"<<SURFA1<<std::endl;
65 TR<<
"SURFA2:"<<SURFA2<<std::endl;
106 TR<<
"Translated Surface Vectors CoOrdinates"<<std::endl;
107 TR<<
"SURFA0:"<<
A<<std::endl;
108 TR<<
"SURFA1:"<<
B<<std::endl;
109 TR<<
"SURFA2:"<<
C<<std::endl;
131 Vector crossBC,cross1C,
CB,CB_C,intersection,inv_crossBC;
132 CB = point2 - point1 ;
133 cross1C = cross ( CB, Cvector );
134 crossBC = cross ( Bvector, Cvector );
135 w = inner_product ( cross1C, crossBC);
136 DD = inner_product ( crossBC, crossBC);
138 return (point1 + t * Bvector);
146 AB = Bpoint - Apoint;
147 AC = Cpoint - Apoint;
158 normalto3 = CalcNormalVector( Apoint, Bpoint, Cpoint );
159 plane123.push_back(normalto3.x());
160 plane123.push_back(normalto3.y());
161 plane123.push_back(normalto3.z());
163 (- normalto3.x()* Apoint.x() -
164 normalto3.y()* Apoint.y() - normalto3.z() * Apoint.z());
176 Vector point_intersection;
178 -( plane_abcd [1] * point_outofplane.x() +
179 plane_abcd [2] * point_outofplane.y() +
180 plane_abcd [3] * point_outofplane.z() + plane_abcd [3] )
182 ( plane_abcd [1] * plane_abcd [1] + plane_abcd [2] * plane_abcd [2]
183 + plane_abcd [3] * plane_abcd [3] );
184 point_intersection = point_outofplane - t * normal_plane;
185 return point_intersection;
197 if ( str.size() >= 52 ) {
199 tmp[1] = str.substr( 30, 7 );
200 tmp[2] = str.substr( 38, 7 );
201 tmp[3] = str.substr( 46, 7 );
202 Vector coords( atof( tmp[1].c_str() ), atof( tmp[2].c_str() ), atof( tmp[3].c_str() ));
205 utility_exit_with_message(
"Unable to convert remark '" + str +
"' into surface vector" );