Skip to content
Snippets Groups Projects
Commit acc2c894 authored by Rafal Gumienny's avatar Rafal Gumienny
Browse files

Merge branch 'develop' into lDDT-SCHWED-3127

parents fc2cc9f6 1e3578ba
Branches
Tags
No related merge requests found
Changes in Release 1.7.1
--------------------------------------------------------------------------------
* Fixed an issue that could cause the star format parser (mmCIF, chemical
components dictionary) to enter an infinite loop
* Chemical components dictionary was extended by new chemical classes
introduced by PDB
* Fixed unit tests
* Improved documentation
Changes in Release 1.7
--------------------------------------------------------------------------------
......
......@@ -7,7 +7,7 @@ project(OpenStructure CXX C)
set (CMAKE_EXPORT_COMPILE_COMMANDS 1)
set (OST_VERSION_MAJOR 1)
set (OST_VERSION_MINOR 7)
set (OST_VERSION_PATCH 0)
set (OST_VERSION_PATCH 1)
set (OST_VERSION_STRING ${OST_VERSION_MAJOR}.${OST_VERSION_MINOR}.${OST_VERSION_PATCH} )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake_support)
include(OST)
......
......@@ -550,11 +550,15 @@ void StarParser::Parse()
case 'd':
if (tline.length()>=5 && StringRef("data_", 5)==tline.substr(0, 5)) {
this->ParseData();
} else {
throw IOException("Missing 'data_' control structure");
}
break;
case 'g':
if (tline.length()>=7 && StringRef("global_", 7)==tline.substr(0, 7)) {
this->ParseGlobal();
} else {
throw IOException("Missing 'global_' control structure");
}
break;
case '#':
......
......@@ -389,6 +389,20 @@ BOOST_AUTO_TEST_CASE(star_items_as_row)
BOOST_TEST_MESSAGE(" done.");
}
BOOST_AUTO_TEST_CASE(star_broken_data)
{
std::ifstream s("testfiles/broken_data.cif");
LoopTestParser star_p(s);
BOOST_CHECK_THROW(star_p.Parse(), IOException);
}
BOOST_AUTO_TEST_CASE(star_broken_global)
{
std::ifstream s("testfiles/broken_global.cif");
LoopTestParser star_p(s);
BOOST_CHECK_THROW(star_p.Parse(), IOException);
}
BOOST_AUTO_TEST_CASE(star_missing_data)
{
std::ifstream s("testfiles/missing_data.cif");
......
d lines starting with a 'd' kicked the parser into an infinite loop.
g lines starting with a 'g' kicked the parser into an infinite loop.
......@@ -732,6 +732,7 @@ The Handle Classes
The atom's occupancy in the range 0 to 1. Read/write. Also available as
:meth:`GetOccupancy`, :meth:`SetOccupancy`.
:type: float
.. attribute:: b_factor
......@@ -1199,7 +1200,8 @@ The View Classes
.. method:: GetBondCount()
Get number of bonds
:rtype: int
:rtype: :class:`int`
.. method:: GetBondList()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment