00001
00002
00003
00004
00005
00006
00007
00008 #ifndef IMPDOMINO_RESTRAINT_EVALUATOR_FROM_FILE_H
00009 #define IMPDOMINO_RESTRAINT_EVALUATOR_FROM_FILE_H
00010
00011 #include "domino_config.h"
00012 #include "DiscreteSampler.h"
00013 #include <IMP/domino/RestraintEvaluatorI.h>
00014 #include <IMP/base_types.h>
00015 #include <vector>
00016 #include <sstream>
00017 #include <algorithm>
00018 #include <boost/algorithm/string.hpp>
00019 #include <boost/algorithm/string/split.hpp>
00020 IMPDOMINO_BEGIN_NAMESPACE
00021
00022 IMPDOMINOEXPORT void write_combinations(const std::string &filename,
00023 const Combinations *combs,Particles &ps);
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 IMPDOMINOEXPORT void read_combinations(const std::string &filename,
00038 Combinations *combs,const Particles &ps);
00039
00040
00041
00042 class IMPDOMINOEXPORT RestraintEvaluatorFromFile : public RestraintEvaluatorI
00043 {
00044 public:
00045
00046
00047
00048
00049
00050
00051
00052 void set_restraint_file(Restraint *r,char *filename);
00053 std::string get_restraint_file(Restraint *r) const;
00054
00055
00056
00057
00058
00059
00060 void calc_scores(const Combinations &comb_states,
00061 CombinationValues &comb_values,Restraint *r,
00062 const Particles &ps);
00063
00064 void show(std::ostream& out = std::cout) const{
00065 out<<"RestraintEvaluatorFromFile"<<std::endl;
00066 }
00067 protected:
00068
00069
00070 void update_score_states(IMP::Particles &ps);
00071 std::map<Restraint*,std::string> restraint_data_;
00072 };
00073
00074 IMPDOMINO_END_NAMESPACE
00075
00076 #endif