28 #include <basic/Tracer.hh>
37 #include <utility/vector0.hh>
38 #include <utility/vector1.hh>
59 if (atom_num == 0) atom_num = 1;
65 out <<
"{" << res_type.
name3() <<
" " << res.
seqpos()
66 <<
" " << res.
atom_name(atom_num) <<
" (" << atom_type.
name() <<
")"
70 out <<
" " << atom.
xyz().x() <<
" " << atom.
xyz().y() <<
" " << atom.
xyz().z() <<
"\n";
85 if (atom_name ==
"") {
114 int const num_colors = 6;
115 std::string colors[num_colors] = {
"pinktint",
"peachtint",
"yellowtint",
"greentint",
"bluetint",
"lilactint"};
117 out <<
"@vectorlist {} color= " << color <<
" width= 1 master= {intra-res}\n";
120 for(core::conformation::Residue::AtomIndices::const_iterator j = nbrs.begin(), end_j = nbrs.end(); j != end_j; ++j) {
122 if(atom_j <= atom_i)
continue;
129 out <<
"@vectorlist {} color= gray width= 1 master= {inter-res}\n";
150 out <<
"@subgroup {by residue} dominant\n";
163 out <<
"@arrowlist {true} color= gold width=3 radius= 0.6 off\n";
165 for( ; i != i_end; ++i) {
167 print_node(out, i->start(), i->start_atom(), conf,
"P");
168 if ( i->is_jump() )
print_node(out, i->stop(), i->stop_atom(), conf,
"width6");
169 else print_node(out, i->stop(), i->stop_atom(), conf);
172 out <<
"@arrowlist {res-by-res} color= lime radius= 0.6\n";
173 i = fold_tree.
begin(), i_end = fold_tree.
end();
174 for( ; i != i_end; ++i) {
175 if ( i->is_jump() ) {
176 print_node(out, i->start(), i->start_atom(), conf,
"P");
177 print_node(out, i->stop(), i->stop_atom(), conf,
"width4");
181 int dir = (i->start() < i->stop() ? 1 : -1);
182 for(
int j = i->start()+dir, j_end = i->stop()+dir; j != j_end; j+=dir ) {
199 if (katom.
parent().get() != NULL) {
201 int p_residue_num = p_atom_id.
rsd();
202 int p_atom_num = p_atom_id.
atomno();
203 print_node(out, p_residue_num, p_atom_num, conf,
"P");
207 int residue_num = atom_id.
rsd();
208 int atom_num = atom_id.
atomno();
210 else print_node(out, residue_num, atom_num, conf);
224 out <<
"@arrowlist {true} color= orange\n";
239 std::ofstream out (filename.c_str());
241 basic::Error() <<
"Can't open kinemage file " << filename << std::endl;
245 out <<
"View this file with KiNG or Mage from http://kinemage.biochem.duke.edu\n";
246 out <<
"@kinemage 1\n";
247 out <<
"@onewidth\n";
248 out <<
"@group {structure}\n";
250 out <<
"@group {fold tree} animate\n";
252 out <<
"@group {atom tree} animate\n";