Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dssp
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
dssp
Commits
2c28c183
Commit
2c28c183
authored
Aug 23, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On Windows
parent
399344c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
16 deletions
+25
-16
CMakeLists.txt
+14
-5
src/mkdssp.cpp
+11
-11
No files found.
CMakeLists.txt
View file @
2c28c183
...
@@ -43,9 +43,9 @@ if(MSVC)
...
@@ -43,9 +43,9 @@ if(MSVC)
get_WIN32_WINNT
(
ver
)
get_WIN32_WINNT
(
ver
)
add_definitions
(
-D_WIN32_WINNT=
${
ver
}
)
add_definitions
(
-D_WIN32_WINNT=
${
ver
}
)
# On Windows, do not install in the system location
by default
# On Windows, do not install in the system location
if
(
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
)
if
(
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
AND
NOT
(
$ENV{LOCALAPPDATA} STREQUAL
""
)
)
message
(
WARNING
"The
library and auxiliary files
will be installed in $ENV{LOCALAPPDATA}/
${
PROJECT_NAME
}
"
)
message
(
WARNING
"The
executable
will be installed in $ENV{LOCALAPPDATA}/
${
PROJECT_NAME
}
"
)
set
(
CMAKE_INSTALL_PREFIX
"$ENV{LOCALAPPDATA}/
${
PROJECT_NAME
}
"
CACHE PATH
"..."
FORCE
)
set
(
CMAKE_INSTALL_PREFIX
"$ENV{LOCALAPPDATA}/
${
PROJECT_NAME
}
"
CACHE PATH
"..."
FORCE
)
endif
()
endif
()
...
@@ -121,7 +121,7 @@ find_package(ZLIB)
...
@@ -121,7 +121,7 @@ find_package(ZLIB)
find_package
(
BZip2
)
find_package
(
BZip2
)
find_package
(
cifpp 1.0 REQUIRED
)
find_package
(
cifpp 1.0 REQUIRED
)
if
(
USE_RSRC
)
if
(
CIFPP_FOUND
)
add_compile_definitions
(
"DATA_DIR=
\"
${
CIFPP_SHARE_DIR
}
\"
"
)
add_compile_definitions
(
"DATA_DIR=
\"
${
CIFPP_SHARE_DIR
}
\"
"
)
endif
()
endif
()
...
@@ -136,13 +136,22 @@ if (BZIP2_FOUND)
...
@@ -136,13 +136,22 @@ if (BZIP2_FOUND)
link_libraries
(
BZip2::BZip2
)
link_libraries
(
BZip2::BZip2
)
endif
()
endif
()
if
(
USE_RSRC
)
add_custom_command
(
OUTPUT mkdssp_rsrc.obj
COMMAND
${
MRC
}
-o mkdssp_rsrc.obj
${
CIFPP_SHARE_DIR
}
/mmcif_pdbx_v50.dic
${
COFF_SPEC
}
)
set
(
DSSP_RESOURCE mkdssp_rsrc.obj
)
endif
()
include_directories
(
include_directories
(
${
PROJECT_SOURCE_DIR
}
/src
${
PROJECT_SOURCE_DIR
}
/src
PUBLIC
${
cifpp_INCLUDE_DIRS
}
${
Boost_INCLUDE_DIRS
}
PUBLIC
${
cifpp_INCLUDE_DIRS
}
${
Boost_INCLUDE_DIRS
}
)
)
add_executable
(
mkdssp
add_executable
(
mkdssp
${
PROJECT_SOURCE_DIR
}
/src/mkdssp.cpp
)
${
PROJECT_SOURCE_DIR
}
/src/mkdssp.cpp
${
DSSP_RESOURCE
}
)
install
(
TARGETS
${
PROJECT_NAME
}
install
(
TARGETS
${
PROJECT_NAME
}
RUNTIME DESTINATION
${
BIN_INSTALL_DIR
}
RUNTIME DESTINATION
${
BIN_INSTALL_DIR
}
...
...
src/mkdssp.cpp
View file @
2c28c183
...
@@ -183,7 +183,7 @@ std::string ResidueToDSSPLine(const mmcif::DSSP::ResidueInfo& info)
...
@@ -183,7 +183,7 @@ std::string ResidueToDSSPLine(const mmcif::DSSP::ResidueInfo& info)
case
mmcif
:
:
Helix
::
Start
:
helix
[
static_cast
<
int
>
(
helixType
)]
=
'>'
;
break
;
case
mmcif
:
:
Helix
::
Start
:
helix
[
static_cast
<
int
>
(
helixType
)]
=
'>'
;
break
;
case
mmcif
:
:
Helix
::
End
:
helix
[
static_cast
<
int
>
(
helixType
)]
=
'<'
;
break
;
case
mmcif
:
:
Helix
::
End
:
helix
[
static_cast
<
int
>
(
helixType
)]
=
'<'
;
break
;
case
mmcif
:
:
Helix
::
StartAndEnd
:
helix
[
static_cast
<
int
>
(
helixType
)]
=
'X'
;
break
;
case
mmcif
:
:
Helix
::
StartAndEnd
:
helix
[
static_cast
<
int
>
(
helixType
)]
=
'X'
;
break
;
case
mmcif
:
:
Helix
::
Middle
:
helix
[
static_cast
<
int
>
(
helixType
)]
=
(
helixType
==
mmcif
::
HelixType
::
rh_pp
?
'P'
:
(
'3'
+
static_cast
<
int
>
(
helixType
)));
break
;
case
mmcif
:
:
Helix
::
Middle
:
helix
[
static_cast
<
int
>
(
helixType
)]
=
(
helixType
==
mmcif
::
HelixType
::
rh_pp
?
'P'
:
static_cast
<
char
>
(
'3'
+
static_cast
<
int
>
(
helixType
)));
break
;
}
}
}
}
...
@@ -560,14 +560,14 @@ int d_main(int argc, const char* argv[])
...
@@ -560,14 +560,14 @@ int d_main(int argc, const char* argv[])
if
(
fmt
.
empty
()
and
vm
.
count
(
"output"
))
if
(
fmt
.
empty
()
and
vm
.
count
(
"output"
))
{
{
fs
::
path
p
=
vm
[
"output"
].
as
<
std
::
string
>
();
fs
::
path
output
=
vm
[
"output"
].
as
<
std
::
string
>
();
if
(
p
.
extension
()
==
".gz"
)
if
(
output
.
extension
()
==
".gz"
)
p
=
p
.
stem
();
output
=
output
.
stem
();
else
if
(
p
.
extension
()
==
".bz2"
)
else
if
(
output
.
extension
()
==
".bz2"
)
p
=
p
.
stem
();
output
=
output
.
stem
();
if
(
p
.
extension
()
==
".dssp"
)
if
(
output
.
extension
()
==
".dssp"
)
fmt
=
"dssp"
;
fmt
=
"dssp"
;
else
else
fmt
=
"cif"
;
fmt
=
"cif"
;
...
@@ -578,8 +578,8 @@ int d_main(int argc, const char* argv[])
...
@@ -578,8 +578,8 @@ int d_main(int argc, const char* argv[])
if
(
vm
.
count
(
"output"
))
if
(
vm
.
count
(
"output"
))
{
{
fs
::
path
p
=
vm
[
"output"
].
as
<
std
::
string
>
();
fs
::
path
output
=
vm
[
"output"
].
as
<
std
::
string
>
();
std
::
ofstream
of
(
p
,
std
::
ios_base
::
out
|
std
::
ios_base
::
binary
);
std
::
ofstream
of
(
output
,
std
::
ios_base
::
out
|
std
::
ios_base
::
binary
);
if
(
not
of
.
is_open
())
if
(
not
of
.
is_open
())
{
{
...
@@ -589,9 +589,9 @@ int d_main(int argc, const char* argv[])
...
@@ -589,9 +589,9 @@ int d_main(int argc, const char* argv[])
io
::
filtering_stream
<
io
::
output
>
out
;
io
::
filtering_stream
<
io
::
output
>
out
;
if
(
p
.
extension
()
==
".gz"
)
if
(
output
.
extension
()
==
".gz"
)
out
.
push
(
io
::
gzip_compressor
());
out
.
push
(
io
::
gzip_compressor
());
else
if
(
p
.
extension
()
==
".bz2"
)
else
if
(
output
.
extension
()
==
".bz2"
)
out
.
push
(
io
::
bzip2_compressor
());
out
.
push
(
io
::
bzip2_compressor
());
out
.
push
(
of
);
out
.
push
(
of
);
...
...
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