00001
00002
00003
00004
00005
00006
00007 #ifndef IMPATOM_FORCE_FIELD_PARAMETERS_H
00008 #define IMPATOM_FORCE_FIELD_PARAMETERS_H
00009
00010 #include "Residue.h"
00011 #include "Atom.h"
00012 #include "Hierarchy.h"
00013 #include <IMP/base_types.h>
00014
00015 IMPATOM_BEGIN_NAMESPACE
00016
00017
00018 class IMPATOMEXPORT ForceFieldParameters: public Object {
00019 public:
00020
00021
00022 Float get_radius(Atom atom) const;
00023
00024
00025 Float get_epsilon(Atom atom) const;
00026
00027
00028 void add_radii(Hierarchy mhd, double scale = 1.0,
00029 FloatKey radius_key= FloatKey("radius")) const;
00030
00031
00032 void add_well_depths(Hierarchy mhd) const;
00033
00034
00035 void add_bonds(Hierarchy mhd) const;
00036
00037 IMP_REF_COUNTED_DESTRUCTOR(ForceFieldParameters);
00038 protected:
00039 class Bond {
00040 public:
00041 Bond(AtomType type1, AtomType type2,
00042 IMP::atom::Bond::Type bond_type = IMP::atom::Bond::SINGLE) :
00043 type1_(type1), type2_(type2), bond_type_(bond_type) {}
00044 AtomType type1_,type2_;
00045 IMP::atom::Bond::Type bond_type_;
00046 };
00047
00048 Float get_radius(const String& force_field_atom_type) const;
00049 Float get_epsilon(const String& force_field_atom_type) const;
00050 virtual String get_force_field_atom_type(Atom atom) const;
00051 void add_bonds(Residue rd) const;
00052 void add_bonds(Residue rd1, Residue rd2) const;
00053
00054
00055
00056 typedef std::map<AtomType, std::pair<std::string, float> > AtomTypeMap;
00057
00058
00059
00060 std::map<ResidueType, AtomTypeMap> atom_res_type_2_force_field_atom_type_;
00061
00062
00063 std::map<ResidueType, std::vector<Bond> > residue_bonds_;
00064
00065
00066
00067 std::map<String, std::pair<float, float> > force_field_2_vdW_;
00068
00069 private:
00070 WarningContext warn_context_;
00071 };
00072
00073
00074 IMPATOMEXPORT ForceFieldParameters* default_force_field_parameters();
00075
00076 IMPATOM_END_NAMESPACE
00077
00078 #endif