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
0d8e548f
Unverified
Commit
0d8e548f
authored
Feb 06, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pdb2cif and vv
parent
b0965081
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
src/pdb/cif2pdb.cpp
+2
-2
src/pdb/pdb2cif.cpp
+12
-10
No files found.
src/pdb/cif2pdb.cpp
View file @
0d8e548f
...
...
@@ -3416,8 +3416,8 @@ std::tuple<int, int> WriteCoordinatesForModel(std::ostream &pdbFile, const datab
if
(
type
==
"branched"
)
// find the real auth_seq_num, since sugars have their auth_seq_num reused as sugar number... sigh.
resSeq
=
pdbx_branch_scheme
.
find1
<
int
>
(
"asym_id"
_key
==
r
.
get
<
std
::
string
>
(
"label_asym_id"
)
and
"pdb_seq_num"
_key
==
resSeq
,
"auth_seq_num"
);
else
if
(
type
==
"non-polymer"
)
// same for non-polymers
resSeq
=
pdbx_nonpoly_scheme
.
find1
<
int
>
(
"asym_id"
_key
==
r
.
get
<
std
::
string
>
(
"label_asym_id"
)
and
"pdb_seq_num"
_key
==
resSeq
,
"auth_seq_num"
);
//
else if (type == "non-polymer") // same for non-polymers
//
resSeq = pdbx_nonpoly_scheme.find1<int>("asym_id"_key == r.get<std::string>("label_asym_id") and "pdb_seq_num"_key == resSeq, "auth_seq_num");
else
if
(
type
==
"polymer"
)
resSeq
=
pdbx_poly_seq_scheme
.
find1
<
int
>
(
"asym_id"
_key
==
r
.
get
<
std
::
string
>
(
"label_asym_id"
)
and
"pdb_seq_num"
_key
==
resSeq
,
"auth_seq_num"
);
...
...
src/pdb/pdb2cif.cpp
View file @
0d8e548f
...
...
@@ -4202,7 +4202,8 @@ void PDBFileParser::ConstructEntities()
// done with the sugar, resume operation as before
std
::
map
<
char
,
std
::
string
>
waterChains
;
std
::
map
<
std
::
tuple
<
std
::
string
,
std
::
string
>
,
int
>
ndbSeqNum
;
// for nonpoly scheme
std
::
map
<
std
::
tuple
<
std
::
string
,
std
::
string
>
,
int
>
ndbSeqNum
;
// for nonpoly scheme
std
::
map
<
std
::
string
,
int
>
entityAuthSeqNum
;
// for nonpoly scheme too
for
(
size_t
i
=
0
;
i
<
mHets
.
size
();
++
i
)
{
...
...
@@ -4331,6 +4332,7 @@ void PDBFileParser::ConstructEntities()
}
int
seqNr
=
++
ndbSeqNum
[
std
::
make_tuple
(
hetID
,
asymID
)];
int
authSeqNr
=
++
entityAuthSeqNum
[
hetID
];
std
::
string
iCode
{
het
.
iCode
};
cif
::
trim
(
iCode
);
...
...
@@ -4339,15 +4341,15 @@ void PDBFileParser::ConstructEntities()
getCategory
(
"pdbx_nonpoly_scheme"
)
->
emplace
({
{
"asym_id"
,
asymID
},
{
"entity_id"
,
mHet2EntityID
[
hetID
]
},
{
"mon_id"
,
hetID
},
{
"ndb_seq_num"
,
seqNr
},
{
"pdb_seq_num"
,
het
.
seqNum
},
{
"auth_seq_num"
,
het
.
seqNum
},
// Yes
{
"pdb_mon_id"
,
hetID
},
{
"auth_mon_id"
,
hetID
},
{
"pdb_strand_id"
,
std
::
string
{
het
.
chainID
}
},
{
"pdb_ins_code"
,
iCode
}
});
{
"entity_id"
,
mHet2EntityID
[
hetID
]
},
{
"mon_id"
,
hetID
},
{
"ndb_seq_num"
,
seqNr
},
{
"pdb_seq_num"
,
het
.
seqNum
},
{
"auth_seq_num"
,
authSeqNr
},
// Yes
{
"pdb_mon_id"
,
hetID
},
{
"auth_mon_id"
,
hetID
},
{
"pdb_strand_id"
,
std
::
string
{
het
.
chainID
}
},
{
"pdb_ins_code"
,
iCode
}
});
// mapping needed?
mChainSeq2AsymSeq
[
std
::
make_tuple
(
het
.
chainID
,
het
.
seqNum
,
het
.
iCode
)]
=
std
::
make_tuple
(
asymID
,
seqNr
,
false
);
...
...
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