Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DisulfideAtomIndices.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 sw=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/scoring/disulfides/DisulfideAtomIndices.cc
11 /// @brief Disulfide Energy class implementation
12 /// @author Andrew Leaver-Fay
13 
14 // Unit headers
16 
17 // Project headers
19 
20 #include <utility/vector1.hh>
21 
22 
23 namespace core {
24 namespace scoring {
25 namespace disulfides {
26 
27 
29  c_alpha_index_( res.atom_index( "CA" ) ),
30  c_beta_index_( res.atom_index( "CB" ) ),
31  derivative_atom_types_( res.natoms(), NO_DERIVATIVES_FOR_ATOM )
32 {
35 
36  if( res.type().has_atom_name("SG") ) {
37  disulf_atom_index_ = res.atom_index( "SG" );
39  }
40  else {
41  assert(res.type().has_atom_name("CEN") );//disulfides form to SG or CEN only
42 
43  disulf_atom_index_ = res.atom_index( "CEN" );
45  }
46 }
47 
48 bool
50 {
51  return derivative_atom_types_[ atom_index ] != NO_DERIVATIVES_FOR_ATOM;
52 }
53 
56 {
57  return derivative_atom_types_[ atom_index ];
58 }
59 
60 
61 
62 } // namespace disulfides
63 } // namespace scoring
64 } // namespace core