Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
abd97cc1
Unverified
Commit
abd97cc1
authored
Jan 02, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge
parent
3315fae8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
19 deletions
+57
-19
CMakeLists.txt
+3
-1
include/cif++/model.hpp
+0
-7
include/cif++/pdb.hpp
+11
-0
src/model.cpp
+0
-11
src/pdb/reconstruct.cpp
+43
-0
No files found.
CMakeLists.txt
View file @
abd97cc1
...
@@ -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
...
...
include/cif++/model.hpp
View file @
abd97cc1
...
@@ -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
include/cif++/pdb.hpp
View file @
abd97cc1
...
@@ -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
...
...
src/model.cpp
View file @
abd97cc1
...
@@ -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
src/pdb/reconstruct.cpp
0 → 100644
View file @
abd97cc1
/*-
* 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment