Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
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
ProMod3
Commits
e7de0041
Commit
e7de0041
authored
7 years ago
by
Gerardo Tauriello
Browse files
Options
Downloads
Patches
Plain Diff
SCHWED-1740
: resolve overlaps in MmSystemCreator
parent
682f66ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
loop/src/mm_system_creator.cc
+18
-9
18 additions, 9 deletions
loop/src/mm_system_creator.cc
with
18 additions
and
9 deletions
loop/src/mm_system_creator.cc
+
18
−
9
View file @
e7de0041
#include
<promod3/loop/mm_system_creator.hh>
#include
<promod3/loop/hydrogen_constructor.hh>
#include
<promod3/loop/idx_handler.hh>
#include
<promod3/core/message.hh>
#include
<promod3/core/runtime_profiling.hh>
...
...
@@ -274,6 +275,10 @@ void MmSystemCreator::SetupSystem(const AllAtomPositions& all_pos,
// check data consistency
const
uint
num_loops
=
loop_start_indices
.
size
();
if
(
num_loops
!=
loop_lengths
.
size
())
{
throw
promod3
::
Error
(
"Sizes of loop_start_indices and loop_lengths must "
"match in MmSystemCreator::SetupSystem!"
);
}
for
(
uint
i_loop
=
0
;
i_loop
<
num_loops
;
++
i_loop
)
{
// loop from start_idx to start_idx + loop_lengths[i_loop] - 1
const
uint
start_idx
=
loop_start_indices
[
i_loop
];
...
...
@@ -284,11 +289,11 @@ void MmSystemCreator::SetupSystem(const AllAtomPositions& all_pos,
}
if
(
is_n_ter
.
size
()
!=
res_indices
.
size
())
{
throw
promod3
::
Error
(
"Sizes of res_indices and is_n_ter must match in "
"
in
MmSystemCreator::SetupSystem!"
);
"MmSystemCreator::SetupSystem!"
);
}
if
(
is_c_ter
.
size
()
!=
res_indices
.
size
())
{
throw
promod3
::
Error
(
"Sizes of res_indices and is_c_ter must match in "
"
in
MmSystemCreator::SetupSystem!"
);
"MmSystemCreator::SetupSystem!"
);
}
for
(
uint
i_res
=
0
;
i_res
<
res_indices
.
size
();
++
i_res
)
{
const
uint
res_idx
=
res_indices
[
i_res
];
...
...
@@ -301,21 +306,25 @@ void MmSystemCreator::SetupSystem(const AllAtomPositions& all_pos,
for
(
uint
i
=
0
;
i
<
disulfid_bridges
.
size
();
++
i
)
{
if
(
disulfid_bridges
[
i
].
first
>=
res_indices
.
size
())
{
throw
promod3
::
Error
(
"Invalid disulfid bridge residue index observed in "
"
in
MmSystemCreator::SetupSystem!"
);
"MmSystemCreator::SetupSystem!"
);
}
if
(
disulfid_bridges
[
i
].
second
>=
res_indices
.
size
())
{
throw
promod3
::
Error
(
"Invalid disulfid bridge residue index observed in "
"
in
MmSystemCreator::SetupSystem!"
);
"MmSystemCreator::SetupSystem!"
);
}
}
// setup internal data (loop_..., is_X_ter_, ff_aa_, first_idx_)
num_loop_residues_
=
0
;
for
(
uint
i_loop
=
0
;
i_loop
<
num_loops
;
++
i_loop
)
{
num_loop_residues_
+=
loop_lengths
[
i_loop
];
}
loop_start_indices_
=
loop_start_indices
;
loop_lengths_
=
loop_lengths
;
IdxHandler
::
ResolveOverlaps
(
loop_start_indices_
,
loop_lengths_
,
true
);
if
(
loop_lengths_
.
empty
())
{
throw
promod3
::
Error
(
"No valid loops in MmSystemCreator::SetupSystem!"
);
}
num_loop_residues_
=
0
;
for
(
uint
i_loop
=
0
;
i_loop
<
loop_lengths_
.
size
();
++
i_loop
)
{
num_loop_residues_
+=
loop_lengths_
[
i_loop
];
}
is_n_ter_
=
is_n_ter
;
is_c_ter_
=
is_c_ter
;
SetupNextIRes_
(
res_indices
);
...
...
@@ -338,7 +347,7 @@ void MmSystemCreator::UpdatePositions(const AllAtomPositions& all_pos,
// check data consistency
if
(
ff_aa_
.
size
()
!=
res_indices
.
size
())
{
throw
promod3
::
Error
(
"Inconsistent size of res_indices in "
"
in
MmSystemCreator::SetupSystem!"
);
"MmSystemCreator::SetupSystem!"
);
}
for
(
uint
i_res
=
0
;
i_res
<
res_indices
.
size
();
++
i_res
)
{
const
uint
res_idx
=
res_indices
[
i_res
];
...
...
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