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
996f1e42
Unverified
Commit
996f1e42
authored
Apr 17, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check existence of alternate for specific atoms
parent
2d84694f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
include/cif++/model.hpp
+3
-0
src/model.cpp
+6
-0
No files found.
include/cif++/model.hpp
View file @
996f1e42
...
@@ -550,6 +550,9 @@ class residue
...
@@ -550,6 +550,9 @@ class residue
/// \brief Return true if this residue has alternate atoms
/// \brief Return true if this residue has alternate atoms
bool
has_alternate_atoms
()
const
;
bool
has_alternate_atoms
()
const
;
/// \brief Return true if this residue has alternate atoms for the atom \a atomID
bool
has_alternate_atoms_for
(
const
std
::
string
&
atomID
)
const
;
/// \brief Return the list of unique alt ID's present in this residue
/// \brief Return the list of unique alt ID's present in this residue
std
::
set
<
std
::
string
>
get_alternate_ids
()
const
;
std
::
set
<
std
::
string
>
get_alternate_ids
()
const
;
...
...
src/model.cpp
View file @
996f1e42
...
@@ -455,6 +455,12 @@ bool residue::has_alternate_atoms() const
...
@@ -455,6 +455,12 @@ bool residue::has_alternate_atoms() const
{
return
atom
.
is_alternate
();
})
!=
m_atoms
.
end
();
{
return
atom
.
is_alternate
();
})
!=
m_atoms
.
end
();
}
}
bool
residue
::
has_alternate_atoms_for
(
const
std
::
string
&
atomID
)
const
{
return
std
::
find_if
(
m_atoms
.
begin
(),
m_atoms
.
end
(),
[
atomID
](
const
atom
&
atom
)
{
return
atom
.
get_label_atom_id
()
==
atomID
and
atom
.
is_alternate
();
})
!=
m_atoms
.
end
();
}
std
::
set
<
std
::
string
>
residue
::
get_atom_ids
()
const
std
::
set
<
std
::
string
>
residue
::
get_atom_ids
()
const
{
{
std
::
set
<
std
::
string
>
ids
;
std
::
set
<
std
::
string
>
ids
;
...
...
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