12 #include <IMP/bff/bff_config.h> 
   32 #include <IMP/bff/internal/json.h> 
   33 #include <IMP/bff/internal/InverseSampler.h> 
   36 #include <IMP/bff/internal/Histogram.h> 
   38 IMPBFF_BEGIN_NAMESPACE
 
   59     double error_neg = -1;
 
   60     double error_pos = -1;
 
   61     double forster_radius = 52.0;
 
   63     std::string position_1;
 
   64     std::string position_2;
 
   67     std::string get_json();
 
   74     double score_model(
double model);
 
   77                         { out << 
"AVPairDistanceMeasurement"; });
 
  104         v[0] = get_linker_length();
 
  105         v[1] = get_radius1();
 
  106         v[2] = get_radius2();
 
  107         v[3] = get_radius3();
 
  108         v[4] = get_linker_width();
 
  109         v[5] = get_allowed_sphere_radius();
 
  110         v[6] = get_contact_volume_thickness();
 
  111         v[7] = get_contact_volume_trapped_fraction();
 
  112         v[8] = get_simulation_grid_resolution();
 
  132     void init_path_map();
 
  155                 FloatKey(
"contact_volume_thickness"),
 
  156                 FloatKey(
"contact_volume_trapped_fraction"),
 
  157                 FloatKey(
"simulation_grid_resolution")
 
  183                                 double linker_length = 20.0,
 
  185                                 double linker_width = 0.5,
 
  186                                 double allowed_sphere_radius = 1.5,
 
  187                                 double contact_volume_thickness = 0.0,
 
  188                                 double contact_volume_trapped_fraction = -1,
 
  189                                 double simulation_grid_resolution = 1.5) {
 
  190         if (!IMP::core::Gaussian::get_is_setup(m, pi)) {
 
  199         m->
add_attribute(get_av_key(6), pi, contact_volume_thickness);
 
  200         m->
add_attribute(get_av_key(7), pi, contact_volume_trapped_fraction);
 
  201         m->
add_attribute(get_av_key(8), pi, simulation_grid_resolution);
 
  306     void set_av_parameter(
const nlohmann::json &j);
 
  330     void resample(
bool shift_xyz=
true);
 
  363     double rda_r0_6 = std::pow(distance / forster_radius, 6.0);
 
  364     return 1. / (1. + rda_r0_6);
 
  376     return forster_radius * std::pow(1. / fret_efficiency - 1.0, 1. / 6.);
 
  391         double forster_radius = 52.0,
 
  393         int n_samples = 10000
 
  397 IMPBFFEXPORT std::vector<double> av_random_points(
 
  414         std::vector<double> axis,
 
  435         std::string json_str = 
"",
 
  436         const nlohmann::json &json_data = nlohmann::json()
 
Particle * get_particle(ParticleIndex p) const 
Get the particle from an index. 
 
The base class for decorators. 
 
static void do_setup_particle(Model *m, ParticleIndex pi, ParticleIndex pi_source, double linker_length=20.0, const algebra::Vector3D radii=algebra::Vector3D(3.5, 0, 0), double linker_width=0.5, double allowed_sphere_radius=1.5, double contact_volume_thickness=0.0, double contact_volume_trapped_fraction=-1, double simulation_grid_resolution=1.5)
Sets up the attributes for a particle in a model for AV (Anisotropic Volume) calculations. 
 
#define IMP_DECORATOR_GET_SET(name, AttributeKey, Type, ReturnType)
Define methods for getting and setting a particular simple field. 
 
Distance between AV mean positions. 
 
A decorator for a particle with accessible volume (AV). 
 
ParticleIndex get_particle_index() const 
Returns the particle index decorated by this decorator. 
 
static Gaussian setup_particle(Model *m, ParticleIndex pi)
 
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed. 
 
Key< 0 > FloatKey
The type used to identify float attributes in the Particles. 
 
algebra::Vector3D get_derivatives() const 
Get the vector of derivatives accumulated by add_to_derivatives(). 
 
ParticleIndex get_particle_index(unsigned int i) const 
Get the particle index of the AV object at the specified index. 
 
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
 
Model * get_model() const 
Returns the Model containing the particle. 
 
Container for experimental distance measurement. 
 
bool get_parameters_are_optimized() const 
Get whether the coordinates are optimized. 
 
double av_distance(const AV &a, const AV &b, double forster_radius=52.0, int distance_type=DYE_PAIR_DISTANCE_MEAN, int n_samples=10000)
Computes the distance to another accessible volume. 
 
A more IMP-like version of the std::vector. 
 
Class to search path on grids. 
 
A smart pointer to a reference counted object. 
 
std::vector< double > av_distance_distribution(const AV &av1, const AV &av2, std::vector< double > axis, int n_samples=10000)
Compute the distance to another accessible volume. 
 
Class for storing model, its restraints, constraints, and particles. 
 
DyePairMeasures
Different types of distances between two accessible volumes. 
 
Base class for a simple primitive-like type. 
 
void set_av_parameters_are_optimized(bool tf) const 
Set whether the coordinates are optimized. 
 
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values. 
 
T fret_efficiency(T distance, double forster_radius)
Computes the FRET efficiency given the distance and Forster radius. 
 
Class to search path on grids. 
 
Key< 3 > ParticleIndexKey
The type used to identify a particle attribute in the Particles. 
 
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle attribute with the specified key and initial value 
 
A Cartesian vector in D-dimensions. 
 
Particle * get_particle() const 
Get the particle pointer of the AV object. 
 
Helper macros for implementing Decorators. 
 
IMP::algebra::Vector3D get_radii()
Returns the radii of an object. 
 
static ParticleIndexKey get_particle_key(unsigned int i)
Get the particle key for the specified index. 
 
static FloatKey get_av_key(unsigned int i)
Get the FloatKey object for a specific AV feature. 
 
Particle * get_particle() const 
Returns the particle decorated by this decorator. 
 
#define IMP_DECORATOR_METHODS(Name, Parent)
 
Base class for a simple primitive-like type. 
 
double Float
Basic floating-point value (could be float, double...) 
 
ParticleIndex get_particle_index() const 
Get the particle index of the AV object. 
 
Class to handle individual particles of a Model object. 
 
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method. 
 
Macros to help in implementing Value objects. 
 
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators. 
 
T distance_fret(double fret_efficiency, double forster_radius)
Computes the distance between two volumes given the FRET efficiency and Forster radius. 
 
A decorator for helping deal with a generalized hierarchy. 
 
std::vector< double > av_random_distances(const AV &av1, const AV &av2, int n_samples=10000)
Random sampling over AV/AV distances. 
 
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const 
return true if particle has attribute with the specified key 
 
Particle * get_particle(unsigned int i) const 
Get the particle pointer of the AV object at the specified index. 
 
Logging and error reporting support. 
 
IMP::ParticleIndex search_labeling_site(const IMP::core::Hierarchy &hier, std::string json_str="", const nlohmann::json &json_data=nlohmann::json())
Find the particle index of a labeling site. 
 
Mean FRET averaged distance R_E. 
 
Type get_attribute(TypeKey attribute_key, ParticleIndex particle)
get the value of the particle attribute with the specified key