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

#include <PDBRotamerLibrarySpecification.hh>

Inheritance diagram for core::chemical::rotamers::PDBRotamerLibrarySpecification:
Inheritance graph
[legend]

Public Member Functions

 PDBRotamerLibrarySpecification ()
 
 PDBRotamerLibrarySpecification (std::string const &library_filename)
 
 PDBRotamerLibrarySpecification (std::istream &input)
 
RotamerLibrarySpecificationOP clone () const override
 Create a copy of the RotamerLibrarySpecification, respecting the subclassing. More...
 
std::string const & pdb_rotamers_file () const
 
void pdb_rotamers_file (std::string const &filename)
 
std::string keyname () const override
 Which type of SingleResidueRotamerLibrary does this specification sub-type correspond to? More...
 
std::string cache_tag (core::chemical::ResidueType const &) const override
 How, if at all, should the corresponding SingleResidueRotamerLibrary be cached? More...
 
void describe (std::ostream &out) const override
 Write a params-file-like description of this RotamerLibrarySpecification to the given output stream. Can be multi-line, will be ended with a newline. More...
 
- Public Member Functions inherited from core::chemical::rotamers::RotamerLibrarySpecification
 RotamerLibrarySpecification ()=default
 

Static Public Member Functions

static std::string library_name ()
 

Private Attributes

std::string pdb_rotamers_file_
 

Constructor & Destructor Documentation

core::chemical::rotamers::PDBRotamerLibrarySpecification::PDBRotamerLibrarySpecification ( )
default
core::chemical::rotamers::PDBRotamerLibrarySpecification::PDBRotamerLibrarySpecification ( std::string const &  library_filename)
core::chemical::rotamers::PDBRotamerLibrarySpecification::PDBRotamerLibrarySpecification ( std::istream &  input)

References pdb_rotamers_file_.

Member Function Documentation

std::string core::chemical::rotamers::PDBRotamerLibrarySpecification::cache_tag ( core::chemical::ResidueType const &  ) const
inlineoverridevirtual

How, if at all, should the corresponding SingleResidueRotamerLibrary be cached?

The default is to return an empty string, which turns off caching.

The SingleResidueRotamerLibraries are cached in the SingleResidueRotamerLibraryFactory based on keyname() and cache_tag() (as keys in a map< string, map< string, SRRL > > ). Two RotamerLibrarySpecifications with identical return values for keyname() and cache_tag() should correspond to (functionally) identical SingleResidueRotamerLibraries.

This has to be in the RotamerLibrarySpecification, as when reading we need to know the cache string before creating the library.

A note on writing RotamerLibrarySpecifications and SingleResidueRotamerLibrarys: The functions of a SingleResidueRotamerLibrary will normally have access to the actual RotamerLibrarySpecification from the passed Residue/ResidueType. Therefore, you don't need to store all the information from a RLS in the SRRL. Not doing so allows you to have more general cache_tag(), as the cache_tag() function only needs to disambiguate RotamerLibrarySpecifications which result in different SingleResidueRotamerLibrarys. (That is, cache_tag() only needs to encapsulate data used by SingleResidueRotamerLibraryCreator to create the SingleResidueRotamerLibrary.)

The ResidueType is passed to cache_tag() so that if the SingleResidueRotamerLibraryCreator needs details from the ResidueType in order to correctly create the SingleResidueRotamerLibrary, that information can be extracted. In general, though, you want to avoid keying off of information in ResidueType as much as possible.

Reimplemented from core::chemical::rotamers::RotamerLibrarySpecification.

References pdb_rotamers_file_.

RotamerLibrarySpecificationOP core::chemical::rotamers::PDBRotamerLibrarySpecification::clone ( ) const
overridevirtual

Create a copy of the RotamerLibrarySpecification, respecting the subclassing.

Implements core::chemical::rotamers::RotamerLibrarySpecification.

void core::chemical::rotamers::PDBRotamerLibrarySpecification::describe ( std::ostream &  out) const
overridevirtual

Write a params-file-like description of this RotamerLibrarySpecification to the given output stream. Can be multi-line, will be ended with a newline.

Implements core::chemical::rotamers::RotamerLibrarySpecification.

References library_name(), and pdb_rotamers_file_.

std::string core::chemical::rotamers::PDBRotamerLibrarySpecification::keyname ( ) const
overridevirtual

Which type of SingleResidueRotamerLibrary does this specification sub-type correspond to?

Implements core::chemical::rotamers::RotamerLibrarySpecification.

References library_name().

std::string core::chemical::rotamers::PDBRotamerLibrarySpecification::library_name ( )
static
std::string const& core::chemical::rotamers::PDBRotamerLibrarySpecification::pdb_rotamers_file ( ) const
inline

References pdb_rotamers_file_.

void core::chemical::rotamers::PDBRotamerLibrarySpecification::pdb_rotamers_file ( std::string const &  filename)
inline

Member Data Documentation

std::string core::chemical::rotamers::PDBRotamerLibrarySpecification::pdb_rotamers_file_
private

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