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
5ccfb4e9
Commit
5ccfb4e9
authored
13 years ago
by
Tobias Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
fixed builder.GetUnknownAtoms for calling it multiple times with the same residue
parent
75582ce3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/conop/src/rule_based_builder.cc
+3
-1
3 additions, 1 deletion
modules/conop/src/rule_based_builder.cc
modules/conop/src/rule_based_builder.hh
+3
-3
3 additions, 3 deletions
modules/conop/src/rule_based_builder.hh
with
6 additions
and
4 deletions
modules/conop/src/rule_based_builder.cc
+
3
−
1
View file @
5ccfb4e9
...
...
@@ -89,9 +89,10 @@ mol::AtomHandleList RuleBasedBuilder::GetUnknownAtoms(mol::ResidueHandle res)
if
(
!
last_compound_
)
{
return
unknown
;
}
mol
::
AtomHandleList
atoms
=
res
.
GetAtomList
();
last_residue_
=
mol
::
ResidueHandle
();
this
->
ReorderAtoms
(
res
,
last_compound_
);
AtomSpecList
::
const_iterator
j
=
last_compound_
->
GetAtomSpecs
().
begin
();
mol
::
AtomHandleList
atoms
=
res
.
GetAtomList
();
mol
::
AtomHandleList
::
iterator
i
=
atoms
.
begin
();
for
(
mol
::
AtomHandleList
::
iterator
i
=
atoms
.
begin
(),
e
=
atoms
.
end
();
i
!=
e
;
++
i
)
{
...
...
@@ -153,6 +154,7 @@ void RuleBasedBuilder::ReorderAtoms(mol::ResidueHandle residue,
mol
::
impl
::
AtomImplList
::
iterator
i
=
impl
->
GetAtomList
().
begin
();
for
(;
i
!=
impl
->
GetAtomList
().
end
();
++
i
)
{
mol
::
impl
::
AtomImplPtr
atom
=*
i
;
atom
->
SetState
(
std
::
numeric_limits
<
unsigned
int
>::
max
());
int
index
=
compound
->
GetAtomSpecIndex
(
atom
->
GetName
());
if
(
index
==-
1
)
{
if
(
!
this
->
OnUnknownAtom
(
mol
::
AtomHandle
(
atom
)))
{
...
...
This diff is collapsed.
Click to expand it.
modules/conop/src/rule_based_builder.hh
+
3
−
3
View file @
5ccfb4e9
...
...
@@ -116,9 +116,6 @@ public:
/// \brief Set residue properties such as chemical class
virtual
void
FillResidueProps
(
mol
::
ResidueHandle
residue
);
/// \brief whether the residue has unknown atoms
bool
HasUnknownAtoms
(
mol
::
ResidueHandle
res
);
mol
::
AtomHandleList
GetUnknownAtoms
(
mol
::
ResidueHandle
res
);
/// \brief Check whether the residue has all required atoms. This does not
...
...
@@ -131,6 +128,9 @@ private:
CompoundPtr
last_compound_
;
mol
::
ResidueHandle
last_residue_
;
bool
unknown_atoms_
;
/// \brief whether the residue has unknown atoms
bool
HasUnknownAtoms
(
mol
::
ResidueHandle
res
);
void
LookupCompound
(
const
mol
::
ResidueHandle
&
rh
);
/// Change internal order of atoms in residue to the order given by compound
void
ReorderAtoms
(
mol
::
ResidueHandle
residue
,
CompoundPtr
compound
);
...
...
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