10 #ifndef IMPISD_EXACT_CROSS_LINK_MSRESTRAINT_H
11 #define IMPISD_EXACT_CROSS_LINK_MSRESTRAINT_H
13 #include <IMP/isd/isd_config.h>
17 #include <cereal/access.hpp>
18 #include <cereal/types/base_class.hpp>
19 #include <cereal/types/polymorphic.hpp>
21 IMPISD_BEGIN_NAMESPACE
53 std::string protein1_, protein2_;
54 int residue1_, residue2_;
56 friend class cereal::access;
58 template<
class Archive>
void serialize(Archive &ar) {
59 ar(cereal::base_class<Restraint>(
this),
60 ppis_, sigmass_, lengthi_, psis_, length_, slope_,
61 constr_, get_log_prob_, protein1_, protein2_, residue1_, residue2_);
69 bool get_log_prob =
false,
71 =
"ExactCrossLinkMSRestraint%1%");
75 bool get_log_prob =
false,
77 =
"ExactCrossLinkMSRestraint%1%");
80 bool get_log_prob =
false,
82 =
"ExactCrossLinkMSRestraint%1%");
122 ppis_.push_back(pps);
123 sigmass_.push_back(sigmas);
124 psis_.push_back(psi);
127 double get_probability()
const;
134 return isd::Scale(get_model(), lengthi_).get_scale();
150 double get_slope()
const {
return slope_; }
152 bool get_log_prob()
const {
return get_log_prob_; }
169 unsigned int get_number_of_contributions()
const {
return ppis_.size(); }
ParticleIndexPair get_contribution_sigma_indexes(int i) const
Get the sigma particle indexes from a contribution.
int get_source_residue2() const
Get residue number for one end of the cross-link.
int get_source_residue1() const
Get residue number for one end of the cross-link.
virtual RestraintInfo * get_static_info() const
void set_source_residue1(int residue1)
Set residue number for one end of the cross-link.
Functions and adaptors for dealing with particle indexes.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Take Decorator, Particle or ParticleIndex.
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
A decorator for scale parameters particles.
Add scale parameter to particle.
A restraint for ambiguous cross-linking MS data and multiple state approach.
ParticleIndex get_contribution_psi_index(int i) const
Get the psi particle index from a contribution.
std::string get_source_protein2() const
Get protein name for one end of the cross-link.
Class for storing model, its restraints, constraints, and particles.
bool get_has_slope() const
Return true iff the restraint has a slope.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
double get_length() const
Get the length of this restraint.
void set_source_protein1(std::string protein1)
Set protein name for one end of the cross-link.
Report key:value information on restraints.
bool get_is_length_variable() const
Return true iff the length is variable (stored in a Scale)
ParticleIndexPair get_contribution_particle_indexes(int i) const
Get the particle indexes from a contribution.
Abstract base class for all restraints.
void set_source_protein2(std::string protein2)
Set protein name for one end of the cross-link.
void set_source_residue2(int residue2)
Set residue number for one end of the cross-link.
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.
std::string get_source_protein1() const
Get protein name for one end of the cross-link.