15 #include <numeric/constants.hh>
16 #include <numeric/xyz.functions.hh>
17 #include <utility/io/izstream.hh>
18 #include <utility/io/ozstream.hh>
40 Mat R = sir.
M.transposed()*sjr.
M;
47 if( fabs(R.zx())-1.0 < 0.00001 ) {
48 theta = -asin(R.zx());
49 Real const ctheta = cos(theta);
50 psi = atan2(R.zy()/ctheta,R.zz()/ctheta);
51 phi = atan2(R.yx()/ctheta,R.xx()/ctheta);
54 theta = numeric::constants::d::pi / 2.0;
55 psi = atan2(R.xy(),R.xz());
57 theta = -numeric::constants::d::pi / 2.0;
58 psi = atan2(-R.xy(),-R.xz());
71 hh =
new char[16*16*16*24*12*24];
72 he =
new char[16*16*16*24*12*24];
73 hl =
new char[16*16*16*24*12*24];
74 ee =
new char[16*16*16*24*12*24];
75 el =
new char[16*16*16*24*12*24];
76 ll =
new char[16*16*16*24*12*24];
77 fillarray(
hh,datadir+
"/hhpb.dat.gz.hist6.dat.gz.bin");
78 fillarray(
he,datadir+
"/hepb.dat.gz.hist6.dat.gz.bin");
79 fillarray(
hl,datadir+
"/hlpb.dat.gz.hist6.dat.gz.bin");
80 fillarray(
ee,datadir+
"/eepb.dat.gz.hist6.dat.gz.bin");
81 fillarray(
el,datadir+
"/elpb.dat.gz.hist6.dat.gz.bin");
82 fillarray(
ll,datadir+
"/llpb.dat.gz.hist6.dat.gz.bin");
95 std::cout <<
"reading " << fname << std::endl;
96 utility::io::izstream in(fname,std::ios::binary);
97 if(!in.good()) utility_exit_with_message(
"bad file");
98 in.read(a,16*16*16*24*12*24);
105 std::cout <<
"reading " << fname << std::endl;
106 utility::io::izstream in(fname);
107 if(!in.good()) utility_exit_with_message(
"bad file");
108 for(
int i = 0; i < 16*16*16*24*12*24; ++i){
111 int tmp = (
int)((log(f)+2.5)*12.0);
112 a[i] = (f==0.0f) ? ((
char)-127) : ((
char)max(-126,min(128,tmp)));
117 std::cout <<
"writing: " << fname+
".bin.gz" << std::endl;
118 utility::io::ozstream out(fname+
".bin",std::ios::out | std::ios::binary);
119 out.write(a,16*16*16*24*12*24);
133 using numeric::constants::d::pi_2;
134 if( ss1==
'L' || ss2==
'L' )
return 0.0;
135 if( s1.
global2local(s2.
v).length_squared() > 64.0 )
return 0.0;
137 if( ss1==
'E' && ss2==
'E' ) a =
ee;
138 else if( ss2==
'E' || ss1==
'E' ) a =
he;
144 Real dx,dy,dz,ex,ey,ez;
145 if((ss1==
'E' && ss2==
'H') || (ss1==
'L' && ss2==
'H') || (ss1==
'L' && ss2==
'E')){
151 int iex = ex/pi_2*24.0 + 12.0;
152 int iey = ey/pi_2*24.0 + 6.0;
153 int iez = ez/pi_2*24.0 + 12.0;
154 int index = idx + 16*idy + 16*16*idz + 16*16*16*iex + 16*16*16*24*iey + 16*16*16*24*12*iez;
155 if( 0 > index || index >= 16*16*16*24*12*24 ) utility_exit_with_message(
"FOO");
160 return val == -127 ? 0.0 : min(10.0,exp(((
float)val)/12.0-2.5));
181 if( CBi.distance_squared(CBj) > 64.0 )
return 0.0;
195 float tot_score = 0.0;
198 float s1 =
score(pose,ir,jr);
199 float s2 =
score(pose,jr,ir);
212 float tot_score = 0.0;
215 float s1 =
score(pose,ir,jr);
216 float s2 =
score(pose,jr,ir);