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
9243b6a7
Commit
9243b6a7
authored
6 years ago
by
Gerardo Tauriello
Browse files
Options
Downloads
Patches
Plain Diff
SCHWED-3473: revert some changes in filter_clashes
parent
c9c20a0a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/mol/alg/src/filter_clashes.cc
+14
-14
14 additions, 14 deletions
modules/mol/alg/src/filter_clashes.cc
with
14 additions
and
14 deletions
modules/mol/alg/src/filter_clashes.cc
+
14
−
14
View file @
9243b6a7
...
...
@@ -207,7 +207,7 @@ StereoChemicalParams FillStereoChemicalParams(const String& header, std::vector<
bool
found
=
false
;
std
::
vector
<
String
>::
const_iterator
line_iter
=
stereo_chemical_props_file
.
begin
();
while
(
line_iter
!=
stereo_chemical_props_file
.
end
())
{
if
((
*
line_iter
).
length
()
!=
0
&&
(
*
line_iter
).
length
()
!=
1
)
{
if
((
*
line_iter
).
length
()
>
1
)
{
StringRef
line_string_ref
(
line_iter
->
data
(),(
*
line_iter
).
length
());
std
::
vector
<
StringRef
>
line_str_vec
=
line_string_ref
.
split
();
if
(
line_str_vec
[
0
].
str
()
==
header
)
{
...
...
@@ -220,7 +220,7 @@ StereoChemicalParams FillStereoChemicalParams(const String& header, std::vector<
if
(
second_line_str_vec
.
size
()
!=
4
)
{
std
::
cout
<<
"The number of elements in one of the lines is wrong"
<<
std
::
endl
;
return
StereoChemicalParams
();
}
}
StringRef
item
=
second_line_str_vec
[
0
];
String
res
=
second_line_str_vec
[
1
].
str
();
std
::
pair
<
bool
,
float
>
parse_value
=
second_line_str_vec
[
2
].
to_float
();
...
...
@@ -231,13 +231,13 @@ StereoChemicalParams FillStereoChemicalParams(const String& header, std::vector<
}
else
{
std
::
cout
<<
"One of the values in the third column is not a number"
<<
std
::
endl
;
return
StereoChemicalParams
();
}
;
}
if
(
parse_stddev
.
first
==
true
)
{
stddev
=
static_cast
<
Real
>
(
parse_stddev
.
second
);
}
else
{
std
::
cout
<<
"One of the values in the fourth column is not a number"
<<
std
::
endl
;
return
StereoChemicalParams
();
}
;
}
std
::
vector
<
StringRef
>
split_item
=
item
.
split
(
'-'
);
String
rearranged_item
;
if
(
split_item
.
size
()
==
2
)
{
...
...
@@ -264,10 +264,10 @@ StereoChemicalParams FillStereoChemicalParams(const String& header, std::vector<
}
else
{
std
::
cout
<<
"One of the strings describing the parameter has the wrong format"
<<
std
::
endl
;
return
StereoChemicalParams
();
}
}
table
.
SetParam
(
rearranged_item
,
res
,
value
,
stddev
);
line_iter
++
;
}
}
line_iter
++
;
}
}
}
...
...
@@ -293,7 +293,7 @@ ClashingDistances FillClashingDistances(std::vector<String>& stereo_chemical_pro
bool
found
=
false
;
std
::
vector
<
String
>::
const_iterator
line_iter
=
stereo_chemical_props_file
.
begin
();
while
(
line_iter
!=
stereo_chemical_props_file
.
end
())
{
if
((
*
line_iter
).
length
()
!=
0
&&
(
*
line_iter
).
length
()
!=
1
)
{
if
((
*
line_iter
).
length
()
>
1
)
{
StringRef
line_string_ref
(
line_iter
->
data
(),(
*
line_iter
).
length
());
std
::
vector
<
StringRef
>
line_str_vec
=
line_string_ref
.
split
();
if
(
line_str_vec
[
0
].
str
()
==
"Non-bonded"
)
{
...
...
@@ -306,7 +306,7 @@ ClashingDistances FillClashingDistances(std::vector<String>& stereo_chemical_pro
if
(
second_line_str_vec
.
size
()
!=
3
)
{
std
::
cout
<<
"The number of elements in one of the lines is wrong"
<<
std
::
endl
;
return
ClashingDistances
();
}
}
String
item
=
second_line_str_vec
[
0
].
str
();
std
::
pair
<
bool
,
float
>
parse_value
=
second_line_str_vec
[
1
].
to_float
();
...
...
@@ -317,7 +317,7 @@ ClashingDistances FillClashingDistances(std::vector<String>& stereo_chemical_pro
}
else
{
std
::
cout
<<
"One of the distance values is not a number"
<<
std
::
endl
;
return
ClashingDistances
();
}
;
}
if
(
parse_stddev
.
first
==
true
)
{
stddev
=
static_cast
<
Real
>
(
parse_stddev
.
second
);
}
else
{
...
...
@@ -329,16 +329,16 @@ ClashingDistances FillClashingDistances(std::vector<String>& stereo_chemical_pro
if
(
itemsr
.
size
()
!=
3
)
{
std
::
cout
<<
"One of the strings describing the interacting atoms has the wrong format"
<<
std
::
endl
;
return
ClashingDistances
();
}
}
String
ele1
=
eles
[
0
].
str
();
String
ele2
=
eles
[
1
].
str
();
if
(
ele2
<
ele1
)
{
table
.
SetClashingDistance
(
ele2
,
ele1
,
value
,
stddev
);
}
else
{
table
.
SetClashingDistance
(
ele1
,
ele2
,
value
,
stddev
);
}
line_iter
++
;
}
}
}
line_iter
++
;
}
}
}
...
...
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