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
f0a913cc
Unverified
Commit
f0a913cc
authored
Nov 03, 2022
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for deuterium...
Fixes for sugar branches
parent
de4fc8a0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
9 deletions
+22
-9
include/cif++/atom_type.hpp
+1
-1
include/cif++/symmetry.hpp
+5
-0
src/atom_type.cpp
+11
-3
src/model.cpp
+5
-5
No files found.
include/cif++/atom_type.hpp
View file @
f0a913cc
...
...
@@ -166,7 +166,7 @@ enum atom_type : uint8_t
No
=
102
,
// Nobelium
Lr
=
103
,
// Lawrencium
D
=
1
2
9
,
// Deuterium
D
=
1
1
9
,
// Deuterium
};
// --------------------------------------------------------------------
...
...
include/cif++/symmetry.hpp
View file @
f0a913cc
...
...
@@ -81,6 +81,11 @@ struct symop_data
return
m_packed
==
rhs
.
m_packed
;
}
bool
operator
<
(
const
symop_data
&
rhs
)
const
{
return
m_packed
<
rhs
.
m_packed
;
}
std
::
array
<
int
,
15
>
data
()
const
{
return
{
...
...
src/atom_type.cpp
View file @
f0a913cc
...
...
@@ -1077,9 +1077,13 @@ bool atom_type_traits::is_metal(const std::string& symbol)
auto
atom_type_traits
::
wksf
(
int
charge
)
const
->
const
SFData
&
{
auto
type
=
m_info
->
type
;
if
(
type
==
D
)
type
=
H
;
for
(
auto
&
sf
:
data
::
kWKSFData
)
{
if
(
sf
.
symbol
==
m_info
->
type
and
sf
.
charge
==
charge
)
if
(
sf
.
symbol
==
type
and
sf
.
charge
==
charge
)
return
sf
.
sf
;
}
...
...
@@ -1092,7 +1096,7 @@ auto atom_type_traits::wksf(int charge) const -> const SFData&
for
(
auto
&
sf
:
data
::
kWKSFData
)
{
if
(
sf
.
symbol
==
m_info
->
type
and
sf
.
charge
==
0
)
if
(
sf
.
symbol
==
type
and
sf
.
charge
==
0
)
return
sf
.
sf
;
}
}
...
...
@@ -1102,9 +1106,13 @@ auto atom_type_traits::wksf(int charge) const -> const SFData&
auto
atom_type_traits
::
elsf
()
const
->
const
SFData
&
{
auto
type
=
m_info
->
type
;
if
(
type
==
D
)
type
=
H
;
for
(
auto
&
sf
:
data
::
kELSFData
)
{
if
(
sf
.
symbol
==
m_info
->
type
)
if
(
sf
.
symbol
==
type
)
return
sf
.
sf
;
}
...
...
src/model.cpp
View file @
f0a913cc
...
...
@@ -1118,8 +1118,8 @@ branch::branch(structure &structure, const std::string &asym_id)
for
(
const
auto
&
[
num1
,
num2
,
atom1
,
atom2
]
:
branch_link
.
find
<
size_t
,
size_t
,
std
::
string
,
std
::
string
>
(
"entity_id"
_key
==
entity_id
,
"entity_branch_list_num_1"
,
"entity_branch_list_num_2"
,
"atom_id_1"
,
"atom_id_2"
))
{
if
(
not
iequals
(
atom1
,
"c1"
))
throw
std
::
runtime_error
(
"invalid pdbx_entity_branch_link"
);
//
if (not iequals(atom1, "c1"))
//
throw std::runtime_error("invalid pdbx_entity_branch_link");
auto
&
s1
=
at
(
num1
-
1
);
auto
&
s2
=
at
(
num2
-
1
);
...
...
@@ -1143,8 +1143,8 @@ void branch::link_atoms()
for
(
const
auto
&
[
num1
,
num2
,
atom1
,
atom2
]
:
branch_link
.
find
<
size_t
,
size_t
,
std
::
string
,
std
::
string
>
(
"entity_id"
_key
==
entity_id
,
"entity_branch_list_num_1"
,
"entity_branch_list_num_2"
,
"atom_id_1"
,
"atom_id_2"
))
{
if
(
not
iequals
(
atom1
,
"c1"
))
throw
std
::
runtime_error
(
"invalid pdbx_entity_branch_link"
);
//
if (not iequals(atom1, "c1"))
//
throw std::runtime_error("invalid pdbx_entity_branch_link");
auto
&
s1
=
at
(
num1
-
1
);
auto
&
s2
=
at
(
num2
-
1
);
...
...
@@ -1279,7 +1279,7 @@ void structure::load_atoms_for_model(StructureOpenOptions options)
if
(
model_nr
and
*
model_nr
!=
m_model_nr
)
continue
;
if
((
options
bitand
StructureOpenOptions
::
SkipHydrogen
)
and
type_symbol
==
"H"
)
if
((
options
bitand
StructureOpenOptions
::
SkipHydrogen
)
and
(
type_symbol
==
"H"
or
type_symbol
==
"D"
)
)
continue
;
emplace_atom
(
std
::
make_shared
<
atom
::
atom_impl
>
(
m_db
,
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