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
560f6deb
Unverified
Commit
560f6deb
authored
Oct 26, 2022
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating dictionaries and default to downloading components.cif
parent
ea1ac33d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
56 deletions
+7
-56
CMakeLists.txt
+5
-5
tools/update-dictionary-script
+0
-51
tools/update-libcifpp-data.in
+2
-0
No files found.
CMakeLists.txt
View file @
560f6deb
...
@@ -59,7 +59,7 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
...
@@ -59,7 +59,7 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
option
(
BUILD_FOR_CCP4
"Build a version to be installed in CCP4"
OFF
)
option
(
BUILD_FOR_CCP4
"Build a version to be installed in CCP4"
OFF
)
# Lots of code depend on the availability of the components.cif file
# Lots of code depend on the availability of the components.cif file
option
(
CIFPP_DOWNLOAD_CCD
"Download the CCD file components.cif during installation"
O
FF
)
option
(
CIFPP_DOWNLOAD_CCD
"Download the CCD file components.cif during installation"
O
N
)
# An optional cron script can be installed to keep the data files up-to-date
# An optional cron script can be installed to keep the data files up-to-date
if
(
UNIX
)
if
(
UNIX
)
...
@@ -69,13 +69,13 @@ endif()
...
@@ -69,13 +69,13 @@ endif()
# When CCP4 is sourced in the environment, we can recreate the symmetry operations table
# When CCP4 is sourced in the environment, we can recreate the symmetry operations table
if
(
EXISTS
"$ENV{CCP4}"
)
if
(
EXISTS
"$ENV{CCP4}"
)
if
(
EXISTS
"$ENV{CLIBD}/syminfo.lib"
)
if
(
EXISTS
"$ENV{CLIBD}/syminfo.lib"
)
option
(
PDBX
PP_RECREATE_SYMOP_DATA
"Recreate SymOp data table in case it is out of date"
ON
)
option
(
CIF
PP_RECREATE_SYMOP_DATA
"Recreate SymOp data table in case it is out of date"
ON
)
else
()
else
()
set
(
PDBX
PP_RECREATE_SYMOP_DATA OFF
)
set
(
CIF
PP_RECREATE_SYMOP_DATA OFF
)
message
(
WARNING
"Symop data table recreation requested, but file syminfo.lib was not found in $ENV{CLIBD}"
)
message
(
WARNING
"Symop data table recreation requested, but file syminfo.lib was not found in $ENV{CLIBD}"
)
endif
()
endif
()
else
()
else
()
set
(
PDBX
PP_RECREATE_SYMOP_DATA OFF
)
set
(
CIF
PP_RECREATE_SYMOP_DATA OFF
)
message
(
"Not trying to recreate symop_table_data.hpp since CCP4 is not defined"
)
message
(
"Not trying to recreate symop_table_data.hpp since CCP4 is not defined"
)
endif
()
endif
()
...
@@ -159,7 +159,7 @@ include(VersionString)
...
@@ -159,7 +159,7 @@ include(VersionString)
write_version_header
(
"LibCIFPP"
)
write_version_header
(
"LibCIFPP"
)
# SymOp data table
# SymOp data table
if
(
PDBX
PP_RECREATE_SYMOP_DATA
)
if
(
CIF
PP_RECREATE_SYMOP_DATA
)
# The tool to create the table
# The tool to create the table
add_executable
(
symop-map-generator
"
${
PROJECT_SOURCE_DIR
}
/tools/symop-map-generator.cpp"
)
add_executable
(
symop-map-generator
"
${
PROJECT_SOURCE_DIR
}
/tools/symop-map-generator.cpp"
)
...
...
tools/update-dictionary-script
deleted
100644 → 0
View file @
ea1ac33d
#!/bin/bash
set
-e
if
[
"
$EUID
"
-ne
0
]
then
echo
"Please run as root"
exit
fi
if
[
-f
/etc/libcifpp.conf
]
;
then
.
/etc/libcifpp.conf
fi
# check to see if we're supposed to run at all
if
[
"
$update
"
!=
"true"
]
;
then
exit
fi
# if cache directory doesn't exist, exit.
if
!
[
-d
/var/cache/libcifpp
]
;
then
exit
fi
fetch_dictionary
()
{
dict
=
$1
source
=
$2
wget
-O
${
dict
}
.gz
${
source
}
# be careful not to nuke an existing dictionary file
# extract to a temporary file first
gunzip
-c
${
dict
}
.gz
>
${
dict
}
-tmp
# then move the extracted file to the final location
mv
${
dict
}
-tmp
${
dict
}
# and clean up afterwards
rm
${
dict
}
.gz
}
# fetch the dictionaries
fetch_dictionary
"/var/cache/libcifpp/mmcif_pdbx.dic"
"https://mmcif.wwpdb.org/dictionaries/ascii/mmcif_pdbx_v50.dic.gz"
fetch_dictionary
"/var/cache/libcifpp/components.cif"
"ftp://ftp.wwpdb.org/pub/pdb/data/monomers/components.cif.gz"
# this one is not compressed
wget
-O
/var/cache/libcifpp/mmcif_ma.dic
"https://github.com/ihmwg/ModelCIF/raw/master/dist/mmcif_ma.dic"
tools/update-libcifpp-data.in
View file @
560f6deb
...
@@ -51,3 +51,5 @@ fetch_dictionary "@CIFPP_CACHE_DIR@/components.cif" "ftp://ftp.wwpdb.org/pub/pdb
...
@@ -51,3 +51,5 @@ fetch_dictionary "@CIFPP_CACHE_DIR@/components.cif" "ftp://ftp.wwpdb.org/pub/pdb
if
[
-d
/etc/libcifpp/cache-update.d
]
&&
[
-x
/bin/run-parts
]
;
then
if
[
-d
/etc/libcifpp/cache-update.d
]
&&
[
-x
/bin/run-parts
]
;
then
run-parts
--arg
"@CIFPP_CACHE_DIR@"
--
/etc/libcifpp/cache-update.d
run-parts
--arg
"@CIFPP_CACHE_DIR@"
--
/etc/libcifpp/cache-update.d
fi
fi
wget
-O
/var/cache/libcifpp/mmcif_ma.dic
"https://github.com/ihmwg/ModelCIF/raw/master/dist/mmcif_ma.dic"
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