10#ifndef IMPBFF_AVNETWORKRESTRAINT_H
11#define IMPBFF_AVNETWORKRESTRAINT_H
13#include <IMP/bff/bff_config.h>
14#include <IMP/score_functor/distance_pair_score_macros.h>
17#include <IMP/Restraint.h>
18#include <IMP/Object.h>
19#include <IMP/Pointer.h>
20#include <IMP/atom/Hierarchy.h>
21#include <IMP/UnaryFunction.h>
23#include <IMP/bff/AV.h>
24#include <IMP/bff/internal/FPSReaderWriter.h>
25#include <IMP/bff/internal/json.h>
57 int n_samples = 50000;
65 std::map<std::string, IMP::bff::AV*> avs_{};
73 IMP::ParticleIndexes av_pi_;
81 IMP::ParticleIndexes model_ps_;
84 std::map<std::string, AVPairDistanceMeasurement> distances_;
91 std::map<std::string, IMP::bff::AV*> create_av_decorated_particles(
92 nlohmann::json used_positions,
93 const IMP::core::Hierarchy &hier);
100 IMP::bff::AV* get_av(std::string name)
const;
112 const IMP::core::Hierarchy &hier,
113 std::string fps_json_fn,
114 std::string name =
"AVNetworkRestraint%1%",
115 std::string score_set =
"",
116 int n_samples = 50000
124 return exp(-unprotected_evaluate(
nullptr));
150 std::string position1_name,
151 std::string position2_name,
152 double forster_radius,
182 void show(std::ostream &out)
const {out <<
"AVNetwork restraint";}
A restraint that uses an annotated volumetric network to score particle distances.
Definition AVNetworkRestraint.h:47
double get_probability() const
Returns exp(score).
Definition AVNetworkRestraint.h:123
virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Evaluates the restraint.
double get_model_distance(std::string position1_name, std::string position2_name, double forster_radius, int distance_type) const
Returns the model distance (or FRET efficiency) between two dyes.
AVNetworkRestraint(const IMP::core::Hierarchy &hier, std::string fps_json_fn, std::string name="AVNetworkRestraint%1%", std::string score_set="", int n_samples=50000)
Constructs an AVNetworkRestraint object.
ParticleIndexes const get_indexes()
Returns the particle indexes of the AVs.
Definition AVNetworkRestraint.h:161
const IMP::bff::AVs get_used_avs()
Returns the used Atom::AVs.
virtual IMP::ModelObjectsTemp do_get_inputs() const override
Returns the inputs required by the restraint.
const std::map< std::string, AVPairDistanceMeasurement > get_used_distances()
Returns the used experimental distances.
Definition AVNetworkRestraint.h:137
void show(std::ostream &out) const
Prints a description of the restraint.
Definition AVNetworkRestraint.h:182