Commit 6a245bf4 by Maarten L. Hekkelman

Update for new libcifpp

parent 32b28bf2
......@@ -4,3 +4,5 @@ version-info*.txt
mkdssp
.vs/
build
.gdb_history
**/*.dssp
......@@ -25,7 +25,7 @@
cmake_minimum_required(VERSION 3.15)
# set the project name
project(mkdssp VERSION 4.0.4 LANGUAGES CXX)
project(mkdssp VERSION 4.0.5 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
......@@ -120,7 +120,7 @@ find_package(Threads)
# Note: use -DBoost_USE_STATIC_LIBS=ON to use boost static libraries
find_package(cifpp 2.0.0 REQUIRED)
find_package(cifpp 4.0.1 REQUIRED)
find_package(Boost COMPONENTS date_time program_options)
add_executable(mkdssp
......
Version 4.0.5
- The options for loading custom dictionary files and the like are now
visible in the help again.
Version 4.0.4
- New version string logic
- Improved makefile
......
.TH mkdssp 1 "2021-08-31" "version 4.0.2" "User Commands"
.TH mkdssp 1 "2021-08-31" "version 4.0.5" "User Commands"
.if n .ad l
.nh
.SH NAME
......@@ -40,6 +40,20 @@ angles within the range required to assing a PP helix.
\fB--write-other\fR
By default the new format does not write the structure information for OTHER.
Use this flag to change that.
.TP
\fB--components\fR
The knowledge of compounds is loaded from the CCD file \fIcomponents.cif\fR
that should have been installed by \fIlibcifpp\fR. You can override that file
by using this option.
.TP
\fB--extra-compounds\fR
As an addition to the standard \fIcomponents.cif\fR file, you can add more
files using this option. Files should be either in CCD format or should be
CCP4 restraints files.
.TP
\fB--mmcif-dictionary\fR
The default mmCIF dictionary file is installed by the \fIlibcifpp\fR library
but you can override it using this option.
.SH DETAILS
The DSSP algorithm assings secondary structure based on the energy calculated
for H-bonds.
......
......@@ -154,6 +154,8 @@ std::string ResidueToDSSPLine(const mmcif::DSSP::ResidueInfo& info)
void writeDSSP(const mmcif::Structure& structure, const mmcif::DSSP& dssp, std::ostream& os)
{
auto &db = structure.datablock();
const std::string kFirstLine("==== Secondary Structure Definition by the program DSSP, NKI version 4.0 ==== ");
boost::format kHeaderLine("%1% %|127t|%2%");
......@@ -163,14 +165,14 @@ void writeDSSP(const mmcif::Structure& structure, const mmcif::DSSP& dssp, std::
date today = day_clock::local_day();
auto& cf = structure.getFile().file();
// auto& cf = structure.file();
os << kHeaderLine % (kFirstLine + "DATE=" + to_iso_extended_string(today)) % '.' << std::endl
<< kHeaderLine % "REFERENCE W. KABSCH AND C.SANDER, BIOPOLYMERS 22 (1983) 2577-2637" % '.' << std::endl
<< GetPDBHEADERLine(cf, 127) << '.' << std::endl
<< GetPDBCOMPNDLine(cf, 127) << '.' << std::endl
<< GetPDBSOURCELine(cf, 127) << '.' << std::endl
<< GetPDBAUTHORLine(cf, 127) << '.' << std::endl;
<< GetPDBHEADERLine(db, 127) << '.' << std::endl
<< GetPDBCOMPNDLine(db, 127) << '.' << std::endl
<< GetPDBSOURCELine(db, 127) << '.' << std::endl
<< GetPDBAUTHORLine(db, 127) << '.' << std::endl;
os << boost::format("%5.5d%3.3d%3.3d%3.3d%3.3d TOTAL NUMBER OF RESIDUES, NUMBER OF CHAINS, NUMBER OF SS-BRIDGES(TOTAL,INTRACHAIN,INTERCHAIN) %|127t|%c") %
stats.nrOfResidues % stats.nrOfChains % stats.nrOfSSBridges % stats.nrOfIntraChainSSBridges % (stats.nrOfSSBridges - stats.nrOfIntraChainSSBridges) % '.' << std::endl;
......@@ -235,7 +237,7 @@ void writeDSSP(const mmcif::Structure& structure, const mmcif::DSSP& dssp, std::
void annotateDSSP(mmcif::Structure& structure, const mmcif::DSSP& dssp, bool writeOther, std::ostream& os)
{
auto& db = structure.getFile().data();
auto& db = structure.datablock();
if (dssp.empty())
{
......
......@@ -83,6 +83,10 @@ int d_main(int argc, const char* argv[])
("min-pp-stretch", po::value<short>(), "Minimal number of residues having PSI/PHI in range for a PP helix, default is 3")
("write-other", "If set, write the type OTHER for loops, default is to leave this out")
("components", po::value<std::string>(), "Location of the components.cif file from CCD")
("extra-compounds", po::value<std::string>(), "File containing residue information for extra compounds in this specific target, should be either in CCD format or a CCP4 restraints file")
("mmcif-dictionary", po::value<std::string>(), "Path to the mmcif_pdbx.dic file to use instead of default")
("help,h", "Display help message")
("version", "Print version")
("verbose,v", "verbose output")
......@@ -94,10 +98,7 @@ int d_main(int argc, const char* argv[])
("output,o", po::value<std::string>(), "Output to this file")
("debug,d", po::value<int>(), "Debug level (for even more verbose output)")
("compounds", po::value<std::string>(), "Location of the components.cif file from CCD")
("components", po::value<std::string>(), "Location of the components.cif file from CCD, alias")
("extra-compounds", po::value<std::string>(), "File containing residue information for extra compounds in this specific target, should be either in CCD format or a CCP4 restraints file")
("mmcif-dictionary", po::value<std::string>(), "Path to the mmcif_pdbx.dic file to use instead of default")
("compounds", po::value<std::string>(), "Location of the components.cif file from CCD, alias")
;
po::options_description cmdline_options;
......
......@@ -2,6 +2,10 @@ data_1CBS
#
_entry.id 1CBS
#
_audit_conform.dict_name mmcif_pdbx.dic
_audit_conform.dict_version 5.279
_audit_conform.dict_location http://mmcif.pdb.org/dictionaries/ascii/mmcif_pdbx.dic
#
loop_
_database_2.database_id
_database_2.database_code
......
......@@ -92,7 +92,7 @@ BOOST_AUTO_TEST_CASE(ut_mmcif_2)
using namespace cif::literals;
mmcif::File f("1cbs.cif.gz");
f.file().loadDictionary("mmcif_pdbx_v50");
f.loadDictionary("mmcif_pdbx_v50");
mmcif::Structure structure(f, 1, mmcif::StructureOpenOptions::SkipHydrogen);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment