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
 
   56   FormFactorTable(
const std::string& table_name, 
double min_q, 
double max_q,
 
   66   double get_vacuum_form_factor(
Particle* p,
 
   70   double get_dummy_form_factor(
Particle* p,
 
   78     return vacuum_zero_form_factors_[OH2];
 
   83     return dummy_zero_form_factors_[OH2];
 
  102     return form_factors_[OH2];
 
  107     return vacuum_form_factors_[OH2];
 
  112     return dummy_form_factors_[OH2];
 
  122   void show(std::ostream& out = std::cout, std::string prefix = 
"") 
const;
 
  132   enum FormFactorAtomType {
 
  178     HEAVY_ATOM_SIZE = 44,
 
  183   static std::map<atom::Element, FormFactorAtomType> element_ff_type_map_;
 
  187     FormFactor(
double ff, 
double vacuum_ff, 
double dummy_ff)
 
  188         : ff_(ff), vacuum_ff_(vacuum_ff), dummy_ff_(dummy_ff) {}
 
  189     double ff_, vacuum_ff_, dummy_ff_;
 
  193   static std::map<atom::ResidueType, FormFactor> residue_type_form_factor_map_;
 
  196   static double zero_form_factors_[];
 
  198   static double vacuum_zero_form_factors_[];
 
  200   static double dummy_zero_form_factors_[];
 
  203   static IntKey form_factor_type_key_;
 
  206   class AtomFactorCoefficients {
 
  208     std::string atom_type_;
 
  217   friend std::istream& operator>>(
 
  218       std::istream& s, AtomFactorCoefficients& atom_factor_coefficients);
 
  221   friend std::ostream& operator<<(
 
  222       std::ostream& s, 
const AtomFactorCoefficients& atom_factor_coefficients);
 
  226   int read_form_factor_table(
const std::string& table_name);
 
  228   void init_element_form_factor_map();
 
  230   void init_residue_type_form_factor_map();
 
  232   void compute_form_factors_all_atoms();
 
  234   void compute_form_factors_heavy_atoms();
 
  236   double get_form_factor(atom::ResidueType rt) 
const;
 
  238   double get_vacuum_form_factor(atom::ResidueType rt) 
const;
 
  240   double get_dummy_form_factor(atom::ResidueType rt) 
const;
 
  242   FormFactorAtomType get_form_factor_atom_type(
atom::Element e) 
const;
 
  244   FormFactorAtomType get_form_factor_atom_type(Particle* p,
 
  247   FormFactorAtomType get_carbon_atom_type(
const atom::AtomType& atom_type,
 
  248                                           const atom::ResidueType& residue_type)
 
  251   FormFactorAtomType get_nitrogen_atom_type(
 
  252       const atom::AtomType& atom_type,
 
  253       const atom::ResidueType& residue_type) 
const;
 
  255   FormFactorAtomType get_oxygen_atom_type(
const atom::AtomType& atom_type,
 
  256                                           const atom::ResidueType& residue_type)
 
  259   FormFactorAtomType get_sulfur_atom_type(
const atom::AtomType& atom_type,
 
  260                                           const atom::ResidueType& residue_type)
 
  265   Vector<AtomFactorCoefficients> form_factors_coefficients_;
 
  268   Vector<Vector<double> > form_factors_;
 
  271   Vector<Vector<double> > vacuum_form_factors_;
 
  274   Vector<Vector<double> > dummy_form_factors_;
 
  277   double min_q_, max_q_, delta_q_;
 
  279   WarningContext warn_context_;
 
  285 IMPSAXS_END_NAMESPACE
 
Define the elements used in IMP. 
 
FormFactorTable * get_default_form_factor_table()
 
double get_volume(const BoundingBoxD< D > &bb)
See BoundingBoxD. 
 
Functions to deal with very common math operations. 
 
A decorator for Residues. 
 
const ResidueType UNK
Unknown residue. 
 
Key< 1 > IntKey
The type used to identify int attributes in the Particles. 
 
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
 
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node. 
 
Class to handle individual particles of a Model object. 
 
FormFactorType
type of the form factors for profile calculations 
 
Element
The various elements currently supported/known.