8 #ifndef IMPRESTRAINER_SIMPLIFY_RESTRAINT_H
9 #define IMPRESTRAINER_SIMPLIFY_RESTRAINT_H
11 #include <IMP/restrainer/restrainer_config.h>
19 IMPRESTRAINER_BEGIN_NAMESPACE
21 class SimpleConnectivity;
24 class SimpleExcludedVolume;
37 IMPRESTRAINEREXPORT SimpleConnectivity
38 create_simple_connectivity_on_rigid_bodies(
const core::RigidBodies &rbs,
40 *ref=IMP::core::internal::get_rigid_members_refiner());
53 const atom::Hierarchies &mhs);
73 const Particles &ps,
Float diameter);
89 IMPRESTRAINEREXPORT SimpleExcludedVolume
91 const core::RigidBodies &rbs,
92 Refiner *ref= IMP::core::internal::get_rigid_members_refiner());
100 IMPRESTRAINEREXPORT SimpleExcludedVolume
102 const atom::Hierarchies &mhs);
112 atom::Hierarchies
const &mhs, em::DensityMap *dmap);
122 atom::Hierarchy
const &mh, em::DensityMap *dmap);
126 char const *map_fn,
float spacing,
float resolution);
128 IMPRESTRAINEREXPORT core::RigidBodies set_rigid_bodies(
129 atom::Hierarchies
const &mhs);
143 create_simple_connectivity_on_rigid_bodies(
144 const core::RigidBodies &rbs,
Refiner *ref);
146 create_simple_connectivity_on_molecules(
147 atom::Hierarchies
const &mhs);
152 return connectivity_restraint_;
157 return harmonic_upper_bound_;
162 return sphere_distance_pair_score_;
170 harmonic_upper_bound_->set_mean(mean);
174 void set_standard_deviation(
Float sd)
176 static Float k = harmonic_upper_bound_->get_k_from_standard_deviation(sd);
177 harmonic_upper_bound_->set_k(k);
185 harmonic_upper_bound_->set_k(k);
188 VersionInfo get_version_info()
const
190 return IMP::VersionInfo(
"restrainer",
191 get_module_version());
194 void show(std::ostream &out = std::cout)
const
196 out <<
"SimpleConnectivity(";
197 if ( connectivity_restraint_ )
198 connectivity_restraint_->show(out);
205 core::ConnectivityRestraint *connectivity_restraint,
206 core::HarmonicUpperBound *harmonic_upper_bound,
207 core::SphereDistancePairScore *sphere_distance_pair_score)
208 : connectivity_restraint_(connectivity_restraint)
209 , harmonic_upper_bound_(harmonic_upper_bound)
210 , sphere_distance_pair_score_(sphere_distance_pair_score)
213 IMP::Pointer<core::ConnectivityRestraint> connectivity_restraint_;
214 IMP::Pointer<core::HarmonicUpperBound> harmonic_upper_bound_;
215 IMP::Pointer<core::SphereDistancePairScore> sphere_distance_pair_score_;
231 create_simple_distance(
const Particles &ps));
235 return distance_restraint_;
240 return harmonic_upper_bound_;
248 harmonic_upper_bound_->
set_mean(mean);
252 void set_standard_deviation(
Float sd)
254 static Float k = harmonic_upper_bound_->get_k_from_standard_deviation(sd);
255 harmonic_upper_bound_->set_k(k);
263 harmonic_upper_bound_->set_k(k);
266 VersionInfo get_version_info()
const
268 return VersionInfo(
"restrainer",
269 get_module_version());
272 void show(std::ostream &out = std::cout)
const
274 out <<
"SimpleDistance(";
275 if ( distance_restraint_ )
276 distance_restraint_->show(out);
283 core::DistanceRestraint *distance_restraint,
284 core::HarmonicUpperBound *harmonic_upper_bound)
285 : distance_restraint_(distance_restraint)
286 , harmonic_upper_bound_(harmonic_upper_bound)
289 IMP::Pointer<core::DistanceRestraint> distance_restraint_;
290 IMP::Pointer<core::HarmonicUpperBound> harmonic_upper_bound_;
305 create_simple_diameter(
const Particles &ps,
311 return diameter_restraint_;
316 return harmonic_upper_bound_;
324 harmonic_upper_bound_->
set_mean(mean);
328 void set_standard_deviation(
Float sd)
330 static Float k = harmonic_upper_bound_->get_k_from_standard_deviation(sd);
331 harmonic_upper_bound_->set_k(k);
339 harmonic_upper_bound_->set_k(k);
342 VersionInfo get_version_info()
const
344 return VersionInfo(
"restrainer",
345 get_module_version());
348 void show(std::ostream &out = std::cout)
const
350 out <<
"SimpleDiameter(";
351 if ( diameter_restraint_ )
352 diameter_restraint_->show(out);
359 core::DiameterRestraint *diameter_restraint,
360 core::HarmonicUpperBound *harmonic_upper_bound)
361 : diameter_restraint_(diameter_restraint)
362 , harmonic_upper_bound_(harmonic_upper_bound)
365 IMP::Pointer<core::DiameterRestraint> diameter_restraint_;
366 IMP::Pointer<core::HarmonicUpperBound> harmonic_upper_bound_;
377 create_simple_excluded_volume_on_rigid_bodies(
378 const core::RigidBodies &rbs,
Refiner*ref)
381 create_simple_excluded_volume_on_molecules(
382 atom::Hierarchies
const &mhs)
388 return excluded_volume_restraint_;
391 VersionInfo get_version_info()
const
393 return VersionInfo(
"restrainer",
394 get_module_version());
397 void show(std::ostream &out = std::cout)
const
399 out <<
"SimpleExcludedVolume(";
400 if ( excluded_volume_restraint_ )
401 excluded_volume_restraint_->show(out);
409 : excluded_volume_restraint_(excluded_volume_restraint)
412 IMP::Pointer<core::ExcludedVolumeRestraint> excluded_volume_restraint_;
428 return fit_restraint_;
431 VersionInfo get_version_info()
const
433 return VersionInfo(
"restrainer",
434 get_module_version());
437 void show(std::ostream &out = std::cout)
const
439 out <<
"SimpleEMFit(";
440 if ( fit_restraint_ )
441 fit_restraint_->show(out);
449 : fit_restraint_(fit_restraint)
452 IMP::Pointer<em::FitRestraint> fit_restraint_;
456 IMPRESTRAINER_END_NAMESPACE