Commit 6adb5634 by Maarten L. Hekkelman

remove boost::date_time dependency

parent 4524357c
......@@ -180,7 +180,7 @@ set(Boost_DETAILED_FAILURE_MSG ON)
if(NOT BUILD_SHARED_LIBS)
set(Boost_USE_STATIC_LIBS ON)
endif()
find_package(Boost 1.70.0 REQUIRED COMPONENTS system iostreams regex date_time program_options)
find_package(Boost 1.70.0 REQUIRED COMPONENTS system iostreams regex program_options)
if(NOT MSVC AND Boost_USE_STATIC_LIBS)
find_package(ZLIB REQUIRED)
......
......@@ -28,10 +28,6 @@
#include <algorithm>
#include <mutex>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/copy.hpp>
#include "cif++/Cif++.hpp"
#include "cif++/Compound.hpp"
#include "cif++/CifUtils.hpp"
......
......@@ -27,8 +27,8 @@
#include <map>
#include <set>
#include <regex>
#include <cmath>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/format.hpp>
......@@ -3638,12 +3638,12 @@ std::tuple<int,int> WriteCoordinatesForModel(std::ostream& pdbFile, Datablock& d
% chainID
% resSeq
% iCode
% lrintf(u11 * 10000)
% lrintf(u22 * 10000)
% lrintf(u33 * 10000)
% lrintf(u12 * 10000)
% lrintf(u13 * 10000)
% lrintf(u23 * 10000)
% std::lrintf(u11 * 10000)
% std::lrintf(u22 * 10000)
% std::lrintf(u33 * 10000)
% std::lrintf(u12 * 10000)
% std::lrintf(u13 * 10000)
% std::lrintf(u23 * 10000)
% element
% sCharge) << std::endl;
}
......
......@@ -28,9 +28,9 @@
#include <set>
#include <stack>
#include <system_error>
#include <iomanip>
#include <boost/algorithm/string.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/format.hpp>
#include <boost/numeric/ublas/matrix.hpp>
......@@ -896,8 +896,6 @@ class PDBFileParser
{
if (regex_match(s, m, rx1))
{
using namespace boost::gregorian;
int day = stoi(m[1].str());
auto mi = kMonths.find(m[2].str());
if (mi == kMonths.end())
......@@ -907,9 +905,12 @@ class PDBFileParser
if (year < 1950)
year += 100;
date dateOriginal(static_cast<uint16_t>(year), static_cast<uint16_t>(month), static_cast<uint16_t>(day));
std::stringstream ss;
ss << std::setw(4) << std::setfill('0') << year << '-'
<< std::setw(2) << std::setfill('0') << month << '-'
<< std::setw(2) << std::setfill('0') << day;
s = to_iso_extended_string(dateOriginal);
s = ss.str();
}
else if (regex_match(s, m, rx2))
{
......
......@@ -29,7 +29,6 @@
#include <map>
#include <set>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/format.hpp>
......
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