9 #ifndef IMPSAXS_FORM_FACTOR_TABLE_H
10 #define IMPSAXS_FORM_FACTOR_TABLE_H
12 #include <IMP/saxs/saxs_config.h>
24 IMPSAXS_BEGIN_NAMESPACE
76 return vacuum_zero_form_factors_[OH2];
81 return dummy_zero_form_factors_[OH2];
105 return vacuum_form_factors_[OH2];
110 return dummy_form_factors_[OH2];
122 void show(std::ostream& out = std::cout, std::string prefix =
"")
const;
132 enum FormFactorAtomType {
177 HEAVY_ATOM_SIZE = 43,
182 static std::map<atom::Element, FormFactorAtomType> element_ff_type_map_;
186 FormFactor(
double ff,
double vacuum_ff,
double dummy_ff)
187 : ff_(ff), vacuum_ff_(vacuum_ff), dummy_ff_(dummy_ff) {}
188 double ff_, vacuum_ff_, dummy_ff_;
192 static std::map<atom::ResidueType, FormFactor> residue_type_form_factor_map_;
195 static Float zero_form_factors_[];
197 static Float vacuum_zero_form_factors_[];
199 static Float dummy_zero_form_factors_[];
202 static IntKey form_factor_type_key_;
205 class AtomFactorCoefficients {
215 friend std::istream& operator>>(
216 std::istream& s, AtomFactorCoefficients& atom_factor_coefficients);
219 friend std::ostream& operator<<(
220 std::ostream& s,
const AtomFactorCoefficients& atom_factor_coefficients);
223 int read_form_factor_table(
const String& table_name);
225 void init_element_form_factor_map();
227 void init_residue_type_form_factor_map();
229 void compute_form_factors_all_atoms();
231 void compute_form_factors_heavy_atoms();
233 float get_form_factor(atom::ResidueType rt)
const;
235 float get_vacuum_form_factor(atom::ResidueType rt)
const;
237 float get_dummy_form_factor(atom::ResidueType rt)
const;
239 FormFactorAtomType get_form_factor_atom_type(
atom::Element e)
const;
244 FormFactorAtomType get_carbon_atom_type(
const atom::AtomType& atom_type,
245 const atom::ResidueType& residue_type)
248 FormFactorAtomType get_nitrogen_atom_type(
249 const atom::AtomType& atom_type,
250 const atom::ResidueType& residue_type)
const;
252 FormFactorAtomType get_oxygen_atom_type(
const atom::AtomType& atom_type,
253 const atom::ResidueType& residue_type)
256 FormFactorAtomType get_sulfur_atom_type(
const atom::AtomType& atom_type,
257 const atom::ResidueType& residue_type)
262 std::vector<AtomFactorCoefficients> form_factors_coefficients_;
265 std::vector<Floats> form_factors_;
268 std::vector<Floats> vacuum_form_factors_;
271 std::vector<Floats> dummy_form_factors_;
274 Float min_q_, max_q_, delta_q_;
276 base::WarningContext warn_context_;
282 IMPSAXS_END_NAMESPACE
FormFactorTable * default_form_factor_table()
Define the elements used in IMP.
Import IMP/kernel/base_types.h in the namespace.
Key< 1, true > IntKey
The type used to identify int attributes in the Particles.
double get_volume(const BoundingBoxD< D > &bb)
Functions to deal with very common math operations.
A decorator for Residues.
Class to handle individual model particles.
Classes to handle individual model particles.
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
IMP::kernel::Particle Particle
double Float
Basic floating-point value (could be float, double...)
FormFactorType
type of the form factors for profile calculations
Element
The various elements currently supported/known.
std::string String
Basic string value.