Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LigandDockingLoaders.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file protocols/ligand_docking/LigandDockingLoaders.cc
11 /// @brief Implementation of the InterfaceBuilderLoader and MoveMapBuilderLoader classes
12 /// @author Gordon Lemmon
13 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com) -- moved here from DockDesignParser.cc
14 
15 // Unit Headers
18 
19 // Project Headers
23 
24 
25 #include <basic/Tracer.hh>
26 
27 // Utility headers
28 #include <utility/tag/Tag.hh>
29 
30 // Boost Headers
31 #include <boost/foreach.hpp>
32 
33 #include <utility/vector0.hh>
34 #include <utility/vector1.hh>
35 
36 #define foreach BOOST_FOREACH
37 
38 namespace protocols {
39 namespace ligand_docking {
40 
41 static basic::Tracer TR( "protocols.ligand_docking.LigandDockingLoaders" );
42 
45 
47  core::pose::Pose const &,
48  utility::tag::TagPtr const tag,
49  moves::DataMap & data
50 ) const
51 {
52  using namespace utility::tag;
54 
55  foreach(TagPtr interface_builder_tag, tag->getTags()){
56  std::string const name( interface_builder_tag->getName() );
57 
58  if ( data.has("interface_builders", name)) {
59  TR << "WARNING WARNING movemap_builder of name \"" << name
60  << ") already exists. Skipping\n" << interface_builder_tag << std::endl;
61  continue;
62  }
63  ///// Add this movemap to the data map
65  interface_builder->parse_my_tag( interface_builder_tag, data );
66  data.add( "interface_builders" , name, interface_builder);
67  }
68  TR.flush();
69 }
70 
73 
75 InterfaceBuilderLoaderCreator::keyname() const { return "INTERFACE_BUILDERS"; }
76 
79 
81  core::pose::Pose const &,
82  utility::tag::TagPtr const tag,
83  moves::DataMap & data
84 ) const
85 {
86  using namespace utility::tag;
88 
89  foreach(TagPtr movemap_builder_tag, tag->getTags()){
90  std::string const name( movemap_builder_tag->getName() );
91 
92  if ( data.has("movemap_builders", name)) {
93  TR << "WARNING WARNING movemap_builder of name \"" << name
94  << ") already exists. Skipping\n" << movemap_builder_tag << std::endl;
95  continue;
96  }
97  ///// Add this movemap to the data map
99  movemap_builder->parse_my_tag( movemap_builder_tag, data );
100  data.add( "movemap_builders" , name, movemap_builder);
101  }
102  TR.flush();
103 }
104 
107 
109 MoveMapBuilderLoaderCreator::keyname() const { return "MOVEMAP_BUILDERS"; }
110 
113 
115  core::pose::Pose const &,
116  utility::tag::TagPtr const tag,
117  moves::DataMap & data
118 ) const
119 {
120  using namespace utility::tag;
122 
123  foreach(TagPtr ligand_area_tag, tag->getTags()){
124  std::string const name( ligand_area_tag->getName() );
125 
126  if ( data.has("ligand_areas", name)) {
127  TR << "WARNING WARNING ligand_area of name \"" << name
128  << ") already exists. Skipping\n" << ligand_area_tag << std::endl;
129  continue;
130  }
131  ///// Add this movemap to the data map
133  ligand_area->parse_my_tag( ligand_area_tag );
134  data.add( "ligand_areas" , name, ligand_area);
135  }
136  TR.flush();
137 }
138 
141 
143 LigandAreaLoaderCreator::keyname() const { return "LIGAND_AREAS"; }
144 
145 
146 
147 } //namespace jd2
148 } //namespace protocols