8 #ifndef IMPRESTRAINER_SIMPLIFY_RESTRAINT_H
9 #define IMPRESTRAINER_SIMPLIFY_RESTRAINT_H
11 #include <IMP/restrainer/restrainer_config.h>
20 IMPRESTRAINER_BEGIN_NAMESPACE
22 class SimpleConnectivity;
25 class SimpleExcludedVolume;
38 IMPRESTRAINEREXPORT SimpleConnectivity
41 *ref=IMP::core::internal::get_rigid_members_refiner());
54 const atom::Hierarchies &mhs);
62 IMPRESTRAINEREXPORT SimpleDistance
75 const kernel::Particles &ps,
Float diameter);
91 IMPRESTRAINEREXPORT SimpleExcludedVolume
93 const core::RigidBodies &rbs,
94 Refiner *ref= IMP::core::internal::get_rigid_members_refiner());
102 IMPRESTRAINEREXPORT SimpleExcludedVolume
104 const atom::Hierarchies &mhs);
114 atom::Hierarchies
const &mhs, em::DensityMap *dmap);
124 atom::Hierarchy
const &mh, em::DensityMap *dmap);
128 char const *map_fn,
float spacing,
float resolution);
132 IMPRESTRAINER_DEPRECATED_FUNCTION_DECL(2.1)
134 atom::Hierarchies const &mhs);
147 friend IMPRESTRAINEREXPORT SimpleConnectivity
150 friend IMPRESTRAINEREXPORT SimpleConnectivity
157 return connectivity_restraint_;
162 return harmonic_upper_bound_;
167 return sphere_distance_pair_score_;
175 harmonic_upper_bound_->set_mean(mean);
181 static Float k = harmonic_upper_bound_->get_k_from_standard_deviation(sd);
182 harmonic_upper_bound_->set_k(k);
190 harmonic_upper_bound_->set_k(k);
196 get_module_version());
199 void show(std::ostream &out = std::cout)
const
201 out <<
"SimpleConnectivity(";
202 if ( connectivity_restraint_ )
203 connectivity_restraint_->show(out);
210 core::ConnectivityRestraint *connectivity_restraint,
211 core::HarmonicUpperBound *harmonic_upper_bound,
212 core::SphereDistancePairScore *sphere_distance_pair_score)
213 : connectivity_restraint_(connectivity_restraint)
214 , harmonic_upper_bound_(harmonic_upper_bound)
215 , sphere_distance_pair_score_(sphere_distance_pair_score)
218 base::Pointer<core::ConnectivityRestraint> connectivity_restraint_;
219 base::Pointer<core::HarmonicUpperBound> harmonic_upper_bound_;
220 base::Pointer<core::SphereDistancePairScore> sphere_distance_pair_score_;
240 return distance_restraint_;
245 return harmonic_upper_bound_;
253 harmonic_upper_bound_->set_mean(mean);
259 static Float k = harmonic_upper_bound_->get_k_from_standard_deviation(sd);
260 harmonic_upper_bound_->set_k(k);
268 harmonic_upper_bound_->set_k(k);
274 get_module_version());
277 void show(std::ostream &out = std::cout)
const
279 out <<
"SimpleDistance(";
280 if ( distance_restraint_ )
281 distance_restraint_->show(out);
288 core::DistanceRestraint *distance_restraint,
289 core::HarmonicUpperBound *harmonic_upper_bound)
290 : distance_restraint_(distance_restraint)
291 , harmonic_upper_bound_(harmonic_upper_bound)
294 base::Pointer<core::DistanceRestraint> distance_restraint_;
295 base::Pointer<core::HarmonicUpperBound> harmonic_upper_bound_;
316 return diameter_restraint_;
321 return harmonic_upper_bound_;
329 harmonic_upper_bound_->set_mean(mean);
335 static Float k = harmonic_upper_bound_->get_k_from_standard_deviation(sd);
336 harmonic_upper_bound_->set_k(k);
344 harmonic_upper_bound_->set_k(k);
350 get_module_version());
353 void show(std::ostream &out = std::cout)
const
355 out <<
"SimpleDiameter(";
356 if ( diameter_restraint_ )
357 diameter_restraint_->show(out);
364 core::DiameterRestraint *diameter_restraint,
365 core::HarmonicUpperBound *harmonic_upper_bound)
366 : diameter_restraint_(diameter_restraint)
367 , harmonic_upper_bound_(harmonic_upper_bound)
370 base::Pointer<core::DiameterRestraint> diameter_restraint_;
371 base::Pointer<core::HarmonicUpperBound> harmonic_upper_bound_;
393 return excluded_volume_restraint_;
399 get_module_version());
402 void show(std::ostream &out = std::cout)
const
404 out <<
"SimpleExcludedVolume(";
405 if ( excluded_volume_restraint_ )
406 excluded_volume_restraint_->show(out);
414 : excluded_volume_restraint_(excluded_volume_restraint)
433 return fit_restraint_;
439 get_module_version());
442 void show(std::ostream &out = std::cout)
const
444 out <<
"SimpleEMFit(";
445 if ( fit_restraint_ )
446 fit_restraint_->show(out);
454 : fit_restraint_(fit_restraint)
461 IMPRESTRAINER_END_NAMESPACE
SimpleDiameter create_simple_diameter(const kernel::Particles &ps, Float diameter)
Calculate score based on fit to EM map.
Import IMP/kernel/SingletonContainer.h in the namespace.
void set_k(Float k)
Set the spring constant for the HarmonicUpperBound.
Upper bound harmonic function (non-zero when feature > mean)
void set_k(Float k)
Set the spring constant for the HarmonicUpperBound.
void set_mean(Float mean)
Set the mean for the HarmonicUpperBound.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
A score on the distance between the surfaces of two spheres.
Distance restraint between two particles.
SimpleEMFit create_simple_em_fit(atom::Hierarchies const &mhs, em::DensityMap *dmap)
void set_mean(Float mean)
Set the mean for the HarmonicUpperBound.
Class for handling density maps.
Class for handling density maps.
void set_standard_deviation(Float sd)
Set the standard deviation for the HarmonicUpperBound.
SimpleExcludedVolume create_simple_excluded_volume_on_molecules(const atom::Hierarchies &mhs)
void set_k(Float k)
Set the spring constant for the HarmonicUpperBound.
IMP::kernel::Refiner Refiner
functionality for defining rigid bodies
Version and authorship of IMP objects.
Restrain the diameter of a set of points.
Simple connectivity restraint.
SimpleConnectivity create_simple_connectivity_on_rigid_bodies(const core::RigidBodies &rbs, Refiner *ref=IMP::core::internal::get_rigid_members_refiner())
#define IMP_NO_SWIG(x)
Hide the line when SWIG is compiled or parses it.
void set_standard_deviation(Float sd)
Set the standard deviation for the HarmonicUpperBound.
SimpleConnectivity create_simple_connectivity_on_molecules(const atom::Hierarchies &mhs)
Ensure that a set of particles remains connected with one another.
Simple distance restraint between two particles.
void set_mean(Float mean)
Set the mean for the HarmonicUpperBound.
Calculate score based on fit to EM map.
Version and module information for Objects.
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
core::RigidBodies set_rigid_bodies(atom::Hierarchies const &mhs)
SimpleDistance create_simple_distance(const kernel::Particles &ps)
double Float
Basic floating-point value (could be float, double...)
Prevent a set of particles and rigid bodies from inter-penetrating.
Simple diameter restraint.
em::DensityMap * load_em_density_map(char const *map_fn, float spacing, float resolution)
SimpleExcludedVolume create_simple_excluded_volume_on_rigid_bodies(const core::RigidBodies &rbs, Refiner *ref=IMP::core::internal::get_rigid_members_refiner())
Simple excluded volume restraint.
Abstract class to implement hierarchical methods.
void set_standard_deviation(Float sd)
Set the standard deviation for the HarmonicUpperBound.