Definition at line 564 of file compound.cpp.
◆ CCP4_compound_factory_impl()
cif::CCP4_compound_factory_impl::CCP4_compound_factory_impl |
( |
const fs::path & |
clibd_mon, |
|
|
std::shared_ptr< compound_factory_impl > |
next = nullptr |
|
) |
| |
Definition at line 576 of file compound.cpp.
578 , m_file((clibd_mon /
"list" /
"mon_lib_list.cif").
string())
579 , m_CLIBD_MON(clibd_mon)
581 const std::regex peptideRx(
"(?:[lmp]-)?peptide", std::regex::icase);
583 auto &chemComps = m_file[
"comp_list"][
"chem_comp"];
585 for (
const auto &[group, threeLetterCode] : chemComps.rows<std::string, std::string>(
"group",
"three_letter_code"))
587 if (std::regex_match(group, peptideRx))
bool iequals(std::string_view a, std::string_view b)
compound_factory_impl(std::shared_ptr< compound_factory_impl > next)
std::set< std::string > m_known_peptides
std::set< std::string > m_known_bases
std::shared_ptr< compound_factory_impl > next() const
◆ create()
compound * cif::CCP4_compound_factory_impl::create |
( |
const std::string & |
id | ) |
|
|
overridevirtual |
Reimplemented from cif::compound_factory_impl.
Definition at line 594 of file compound.cpp.
596 compound *result =
nullptr;
598 auto &cat = m_file[
"comp_list"][
"chem_comp"];
600 auto rs = cat.find(cif::key(
"three_letter_code") ==
id);
604 auto row = rs.front();
606 std::string name, group;
607 uint32_t numberAtomsAll, numberAtomsNh;
608 cif::tie(name, group, numberAtomsAll, numberAtomsNh) =
609 row.get(
"name",
"group",
"number_atoms_all",
"number_atoms_nh");
613 if (not fs::exists(resFile) and (
id ==
"COM" or id ==
"CON" or "PRN"))
614 resFile = m_CLIBD_MON /
cif::to_lower_copy(
id.substr(0, 1)) / (
id +
'_' +
id +
".cif");
616 if (fs::exists(resFile))
618 cif::file cf(resFile.string());
621 auto &db = cf[
"comp_" + id];
645 type =
"peptide linking";
647 type = "L-peptide linking";
649 type = "DNA linking";
651 type = "RNA linking";
653 type = "non-polymer";
655 m_compounds.push_back(new compound(db,
id, name, type, group));
std::vector< compound * > m_compounds
bool iequals(std::string_view a, std::string_view b)
std::string to_lower_copy(std::string_view s)
if(fabs(c[*nmax+ *nmax *c_dim1])==0.e0)
The documentation for this class was generated from the following file: