30 #include <basic/options/option.hh>
31 #include <basic/options/keys/in.OptionKeys.gen.hh>
34 #include <basic/datacache/BasicDataCache.hh>
37 #include <utility/io/izstream.hh>
38 #include <basic/Tracer.hh>
40 #include <utility/vector1.hh>
53 static basic::Tracer
TR(
"core.scoring.MembraneTopology");
80 using namespace basic::options;
81 using namespace basic::options::OptionKeys;
83 TR <<
"Initialize Membrane spanning regions with " << spanfile << std::endl;
85 utility::io::izstream stream (spanfile);
87 TR << line << std::endl;
91 std::istringstream l(line);
92 TR << line << std::endl;
97 span_.dimension(max_tmhelix,2);
103 getline(stream,line);
104 TR << line << std::endl;
105 getline(stream,line);
106 TR << line << std::endl;
109 getline(stream,line);
111 std::istringstream l(line);
115 TR << line << std::endl ;
120 utility_exit_with_message(
"bad format for spanfile total_tmhelix=0");
140 depth_.resize(total_residue,0.0);
146 for(
Size i=1;i<=total_residue;++i) {
157 if(option[in::file::lipofile].user())
159 Size NumberOfConstraints(0);
163 std::string lipofile(option[OptionKeys::in::file::lipofile]());
164 TR <<
"init lipo using " << lipofile << std::endl;
167 stream.open(lipofile);
170 getline(stream,line);
171 getline(stream,line);
172 while(!stream.eof()) {
173 std::istringstream l(line);
179 NumberOfConstraints++;
182 NumberOfConstraints++;
185 getline(stream,line);
189 TR << NumberOfConstraints <<
" exposure constraints read!" << std::endl;
190 if(NumberOfConstraints>0)
195 TR <<
"unable to open " << lipofile << std::endl;
222 utility_exit_with_message(
"Span out of bounds");
247 TR <<
"SPAN " << i <<
" " <<
span_(i,1) <<
" " <<
span_(i,2) << std::endl;
261 utility_exit_with_message(
"Too long TMH_list");
263 Size const len(TMH_list.size());
264 span_.dimension(len,2);
269 for(
Size i=1;i<=len;++i)
276 for(
Size j=1;j<=TMH_list.size();++j)
314 return *membrane_topology;