Commit abd97cc1 by Maarten L. Hekkelman

Merge

parent 3315fae8
...@@ -298,7 +298,9 @@ set(project_sources ...@@ -298,7 +298,9 @@ set(project_sources
${PROJECT_SOURCE_DIR}/src/pdb/pdb2cif.cpp ${PROJECT_SOURCE_DIR}/src/pdb/pdb2cif.cpp
${PROJECT_SOURCE_DIR}/src/pdb/pdb_record.hpp ${PROJECT_SOURCE_DIR}/src/pdb/pdb_record.hpp
${PROJECT_SOURCE_DIR}/src/pdb/pdb2cif_remark_3.hpp ${PROJECT_SOURCE_DIR}/src/pdb/pdb2cif_remark_3.hpp
${PROJECT_SOURCE_DIR}/src/pdb/pdb2cif_remark_3.cpp) ${PROJECT_SOURCE_DIR}/src/pdb/pdb2cif_remark_3.cpp
${PROJECT_SOURCE_DIR}/src/pdb/reconstruct.cpp
)
set(project_headers set(project_headers
${PROJECT_SOURCE_DIR}/include/cif++.hpp ${PROJECT_SOURCE_DIR}/include/cif++.hpp
......
...@@ -1115,11 +1115,4 @@ class structure ...@@ -1115,11 +1115,4 @@ class structure
std::vector<residue> m_non_polymers; std::vector<residue> m_non_polymers;
}; };
// --------------------------------------------------------------------
/// \brief Reconstruct all missing categories for an assumed PDBx file.
/// Some people believe that simply dumping some atom records is enough.
/// \param db The cif::datablock that hopefully contains some valid data
void reconstruct_pdbx(datablock &db);
} // namespace cif::mm } // namespace cif::mm
...@@ -100,6 +100,17 @@ inline void write(const std::filesystem::path &p, const file &f) ...@@ -100,6 +100,17 @@ inline void write(const std::filesystem::path &p, const file &f)
} }
// -------------------------------------------------------------------- // --------------------------------------------------------------------
/** \brief Reconstruct all missing categories for an assumed PDBx file.
*
* Some people believe that simply dumping some atom records is enough.
*
* \param db The cif::datablock that hopefully contains some valid data
*/
void reconstruct_pdbx(datablock &db);
// --------------------------------------------------------------------
// Other I/O related routines // Other I/O related routines
/** @brief Return the HEADER line for the data in @a data /** @brief Return the HEADER line for the data in @a data
......
...@@ -2836,15 +2836,4 @@ void structure::validate_atoms() const ...@@ -2836,15 +2836,4 @@ void structure::validate_atoms() const
assert(atoms.empty()); assert(atoms.empty());
} }
// --------------------------------------------------------------------
void reconstruct_pdbx(datablock &db)
{
if (db.get("atom_site") == nullptr)
throw std::runtime_error("Cannot reconstruct PDBx file, atom data missing");
assert(false);
throw std::runtime_error("not implemented yet");
}
} // namespace pdbx } // namespace pdbx
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2024 NKI/AVL, Netherlands Cancer Institute
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "cif++/pdb.hpp"
// --------------------------------------------------------------------
namespace cif::pdb
{
void reconstruct_pdbx(datablock &db)
{
if (db.get("atom_site") == nullptr)
throw std::runtime_error("Cannot reconstruct PDBx file, atom data missing");
}
} // namespace cif::pdb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment