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
eef9f076
Commit
eef9f076
authored
12 years ago
by
Niklaus Johner
Browse files
Options
Downloads
Patches
Plain Diff
Fixed the atom indices in the entity generated in the CoordGroup::Filter function
parent
b67a85eb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/mol/base/src/atom_base.cc
+7
-0
7 additions, 0 deletions
modules/mol/base/src/atom_base.cc
modules/mol/base/src/atom_base.hh
+1
-0
1 addition, 0 deletions
modules/mol/base/src/atom_base.hh
modules/mol/base/src/coord_group.cc
+5
-1
5 additions, 1 deletion
modules/mol/base/src/coord_group.cc
with
13 additions
and
1 deletion
modules/mol/base/src/atom_base.cc
+
7
−
0
View file @
eef9f076
...
...
@@ -240,5 +240,12 @@ unsigned long AtomBase::GetIndex() const
return
Impl
()
->
GetIndex
();
}
void
AtomBase
::
SetIndex
(
const
unsigned
long
index
)
{
this
->
CheckValidity
();
return
impl_
->
SetIndex
(
index
);
}
}}
// ns
This diff is collapsed.
Click to expand it.
modules/mol/base/src/atom_base.hh
+
1
−
0
View file @
eef9f076
...
...
@@ -141,6 +141,7 @@ public:
void
SetRadius
(
Real
radius
);
void
SetIndex
(
const
unsigned
long
index
);
const
geom
::
Mat3
&
GetAnisou
()
const
;
...
...
This diff is collapsed.
Click to expand it.
modules/mol/base/src/coord_group.cc
+
5
−
1
View file @
eef9f076
...
...
@@ -239,8 +239,12 @@ CoordGroupHandle CoordGroupHandle::Filter(const EntityView& selected, int first,
indices
.
push_back
(
i
->
GetIndex
());
}
new_ent
=
CreateEntityFromView
(
selected
,
false
);
//we have to correct the atom indices in the new entity
AtomHandleList
new_atoms
=
new_ent
.
GetAtomList
();
for
(
int
i
=
0
,
e
=
atoms
.
size
();
i
!=
e
;
++
i
){
new_atoms
[
i
].
SetIndex
(
i
);
}
}
CoordGroupHandle
filtered_cg
=
CreateCoordGroup
(
new_ent
.
GetAtomList
());
std
::
vector
<
geom
::
Vec3
>
vecs
(
indices
.
size
());
if
(
last
==-
1
)
last
=
this
->
GetFrameCount
();
...
...
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