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
3e690048
Unverified
Commit
3e690048
authored
Jan 02, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sugar work
parent
7ec3bfea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
include/cif++/model.hpp
+2
-0
src/model.cpp
+38
-2
No files found.
include/cif++/model.hpp
View file @
3e690048
...
...
@@ -667,6 +667,8 @@ class branch : public std::vector<sugar>
}
sugar
&
construct_sugar
(
const
std
::
string
&
compound_id
);
sugar
&
construct_sugar
(
const
std
::
string
&
compound_id
,
const
std
::
string
&
atom_id
,
int
linked_sugar_nr
,
const
std
::
string
&
linked_atom_id
);
private
:
friend
sugar
;
...
...
src/model.cpp
View file @
3e690048
...
...
@@ -1244,6 +1244,36 @@ sugar &branch::construct_sugar(const std::string &compound_id)
return
result
;
}
sugar
&
branch
::
construct_sugar
(
const
std
::
string
&
compound_id
,
const
std
::
string
&
atom_id
,
int
linked_sugar_nr
,
const
std
::
string
&
linked_atom_id
)
{
auto
&
result
=
construct_sugar
(
compound_id
);
auto
&
linked
=
get_sugar_by_num
(
linked_sugar_nr
);
result
.
set_link
(
linked
.
get_atom_by_atom_id
(
linked_atom_id
));
auto
&
db
=
m_structure
->
get_datablock
();
auto
&
pdbx_entity_branch_link
=
db
[
"pdbx_entity_branch_link"
];
auto
linkID
=
pdbx_entity_branch_link
.
get_unique_id
(
""
);
db
[
"pdbx_entity_branch_link"
].
emplace
({
{
"link_id"
,
linkID
},
{
"entity_id"
,
get_entity_id
()
},
{
"entity_branch_list_num_1"
,
result
.
num
()
},
{
"comp_id_1"
,
compound_id
},
{
"atom_id_1"
,
atom_id
},
{
"leaving_atom_id_1"
,
"O1"
},
/// TODO: Need to fix this!
{
"entity_branch_list_num_2"
,
linked
.
num
()
},
{
"comp_id_2"
,
linked
.
get_compound_id
()
},
{
"atom_id_2"
,
linked_atom_id
},
{
"leaving_atom_id_2"
,
"."
},
{
"value_order"
,
"sing"
}
});
return
result
;
}
std
::
string
branch
::
name
(
const
sugar
&
s
)
const
{
using
namespace
literals
;
...
...
@@ -2275,10 +2305,16 @@ std::string structure::create_non_poly(const std::string &entity_id, std::vector
branch
&
structure
::
create_branch
()
{
auto
&
entity
=
m_db
[
"entity"
];
auto
&
struct_asym
=
m_db
[
"struct_asym"
];
std
::
string
asym_id
=
struct_asym
.
get_unique_id
();
auto
entity_id
=
m_db
[
"entity"
].
get_unique_id
(
""
);
auto
entity_id
=
entity
.
get_unique_id
(
""
);
auto
asym_id
=
struct_asym
.
get_unique_id
();
entity
.
emplace
({
{
"id"
,
entity_id
},
{
"type"
,
"branched"
}
});
struct_asym
.
emplace
({
{
"id"
,
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