Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
core::chemical::Patch Class Reference

A class patching basic ResidueType to create variant types, containing multiple PatchCase. More...

#include <Patch.hh>

Inheritance diagram for core::chemical::Patch:
Inheritance graph
[legend]
Collaboration diagram for core::chemical::Patch:
Collaboration graph
[legend]

Public Member Functions

virtual ~Patch ()
 Automatically generated virtual destructor for class deriving directly from ReferenceCount. More...
 
void read_file (std::string const &filename)
 constructor from file More...
 
virtual bool applies_to (ResidueType const &rsd) const
 can I operate on this residue type? More...
 
virtual bool replaces (ResidueType const &rsd) const
 do I replace this residue type? More...
 
virtual ResidueTypeOP apply (ResidueType const &rsd_type) const
 returns patched residue, 0 if patch failed More...
 
virtual std::string const & name () const
 unique name of this patch, eg Nter-simple, Cter-full, Phospho, ... ? More...
 
virtual utility::vector1
< VariantType > const & 
types () const
 the variant types created by applying this patch More...
 

Private Attributes

std::string name_
 private data More...
 
utility::vector1< VariantTypetypes_
 variant types created by the patch More...
 
ResidueSelector selector_
 criteria to select ResidueTypes to which the patch is applied More...
 
utility::vector1< PatchCaseOPcases_
 different cases to which the patch is applied slightly differently, e.g., N-terminus patch to PRO and GLY More...
 
bool replaces_residue_type_
 if set this patch will not change the name of the ResidueType and returns true for replaces() More...
 

Detailed Description

A class patching basic ResidueType to create variant types, containing multiple PatchCase.

Definition at line 98 of file Patch.hh.

Constructor & Destructor Documentation

core::chemical::Patch::~Patch ( )
virtual

Automatically generated virtual destructor for class deriving directly from ReferenceCount.

Auto-generated virtual destructor

Definition at line 180 of file Patch.cc.

Member Function Documentation

virtual bool core::chemical::Patch::applies_to ( ResidueType const &  rsd) const
inlinevirtual

can I operate on this residue type?

Definition at line 109 of file Patch.hh.

References selector_.

Referenced by apply(), core::chemical::ResidueTypeSet::apply_patches(), and replaces().

ResidueTypeOP core::chemical::Patch::apply ( ResidueType const &  rsd_type) const
virtual

returns patched residue, 0 if patch failed

loop through the cases in this patch and if it is applicable to this ResidueType, the corresponding patch operations are applied to create a new variant type of the basic ResidueType. The new types's name and its variant type info are updated together with all other primary and derived ResidueType data.

Definition at line 355 of file Patch.cc.

References applies_to(), cases_, core::chemical::ResidueType::name(), name_, core::chemical::patch_linker, replaces_residue_type_, core::chemical::tr(), and types_.

Referenced by core::chemical::ResidueTypeSet::apply_patches().

virtual std::string const& core::chemical::Patch::name ( ) const
inlinevirtual

unique name of this patch, eg Nter-simple, Cter-full, Phospho, ... ?

Definition at line 131 of file Patch.hh.

References name_.

void core::chemical::Patch::read_file ( std::string const &  filename)

constructor from file

  • first read in all lines from the file, discarding # comment lines
  • parse input lines for Patch name and variant types (NAME, TYPES)
  • parse input lines for general ResidueSelector defined for this Patch (BEGIN_SELECTOR, END_SELECTOR)
  • parse input lines to create each case accordingly (BEGIN_CASE, END_CASE)
    Note
    keep the order to avoid triggering parsing errors

Definition at line 268 of file Patch.cc.

References core::chemical::ResidueSelector::add_line(), core::chemical::case_from_lines(), cases_, core::chemical::ResidueSelector::clear(), name_, replaces_residue_type_, selector_, core::scoring::hbonds::t(), core::chemical::tag_from_line(), core::chemical::tr(), and types_.

Referenced by core::chemical::ResidueTypeSet::apply_patches().

virtual bool core::chemical::Patch::replaces ( ResidueType const &  rsd) const
inlinevirtual

do I replace this residue type?

Definition at line 117 of file Patch.hh.

References applies_to(), and replaces_residue_type_.

Referenced by core::chemical::ResidueTypeSet::apply_patches().

virtual utility::vector1< VariantType > const& core::chemical::Patch::types ( ) const
inlinevirtual

the variant types created by applying this patch

Definition at line 139 of file Patch.hh.

References types_.

Member Data Documentation

utility::vector1< PatchCaseOP > core::chemical::Patch::cases_
private

different cases to which the patch is applied slightly differently, e.g., N-terminus patch to PRO and GLY

Definition at line 156 of file Patch.hh.

Referenced by apply(), and read_file().

std::string core::chemical::Patch::name_
private

private data

name of the patch

Definition at line 147 of file Patch.hh.

Referenced by apply(), name(), and read_file().

bool core::chemical::Patch::replaces_residue_type_
private

if set this patch will not change the name of the ResidueType and returns true for replaces()

Definition at line 159 of file Patch.hh.

Referenced by apply(), read_file(), and replaces().

ResidueSelector core::chemical::Patch::selector_
private

criteria to select ResidueTypes to which the patch is applied

Definition at line 153 of file Patch.hh.

Referenced by applies_to(), and read_file().

utility::vector1< VariantType > core::chemical::Patch::types_
private

variant types created by the patch

Definition at line 150 of file Patch.hh.

Referenced by apply(), read_file(), and types().


The documentation for this class was generated from the following files: