Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Biomol::ResidueDictionary::Entry Class Reference

A single residue dictionary entry. More...

#include <ResidueDictionary.hpp>

Public Types

typedef std::function< Chem::MolecularGraph::SharedPointer(const std::string &)> StructureRetrievalFunction
 Generic wrapper for storing a user-defined function that retrieves the residue structure for a given three-letter code. More...
 

Public Member Functions

 Entry (const std::string &code, const std::string &rep_code, const std::string &rep_by_code, const std::string &parent_code, const std::string &one_letter_code, bool obsolete, const std::string &name, unsigned int type, const StructureRetrievalFunction &struc_ret_func)
 Constructs and initializes an Entry instance with the given data. More...
 
 Entry ()
 Constructs an empty (default-initialized) Entry instance. More...
 
const std::string & getCode () const
 Returns the three-letter code (TLC) of the residue. More...
 
const std::string & getReplacedCode () const
 Returns the TLC of the residue this entry replaces. More...
 
const std::string & getReplacedByCode () const
 Returns the TLC of the residue that replaces this one. More...
 
const std::string & getParentCode () const
 Returns the TLC of the parent residue. More...
 
const std::string & getOneLetterCode () const
 Returns the one-letter residue code. More...
 
bool isObsolete () const
 Tells whether the residue type described by this entry is obsolete. More...
 
const std::string & getName () const
 Returns the full residue name. More...
 
unsigned int getType () const
 Returns the residue type (see Biomol::ResidueType). More...
 
Chem::MolecularGraph::SharedPointer getStructure () const
 Retrieves the residue structure via the configured structure-retrieval function. More...
 

Detailed Description

A single residue dictionary entry.

Member Typedef Documentation

◆ StructureRetrievalFunction

Generic wrapper for storing a user-defined function that retrieves the residue structure for a given three-letter code.

Constructor & Destructor Documentation

◆ Entry() [1/2]

CDPL::Biomol::ResidueDictionary::Entry::Entry ( const std::string &  code,
const std::string &  rep_code,
const std::string &  rep_by_code,
const std::string &  parent_code,
const std::string &  one_letter_code,
bool  obsolete,
const std::string &  name,
unsigned int  type,
const StructureRetrievalFunction struc_ret_func 
)

Constructs and initializes an Entry instance with the given data.

Parameters
codeThe three-letter code (TLC) of the residue.
rep_codeThe TLC of the residue this entry replaces (or an empty string if it does not replace any other residue).
rep_by_codeThe TLC of the residue that replaces this one (or an empty string if it has not been replaced).
parent_codeThe TLC of the parent residue (or an empty string if there is no parent).
one_letter_codeThe one-letter residue code (or an empty string if not defined).
obsoletetrue if the residue type is obsolete, and false otherwise.
nameThe full residue name.
typeThe residue type (see Biomol::ResidueType).
struc_ret_funcThe function used to retrieve the residue structure on demand.

◆ Entry() [2/2]

CDPL::Biomol::ResidueDictionary::Entry::Entry ( )

Constructs an empty (default-initialized) Entry instance.

Member Function Documentation

◆ getCode()

const std::string& CDPL::Biomol::ResidueDictionary::Entry::getCode ( ) const

Returns the three-letter code (TLC) of the residue.

Returns
A const reference to the three-letter residue code.

◆ getReplacedCode()

const std::string& CDPL::Biomol::ResidueDictionary::Entry::getReplacedCode ( ) const

Returns the TLC of the residue this entry replaces.

Returns
A const reference to the replaced-residue code (or an empty string if this entry does not replace any other residue).

◆ getReplacedByCode()

const std::string& CDPL::Biomol::ResidueDictionary::Entry::getReplacedByCode ( ) const

Returns the TLC of the residue that replaces this one.

Returns
A const reference to the replacing-residue code (or an empty string if this entry has not been replaced).

◆ getParentCode()

const std::string& CDPL::Biomol::ResidueDictionary::Entry::getParentCode ( ) const

Returns the TLC of the parent residue.

Returns
A const reference to the parent-residue code (or an empty string if there is no parent).
Since
1.2

◆ getOneLetterCode()

const std::string& CDPL::Biomol::ResidueDictionary::Entry::getOneLetterCode ( ) const

Returns the one-letter residue code.

Returns
A const reference to the one-letter residue code (or an empty string if not defined).
Since
1.2

◆ isObsolete()

bool CDPL::Biomol::ResidueDictionary::Entry::isObsolete ( ) const

Tells whether the residue type described by this entry is obsolete.

Returns
true if the residue type is obsolete, and false otherwise.

◆ getName()

const std::string& CDPL::Biomol::ResidueDictionary::Entry::getName ( ) const

Returns the full residue name.

Returns
A const reference to the residue name.

◆ getType()

unsigned int CDPL::Biomol::ResidueDictionary::Entry::getType ( ) const

Returns the residue type (see Biomol::ResidueType).

Returns
The residue type identifier.

◆ getStructure()

Chem::MolecularGraph::SharedPointer CDPL::Biomol::ResidueDictionary::Entry::getStructure ( ) const

Retrieves the residue structure via the configured structure-retrieval function.

Returns
A shared pointer to the residue structure (or an empty pointer if no structure could be retrieved).

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