26 #include <basic/Tracer.hh>
29 #include <utility/io/izstream.hh>
34 #include <utility/vector1.hh>
39 namespace geometric_solvation {
41 static basic::Tracer
tr(
"core.scoring.DatabaseOccSolEne");
46 min_occ_energy_(min_occ_energy)
50 utility_exit_with_message(
"cannot presently use OccludedHbondSolEnergy in any mode but FA_STANDARD_DEFAULT, current mode is " + etable_name );
58 tr <<
"reading params" << std::endl;
70 bool const process_donors
77 occ_data_.resize( n_atom_types );
78 for (
Size j=1; j <= n_atom_types; ++j ) {
79 occ_data_[j].resize( n_atom_types );
80 for (
Size k=1; k <= n_atom_types; ++k ) {
86 utility::io::izstream stream;
87 stream.open( database_name );
88 if ( !stream.good() ) {
89 utility_exit_with_message(
"Unable to open " + database_name );
99 while ( getline( stream, line ) ) {
100 std::istringstream l(line);
102 std::string polar_atom_type_name, occ_atom_type_name;
103 l >> polar_atom_type_name;
105 l >> occ_atom_type_name;
109 Real amp_reweighting(0.387829);
110 if ( process_donors ) {
111 if ( polar_atom_type_name ==
"NH2O" ) {
112 amp_reweighting *= 0.8534;
113 }
else if ( polar_atom_type_name ==
"Narg" ) {
114 amp_reweighting *= 0.9365;
115 }
else if ( polar_atom_type_name ==
"Nbb" ) {
116 amp_reweighting *= 0.7724;
117 }
else if ( polar_atom_type_name ==
"Nlys" ) {
118 amp_reweighting *= 0.8122;
119 }
else if ( polar_atom_type_name ==
"Ntrp" ) {
120 amp_reweighting *= 0.9530;
121 }
else if ( polar_atom_type_name ==
"OH" ) {
122 amp_reweighting *= 0.8968;
124 utility_exit_with_message(
"unrecognized donor polar atom type " + polar_atom_type_name );
127 if ( polar_atom_type_name ==
"Nhis" ) {
128 amp_reweighting *= 1.0727;
129 }
else if ( polar_atom_type_name ==
"OCbb" ) {
130 amp_reweighting *= 1.1669;
131 }
else if ( polar_atom_type_name ==
"OH" ) {
132 amp_reweighting *= 1.0333;
133 }
else if ( polar_atom_type_name ==
"ONH2" ) {
134 amp_reweighting *= 0.9672;
135 }
else if ( polar_atom_type_name ==
"OOC" ) {
136 amp_reweighting *= 0.8558;
138 utility_exit_with_message(
"unrecognized donor polar atom type " + polar_atom_type_name );
143 Real amp, dist_mu, twice_dist_sigma_sq, cos_angle_mu, twice_cos_angle_sigma_sq;
144 l >> amp; l >> dist_mu; l >> twice_dist_sigma_sq; l >> cos_angle_mu; l >> twice_cos_angle_sigma_sq;
145 if ( l.fail() ) utility_exit_with_message(
"bad format in " + database_name);
148 occ_data_[ polar_atom_type_index ][ occ_atom_type_index ][
OccFitParam_amp ] = amp * amp_reweighting;
149 occ_data_[ polar_atom_type_index ][ occ_atom_type_index ][
OccFitParam_dist_mu ] = dist_mu;
157 Real max_dist_to_compute = dist_mu + dist_away_from_mu;
158 occ_data_[ polar_atom_type_index ][ occ_atom_type_index ][
OccFitParam_max_sq_dist ] = max_dist_to_compute * max_dist_to_compute;
163 Real min_cos_angle_to_compute = cos_angle_mu - cos_angle_away_from_mu;
164 if ( min_cos_angle_to_compute < -1. ) min_cos_angle_to_compute = -1.;
178 assert ( twice_sigma_sq > 0. );