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
941a015b
Unverified
Commit
941a015b
authored
May 15, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not stop when compound is missing
parent
ae0e9fbe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/pdb/reconstruct.cpp
+14
-3
No files found.
src/pdb/reconstruct.cpp
View file @
941a015b
...
@@ -144,9 +144,11 @@ void checkEntities(datablock &db)
...
@@ -144,9 +144,11 @@ void checkEntities(datablock &db)
if
(
comp_id
.
has_value
())
if
(
comp_id
.
has_value
())
{
{
auto
compound
=
cf
.
create
(
*
comp_id
);
auto
compound
=
cf
.
create
(
*
comp_id
);
assert
(
compound
);
if
(
not
compound
)
if
(
not
compound
)
throw
std
::
runtime_error
(
"missing information for compound "
+
*
comp_id
);
{
std
::
cerr
<<
"missing information for compound "
<<
*
comp_id
<<
"
\n
"
;
continue
;
}
formula_weight
=
compound
->
formula_weight
();
formula_weight
=
compound
->
formula_weight
();
}
}
}
}
...
@@ -416,6 +418,8 @@ void checkAtomRecords(datablock &db)
...
@@ -416,6 +418,8 @@ void checkAtomRecords(datablock &db)
for
(
int
id
:
db
[
"entity"
].
find
<
int
>
(
"type"
_key
==
"polymer"
,
"id"
))
for
(
int
id
:
db
[
"entity"
].
find
<
int
>
(
"type"
_key
==
"polymer"
,
"id"
))
polymer_entities
.
insert
(
id
);
polymer_entities
.
insert
(
id
);
std
::
set
<
std
::
string
>
missingCompounds
;
for
(
auto
row
:
atom_site
)
for
(
auto
row
:
atom_site
)
{
{
residue_key_type
k
=
row
.
get
<
std
::
optional
<
std
::
string
>
,
residue_key_type
k
=
row
.
get
<
std
::
optional
<
std
::
string
>
,
...
@@ -446,11 +450,18 @@ void checkAtomRecords(datablock &db)
...
@@ -446,11 +450,18 @@ void checkAtomRecords(datablock &db)
std
::
string
asym_id
=
get_asym_id
(
k
);
std
::
string
asym_id
=
get_asym_id
(
k
);
std
::
string
comp_id
=
get_comp_id
(
k
);
std
::
string
comp_id
=
get_comp_id
(
k
);
if
(
missingCompounds
.
contains
(
comp_id
))
continue
;
bool
is_polymer
=
polymer_entities
.
contains
(
row
[
"label_entity_id"
].
as
<
int
>
());
bool
is_polymer
=
polymer_entities
.
contains
(
row
[
"label_entity_id"
].
as
<
int
>
());
auto
compound
=
cf
.
create
(
comp_id
);
auto
compound
=
cf
.
create
(
comp_id
);
if
(
not
compound
)
if
(
not
compound
)
throw
std
::
runtime_error
(
"Missing compound information for "
+
comp_id
);
{
missingCompounds
.
insert
(
comp_id
);
std
::
cerr
<<
"Missing compound information for "
<<
comp_id
<<
"
\n
"
;
continue
;
}
auto
chem_comp_entry
=
chem_comp
.
find_first
(
"id"
_key
==
comp_id
);
auto
chem_comp_entry
=
chem_comp
.
find_first
(
"id"
_key
==
comp_id
);
...
...
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