Chemical Data Processing Library Python API - Version 1.4.0
Classes | Public Member Functions | Static Public Member Functions | Properties | List of all members
CDPL.Biomol.ResidueDictionary Class Reference

Global dictionary for the lookup of meta-data associated with the residues in biological macromolecules. More...

+ Inheritance diagram for CDPL.Biomol.ResidueDictionary:

Classes

class  Entry
 A single residue dictionary entry. More...
 

Public Member Functions

None __init__ ()
 Initializes the ResidueDictionary instance.
 
None __init__ (ResidueDictionary dict)
 Initializes a copy of the ResidueDictionary instance dict. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None addEntry (Entry entry)
 Adds (or overwrites) the dictionary entry entry by moving its data. More...
 
bool containsEntry (str code)
 Tells whether the dictionary contains an entry for the residue with three-letter code code. More...
 
None removeEntry (str code)
 Removes the dictionary entry for the residue with three-letter code code. More...
 
Entry getEntry (str code)
 Returns the dictionary entry for the residue with three-letter code code. More...
 
None clear ()
 Removes all entries from the dictionary.
 
int getNumEntries ()
 Returns the number of entries in the dictionary. More...
 
list getEntries ()
 
None loadDefaults ()
 Loads the built-in default residue dictionary entries.
 
ResidueDictionary assign (ResidueDictionary dict)
 Replaces the current state of self with a copy of the state of the ResidueDictionary instance dict. More...
 
str getReplacedCode (str code)
 
str getReplacedByCode (str code)
 
str getParentCode (str code)
 
str getOneLetterCode (str code)
 
bool isObsolete (str code)
 
str getName (str code)
 
int getType (str code)
 
Chem.MolecularGraph getStructure (str code)
 

Static Public Member Functions

None set (ResidueDictionary dict)
 Replaces the process-wide default dictionary by dict. More...
 
ResidueDictionary get ()
 Returns the process-wide default dictionary (lazily initialized on first call). More...
 
bool isStdResidue (str code)
 Tells whether the residue with three-letter code code is a standard biopolymer residue (amino acid or nucleotide). More...
 

Properties

 objectID = property(getObjectID)
 
 numEntries = property(getNumEntries)
 
 entries = property(getEntries)
 

Detailed Description

Global dictionary for the lookup of meta-data associated with the residues in biological macromolecules.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Biomol.ResidueDictionary.__init__ ( ResidueDictionary  dict)

Initializes a copy of the ResidueDictionary instance dict.

Parameters
dictThe ResidueDictionary instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.Biomol.ResidueDictionary.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python ResidueDictionary instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two ResidueDictionary instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ addEntry()

None CDPL.Biomol.ResidueDictionary.addEntry ( Entry  entry)

Adds (or overwrites) the dictionary entry entry by moving its data.

Parameters
entryThe entry to add.
Since
1.2

◆ containsEntry()

bool CDPL.Biomol.ResidueDictionary.containsEntry ( str  code)

Tells whether the dictionary contains an entry for the residue with three-letter code code.

Parameters
codeThe residue three-letter code.
Returns
True if a matching entry exists, and False otherwise.

◆ removeEntry()

None CDPL.Biomol.ResidueDictionary.removeEntry ( str  code)

Removes the dictionary entry for the residue with three-letter code code.

Parameters
codeThe residue three-letter code.

◆ getEntry()

Entry CDPL.Biomol.ResidueDictionary.getEntry ( str  code)

Returns the dictionary entry for the residue with three-letter code code.

Parameters
codeThe residue three-letter code.
Returns
A reference to the matching entry (or to an empty default-constructed entry if no matching entry exists).

◆ getNumEntries()

int CDPL.Biomol.ResidueDictionary.getNumEntries ( )

Returns the number of entries in the dictionary.

Returns
The entry count.

◆ getEntries()

list CDPL.Biomol.ResidueDictionary.getEntries ( )
Returns

◆ assign()

ResidueDictionary CDPL.Biomol.ResidueDictionary.assign ( ResidueDictionary  dict)

Replaces the current state of self with a copy of the state of the ResidueDictionary instance dict.

Parameters
dictThe ResidueDictionary instance to copy.
Returns
self

◆ set()

None CDPL.Biomol.ResidueDictionary.set ( ResidueDictionary  dict)
static

Replaces the process-wide default dictionary by dict.

Parameters
dictThe new default dictionary (a nullptr resets to the built-in default).

◆ get()

ResidueDictionary CDPL.Biomol.ResidueDictionary.get ( )
static

Returns the process-wide default dictionary (lazily initialized on first call).

Returns
A reference to the default-dictionary shared reference.

◆ getReplacedCode()

str CDPL.Biomol.ResidueDictionary.getReplacedCode ( str  code)
Parameters
arg1
code
Returns

◆ getReplacedByCode()

str CDPL.Biomol.ResidueDictionary.getReplacedByCode ( str  code)
Parameters
arg1
code
Returns

◆ getParentCode()

str CDPL.Biomol.ResidueDictionary.getParentCode ( str  code)
Parameters
arg1
code
Returns

◆ getOneLetterCode()

str CDPL.Biomol.ResidueDictionary.getOneLetterCode ( str  code)
Parameters
arg1
code
Returns

◆ isObsolete()

bool CDPL.Biomol.ResidueDictionary.isObsolete ( str  code)
Parameters
arg1
code
Returns

◆ getName()

str CDPL.Biomol.ResidueDictionary.getName ( str  code)
Parameters
arg1
code
Returns

◆ isStdResidue()

bool CDPL.Biomol.ResidueDictionary.isStdResidue ( str  code)
static

Tells whether the residue with three-letter code code is a standard biopolymer residue (amino acid or nucleotide).

Parameters
codeThe residue three-letter code.
Returns
True if the residue is a standard biopolymer residue, and False otherwise.

◆ getType()

int CDPL.Biomol.ResidueDictionary.getType ( str  code)
Parameters
arg1
code
Returns

◆ getStructure()

Chem.MolecularGraph CDPL.Biomol.ResidueDictionary.getStructure ( str  code)
Parameters
arg1
code
Returns