10 #ifndef IMPISD_CROSS_LINK_MSRESTRAINT_H
11 #define IMPISD_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
37 std::string protein1_, protein2_;
38 int residue1_, residue2_;
40 friend class cereal::access;
42 template<
class Archive>
void serialize(Archive &ar) {
43 ar(cereal::base_class<Restraint>(
this),
44 ppis_, sigmass_, lengthi_, psis_, length_, slope_,
45 constr_, get_log_prob_, protein1_, protein2_, residue1_, residue2_);
48 double sphere_cap(
float r1,
float r2,
float d)
const;
55 bool get_log_prob =
false,
56 std::string name =
"CrossLinkMSRestraint%1%");
60 bool get_log_prob =
false,
61 std::string name =
"CrossLinkMSRestraint%1%");
64 bool get_log_prob =
false,
65 std::string name =
"CrossLinkMSRestraint%1%");
105 ppis_.push_back(pps);
106 sigmass_.push_back(sigmas);
107 psis_.push_back(psi);
110 double get_probability()
const;
117 return isd::Scale(get_model(), lengthi_).get_scale();
133 double get_slope()
const {
return slope_; }
135 bool get_log_prob()
const {
return get_log_prob_; }
152 unsigned int get_number_of_contributions()
const {
return ppis_.size(); }
A restraint for ambiguous cross-linking MS data and multiple state approach.
virtual RestraintInfo * get_static_info() const
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.
std::string get_source_protein1() const
Get protein name for one end of the cross-link.
A decorator for scale parameters particles.
Add scale parameter to particle.
void set_source_protein1(std::string protein1)
Set protein name for one end of the cross-link.
ParticleIndexPair get_contribution_particle_indexes(int i) const
Get the particle indexes from a contribution.
bool get_is_length_variable() const
Return true iff the length is variable (stored in a Scale)
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.
Class for storing model, its restraints, constraints, and particles.
ParticleIndexPair get_contribution_sigma_indexes(int i) const
Get the sigma particle indexes from a contribution.
double get_length() const
Get the length of this restraint.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
bool get_has_slope() const
Return true iff the restraint has a slope.
std::string get_source_protein2() const
Get protein name for one end of the cross-link.
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.
Report key:value information on restraints.
void set_source_residue1(int residue1)
Set residue number for one end of the cross-link.
Abstract base class for all restraints.
ParticleIndex get_contribution_psi_index(int i) const
Get the psi particle index from a contribution.
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.