9 #ifndef IMPSAXS_PROFILE_H
10 #define IMPSAXS_PROFILE_H
12 #include <IMP/saxs/saxs_config.h>
22 IMPSAXS_BEGIN_NAMESPACE
24 class RadialDistributionFunction;
46 bool reciprocal =
false) {
48 calculate_profile_real(particles, ff_type);
50 calculate_profile_reciprocal(particles, ff_type);
81 calculate_profile_real(particles1, particles2, ff_type);
89 void calculate_profile_constant_form_factor(
101 Float max_distance)
const;
107 void resample(
const Profile* exp_profile,
Profile* resampled_profile,
108 bool partial_profiles =
false)
const;
111 void downsample(
Profile* downsampled_profile,
112 unsigned int point_number)
const;
128 void read_SAXS_file(
const String& file_name,
bool fit_file =
false);
134 void write_SAXS_file(
const String& file_name,
Float max_q = 0.0)
const;
137 void read_partial_profiles(
const String& file_name);
140 void write_partial_profiles(
const String& file_name)
const;
153 Float get_intensity(
unsigned int i)
const {
return intensity_[i]; }
154 Float get_q(
unsigned int i)
const {
return q_[i]; }
155 Float get_error(
unsigned int i)
const {
return error_[i]; }
156 Float get_weight(
unsigned int i)
const {
160 Float get_average_radius()
const {
return average_radius_; }
163 unsigned int size()
const {
return q_.size(); }
166 bool is_uniform_sampling()
const;
168 std::string get_name()
const {
return name_; }
170 unsigned int get_id()
const {
return id_; }
174 void set_intensity(
unsigned int i,
Float iq) { intensity_[i] = iq; }
179 void set_average_radius(
Float r) { average_radius_ = r; }
181 void set_average_volume(
Float v) { average_volume_ = v; }
183 void set_name(std::string name) { name_ = name; }
185 void set_id(
unsigned int id) { id_ = id; }
190 intensity_.push_back(intensity);
191 error_.push_back(error);
198 void add_noise(
Float percentage = 0.03);
201 void sum_partial_profiles(
Float c1,
Float c2);
204 void add(
const Profile* other_profile,
Float weight = 1.0);
207 void add_partial_profiles(
const Profile* other_profile,
Float weight = 1.0);
210 void add(
const std::vector<Profile*>& profiles,
211 const std::vector<Float>& weights = std::vector<Float>());
214 void add_partial_profiles(
const std::vector<Profile*>& profiles,
215 const std::vector<Float>& weights =
216 std::vector<Float>());
219 void background_adjust(
double start_q);
225 void offset(
Float c);
228 void copy_errors(
const Profile* exp_profile);
231 static const Float modulation_function_parameter_;
255 void squared_distributions_2_partial_profiles(
256 const std::vector<RadialDistributionFunction>& r_dist);
258 double radius_of_gyration_fixed_q(
double end_q)
const;
261 std::vector<double> q_;
262 std::vector<double> intensity_;
263 std::vector<double> error_;
265 Float min_q_, max_q_;
270 std::vector<std::vector<double> > partial_profiles_;
273 Float average_radius_;
274 Float average_volume_;
277 std::map<float, unsigned int> q_mapping_;
285 IMPSAXS_END_NAMESPACE
unsigned int size() const
return number of entries in SAXS profile
#define IMP_UNUSED(variable)
void calculate_profile(const kernel::Particles &particles1, const kernel::Particles &particles2, FormFactorType ff_type=HEAVY_ATOMS)
Float get_delta_q() const
return sampling resolution
Float get_min_q() const
return minimal sampling point
void calculate_profile(const kernel::Particles &particles, FormFactorType ff_type=HEAVY_ATOMS, bool reciprocal=false)
computes theoretical profile
Float get_max_q() const
return maximal sampling point
Various general useful macros for IMP.
computes distribution functions
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Common base class for heavy weight IMP objects.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Float radius_of_gyration(const kernel::Particles &particles)
compute radius_of_gyration
IMP::base::Vector< Float > Floats
Standard way to pass a bunch of Float values.
double Float
Basic floating-point value (could be float, double...)
FormFactorType
type of the form factors for profile calculations
void set_ff_table(FormFactorTable *ff_table)
required for reciprocal space calculation
A shared base class to help in debugging and things.
std::string String
Basic string value.
void add_entry(Float q, Float intensity, Float error=1.0)
add intensity entry to profile