Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VirtualCoordinates.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 // This file is made available under the Rosetta Commons license.
5 // See http://www.rosettacommons.org/license
6 // (C) 199x-2007 University of Washington
7 // (C) 199x-2007 University of California Santa Cruz
8 // (C) 199x-2007 University of California San Francisco
9 // (C) 199x-2007 Johns Hopkins University
10 // (C) 199x-2007 University of North Carolina, Chapel Hill
11 // (C) 199x-2007 Vanderbilt University
12 
13 /// @brief VirtualCoordinate container
14 /// @file core/conformation/symmetry/VirtualCoordinates.cc
15 /// @author Ingemar Andre
16 
17 // Unit headers
19 
20 // C++ headers
21 #include <iostream>
22 
23 // Utility header
24 #include <utility/io/izstream.hh>
25 #include <utility/string_util.hh>
26 
27 namespace core {
28 namespace conformation {
29 namespace symmetry {
30 
32 {
33  axis_x_ = src.axis_x_;
34  axis_y_ = src.axis_y_;
36 }
37 
38 void
40  std::vector< std::string > coords,
41  core::Size coord_start )
42 {
43  assert( coords.size() >= 3 );
44  utility::vector1< std::string> split ( utility::string_split( coords[ coord_start -1 ], ',' ) );
45  assert( split.size() == 3 );
46  Vector x( ( static_cast<core::Real>( std::atof( split[1].c_str() ) ) ),
47  ( static_cast<core::Real>( std::atof( split[2].c_str() ) ) ),
48  ( static_cast<core::Real>( std::atof( split[3].c_str() ) ) ) );
49  split = utility::string_split( coords[ coord_start ], ',' );
50  Vector y( ( static_cast<core::Real>( std::atof( split[1].c_str() ) ) ),
51  ( static_cast<core::Real>( std::atof( split[2].c_str() ) ) ),
52  ( static_cast<core::Real>( std::atof( split[3].c_str() ) ) ) );
53  Vector origin(0,0,0);
54  if ( coords.size() == 4 ) {
55  split = utility::string_split( coords[ coord_start +2 ], ',' );
56  origin = Vector( ( static_cast<core::Real>( std::atof( split[1].c_str() ) ) ),
57  ( static_cast<core::Real>( std::atof( split[2].c_str() ) ) ),
58  ( static_cast<core::Real>( std::atof( split[3].c_str() ) ) ) );
59  }
60  push_back_x( x );
61  push_back_y( y );
62  push_back_origin( origin );
63 }
64 
65 } // symmetry
66 } // conformation
67 } // core