9 #ifndef IMPISD_GAUSSIAN_EM_RESTRAINT_H
10 #define IMPISD_GAUSSIAN_EM_RESTRAINT_H
12 #include <IMP/isd/isd_config.h>
24 #include <Eigen/Dense>
25 #include <boost/unordered_map.hpp>
26 #include <cereal/access.hpp>
27 #include <cereal/types/vector.hpp>
29 IMPISD_BEGIN_NAMESPACE
67 Float model_cutoff_dist,
Float density_cutoff_dist,
69 bool update_model=
true,
bool backbone_slope=
false,
71 std::string name=
"GaussianEMRestraint%1%");
85 return cross_correlation_;
101 void compute_initial_scores();
111 void show(std::ostream &out)
const { out <<
"GEM restraint"; }
122 double model_cutoff_dist_, density_cutoff_dist_;
126 bool update_model_,local_;
128 Float normalization_;
130 Float self_mm_score_;
134 std::string density_fn_;
141 mutable double cross_correlation_;
144 void create_containers();
146 friend class cereal::access;
148 template<
class Archive>
void serialize(Archive &ar) {
149 ar(cereal::base_class<Restraint>(
this), model_cutoff_dist_,
150 density_cutoff_dist_, model_ps_, density_ps_, slope_, update_model_,
151 local_, msize_,dsize_, normalization_, dd_score_, self_mm_score_,
152 slope_ps_, density_fn_, exp_grid_,
153 invdx_, argmax_, cross_correlation_);
155 if (std::is_base_of<cereal::detail::InputArchiveBase, Archive>::value) {
Helper functions to check for NaN or infinity.
Decorator to hold Gaussian3D.
A decorator for particles with mass.
virtual RestraintInfo * get_static_info() const
Store a list of ParticleIndexes.
Return all pairs from a SingletonContainer.
virtual RestraintInfo * get_dynamic_info() const
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Float get_slope()
Get restraint slope.
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
void set_density_filename(std::string density_fn)
Set the filename corresponding to the density GMM particles.
Handling of file input/output.
void set_slope(Float s)
Set restraint slope.
Macros to define containers of objects.
Class for storing model, its restraints, constraints, and particles.
double get_probability() const
Returns exp(score)
double get_cross_correlation_coefficient() const
Get cross correlation between the model and the map.
Restraint between two Gaussian Mixture Models, "model" and "density".
Return all pairs from a SingletonContainer.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Report key:value information on restraints.
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
std::string get_absolute_path(std::string file)
Convert a possibly relative path to an absolute path.
double Float
Basic floating-point value (could be float, double...)
virtual ModelObjectsTemp do_get_inputs() const =0
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.