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
446438bf
Unverified
Commit
446438bf
authored
Jan 29, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing pdb2cif, and sequence checking
parent
4e012cbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
src/pdb/pdb2cif.cpp
+2
-2
src/pdb/validate-pdbx.cpp
+12
-6
No files found.
src/pdb/pdb2cif.cpp
View file @
446438bf
...
@@ -6440,9 +6440,9 @@ file read(std::istream &is)
...
@@ -6440,9 +6440,9 @@ file read(std::istream &is)
// Well, not quite, Unfortunately... People insisted that
// Well, not quite, Unfortunately... People insisted that
// having only ATOM records also makes up a valid PDB file...
// having only ATOM records also makes up a valid PDB file...
// Since mmCIF files cannot validly start with a letter character
// Since mmCIF files cannot validly start with a letter character
// the test has changed into the following:
//
apart from the letter 'd',
the test has changed into the following:
if
(
std
::
isalpha
(
ch
))
if
(
std
::
isalpha
(
ch
)
and
std
::
toupper
(
ch
)
!=
'D'
)
read_pdb_file
(
is
,
result
);
read_pdb_file
(
is
,
result
);
else
else
{
{
...
...
src/pdb/validate-pdbx.cpp
View file @
446438bf
...
@@ -248,13 +248,12 @@ bool is_valid_pdbx_file(const file &file, std::string_view dictionary, std::erro
...
@@ -248,13 +248,12 @@ bool is_valid_pdbx_file(const file &file, std::string_view dictionary, std::erro
for
(
auto
comp_id
:
comp_ids
)
for
(
auto
comp_id
:
comp_ids
)
{
{
std
::
string
letter
;
std
::
string
letter
;
if
(
compound_factory
::
kBaseMap
.
contains
(
comp_id
))
letter
=
compound_factory
::
kBaseMap
.
at
(
comp_id
);
if
(
can
)
else
if
(
compound_factory
::
kAAMap
.
contains
(
comp_id
))
letter
=
compound_factory
::
kAAMap
.
at
(
comp_id
);
else
{
{
if
(
can
)
if
(
compound_factory
::
kBaseMap
.
contains
(
comp_id
))
letter
=
compound_factory
::
kBaseMap
.
at
(
comp_id
);
else
{
{
auto
c
=
cf
.
create
(
comp_id
);
auto
c
=
cf
.
create
(
comp_id
);
if
(
c
and
c
->
one_letter_code
())
if
(
c
and
c
->
one_letter_code
())
...
@@ -262,6 +261,13 @@ bool is_valid_pdbx_file(const file &file, std::string_view dictionary, std::erro
...
@@ -262,6 +261,13 @@ bool is_valid_pdbx_file(const file &file, std::string_view dictionary, std::erro
else
else
letter
=
"X"
;
letter
=
"X"
;
}
}
}
else
{
if
(
compound_factory
::
kAAMap
.
contains
(
comp_id
))
letter
=
compound_factory
::
kAAMap
.
at
(
comp_id
);
else
if
(
comp_id
.
length
()
==
1
and
compound_factory
::
kBaseMap
.
contains
(
comp_id
))
letter
=
compound_factory
::
kBaseMap
.
at
(
comp_id
);
else
else
letter
=
'('
+
comp_id
+
')'
;
letter
=
'('
+
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