Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
2c622298
Unverified
Commit
2c622298
authored
Mar 10, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
link distance calculation
parent
58d7e171
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
GNUmakefile.in
+1
-1
src/PDB2Cif.cpp
+2
-2
test/pdb2cif-test.cpp
+1
-1
No files found.
GNUmakefile.in
View file @
2c622298
...
@@ -218,7 +218,7 @@ $(1)-test: test/$(1)-test
...
@@ -218,7 +218,7 @@ $(1)-test: test/$(1)-test
endef
endef
TESTS
=
unit
#
pdb2cif
TESTS
=
unit pdb2cif
$(foreach
part,$(TESTS),$(eval
$(call
TEST_template,$(part))))
$(foreach
part,$(TESTS),$(eval
$(call
TEST_template,$(part))))
...
...
src/PDB2Cif.cpp
View file @
2c622298
...
@@ -5797,7 +5797,7 @@ void PDBFileParser::Parse(std::istream& is, cif::File& result)
...
@@ -5797,7 +5797,7 @@ void PDBFileParser::Parse(std::istream& is, cif::File& result)
const
auto
&
[
x1
,
y1
,
z1
]
=
a1
.
get
<
float
,
float
,
float
>
({
"cartn_x"
,
"cartn_y"
,
"cartn_z"
});
const
auto
&
[
x1
,
y1
,
z1
]
=
a1
.
get
<
float
,
float
,
float
>
({
"cartn_x"
,
"cartn_y"
,
"cartn_z"
});
const
auto
&
[
x2
,
y2
,
z2
]
=
a2
.
get
<
float
,
float
,
float
>
({
"cartn_x"
,
"cartn_y"
,
"cartn_z"
});
const
auto
&
[
x2
,
y2
,
z2
]
=
a2
.
get
<
float
,
float
,
float
>
({
"cartn_x"
,
"cartn_y"
,
"cartn_z"
});
if
(
symm1
==
"1_555"
and
symm2
==
"1_555"
)
if
(
(
symm1
.
empty
()
or
symm1
==
"1_555"
)
and
(
symm2
.
empty
()
or
symm2
==
"1_555"
)
)
distance
=
mmcif
::
Distance
(
mmcif
::
Point
{
x1
,
y1
,
z1
},
mmcif
::
Point
{
x2
,
y2
,
z2
});
distance
=
mmcif
::
Distance
(
mmcif
::
Point
{
x1
,
y1
,
z1
},
mmcif
::
Point
{
x2
,
y2
,
z2
});
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"Cannot calculate distance for link since one of the atoms is in another dimension"
<<
std
::
endl
;
std
::
cerr
<<
"Cannot calculate distance for link since one of the atoms is in another dimension"
<<
std
::
endl
;
...
@@ -5805,7 +5805,7 @@ void PDBFileParser::Parse(std::istream& is, cif::File& result)
...
@@ -5805,7 +5805,7 @@ void PDBFileParser::Parse(std::istream& is, cif::File& result)
catch
(
std
::
exception
&
ex
)
catch
(
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"Error finding atom: "
<<
ex
.
what
()
<<
std
::
endl
;
std
::
cerr
<<
"Error finding atom
for LINK distance calculation
: "
<<
ex
.
what
()
<<
std
::
endl
;
}
}
r
[
"pdbx_dist_value"
]
=
distance
;
r
[
"pdbx_dist_value"
]
=
distance
;
...
...
test/pdb2cif-test.cpp
View file @
2c622298
...
@@ -52,7 +52,7 @@ int main(int argc, char* argv[])
...
@@ -52,7 +52,7 @@ int main(int argc, char* argv[])
cif
::
File
f
;
cif
::
File
f
;
ReadPDBFile
(
is
,
f
);
ReadPDBFile
(
is
,
f
);
// f.writ
e(std::cout);
f
.
sav
e
(
std
::
cout
);
return
0
;
return
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment