Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PoseFromPDBLoader.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 core/import_pose/PoseFromPDBLoader.cc
11 /// @brief
12 /// @author Brian D. Weitzner brian.weitzner@gmail.com
13 
14 //unit headers
17 
18 //package headers
19 #include <core/pose/Pose.hh>
22 
23 //utility headers
24 #include <utility/excn/Exceptions.hh>
25 
26 // numeric headers
27 
28 namespace core {
29 namespace import_pose {
30 
33 
34 utility::pointer::ReferenceCountOP
36  basic::resource_manager::ResourceOptions const & options,
37  basic::resource_manager::LocatorID const & locator_id,
38  std::istream & istream
39 ) const
40 {
41  ImportPoseOptionsCOP pose_opts_ptr = dynamic_cast< ImportPoseOptions const * > ( &options );
42  if ( ! pose_opts_ptr ) {
43  throw utility::excn::EXCN_Msg_Exception( "PoseFromPDBLoader expected to be given a ImportPoseOptions object, " \
44  "but was given a non-ImportPoseOptions object of type '" + options.type() + "', which has the name '" + options.name() + "'." );
45  }
46  pose::PoseOP pose = new pose::Pose();
47  pose_from_pdb_stream( *pose, istream, locator_id, *pose_opts_ptr );
48  return pose;
49 }
50 
51 basic::resource_manager::ResourceOptionsOP
53 {
54  return new ImportPoseOptions();
55 }
56 
57 basic::resource_manager::ResourceLoaderOP PoseFromPDBLoaderCreator::create_resource_loader() const
58 {
59  return new PoseFromPDBLoader();
60 }
61 
63 {
64  return "PoseFromPDB";
65 }
66 
67 } // namespace import_pose
68 } // namespace core