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
3ebceb75
Unverified
Commit
3ebceb75
authored
Mar 12, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not number non-polymer residues
parent
cedaab96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/pdb/reconstruct.cpp
+7
-2
No files found.
src/pdb/reconstruct.cpp
View file @
3ebceb75
...
...
@@ -412,6 +412,10 @@ void checkAtomRecords(datablock &db)
if
(
atom_site
.
contains
(
key
(
"label_seq_id"
)
<
0
))
fixNegativeSeqID
(
atom_site
);
std
::
set
<
int
>
polymer_entities
;
for
(
int
id
:
db
[
"entity"
].
find
<
int
>
(
"type"
_key
==
"polymer"
,
"id"
))
polymer_entities
.
insert
(
id
);
for
(
auto
row
:
atom_site
)
{
residue_key_type
k
=
row
.
get
<
std
::
optional
<
std
::
string
>
,
...
...
@@ -443,6 +447,7 @@ void checkAtomRecords(datablock &db)
std
::
string
comp_id
=
get_comp_id
(
k
);
bool
is_peptide
=
cf
.
is_peptide
(
comp_id
);
bool
is_polymer
=
polymer_entities
.
contains
(
row
[
"label_entity_id"
].
as
<
int
>
());
auto
compound
=
cf
.
create
(
comp_id
);
if
(
not
compound
)
...
...
@@ -483,12 +488,12 @@ void checkAtomRecords(datablock &db)
chem_comp_entry
.
assign
(
items
);
}
if
(
is_p
eptide
and
not
has_seq_id
(
k
))
if
(
is_p
olymer
and
not
has_seq_id
(
k
))
throw
std
::
runtime_error
(
"atom_site record has peptide comp_id but no sequence number, cannot continue"
);
int
seq_id
=
get_seq_id
(
k
);
if
(
row
[
"label_seq_id"
].
empty
()
and
cf
.
is_monomer
(
comp_id
))
if
(
is_polymer
and
row
[
"label_seq_id"
].
empty
()
and
cf
.
is_monomer
(
comp_id
))
row
[
"label_seq_id"
]
=
std
::
to_string
(
seq_id
);
if
(
row
[
"label_atom_id"
].
empty
())
...
...
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