9 #ifndef IMPMULTIFIT_SETTINGS_DATA_H
10 #define IMPMULTIFIT_SETTINGS_DATA_H
11 #include <IMP/multifit/multifit_config.h>
16 #include <IMP/internal/OwnerPointer.h>
19 IMPMULTIFIT_BEGIN_NAMESPACE
31 transformations_fn_=
"";
34 void set_name(
const std::string &name) {name_=name;}
35 inline std::string get_name()
const {
return name_;}
36 inline std::string get_filename()
const {
return filename_;}
37 void set_filename(
const std::string &filename){filename_=filename;}
38 inline std::string get_surface_fn()
const {
return surface_fn_;}
39 void set_surface_fn(
const std::string &fn){surface_fn_=fn;}
40 void set_txt_ap_fn(
const std::string &pdb_ap_fn) {pdb_ap_fn_=pdb_ap_fn;}
41 inline std::string get_txt_ap_fn()
const {
return pdb_ap_fn_;}
42 void set_txt_fine_ap_fn(
const std::string &pdb_ap_fn) {
43 pdb_fine_ap_fn_=pdb_ap_fn;}
44 inline std::string get_txt_fine_ap_fn()
const {
45 return pdb_fine_ap_fn_;}
46 void set_num_ap(
int num_ap) {num_ap_=num_ap;}
47 inline int get_num_ap()
const {
return num_ap_;}
48 void set_num_fine_ap(
int num_ap) {num_fine_ap_=num_ap;}
49 inline int get_num_fine_ap()
const {
return num_fine_ap_;}
50 void set_transformations_fn(std::string transformations_fn)
51 { transformations_fn_=transformations_fn;}
52 std::string get_transformations_fn()
const {
return transformations_fn_;}
53 void set_reference_fn(
const std::string &ref_fn){reference_fn_=ref_fn;}
54 std::string get_reference_fn()
const {
return reference_fn_;}
56 out<<name_<<
"|"<<filename_<<
"|"<<surface_fn_<<
"|";
57 out<<pdb_ap_fn_<<
"|"<<num_ap_<<
"|";
58 out<<pdb_fine_ap_fn_<<
"|"<<num_fine_ap_<<
"|";
59 out<<transformations_fn_<<
"|"<<reference_fn_<<
"|"<<std::endl; }, {});
62 std::string filename_;
63 std::string surface_fn_;
64 std::string pdb_ap_fn_;
66 std::string pdb_fine_ap_fn_;
68 std::string transformations_fn_;
69 std::string reference_fn_;
82 coarse_over_sampled_ap_fn_=
"";
84 fine_over_sampled_ap_fn_=
"";
86 void set_dens_fn(
const std::string &dens_fn) {dens_fn_=dens_fn;}
87 std::string get_dens_fn()
const {
return dens_fn_;}
88 void set_resolution(
float res) {resolution_=res;}
89 float get_resolution()
const {
return resolution_;}
90 float get_spacing()
const {
return spacing_;}
91 void set_spacing(
float spacing) {spacing_=spacing;}
92 void set_threshold(
float t) {threshold_=t;}
93 float get_threshold()
const {
return threshold_;}
96 std::string get_coarse_ap_fn ()
const {
return coarse_ap_fn_;}
97 void set_coarse_ap_fn (
const std::string &new_fn) {
98 coarse_ap_fn_ = new_fn;}
99 std::string get_coarse_over_sampled_ap_fn ()
const {
100 return coarse_over_sampled_ap_fn_;}
101 void set_coarse_over_sampled_ap_fn (
const std::string &new_fn) {
102 coarse_over_sampled_ap_fn_=new_fn;}
103 std::string get_fine_ap_fn ()
const {
return fine_ap_fn_;}
104 void set_fine_ap_fn (
const std::string &new_fn) {
105 fine_ap_fn_ = new_fn;}
106 std::string get_fine_over_sampled_ap_fn ()
const {
107 return fine_over_sampled_ap_fn_;}
108 void set_fine_over_sampled_ap_fn (
const std::string &new_fn) {
109 fine_over_sampled_ap_fn_=new_fn;}
111 out<<dens_fn_<<
"|"<<resolution_<<
"|"<<spacing_<<
"|"<<threshold_
112 <<
"|"<<origin_[0]<<
"|";
113 out<<origin_[1]<<
"|"<<origin_[2]<<
"|"<<coarse_ap_fn_;
114 out<<
"|"<<coarse_over_sampled_ap_fn_<<
"|";
115 out<<fine_ap_fn_<<
"|"<<fine_over_sampled_ap_fn_<<
"|\n";
118 std::string dens_fn_;
123 std::string coarse_ap_fn_;
124 std::string coarse_over_sampled_ap_fn_;
125 std::string fine_ap_fn_;
126 std::string fine_over_sampled_ap_fn_;
134 static void show_component_header_line(std::ostream& out = std::cout) {
135 out<<get_component_header_line();
137 static std::string get_component_header_line(){
138 std::stringstream ss;
139 ss<<
"name|protein|surface|pdb_anchor_points|number of anchor points|"<<
140 "fine pdb_anchor_points|number of fine anchor points|"<<
141 "transformations|ref filename|"<<std::endl;
144 static void show_density_header_line(std::ostream& out = std::cout) {
145 out <<get_density_header_line();
147 static std::string get_density_header_line() {
148 std::stringstream ss;
149 ss <<
"map| resolution| spacing| threshold|x-origin| y-origin| z-origin|";
150 ss<<
"coarse anchor points|coarse over sampled anchor points|";
151 ss<<
"fine anchor points|fine over sampled anchor points|"<<std::endl;
154 void set_assembly_filename(
const std::string &fn) {
157 const char * get_assembly_filename()
const {
158 return asmb_fn_.c_str();
166 void set_data_path(
const std::string &fn) {
174 component_header, component_headers,
179 IMP::OwnerPointer<AssemblyHeader> dens_data_;
180 std::string asmb_fn_;
181 std::string data_path_;
184 IMPMULTIFITEXPORT
SettingsData *read_settings(
const char *filename);
185 IMPMULTIFITEXPORT
void write_settings(
187 IMPMULTIFIT_END_NAMESPACE