10#ifndef IMPISD_ATOMIC_CROSS_LINK_MSRESTRAINT_H
11#define IMPISD_ATOMIC_CROSS_LINK_MSRESTRAINT_H
12#include <IMP/isd/isd_config.h>
36 bool part_of_log_score=
false,
37 std::string name =
"AtomicCrossLinkMSRestraint%1%");
68 void show(std::ostream &out)
const { out <<
"Atomic XL restraint with "
71 void set_slope(
Float slope) { slope_=slope; }
72 void set_part_of_log_score(
bool hey) { part_of_log_score_=hey; }
79 bool part_of_log_score_;
84 friend class cereal::access;
86 template<
class Archive>
void serialize(Archive &ar) {
87 ar(cereal::base_class<Restraint>(
this), xlen_, psi_, slope_,
88 part_of_log_score_, ppis_, sigmass_, default_range_);
Store a list of ParticleIndexes.
Abstract base class for all restraints.
Class for adding derivatives from restraints to the model.
Class for storing model, its restraints, constraints, and particles.
Restraint(Model *m, std::string name)
Create a restraint and register it with the model.
Restrain atom pairs based on a set of crosslinks.
AtomicCrossLinkMSRestraint(IMP::Model *m, double length, ParticleIndex psi, Float slope=0.0, bool part_of_log_score=false, std::string name="AtomicCrossLinkMSRestraint%1%")
Constructor.
ParticleIndex get_psi() const
Get the psi nuisance in a contribution.
virtual IMP::ModelObjectsTemp do_get_inputs() const override
void add_contribution(const ParticleIndexPair &ppi, const ParticleIndexPair &sigmas)
Add a contribution to this xlink.
virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
unsigned int get_number_of_contributions() const
Get number of contributions added to the restraint.
ParticleIndexPair get_contribution(int i) const
Get the particles in a contribution.
ParticleIndexPair get_contribution_sigmas(int i) const
Get the sigma nuisances in a contribution.
Float evaluate_for_contributions(Ints c, DerivativeAccumulator *accum) const
Evaluate the restraint just for a subset of contribution indexes.
Macros to define containers of objects.
Index< ParticleIndexTag > ParticleIndex
double Float
Basic floating-point value (could be float, double...).
IMP::Vector< ParticleIndexPair, std::allocator< ParticleIndexPair > > ParticleIndexPairs
IMP::Vector< Int > Ints
Standard way to pass a bunch of Int values.
Array< 2, ParticleIndex > ParticleIndexPair
An ordered pair of particles, each identified by its ParticleIndex.
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.