|
virtual compound * | create (const std::string &id) |
|
Definition at line 290 of file compound.cpp.
◆ compound_factory_impl() [1/2]
Definition at line 378 of file compound.cpp.
381 for (
const auto &[key, value] : compound_factory::kAAMap)
384 for (
const auto &[key, value] : compound_factory::kBaseMap)
std::set< std::string > m_known_peptides
std::set< std::string > m_known_bases
std::shared_ptr< compound_factory_impl > m_next
std::shared_ptr< compound_factory_impl > next() const
◆ compound_factory_impl() [2/2]
cif::compound_factory_impl::compound_factory_impl |
( |
const fs::path & |
file, |
|
|
std::shared_ptr< compound_factory_impl > |
next |
|
) |
| |
Definition at line 388 of file compound.cpp.
391 cif::file cifFile(file);
393 if (cifFile.contains(
"comp_list"))
395 auto &compList = cifFile[
"comp_list"];
396 auto &chemComp = compList[
"chem_comp"];
398 for (
const auto &[
id, name, group] : chemComp.rows<std::string, std::string, std::string>(
"id",
"name",
"group"))
422 type =
"peptide linking";
424 type = "L-peptide linking";
426 type = "DNA linking";
428 type = "RNA linking";
430 type = "non-polymer";
432 auto &db = cifFile["comp_" +
id];
434 m_compounds.push_back(new compound(db,
id, name, type, group));
442 cifFile.load_dictionary(
"mmcif_pdbx.dic");
444 if (not cifFile.is_valid())
446 std::cerr <<
"The components file " << file <<
" is not valid" << std::endl;
448 std::cerr <<
"(use --verbose to see why)" << std::endl;
451 catch (
const std::exception &e)
453 std::cerr <<
"When trying to load the components file " << file <<
" there was an exception:" << std::endl
454 << e.what() << std::endl;
457 for (
auto &db : cifFile)
std::vector< compound * > m_compounds
bool iequals(std::string_view a, std::string_view b)
if(fabs(c[*nmax+ *nmax *c_dim1])==0.e0)
std::shared_ptr< compound_factory_impl > m_next
std::shared_ptr< compound_factory_impl > next() const
◆ ~compound_factory_impl()
virtual cif::compound_factory_impl::~compound_factory_impl |
( |
| ) |
|
|
inlinevirtual |
Definition at line 297 of file compound.cpp.
std::vector< compound * > m_compounds
◆ create()
virtual compound* cif::compound_factory_impl::create |
( |
const std::string & |
id | ) |
|
|
inlineprotectedvirtual |
◆ get()
compound* cif::compound_factory_impl::get |
( |
std::string |
id | ) |
|
|
inline |
Definition at line 303 of file compound.cpp.
307 std::shared_lock lock(
mMutex);
309 compound *result =
nullptr;
312 for (
auto impl = shared_from_this(); impl; impl = impl->m_next)
314 for (
auto cmp : impl->m_compounds)
327 if (result ==
nullptr and
m_missing.count(
id) == 0)
329 for (
auto impl = shared_from_this(); impl; impl = impl->m_next)
331 result = impl->create(
id);
332 if (result !=
nullptr)
336 if (result ==
nullptr)
void to_upper(std::string &s)
std::set< std::string > m_missing
std::shared_timed_mutex mMutex
◆ is_known_base()
bool cif::compound_factory_impl::is_known_base |
( |
const std::string & |
resName | ) |
|
|
inline |
Definition at line 354 of file compound.cpp.
std::set< std::string > m_known_bases
std::shared_ptr< compound_factory_impl > m_next
◆ is_known_peptide()
bool cif::compound_factory_impl::is_known_peptide |
( |
const std::string & |
resName | ) |
|
|
inline |
Definition at line 348 of file compound.cpp.
std::set< std::string > m_known_peptides
std::shared_ptr< compound_factory_impl > m_next
◆ next()
Definition at line 343 of file compound.cpp.
std::shared_ptr< compound_factory_impl > m_next
◆ m_compounds
std::vector<compound *> cif::compound_factory_impl::m_compounds |
|
protected |
◆ m_known_bases
std::set<std::string> cif::compound_factory_impl::m_known_bases |
|
protected |
◆ m_known_peptides
std::set<std::string> cif::compound_factory_impl::m_known_peptides |
|
protected |
◆ m_missing
std::set<std::string> cif::compound_factory_impl::m_missing |
|
protected |
◆ m_next
◆ mMutex
std::shared_timed_mutex cif::compound_factory_impl::mMutex |
|
protected |
The documentation for this class was generated from the following file: