Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OptCysHG.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/pack/task/operation/OptCysHG.cc
11 /// @brief run optH on non-disulfided bonded CYS only; meant to relieve
12 /// any clashes caused by swapping of CYD->CYS after calling
13 /// Conformation::detect_disulfides()
14 /// @author Yih-En Andrew Ban (yab@u.washington.edu)
15 
16 // unit headers
19 
20 // package headers
22 
23 // package headers
24 #include <core/chemical/AA.hh>
27 // AUTO-REMOVED #include <core/pack/task/PackerTask.hh>
28 #include <core/pose/Pose.hh>
29 
30 #include <utility/vector1.hh>
31 
32 
33 
34 namespace core {
35 namespace pack {
36 namespace task {
37 namespace operation {
38 
39 
40 /// @brief default constructor
42  Super()
43 {}
44 
45 
46 /// @brief copy constructor
47 OptCysHG::OptCysHG( OptCysHG const & rval ) :
48  Super( rval )
49 {}
50 
51 
52 /// @brief default destructor
54 
56 {
57  return new OptCysHG;
58 }
59 
60 /// @brief clone this object
62  return new OptCysHG( *this );
63 }
64 
65 
66 /// @brief apply operations to PackerTask
67 void OptCysHG::apply( Pose const & pose, PackerTask & task ) const {
70 
71  OptH optH;
72 
73  // restrict to only non-disulfide bonded CYS
74  for ( Size i = 1, ie = pose.n_residue(); i <= ie; ++i ) {
75  if ( !strncmp(pose.residue_type(i).name3().c_str(), "CYS", 3) || pose.residue( i ).aa() != aa_cys || pose.residue( i ).has_variant_type( DISULFIDE ) ) { //check both names to be double sure; used in fake Cys catalytic residues
76  optH.disallow_resid( i );
77  }
78  }
79 
80  optH.apply( pose, task );
81 }
82 
83 
84 } // namespace operation
85 } // namespace task
86 } // namespace pack
87 } // namespace core
88