#include <BALL/STRUCTURE/fragmentDB.h>
FragmentDB - fragment database class. The fragment database is used to store commonly used subunits as amino acids, sugars and the like. They are entered in a special format described below. The main resource file resides under data/fragments/Fragments.db.
Definition at line 44 of file fragmentDB.h.
typedef StringHashMap<String> BALL::FragmentDB::NameMap |
A hash map used to convert one atom naming convention to another
Definition at line 76 of file fragmentDB.h.
typedef short BALL::FragmentDB::Type |
Type definition for the fragment type
Definition at line 74 of file fragmentDB.h.
Fragment types
Definition at line 59 of file fragmentDB.h.
BALL::FragmentDB::FragmentDB | ( | ) |
Creates a default but invalid FragmentDB instance.
BALL::FragmentDB::FragmentDB | ( | const String & | filename | ) |
Creates a FragmentDB object and reads the contents of filename
. If filename is an empty string, the default value "fragments/Fragments.db" is used.
Exception::FileNotFound | if the file is not found in the BALL_DATA_PATH |
BALL::FragmentDB::FragmentDB | ( | const FragmentDB & | db, | |
bool | deep = true | |||
) |
Copy constructor.
virtual BALL::FragmentDB::~FragmentDB | ( | ) | [virtual] |
Destructor.
Add a new fragment pointer to the database (while parsing)
void BALL::FragmentDB::destroy | ( | ) |
bool BALL::FragmentDB::expandFirst_ | ( | ResourceEntry & | root_entry | ) | [private] |
void BALL::FragmentDB::expandTree_ | ( | ResourceEntry & | root_entry | ) | [private] |
std::vector<String> BALL::FragmentDB::getAvailableNamingStandards | ( | ) | const |
Return a vector of available naming standards
const String& BALL::FragmentDB::getDefaultNamingStandard | ( | ) | const |
Return the default naming standard
const String& BALL::FragmentDB::getFilename | ( | ) | const |
Get the filename.
Return a fragment.
Return a copy of a fragment. If a fragment with name fragment_name
exists in the fragment database, a copy is created and returned. Otherwise, a null pointer is returned. Take care to destruct the copy again to avoid memory leaks.
fragent_name | the name of the fragment in the database |
const std::vector<Residue*>& BALL::FragmentDB::getFragments | ( | ) | const [inline] |
Definition at line 158 of file fragmentDB.h.
FragmentDB::Type BALL::FragmentDB::getFragmentType | ( | const String & | fragment_name | ) | const |
Return a fragment.
Return a copy of a fragment as a molecule. If a fragment with name fragment_name
exists in the fragment database, a copy is created, inserted into a new molecule, and returned. Otherwise, a null pointer is returned. Take care to destruct the copy again to avoid memory leaks.
fragent_name | the name of the fragment in the database |
const StringHashMap<String>& BALL::FragmentDB::getNamingStandard | ( | const String & | std | ) | const |
Return the naming standard given by std
StringHashMap<String>::IllegalKey | if std is not a valid naming standard |
StringHashMap<NameMap>& BALL::FragmentDB::getNamingStandards | ( | ) |
Return a hash map containing all naming maps.
Return a reference fragment. This method returns a standard template of a given fragment or a NULL pointer if the fragment is not known. The first criterion is the fragment name. If there exist multiple variants of the fragment, the correct variant is chosen according to the properties set in fragment
.
Return a residue.
Return a copy of a residue. If a fragment with name fragment_name
exists in the fragment database, a copy is created and returned as a residue. Otherwise, a null pointer is returned. Take care to destruct the copy again to avoid memory leaks.
fragent_name | the name of the fragment in the database |
Return a list containing all variant names.
Checks whether a specified fragment is known to the fragment database.
void BALL::FragmentDB::init | ( | ) |
Initialization of the database.
Exception::FileNotFound | if the file is not found in the BALL_DATA_PATH | |
Exception::NoFragmentNode | if the FragmentDB file did not contain any node entries |
bool BALL::FragmentDB::isValid | ( | ) | const |
FragmentDB& BALL::FragmentDB::operator= | ( | const FragmentDB & | db | ) |
Assignment operator.
void BALL::FragmentDB::parseAtoms_ | ( | ResourceEntry & | entry, | |
Fragment & | fragment | |||
) | [private] |
void BALL::FragmentDB::parseBonds_ | ( | ResourceEntry & | entry, | |
Fragment & | fragment | |||
) | [private] |
void BALL::FragmentDB::parseDelete_ | ( | ResourceEntry & | entry, | |
Fragment & | fragment | |||
) | [private] |
void BALL::FragmentDB::parseProperties_ | ( | ResourceEntry & | entry, | |
PropertyManager & | property_man | |||
) | [private] |
void BALL::FragmentDB::parseRename_ | ( | ResourceEntry & | entry, | |
Fragment & | fragment | |||
) | [private] |
void BALL::FragmentDB::setFilename | ( | const String & | filename | ) |
Assigns a filename.
Exception::FileNotFound | if the file is not found in the BALL_DATA_PATH |
friend class FragmentDB::AddHydrogensProcessor [friend] |
Definition at line 48 of file fragmentDB.h.
The standard hydrogen adder
Definition at line 480 of file fragmentDB.h.
The standard bond builder
Definition at line 484 of file fragmentDB.h.
String BALL::FragmentDB::default_standard_ [private] |
Definition at line 550 of file fragmentDB.h.
String BALL::FragmentDB::filename_ [private] |
Definition at line 547 of file fragmentDB.h.
std::vector<Residue*> BALL::FragmentDB::fragments_ [private] |
Definition at line 553 of file fragmentDB.h.
Definition at line 559 of file fragmentDB.h.
NameMap BALL::FragmentDB::name_to_path_ [private] |
Definition at line 556 of file fragmentDB.h.
StringHashMap<list<Position> > BALL::FragmentDB::name_to_variants_ [private] |
Definition at line 562 of file fragmentDB.h.
The standard name normalization processor
Definition at line 476 of file fragmentDB.h.
StringHashMap<NameMap> BALL::FragmentDB::standards_ [private] |
Definition at line 565 of file fragmentDB.h.
The resource tree read from the database file
Definition at line 488 of file fragmentDB.h.
bool BALL::FragmentDB::valid_ [private] |
Definition at line 544 of file fragmentDB.h.