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
7295281c
Commit
7295281c
authored
12 years ago
by
Valerio Mariani
Browse files
Options
Downloads
Patches
Plain Diff
Partial fix of the residue by residue ldt score
parent
6674be51
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
modules/mol/alg/src/local_dist_diff_test.cc
+27
-23
27 additions, 23 deletions
modules/mol/alg/src/local_dist_diff_test.cc
with
27 additions
and
23 deletions
modules/mol/alg/src/local_dist_diff_test.cc
+
27
−
23
View file @
7295281c
...
@@ -81,7 +81,14 @@ std::pair<long int, long int> calc_overlap1(const ResidueRDMap& res_distance_lis
...
@@ -81,7 +81,14 @@ std::pair<long int, long int> calc_overlap1(const ResidueRDMap& res_distance_lis
const
UniqueAtomIdentifier
&
first_atom
=
uais
.
first
;
const
UniqueAtomIdentifier
&
first_atom
=
uais
.
first
;
const
UniqueAtomIdentifier
&
second_atom
=
uais
.
second
;
const
UniqueAtomIdentifier
&
second_atom
=
uais
.
second
;
String
name
=
swap
?
swapped_name
(
first_atom
.
GetAtomName
())
:
first_atom
.
GetAtomName
();
String
name
=
swap
?
swapped_name
(
first_atom
.
GetAtomName
())
:
first_atom
.
GetAtomName
();
AtomView
av1
=
mdl_res
?
mdl_res
.
FindAtom
(
name
)
:
AtomView
();
AtomView
av1
;
int
rindex1
=
0
,
rindex2
=
0
;
if
(
mdl_res
)
{
rindex1
=
mdl_res
.
GetIndex
();
overlap_list
[
rindex1
].
second
+=
tol_list
.
size
();
av1
=
mdl_res
.
FindAtom
(
name
);
}
if
(
only_fixed
)
{
if
(
only_fixed
)
{
if
(
std
::
abs
(
first_atom
.
GetResNum
().
GetNum
()
-
second_atom
.
GetResNum
().
GetNum
())
<
sequence_separation
)
{
if
(
std
::
abs
(
first_atom
.
GetResNum
().
GetNum
()
-
second_atom
.
GetResNum
().
GetNum
())
<
sequence_separation
)
{
...
@@ -97,19 +104,16 @@ std::pair<long int, long int> calc_overlap1(const ResidueRDMap& res_distance_lis
...
@@ -97,19 +104,16 @@ std::pair<long int, long int> calc_overlap1(const ResidueRDMap& res_distance_lis
}
}
}
}
AtomView
av2
=
mdl_chain
.
FindAtom
(
second_atom
.
GetResNum
(),
second_atom
.
GetAtomName
());
AtomView
av2
;
overlap
.
second
+=
tol_list
.
size
();
ResidueView
mdl_res_av2
=
mdl_chain
.
FindResidue
(
second_atom
.
GetResNum
());
int
rindex1
=
0
,
rindex2
=
0
;
if
(
mdl_res_av2
)
{
if
(
av1
)
{
rindex2
=
mdl_res_av2
.
GetIndex
();
rindex1
=
av1
.
GetResidue
().
GetIndex
();
overlap_list
[
rindex1
].
second
+=
tol_list
.
size
();
}
if
(
av2
)
{
rindex2
=
av2
.
GetResidue
().
GetIndex
();
overlap_list
[
rindex2
].
second
+=
tol_list
.
size
();
overlap_list
[
rindex2
].
second
+=
tol_list
.
size
();
av2
=
mdl_res_av2
.
FindAtom
(
second_atom
.
GetAtomName
());
}
}
overlap
.
second
+=
tol_list
.
size
();
if
(
!
(
av1
&&
av2
))
{
if
(
!
(
av1
&&
av2
))
{
continue
;
continue
;
}
}
...
@@ -495,17 +499,17 @@ std::pair<long int,long int> LocalDistDiffTest(const EntityView& mdl, const Glob
...
@@ -495,17 +499,17 @@ std::pair<long int,long int> LocalDistDiffTest(const EntityView& mdl, const Glob
total_ov
.
first
+=
ov1
.
first
;
total_ov
.
first
+=
ov1
.
first
;
total_ov
.
second
+=
ov1
.
second
;
total_ov
.
second
+=
ov1
.
second
;
}
}
if
(
local_lddt_property_string
!=
""
)
{
ResidueView
mdlr
=
mdl_chain
.
FindResidue
(
rn
);
if
(
mdlr
.
IsValid
())
{
int
mdl_res_index
=
mdlr
.
GetIndex
();
Real
local_lddt
=
static_cast
<
Real
>
(
overlap_list
[
mdl_res_index
].
first
)
/
(
static_cast
<
Real
>
(
overlap_list
[
mdl_res_index
].
second
)
?
static_cast
<
Real
>
(
overlap_list
[
mdl_res_index
].
second
)
:
1
);
mdlr
.
SetFloatProp
(
local_lddt_property_string
,
local_lddt
);
mdlr
.
SetIntProp
(
local_lddt_property_string
+
"_conserved"
,
overlap_list
[
mdl_res_index
].
first
);
mdlr
.
SetIntProp
(
local_lddt_property_string
+
"_total"
,
overlap_list
[
mdl_res_index
].
second
);
}
}
}
}
if
(
local_lddt_property_string
!=
""
)
{
ResidueViewList
rlist
=
mdl_chain
.
GetResidueList
();
for
(
ResidueViewList
::
iterator
rit
=
rlist
.
begin
();
rit
!=
rlist
.
end
();
++
rit
)
{
int
mdl_res_index
=
rit
->
GetIndex
();
Real
local_lddt
=
static_cast
<
Real
>
(
overlap_list
[
mdl_res_index
].
first
)
/
(
static_cast
<
Real
>
(
overlap_list
[
mdl_res_index
].
second
)
?
static_cast
<
Real
>
(
overlap_list
[
mdl_res_index
].
second
)
:
1
);
rit
->
SetFloatProp
(
local_lddt_property_string
,
local_lddt
);
rit
->
SetIntProp
(
local_lddt_property_string
+
"_conserved"
,
overlap_list
[
mdl_res_index
].
first
);
rit
->
SetIntProp
(
local_lddt_property_string
+
"_total"
,
overlap_list
[
mdl_res_index
].
second
);
}
}
overlap_list
.
clear
();
overlap_list
.
clear
();
return
std
::
make_pair
<
long
int
,
long
int
>
(
total_ov
.
first
,
total_ov
.
second
);
return
std
::
make_pair
<
long
int
,
long
int
>
(
total_ov
.
first
,
total_ov
.
second
);
}
}
...
...
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