Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
e350a7e9
Commit
e350a7e9
authored
1 year ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
mmcif writer: cleanup
parent
9c4665d5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/io/src/mol/mmcif_writer.cc
+21
-20
21 additions, 20 deletions
modules/io/src/mol/mmcif_writer.cc
with
21 additions
and
20 deletions
modules/io/src/mol/mmcif_writer.cc
+
21
−
20
View file @
e350a7e9
...
@@ -470,6 +470,25 @@ namespace {
...
@@ -470,6 +470,25 @@ namespace {
}
}
}
}
bool
MatchEntity
(
const
ost
::
mol
::
ResidueHandleList
&
res_list
,
const
ost
::
io
::
MMCifWriterEntity
&
info
)
{
// checks if the residue names in res_list are an exact match
// with mon_ids in info
std
::
vector
<
String
>
mon_ids
;
for
(
auto
res
:
res_list
)
{
mon_ids
.
push_back
(
res
.
GetName
());
}
return
mon_ids
==
info
.
mon_ids
;
}
void
AddAsym
(
const
String
&
asym_chain_name
,
ost
::
io
::
MMCifWriterEntity
&
info
)
{
// adds asym_chain_name to info under the assumption that mon_ids
// exactly match => just add a copy of mon_ids to asym_alns
info
.
asym_ids
.
push_back
(
asym_chain_name
);
info
.
asym_alns
.
push_back
(
info
.
mon_ids
);
}
bool
MatchEntityResnum
(
const
ost
::
mol
::
ResidueHandleList
&
res_list
,
bool
MatchEntityResnum
(
const
ost
::
mol
::
ResidueHandleList
&
res_list
,
const
ost
::
io
::
MMCifWriterEntity
&
info
,
const
ost
::
io
::
MMCifWriterEntity
&
info
,
Real
beyond_frac
=
0.05
)
{
Real
beyond_frac
=
0.05
)
{
...
@@ -521,25 +540,6 @@ namespace {
...
@@ -521,25 +540,6 @@ namespace {
}
}
}
}
bool
MatchEntity
(
const
ost
::
mol
::
ResidueHandleList
&
res_list
,
const
ost
::
io
::
MMCifWriterEntity
&
info
)
{
// checks if the residue names in res_list are an exact match
// with mon_ids in info
std
::
vector
<
String
>
mon_ids
;
for
(
auto
res
:
res_list
)
{
mon_ids
.
push_back
(
res
.
GetName
());
}
return
mon_ids
==
info
.
mon_ids
;
}
void
AddAsym
(
const
String
&
asym_chain_name
,
ost
::
io
::
MMCifWriterEntity
&
info
)
{
// adds asym_chain_name to info under the assumption that mon_ids
// exactly match => just add a copy of mon_ids to asym_alns
info
.
asym_ids
.
push_back
(
asym_chain_name
);
info
.
asym_alns
.
push_back
(
info
.
mon_ids
);
}
void
AddAsymResnum
(
const
String
&
asym_chain_name
,
void
AddAsymResnum
(
const
String
&
asym_chain_name
,
const
ost
::
mol
::
ResidueHandleList
&
res_list
,
const
ost
::
mol
::
ResidueHandleList
&
res_list
,
ost
::
io
::
MMCifWriterEntity
&
info
)
{
ost
::
io
::
MMCifWriterEntity
&
info
)
{
...
@@ -729,7 +729,8 @@ namespace {
...
@@ -729,7 +729,8 @@ namespace {
const
ost
::
mol
::
ResidueHandleList
&
res_list
,
const
ost
::
mol
::
ResidueHandleList
&
res_list
,
bool
resnum_alignment
,
bool
resnum_alignment
,
std
::
vector
<
ost
::
io
::
MMCifWriterEntity
>&
entity_infos
)
{
std
::
vector
<
ost
::
io
::
MMCifWriterEntity
>&
entity_infos
)
{
// use chem types in res_list to determine _entity.type and
// _entity_poly.type
String
type
=
GuessEntityType
(
res_list
);
String
type
=
GuessEntityType
(
res_list
);
bool
is_poly
=
type
==
"polymer"
;
bool
is_poly
=
type
==
"polymer"
;
String
poly_type
=
""
;
String
poly_type
=
""
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment