Definition at line 465 of file compound.cpp.
◆ CCD_compound_factory_impl() [1/2]
cif::CCD_compound_factory_impl::CCD_compound_factory_impl |
( |
std::shared_ptr< compound_factory_impl > |
next, |
|
|
const fs::path & |
file |
|
) |
| |
|
inline |
Definition at line 468 of file compound.cpp.
compound_factory_impl(std::shared_ptr< compound_factory_impl > next)
std::shared_ptr< compound_factory_impl > next() const
◆ CCD_compound_factory_impl() [2/2]
cif::CCD_compound_factory_impl::CCD_compound_factory_impl |
( |
std::shared_ptr< compound_factory_impl > |
next | ) |
|
|
inline |
Definition at line 474 of file compound.cpp.
compound_factory_impl(std::shared_ptr< compound_factory_impl > next)
std::shared_ptr< compound_factory_impl > next() const
◆ create()
compound * cif::CCD_compound_factory_impl::create |
( |
const std::string & |
id | ) |
|
|
overridevirtual |
Reimplemented from cif::compound_factory_impl.
Definition at line 485 of file compound.cpp.
487 compound *result =
nullptr;
489 std::unique_ptr<std::istream> ccd;
496 std::cerr <<
"Could not locate the CCD components.cif file, please make sure the software is installed properly and/or use the update-libcifpp-data to fetch the data." << std::endl;
509 std::cout <<
"Creating component index " 514 cif::parser parser(*ccd, file);
515 mIndex = parser.index_datablocks();
518 std::cout <<
" done" << std::endl;
525 throw std::runtime_error(
"Could not locate the CCD components.cif file, please make sure the software is installed properly and/or use the update-libcifpp-data to fetch the data.");
533 std::cout <<
"Loading component " <<
id <<
"...";
537 cif::parser parser(*ccd, file);
538 parser.parse_single_datablock(
id,
mIndex);
541 std::cout <<
" done" << std::endl;
543 if (not file.empty())
545 auto &db = file.front();
548 result =
new compound(db);
550 std::shared_lock lock(
mMutex);
556 std::cerr <<
"Could not locate compound " <<
id <<
" in the CCD components file" << std::endl;
std::vector< compound * > m_compounds
std::unique_ptr< std::istream > load_resource(std::filesystem::path name)
std::shared_timed_mutex mMutex
cif::parser::datablock_index mIndex
◆ mCompoundsFile
fs::path cif::CCD_compound_factory_impl::mCompoundsFile |
◆ mIndex
cif::parser::datablock_index cif::CCD_compound_factory_impl::mIndex |
The documentation for this class was generated from the following file: