23 #include <utility/tag/Tag.hh>
29 namespace scoring_grid {
39 solvation_meta_grid->parse_my_tag(tag);
40 return solvation_meta_grid;
50 return "SolvationMetaGrid";
69 for(
core::ShortSize atom_type = 1; atom_type <= max_atom_type;++atom_type)
73 new_grid->set_probe_atom_type(atom_type);
74 new_grid->initialize(center, width, resolution);
91 std::map<core::ShortSize,SingleGridOP>::iterator it =
grid_map_.begin();
94 std::cout <<
"initializing solvation grid for atom type " <<it->first <<std::endl;
95 it->second->refresh(pose,center);
110 std::map<core::ShortSize,SingleGridOP>::iterator grid_iterator(
grid_map_.find(current_atom.type()));
113 utility_exit_with_message(
"Ligands must be parameterized with the FA_STANDARD atom type set for use in the SolvationMetaGrid");
117 total_score += current_grid->get_point(current_atom.xyz());
126 std::map<core::ShortSize,SingleGridOP>::iterator grid_iterator(
grid_map_.find(current_atom.type()));
129 utility_exit_with_message(
"Ligands must be parameterized with the FA_STANDARD atom type set for use in the SolvationMetaGrid");
133 return current_grid->get_point(current_atom.xyz());
138 return "SolvationMetaGrid";
143 std::map<core::ShortSize,SingleGridOP>::iterator it =
grid_map_.begin();
146 it->second->set_chain(chain);
152 utility_exit_with_message(
"SolvationMetaGrid is currently unable to output a BRIX grid, sorry :(");
157 using utility::json_spirit::Value;
158 using utility::json_spirit::Pair;
160 Pair type_record(
"type",Value(
type_));
161 std::vector<Value> grid_map_vector;
163 for(std::map<core::ShortSize,SingleGridOP>::iterator it =
grid_map_.begin();it !=
grid_map_.end();++it)
165 std::vector<Value> current_map_data(utility::tools::make_vector(Value(
core::ShortSize(it->first)),Value(it->second->serialize())));
166 grid_map_vector.push_back(Value(current_map_data));
169 Pair grid_map_data(
"grids",grid_map_vector);
175 return Value(utility::tools::make_vector(type_record,grid_map_data));
181 type_ = data[
"type"].get_str();
182 utility::json_spirit::mArray grid_map_data(data[
"grids"].get_array());
183 for(utility::json_spirit::mArray::iterator it = grid_map_data.begin();it != grid_map_data.end();++it)
185 utility::json_spirit::mArray grid_pair(it->get_array());
188 grid->deserialize(grid_pair[1].get_obj());
195 for(std::map<core::ShortSize,SingleGridOP>::iterator it =
grid_map_.begin();it !=
grid_map_.end();++it)
197 if(!it->second->is_in_grid(residue))