Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dssp
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
dssp
Commits
ee99d848
Unverified
Commit
ee99d848
authored
Nov 23, 2022
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming
parent
9655748d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
src/dssp-io.cpp
+28
-10
No files found.
src/dssp-io.cpp
View file @
ee99d848
...
...
@@ -220,11 +220,30 @@ void writeDSSP(const dssp &dssp, std::ostream &os)
// --------------------------------------------------------------------
void
write
HBond
s
(
cif
::
datablock
&
db
,
const
dssp
&
dssp
)
void
write
BridgePair
s
(
cif
::
datablock
&
db
,
const
dssp
&
dssp
)
{
using
ResidueInfo
=
dssp
::
residue_info
;
auto
&
hb
=
db
[
"dssp_struct_hbond"
];
auto
&
hb
=
db
[
"dssp_struct_bridge_pairs"
];
hb
.
add_column
(
"id"
);
hb
.
add_column
(
"label_comp_id"
);
hb
.
add_column
(
"label_seq_id"
);
hb
.
add_column
(
"label_asym_id"
);
hb
.
add_column
(
"auth_seq_id"
);
hb
.
add_column
(
"auth_asym_id"
);
hb
.
add_column
(
"pdbx_PDB_ins_code"
);
// force right order
for
(
std
::
string
da
:
{
"acceptor_"
,
"donor_"
})
{
for
(
std
::
string
i
:
{
"1_"
,
"2_"
})
{
for
(
std
::
string
n
:
{
"label_comp_id"
,
"label_seq_id"
,
"label_asym_id"
,
"auth_seq_id"
,
"auth_asym_id"
,
"pdbx_PDB_ins_code"
,
"energy"
})
hb
.
add_column
(
da
+
i
+
n
);
}
}
for
(
auto
&
res
:
dssp
)
{
...
...
@@ -254,15 +273,14 @@ void writeHBonds(cif::datablock &db, const dssp &dssp)
for
(
int
i
:
{
0
,
1
})
{
const
auto
&&
[
donor
,
donorEnergy
]
=
res
.
donor
(
i
);
if
(
donor
)
write_res
(
i
?
"donor_2_"
:
"donor_1_"
,
donor
,
donorEnergy
);
const
auto
&&
[
acceptor
,
acceptorEnergy
]
=
res
.
acceptor
(
i
);
const
auto
&&
[
donor
,
donorEnergy
]
=
res
.
donor
(
i
);
if
(
acceptor
)
write_res
(
i
?
"acceptor_2_"
:
"acceptor_1_"
,
acceptor
,
acceptorEnergy
);
if
(
donor
)
write_res
(
i
?
"donor_2_"
:
"donor_1_"
,
donor
,
donorEnergy
);
}
}
}
...
...
@@ -848,7 +866,7 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, std::os
}
else
{
write
HBond
s
(
db
,
dssp
);
write
BridgePair
s
(
db
,
dssp
);
writeSheets
(
db
,
dssp
);
writeLadders
(
db
,
dssp
);
...
...
@@ -946,7 +964,7 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, std::os
// A approximation of the old format
auto
&
dssp_struct_
legacy
=
db
[
"dssp_struct_legac
y"
];
auto
&
dssp_struct_
summary
=
db
[
"dssp_struct_summar
y"
];
for
(
auto
res
:
dssp
)
{
...
...
@@ -1015,7 +1033,7 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, std::os
auto
const
&
[
cax
,
cay
,
caz
]
=
res
.
ca_location
();
dssp_struct_
legac
y
.
emplace
({
dssp_struct_
summar
y
.
emplace
({
{
"entry_id"
,
db
.
name
()
},
{
"label_comp_id"
,
res
.
compound_id
()
},
{
"label_asym_id"
,
res
.
asym_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