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
aec60829
Commit
aec60829
authored
Jan 05, 2022
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more quiet code
parent
888c3c38
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
157 additions
and
127 deletions
+157
-127
src/BondMap.cpp
+5
-2
src/Cif++.cpp
+12
-9
src/Cif2PDB.cpp
+6
-3
src/CifParser.cpp
+4
-3
src/CifUtils.cpp
+1
-1
src/CifValidator.cpp
+1
-1
src/Compound.cpp
+8
-6
src/PDB2Cif.cpp
+58
-49
src/PDB2CifRemark3.cpp
+9
-7
src/Secondary.cpp
+6
-6
src/Structure.cpp
+22
-17
src/TlsParser.cpp
+25
-23
No files found.
src/BondMap.cpp
View file @
aec60829
...
@@ -180,7 +180,10 @@ bool CompoundBondMap::bonded(const std::string &compoundID, const std::string &a
...
@@ -180,7 +180,10 @@ bool CompoundBondMap::bonded(const std::string &compoundID, const std::string &a
auto
compound
=
mmcif
::
CompoundFactory
::
instance
().
create
(
compoundID
);
auto
compound
=
mmcif
::
CompoundFactory
::
instance
().
create
(
compoundID
);
if
(
not
compound
)
if
(
not
compound
)
std
::
cerr
<<
"Missing compound bond info for "
<<
compoundID
<<
std
::
endl
;
{
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Missing compound bond info for "
<<
compoundID
<<
std
::
endl
;
}
else
else
{
{
for
(
auto
&
atom
:
compound
->
bonds
())
for
(
auto
&
atom
:
compound
->
bonds
())
...
@@ -308,7 +311,7 @@ BondMap::BondMap(const Structure &p)
...
@@ -308,7 +311,7 @@ BondMap::BondMap(const Structure &p)
{
{
if
(
c
==
"HOH"
or
c
==
"H2O"
or
c
==
"WAT"
)
if
(
c
==
"HOH"
or
c
==
"H2O"
or
c
==
"WAT"
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"skipping water in bond map calculation"
<<
std
::
endl
;
std
::
cerr
<<
"skipping water in bond map calculation"
<<
std
::
endl
;
continue
;
continue
;
}
}
...
...
src/Cif++.cpp
View file @
aec60829
...
@@ -1497,7 +1497,7 @@ size_t Category::getColumnIndex(std::string_view name) const
...
@@ -1497,7 +1497,7 @@ size_t Category::getColumnIndex(std::string_view name) const
break
;
break
;
}
}
if
(
VERBOSE
and
result
==
mColumns
.
size
()
and
mCatValidator
!=
nullptr
)
// validate the name, if it is known at all (since it was not found)
if
(
VERBOSE
>
0
and
result
==
mColumns
.
size
()
and
mCatValidator
!=
nullptr
)
// validate the name, if it is known at all (since it was not found)
{
{
auto
iv
=
mCatValidator
->
getValidatorForItem
(
name
);
auto
iv
=
mCatValidator
->
getValidatorForItem
(
name
);
if
(
iv
==
nullptr
)
if
(
iv
==
nullptr
)
...
@@ -2340,7 +2340,7 @@ void Category::validateLinks() const
...
@@ -2340,7 +2340,7 @@ void Category::validateLinks() const
if
(
not
hasParent
(
r
,
*
parentCat
,
*
link
))
if
(
not
hasParent
(
r
,
*
parentCat
,
*
link
))
++
missing
;
++
missing
;
if
(
missing
)
if
(
missing
and
VERBOSE
>=
0
)
{
{
std
::
cerr
<<
"Links for "
<<
link
->
mLinkGroupLabel
<<
" are incomplete"
<<
std
::
endl
std
::
cerr
<<
"Links for "
<<
link
->
mLinkGroupLabel
<<
" are incomplete"
<<
std
::
endl
<<
" There are "
<<
missing
<<
" items in "
<<
mName
<<
" that don't have matching parent items in "
<<
parentCat
->
mName
<<
std
::
endl
;
<<
" There are "
<<
missing
<<
" items in "
<<
mName
<<
" that don't have matching parent items in "
<<
parentCat
->
mName
<<
std
::
endl
;
...
@@ -2900,7 +2900,7 @@ void Category::update_value(RowSet &&rows, const std::string &tag, const std::st
...
@@ -2900,7 +2900,7 @@ void Category::update_value(RowSet &&rows, const std::string &tag, const std::st
}
}
// cannot update this...
// cannot update this...
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Cannot update child "
<<
childCat
->
mName
<<
"."
<<
childTag
<<
" with value "
<<
value
<<
std
::
endl
;
std
::
cerr
<<
"Cannot update child "
<<
childCat
->
mName
<<
"."
<<
childTag
<<
" with value "
<<
value
<<
std
::
endl
;
}
}
...
@@ -3018,7 +3018,8 @@ void Row::assign(std::string_view name, const std::string &value, bool skipUpdat
...
@@ -3018,7 +3018,8 @@ void Row::assign(std::string_view name, const std::string &value, bool skipUpdat
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Could not assign value '"
<<
value
<<
"' to column _"
<<
mData
->
mCategory
->
name
()
<<
'.'
<<
name
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Could not assign value '"
<<
value
<<
"' to column _"
<<
mData
->
mCategory
->
name
()
<<
'.'
<<
name
<<
std
::
endl
;
throw
;
throw
;
}
}
}
}
...
@@ -3181,7 +3182,7 @@ void Row::assign(size_t column, const std::string &value, bool skipUpdateLinked)
...
@@ -3181,7 +3182,7 @@ void Row::assign(size_t column, const std::string &value, bool skipUpdateLinked)
auto
rows_n
=
childCat
->
find
(
std
::
move
(
cond_n
));
auto
rows_n
=
childCat
->
find
(
std
::
move
(
cond_n
));
if
(
not
rows_n
.
empty
())
if
(
not
rows_n
.
empty
())
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Will not rename in child category since there are already rows that link to the parent"
<<
std
::
endl
;
std
::
cerr
<<
"Will not rename in child category since there are already rows that link to the parent"
<<
std
::
endl
;
continue
;
continue
;
...
@@ -3387,7 +3388,7 @@ void Row::swap(size_t cix, ItemRow *a, ItemRow *b)
...
@@ -3387,7 +3388,7 @@ void Row::swap(size_t cix, ItemRow *a, ItemRow *b)
}
}
else
else
{
{
if
(
VERBOSE
)
if
(
VERBOSE
>
0
)
std
::
cerr
<<
"In "
<<
childCat
->
mName
<<
" changing "
<<
linkChildColName
<<
": "
<<
r
[
linkChildColName
].
as
<
std
::
string
>
()
<<
" => "
<<
(
i
?
i
->
mText
:
""
)
<<
std
::
endl
;
std
::
cerr
<<
"In "
<<
childCat
->
mName
<<
" changing "
<<
linkChildColName
<<
": "
<<
r
[
linkChildColName
].
as
<
std
::
string
>
()
<<
" => "
<<
(
i
?
i
->
mText
:
""
)
<<
std
::
endl
;
r
[
linkChildColName
]
=
i
?
i
->
mText
:
""
;
r
[
linkChildColName
]
=
i
?
i
->
mText
:
""
;
}
}
...
@@ -3496,7 +3497,8 @@ File::File(const std::filesystem::path &path, bool validate)
...
@@ -3496,7 +3497,8 @@ File::File(const std::filesystem::path &path, bool validate)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Error while loading file "
<<
path
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Error while loading file "
<<
path
<<
std
::
endl
;
throw
;
throw
;
}
}
}
}
...
@@ -3564,7 +3566,8 @@ void File::load(const std::filesystem::path &p)
...
@@ -3564,7 +3566,8 @@ void File::load(const std::filesystem::path &p)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Error loading file "
<<
path
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Error loading file "
<<
path
<<
std
::
endl
;
throw
;
throw
;
}
}
}
}
...
@@ -3660,7 +3663,7 @@ bool File::isValid()
...
@@ -3660,7 +3663,7 @@ bool File::isValid()
{
{
if
(
mValidator
==
nullptr
)
if
(
mValidator
==
nullptr
)
{
{
if
(
VERBOSE
)
if
(
VERBOSE
>
0
)
std
::
cerr
<<
"No dictionary loaded explicitly, loading default"
<<
std
::
endl
;
std
::
cerr
<<
"No dictionary loaded explicitly, loading default"
<<
std
::
endl
;
loadDictionary
();
loadDictionary
();
...
...
src/Cif2PDB.cpp
View file @
aec60829
...
@@ -753,7 +753,8 @@ class Ff : public FBase
...
@@ -753,7 +753,8 @@ class Ff : public FBase
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Failed to write '"
<<
s
<<
"' as a double, this indicates an error in the code for writing PDB files"
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Failed to write '"
<<
s
<<
"' as a double, this indicates an error in the code for writing PDB files"
<<
std
::
endl
;
os
<<
s
;
os
<<
s
;
}
}
}
}
...
@@ -2329,7 +2330,8 @@ void WriteRemark200(std::ostream& pdbFile, Datablock& db)
...
@@ -2329,7 +2330,8 @@ void WriteRemark200(std::ostream& pdbFile, Datablock& db)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
}
}
}
}
...
@@ -2390,7 +2392,8 @@ void WriteRemark280(std::ostream& pdbFile, Datablock& db)
...
@@ -2390,7 +2392,8 @@ void WriteRemark280(std::ostream& pdbFile, Datablock& db)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
}
}
}
}
...
...
src/CifParser.cpp
View file @
aec60829
...
@@ -288,7 +288,7 @@ SacParser::CIFToken SacParser::getNextToken()
...
@@ -288,7 +288,7 @@ SacParser::CIFToken SacParser::getNextToken()
mState
=
eStateTextField
+
1
;
mState
=
eStateTextField
+
1
;
else
if
(
ch
==
kEOF
)
else
if
(
ch
==
kEOF
)
error
(
"unterminated textfield"
);
error
(
"unterminated textfield"
);
else
if
(
not
isAnyPrint
(
ch
))
else
if
(
not
isAnyPrint
(
ch
)
and
cif
::
VERBOSE
>=
0
)
// error("invalid character in text field '" + string({ static_cast<char>(ch) }) + "' (" + to_string((int)ch) + ")");
// error("invalid character in text field '" + string({ static_cast<char>(ch) }) + "' (" + to_string((int)ch) + ")");
std
::
cerr
<<
"invalid character in text field '"
<<
std
::
string
({
static_cast
<
char
>
(
ch
)})
<<
"' ("
<<
ch
<<
") line: "
<<
mLineNr
<<
std
::
endl
;
std
::
cerr
<<
"invalid character in text field '"
<<
std
::
string
({
static_cast
<
char
>
(
ch
)})
<<
"' ("
<<
ch
<<
") line: "
<<
mLineNr
<<
std
::
endl
;
break
;
break
;
...
@@ -1220,7 +1220,7 @@ void DictParser::linkItems()
...
@@ -1220,7 +1220,7 @@ void DictParser::linkItems()
{
{
for
(
auto
&
iv
:
cv
.
mItemValidators
)
for
(
auto
&
iv
:
cv
.
mItemValidators
)
{
{
if
(
iv
.
mType
==
nullptr
)
if
(
iv
.
mType
==
nullptr
and
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Missing item_type for "
<<
iv
.
mTag
<<
std
::
endl
;
std
::
cerr
<<
"Missing item_type for "
<<
iv
.
mTag
<<
std
::
endl
;
}
}
}
}
...
@@ -1255,7 +1255,8 @@ void DictParser::loadDictionary()
...
@@ -1255,7 +1255,8 @@ void DictParser::loadDictionary()
}
}
catch
(
const
std
::
exception
&
)
catch
(
const
std
::
exception
&
)
{
{
std
::
cerr
<<
"Error parsing dictionary"
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Error parsing dictionary"
<<
std
::
endl
;
throw
;
throw
;
}
}
...
...
src/CifUtils.cpp
View file @
aec60829
...
@@ -1237,7 +1237,7 @@ std::filesystem::path gDataDir;
...
@@ -1237,7 +1237,7 @@ std::filesystem::path gDataDir;
void
addDataDirectory
(
std
::
filesystem
::
path
dataDir
)
void
addDataDirectory
(
std
::
filesystem
::
path
dataDir
)
{
{
if
(
VERBOSE
and
not
fs
::
exists
(
dataDir
))
if
(
VERBOSE
>
0
and
not
fs
::
exists
(
dataDir
))
std
::
cerr
<<
"The specified data directory "
<<
dataDir
<<
" does not exist"
<<
std
::
endl
;
std
::
cerr
<<
"The specified data directory "
<<
dataDir
<<
" does not exist"
<<
std
::
endl
;
gDataDir
=
dataDir
;
gDataDir
=
dataDir
;
}
}
...
...
src/CifValidator.cpp
View file @
aec60829
...
@@ -354,7 +354,7 @@ void Validator::reportError(const std::string &msg, bool fatal) const
...
@@ -354,7 +354,7 @@ void Validator::reportError(const std::string &msg, bool fatal) const
{
{
if
(
mStrict
or
fatal
)
if
(
mStrict
or
fatal
)
throw
ValidationError
(
msg
);
throw
ValidationError
(
msg
);
else
if
(
VERBOSE
)
else
if
(
VERBOSE
>
0
)
std
::
cerr
<<
msg
<<
std
::
endl
;
std
::
cerr
<<
msg
<<
std
::
endl
;
}
}
...
...
src/Compound.cpp
View file @
aec60829
...
@@ -193,7 +193,7 @@ Compound::Compound(cif::Datablock &db, const std::string &id, const std::string
...
@@ -193,7 +193,7 @@ Compound::Compound(cif::Datablock &db, const std::string &id, const std::string
bond
.
type
=
BondType
::
delo
;
bond
.
type
=
BondType
::
delo
;
else
else
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Unimplemented chem_comp_bond.type "
<<
btype
<<
" in "
<<
id
<<
std
::
endl
;
std
::
cerr
<<
"Unimplemented chem_comp_bond.type "
<<
btype
<<
" in "
<<
id
<<
std
::
endl
;
bond
.
type
=
BondType
::
sing
;
bond
.
type
=
BondType
::
sing
;
}
}
...
@@ -520,7 +520,7 @@ Compound *CCDCompoundFactoryImpl::create(const std::string &id)
...
@@ -520,7 +520,7 @@ Compound *CCDCompoundFactoryImpl::create(const std::string &id)
}
}
}
}
if
(
result
==
nullptr
and
cif
::
VERBOSE
)
if
(
result
==
nullptr
and
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Could not locate compound "
<<
id
<<
" in the CCD components file"
<<
std
::
endl
;
std
::
cerr
<<
"Could not locate compound "
<<
id
<<
" in the CCD components file"
<<
std
::
endl
;
return
result
;
return
result
;
...
@@ -645,13 +645,13 @@ CompoundFactory::CompoundFactory()
...
@@ -645,13 +645,13 @@ CompoundFactory::CompoundFactory()
auto
ccd
=
cif
::
loadResource
(
"components.cif"
);
auto
ccd
=
cif
::
loadResource
(
"components.cif"
);
if
(
ccd
)
if
(
ccd
)
mImpl
.
reset
(
new
CCDCompoundFactoryImpl
(
mImpl
));
mImpl
.
reset
(
new
CCDCompoundFactoryImpl
(
mImpl
));
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"CCD components.cif file was not found"
<<
std
::
endl
;
std
::
cerr
<<
"CCD components.cif file was not found"
<<
std
::
endl
;
const
char
*
clibd_mon
=
getenv
(
"CLIBD_MON"
);
const
char
*
clibd_mon
=
getenv
(
"CLIBD_MON"
);
if
(
clibd_mon
!=
nullptr
and
fs
::
is_directory
(
clibd_mon
))
if
(
clibd_mon
!=
nullptr
and
fs
::
is_directory
(
clibd_mon
))
mImpl
.
reset
(
new
CCP4CompoundFactoryImpl
(
clibd_mon
));
mImpl
.
reset
(
new
CCP4CompoundFactoryImpl
(
clibd_mon
));
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"CCP4 monomers library not found, CLIBD_MON is not defined"
<<
std
::
endl
;
std
::
cerr
<<
"CCP4 monomers library not found, CLIBD_MON is not defined"
<<
std
::
endl
;
}
}
...
@@ -695,7 +695,8 @@ void CompoundFactory::setDefaultDictionary(const std::filesystem::path &inDictFi
...
@@ -695,7 +695,8 @@ void CompoundFactory::setDefaultDictionary(const std::filesystem::path &inDictFi
}
}
catch
(
const
std
::
exception
&
)
catch
(
const
std
::
exception
&
)
{
{
std
::
cerr
<<
"Error loading dictionary "
<<
inDictFile
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Error loading dictionary "
<<
inDictFile
<<
std
::
endl
;
throw
;
throw
;
}
}
}
}
...
@@ -715,7 +716,8 @@ void CompoundFactory::pushDictionary(const std::filesystem::path &inDictFile)
...
@@ -715,7 +716,8 @@ void CompoundFactory::pushDictionary(const std::filesystem::path &inDictFile)
}
}
catch
(
const
std
::
exception
&
)
catch
(
const
std
::
exception
&
)
{
{
std
::
cerr
<<
"Error loading dictionary "
<<
inDictFile
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Error loading dictionary "
<<
inDictFile
<<
std
::
endl
;
throw
;
throw
;
}
}
}
}
...
...
src/PDB2Cif.cpp
View file @
aec60829
...
@@ -268,7 +268,8 @@ int PDBRecord::vI(int columnFirst, int columnLast)
...
@@ -268,7 +268,8 @@ int PDBRecord::vI(int columnFirst, int columnLast)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Trying to parse '"
<<
std
::
string
(
mValue
+
columnFirst
-
7
,
mValue
+
columnLast
-
7
)
<<
'\''
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Trying to parse '"
<<
std
::
string
(
mValue
+
columnFirst
-
7
,
mValue
+
columnLast
-
7
)
<<
'\''
<<
std
::
endl
;
throw
;
throw
;
}
}
...
@@ -337,7 +338,7 @@ std::tuple<std::string, std::string> SpecificationListParser::GetNextSpecificati
...
@@ -337,7 +338,7 @@ std::tuple<std::string, std::string> SpecificationListParser::GetNextSpecificati
}
}
else
if
(
not
isspace
(
ch
))
else
if
(
not
isspace
(
ch
))
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"skipping invalid character in SOURCE ID: "
<<
ch
<<
std
::
endl
;
std
::
cerr
<<
"skipping invalid character in SOURCE ID: "
<<
ch
<<
std
::
endl
;
}
}
break
;
break
;
...
@@ -354,7 +355,7 @@ std::tuple<std::string, std::string> SpecificationListParser::GetNextSpecificati
...
@@ -354,7 +355,7 @@ std::tuple<std::string, std::string> SpecificationListParser::GetNextSpecificati
case
eColon
:
case
eColon
:
if
(
ch
==
';'
)
if
(
ch
==
';'
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Empty value for SOURCE: "
<<
id
<<
std
::
endl
;
std
::
cerr
<<
"Empty value for SOURCE: "
<<
id
<<
std
::
endl
;
state
=
eStart
;
state
=
eStart
;
}
}
...
@@ -418,7 +419,7 @@ std::tuple<std::string, std::string> SpecificationListParser::GetNextSpecificati
...
@@ -418,7 +419,7 @@ std::tuple<std::string, std::string> SpecificationListParser::GetNextSpecificati
case
eError
:
case
eError
:
if
(
ch
==
';'
)
if
(
ch
==
';'
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Skipping invalid header line: '"
<<
std
::
string
(
start
,
mP
)
<<
std
::
endl
;
std
::
cerr
<<
"Skipping invalid header line: '"
<<
std
::
string
(
start
,
mP
)
<<
std
::
endl
;
state
=
eStart
;
state
=
eStart
;
}
}
...
@@ -832,7 +833,7 @@ class PDBFileParser
...
@@ -832,7 +833,7 @@ class PDBFileParser
if
(
not
mChainSeq2AsymSeq
.
count
(
key
))
if
(
not
mChainSeq2AsymSeq
.
count
(
key
))
{
{
ec
=
error
::
make_error_code
(
error
::
pdbErrors
::
residueNotFound
);
ec
=
error
::
make_error_code
(
error
::
pdbErrors
::
residueNotFound
);
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Residue "
<<
chainID
<<
resSeq
<<
iCode
<<
" could not be mapped"
<<
std
::
endl
;
std
::
cerr
<<
"Residue "
<<
chainID
<<
resSeq
<<
iCode
<<
" could not be mapped"
<<
std
::
endl
;
}
}
else
else
...
@@ -929,7 +930,7 @@ class PDBFileParser
...
@@ -929,7 +930,7 @@ class PDBFileParser
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
ec
=
error
::
make_error_code
(
error
::
pdbErrors
::
invalidDate
);
ec
=
error
::
make_error_code
(
error
::
pdbErrors
::
invalidDate
);
}
}
...
@@ -1160,7 +1161,8 @@ void PDBFileParser::PreParseInput(std::istream &is)
...
@@ -1160,7 +1161,8 @@ void PDBFileParser::PreParseInput(std::istream &is)
if
(
is
.
eof
())
if
(
is
.
eof
())
break
;
break
;
std
::
cerr
<<
"Line number "
<<
lineNr
<<
" is empty!"
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Line number "
<<
lineNr
<<
" is empty!"
<<
std
::
endl
;
getline
(
is
,
lookahead
);
getline
(
is
,
lookahead
);
++
lineNr
;
++
lineNr
;
...
@@ -1278,7 +1280,8 @@ void PDBFileParser::PreParseInput(std::istream &is)
...
@@ -1278,7 +1280,8 @@ void PDBFileParser::PreParseInput(std::istream &is)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Dropping FORMUL line ("
<<
(
lineNr
-
1
)
<<
") with invalid component number '"
<<
value
.
substr
(
1
,
3
)
<<
'\''
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Dropping FORMUL line ("
<<
(
lineNr
-
1
)
<<
") with invalid component number '"
<<
value
.
substr
(
1
,
3
)
<<
'\''
<<
std
::
endl
;
continue
;
continue
;
// throw_with_nested(std::runtime_error("Invalid component number '" + value.substr(1, 3) + '\''));
// throw_with_nested(std::runtime_error("Invalid component number '" + value.substr(1, 3) + '\''));
}
}
...
@@ -1305,7 +1308,8 @@ void PDBFileParser::PreParseInput(std::istream &is)
...
@@ -1305,7 +1308,8 @@ void PDBFileParser::PreParseInput(std::istream &is)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Error parsing FORMUL at line "
<<
lineNr
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Error parsing FORMUL at line "
<<
lineNr
<<
std
::
endl
;
throw
;
throw
;
}
}
}
}
...
@@ -1412,7 +1416,8 @@ void PDBFileParser::PreParseInput(std::istream &is)
...
@@ -1412,7 +1416,8 @@ void PDBFileParser::PreParseInput(std::istream &is)
if
(
not
dropped
.
empty
())
if
(
not
dropped
.
empty
())
{
{
std
::
cerr
<<
"Dropped unsupported records: "
<<
ba
::
join
(
dropped
,
", "
)
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Dropped unsupported records: "
<<
ba
::
join
(
dropped
,
", "
)
<<
std
::
endl
;
}
}
if
(
mData
==
nullptr
)
if
(
mData
==
nullptr
)
...
@@ -1440,7 +1445,7 @@ void PDBFileParser::Match(const std::string &expected, bool throwIfMissing)
...
@@ -1440,7 +1445,7 @@ void PDBFileParser::Match(const std::string &expected, bool throwIfMissing)
{
{
if
(
throwIfMissing
)
if
(
throwIfMissing
)
throw
std
::
runtime_error
(
"Expected record "
+
expected
+
" but found "
+
mRec
->
mName
);
throw
std
::
runtime_error
(
"Expected record "
+
expected
+
" but found "
+
mRec
->
mName
);
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Expected record "
+
expected
+
" but found "
+
mRec
->
mName
<<
std
::
endl
;
std
::
cerr
<<
"Expected record "
+
expected
+
" but found "
+
mRec
->
mName
<<
std
::
endl
;
}
}
}
}
...
@@ -1575,7 +1580,8 @@ void PDBFileParser::ParseTitle()
...
@@ -1575,7 +1580,8 @@ void PDBFileParser::ParseTitle()
if
(
not
iequals
(
key
,
"MOL_ID"
)
and
mCompounds
.
empty
())
if
(
not
iequals
(
key
,
"MOL_ID"
)
and
mCompounds
.
empty
())
{
{
std
::
cerr
<<
"Ignoring invalid COMPND record"
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Ignoring invalid COMPND record"
<<
std
::
endl
;
break
;
break
;
}
}
...
@@ -1625,7 +1631,7 @@ void PDBFileParser::ParseTitle()
...
@@ -1625,7 +1631,7 @@ void PDBFileParser::ParseTitle()
// auto colon = s.find(": ");
// auto colon = s.find(": ");
// if (colon == std::string::npos)
// if (colon == std::string::npos)
// {
// {
// if (cif::VERBOSE)
// if (cif::VERBOSE
> 0
)
// std::cerr << "invalid source field, missing colon (" << s << ')' << std::endl;
// std::cerr << "invalid source field, missing colon (" << s << ')' << std::endl;
// continue;
// continue;
// }
// }
...
@@ -1713,7 +1719,7 @@ void PDBFileParser::ParseTitle()
...
@@ -1713,7 +1719,7 @@ void PDBFileParser::ParseTitle()
// NUMMDL
// NUMMDL
if
(
mRec
->
is
(
"NUMMDL"
))
if
(
mRec
->
is
(
"NUMMDL"
))
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"skipping unimplemented NUMMDL record"
<<
std
::
endl
;
std
::
cerr
<<
"skipping unimplemented NUMMDL record"
<<
std
::
endl
;
GetNextRecord
();
GetNextRecord
();
}
}
...
@@ -1816,7 +1822,7 @@ void PDBFileParser::ParseTitle()
...
@@ -1816,7 +1822,7 @@ void PDBFileParser::ParseTitle()
// SPRSDE
// SPRSDE
if
(
mRec
->
is
(
"SPRSDE"
))
if
(
mRec
->
is
(
"SPRSDE"
))
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"skipping unimplemented SPRSDE record"
<<
std
::
endl
;
std
::
cerr
<<
"skipping unimplemented SPRSDE record"
<<
std
::
endl
;
GetNextRecord
();
GetNextRecord
();
}
}
...
@@ -2265,7 +2271,7 @@ void PDBFileParser::ParseRemarks()
...
@@ -2265,7 +2271,7 @@ void PDBFileParser::ParseRemarks()
state
=
eMCP
;
state
=
eMCP
;
else
if
(
subtopic
==
"CHIRAL CENTERS"
)
else
if
(
subtopic
==
"CHIRAL CENTERS"
)
state
=
eChC
;
state
=
eChC
;
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
throw
std
::
runtime_error
(
"Unknown subtopic in REMARK 500: "
+
subtopic
);
throw
std
::
runtime_error
(
"Unknown subtopic in REMARK 500: "
+
subtopic
);
headerSeen
=
false
;
headerSeen
=
false
;
...
@@ -2342,7 +2348,7 @@ void PDBFileParser::ParseRemarks()
...
@@ -2342,7 +2348,7 @@ void PDBFileParser::ParseRemarks()
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Dropping REMARK 500 at line "
<<
mRec
->
mLineNr
<<
" due to invalid symmetry operation"
<<
std
::
endl
;
std
::
cerr
<<
"Dropping REMARK 500 at line "
<<
mRec
->
mLineNr
<<
" due to invalid symmetry operation"
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -2675,7 +2681,7 @@ void PDBFileParser::ParseRemarks()
...
@@ -2675,7 +2681,7 @@ void PDBFileParser::ParseRemarks()
case
sStart
:
case
sStart
:
if
(
s
==
"SITE"
)
if
(
s
==
"SITE"
)
state
=
sID
;
state
=
sID
;
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
throw
std
::
runtime_error
(
"Invalid REMARK 800 record, expected SITE"
);
throw
std
::
runtime_error
(
"Invalid REMARK 800 record, expected SITE"
);
break
;
break
;
...
@@ -2685,7 +2691,7 @@ void PDBFileParser::ParseRemarks()
...
@@ -2685,7 +2691,7 @@ void PDBFileParser::ParseRemarks()
id
=
m
[
1
].
str
();
id
=
m
[
1
].
str
();
state
=
sEvidence
;
state
=
sEvidence
;
}
}
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
throw
std
::
runtime_error
(
"Invalid REMARK 800 record, expected SITE_IDENTIFIER"
);
throw
std
::
runtime_error
(
"Invalid REMARK 800 record, expected SITE_IDENTIFIER"
);
break
;
break
;
...
@@ -2695,7 +2701,7 @@ void PDBFileParser::ParseRemarks()
...
@@ -2695,7 +2701,7 @@ void PDBFileParser::ParseRemarks()
evidence
=
m
[
1
].
str
();
evidence
=
m
[
1
].
str
();
state
=
sDesc
;
state
=
sDesc
;
}
}
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
throw
std
::
runtime_error
(
"Invalid REMARK 800 record, expected SITE_IDENTIFIER"
);
throw
std
::
runtime_error
(
"Invalid REMARK 800 record, expected SITE_IDENTIFIER"
);
break
;
break
;
...
@@ -2906,7 +2912,7 @@ void PDBFileParser::ParseRemark200()
...
@@ -2906,7 +2912,7 @@ void PDBFileParser::ParseRemark200()
collectionDate
=
pdb2cifDate
(
rm200
(
"DATE OF DATA COLLECTION"
,
diffrnNr
),
ec
);
collectionDate
=
pdb2cifDate
(
rm200
(
"DATE OF DATA COLLECTION"
,
diffrnNr
),
ec
);
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
ec
.
message
()
<<
" for pdbx_collection_date"
<<
std
::
endl
;
std
::
cerr
<<
ec
.
message
()
<<
" for pdbx_collection_date"
<<
std
::
endl
;
// The date field can become truncated when multiple values are available
// The date field can become truncated when multiple values are available
...
@@ -3025,7 +3031,7 @@ void PDBFileParser::ParseRemark200()
...
@@ -3025,7 +3031,7 @@ void PDBFileParser::ParseRemark200()
else
if
(
inRM200
({
"HIGHEST RESOLUTION SHELL, RANGE LOW (A)"
,
"COMPLETENESS FOR SHELL (%)"
,
else
if
(
inRM200
({
"HIGHEST RESOLUTION SHELL, RANGE LOW (A)"
,
"COMPLETENESS FOR SHELL (%)"
,
"R MERGE FOR SHELL (I)"
,
"R SYM FOR SHELL (I)"
,
"<I/SIGMA(I)> FOR SHELL"
,
"DATA REDUNDANCY IN SHELL"
}))
"R MERGE FOR SHELL (I)"
,
"R SYM FOR SHELL (I)"
,
"<I/SIGMA(I)> FOR SHELL"
,
"DATA REDUNDANCY IN SHELL"
}))
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Not writing reflns_shell record since d_res_high is missing"
<<
std
::
endl
;
std
::
cerr
<<
"Not writing reflns_shell record since d_res_high is missing"
<<
std
::
endl
;
}
}
}
}
...
@@ -3595,7 +3601,7 @@ void PDBFileParser::ConstructEntities()
...
@@ -3595,7 +3601,7 @@ void PDBFileParser::ConstructEntities()
{
{
auto
&
r
=
chain
.
mResiduesSeen
[
lastResidueIndex
+
1
];
auto
&
r
=
chain
.
mResiduesSeen
[
lastResidueIndex
+
1
];
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cerr
<<
"Detected residues that cannot be aligned to SEQRES"
<<
std
::
endl
std
::
cerr
<<
"Detected residues that cannot be aligned to SEQRES"
<<
std
::
endl
<<
"First residue is "
<<
chain
.
mDbref
.
chainID
<<
':'
<<
r
.
mSeqNum
<<
r
.
mIcode
<<
std
::
endl
;
<<
"First residue is "
<<
chain
.
mDbref
.
chainID
<<
':'
<<
r
.
mSeqNum
<<
r
.
mIcode
<<
std
::
endl
;
...
@@ -4005,7 +4011,7 @@ void PDBFileParser::ConstructEntities()
...
@@ -4005,7 +4011,7 @@ void PDBFileParser::ConstructEntities()
tie
(
asym
,
labelSeq
,
std
::
ignore
)
=
MapResidue
(
seqadv
.
chainID
,
seqadv
.
seqNum
,
seqadv
.
iCode
,
ec
);
tie
(
asym
,
labelSeq
,
std
::
ignore
)
=
MapResidue
(
seqadv
.
chainID
,
seqadv
.
seqNum
,
seqadv
.
iCode
,
ec
);
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"dropping unmatched SEQADV record"
<<
std
::
endl
;
std
::
cerr
<<
"dropping unmatched SEQADV record"
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -4319,7 +4325,7 @@ void PDBFileParser::ConstructEntities()
...
@@ -4319,7 +4325,7 @@ void PDBFileParser::ConstructEntities()
tie
(
asymID
,
seq
,
std
::
ignore
)
=
MapResidue
(
chainID
,
seqNum
,
iCode
,
ec
);
tie
(
asymID
,
seq
,
std
::
ignore
)
=
MapResidue
(
chainID
,
seqNum
,
iCode
,
ec
);
if
(
ec
)
// no need to write a modres if it could not be found
if
(
ec
)
// no need to write a modres if it could not be found
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"dropping unmapped MODRES record"
<<
std
::
endl
;
std
::
cerr
<<
"dropping unmapped MODRES record"
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -4415,7 +4421,7 @@ void PDBFileParser::ConstructEntities()
...
@@ -4415,7 +4421,7 @@ void PDBFileParser::ConstructEntities()
tie
(
asymID
,
seqNr
,
isPolymer
)
=
MapResidue
(
unobs
.
chain
,
unobs
.
seq
,
unobs
.
iCode
,
ec
);
tie
(
asymID
,
seqNr
,
isPolymer
)
=
MapResidue
(
unobs
.
chain
,
unobs
.
seq
,
unobs
.
iCode
,
ec
);
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"error mapping unobserved residue"
<<
std
::
endl
;
std
::
cerr
<<
"error mapping unobserved residue"
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -4676,7 +4682,7 @@ void PDBFileParser::ParseSecondaryStructure()
...
@@ -4676,7 +4682,7 @@ void PDBFileParser::ParseSecondaryStructure()
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Could not map residue for HELIX "
<<
vI
(
8
,
10
)
<<
std
::
endl
;
std
::
cerr
<<
"Could not map residue for HELIX "
<<
vI
(
8
,
10
)
<<
std
::
endl
;
}
}
else
else
...
@@ -4791,7 +4797,7 @@ void PDBFileParser::ParseSecondaryStructure()
...
@@ -4791,7 +4797,7 @@ void PDBFileParser::ParseSecondaryStructure()
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Dropping SHEET record "
<<
vI
(
8
,
10
)
<<
std
::
endl
;
std
::
cerr
<<
"Dropping SHEET record "
<<
vI
(
8
,
10
)
<<
std
::
endl
;
}
}
else
else
...
@@ -4827,7 +4833,7 @@ void PDBFileParser::ParseSecondaryStructure()
...
@@ -4827,7 +4833,7 @@ void PDBFileParser::ParseSecondaryStructure()
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"skipping unmatched pdbx_struct_sheet_hbond record"
<<
std
::
endl
;
std
::
cerr
<<
"skipping unmatched pdbx_struct_sheet_hbond record"
<<
std
::
endl
;
}
}
else
else
...
@@ -4927,7 +4933,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
...
@@ -4927,7 +4933,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Dropping SSBOND "
<<
vI
(
8
,
10
)
<<
std
::
endl
;
std
::
cerr
<<
"Dropping SSBOND "
<<
vI
(
8
,
10
)
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -4948,7 +4954,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
...
@@ -4948,7 +4954,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Dropping SSBOND "
<<
vI
(
8
,
10
)
<<
" due to invalid symmetry operation"
<<
std
::
endl
;
std
::
cerr
<<
"Dropping SSBOND "
<<
vI
(
8
,
10
)
<<
" due to invalid symmetry operation"
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -4993,7 +4999,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
...
@@ -4993,7 +4999,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
if
(
mRec
->
is
(
"LINK "
)
or
mRec
->
is
(
"LINKR "
))
if
(
mRec
->
is
(
"LINK "
)
or
mRec
->
is
(
"LINKR "
))
{
{
if
(
cif
::
VERBOSE
and
mRec
->
is
(
"LINKR "
))
if
(
cif
::
VERBOSE
>
0
and
mRec
->
is
(
"LINKR "
))
std
::
cerr
<<
"Accepting non-standard LINKR record, but ignoring extra information"
<<
std
::
endl
;
std
::
cerr
<<
"Accepting non-standard LINKR record, but ignoring extra information"
<<
std
::
endl
;
// 1 - 6 Record name "LINK "
// 1 - 6 Record name "LINK "
...
@@ -5046,7 +5052,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
...
@@ -5046,7 +5052,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Dropping LINK record at line "
<<
mRec
->
mLineNr
<<
std
::
endl
;
std
::
cerr
<<
"Dropping LINK record at line "
<<
mRec
->
mLineNr
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -5062,7 +5068,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
...
@@ -5062,7 +5068,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
}
}
catch
(
const
std
::
invalid_argument
&
)
catch
(
const
std
::
invalid_argument
&
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Distance value '"
<<
distance
<<
"' is not a valid float in LINK record"
<<
std
::
endl
;
std
::
cerr
<<
"Distance value '"
<<
distance
<<
"' is not a valid float in LINK record"
<<
std
::
endl
;
swap
(
ccp4LinkID
,
distance
);
// assume this is a ccp4_link_id... oh really?
swap
(
ccp4LinkID
,
distance
);
// assume this is a ccp4_link_id... oh really?
}
}
...
@@ -5078,7 +5084,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
...
@@ -5078,7 +5084,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Dropping LINK record at line "
<<
mRec
->
mLineNr
<<
" due to invalid symmetry operation"
<<
std
::
endl
;
std
::
cerr
<<
"Dropping LINK record at line "
<<
mRec
->
mLineNr
<<
" due to invalid symmetry operation"
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -5149,7 +5155,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
...
@@ -5149,7 +5155,7 @@ void PDBFileParser::ParseConnectivtyAnnotation()
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Dropping CISPEP record at line "
<<
mRec
->
mLineNr
<<
std
::
endl
;
std
::
cerr
<<
"Dropping CISPEP record at line "
<<
mRec
->
mLineNr
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -5215,7 +5221,7 @@ void PDBFileParser::ParseMiscellaneousFeatures()
...
@@ -5215,7 +5221,7 @@ void PDBFileParser::ParseMiscellaneousFeatures()
if
(
ec
)
if
(
ec
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"skipping struct_site_gen record"
<<
std
::
endl
;
std
::
cerr
<<
"skipping struct_site_gen record"
<<
std
::
endl
;
}
}
else
else
...
@@ -5518,7 +5524,7 @@ void PDBFileParser::ParseCoordinate(int modelNr)
...
@@ -5518,7 +5524,7 @@ void PDBFileParser::ParseCoordinate(int modelNr)
{
{
if
(
groupPDB
==
"HETATM"
)
if
(
groupPDB
==
"HETATM"
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Changing atom from HETATM to ATOM at line "
<<
mRec
->
mLineNr
<<
std
::
endl
;
std
::
cerr
<<
"Changing atom from HETATM to ATOM at line "
<<
mRec
->
mLineNr
<<
std
::
endl
;
groupPDB
=
"ATOM"
;
groupPDB
=
"ATOM"
;
}
}
...
@@ -5527,7 +5533,7 @@ void PDBFileParser::ParseCoordinate(int modelNr)
...
@@ -5527,7 +5533,7 @@ void PDBFileParser::ParseCoordinate(int modelNr)
{
{
if
(
groupPDB
==
"ATOM"
)
if
(
groupPDB
==
"ATOM"
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Changing atom from ATOM to HETATM at line "
<<
mRec
->
mLineNr
<<
std
::
endl
;
std
::
cerr
<<
"Changing atom from ATOM to HETATM at line "
<<
mRec
->
mLineNr
<<
std
::
endl
;
groupPDB
=
"HETATM"
;
groupPDB
=
"HETATM"
;
}
}
...
@@ -5698,7 +5704,8 @@ void PDBFileParser::Parse(std::istream &is, cif::File &result)
...
@@ -5698,7 +5704,8 @@ void PDBFileParser::Parse(std::istream &is, cif::File &result)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Error parsing REMARK 3"
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Error parsing REMARK 3"
<<
std
::
endl
;
throw
;
throw
;
}
}
//
//
...
@@ -5750,12 +5757,12 @@ void PDBFileParser::Parse(std::istream &is, cif::File &result)
...
@@ -5750,12 +5757,12 @@ void PDBFileParser::Parse(std::istream &is, cif::File &result)
if
((
symm1
.
empty
()
or
symm1
==
"1_555"
)
and
(
symm2
.
empty
()
or
symm2
==
"1_555"
))
if
((
symm1
.
empty
()
or
symm1
==
"1_555"
)
and
(
symm2
.
empty
()
or
symm2
==
"1_555"
))
distance
=
static_cast
<
float
>
(
mmcif
::
Distance
(
mmcif
::
Point
{
x1
,
y1
,
z1
},
mmcif
::
Point
{
x2
,
y2
,
z2
}));
distance
=
static_cast
<
float
>
(
mmcif
::
Distance
(
mmcif
::
Point
{
x1
,
y1
,
z1
},
mmcif
::
Point
{
x2
,
y2
,
z2
}));
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Cannot calculate distance for link since one of the atoms is in another dimension"
<<
std
::
endl
;
std
::
cerr
<<
"Cannot calculate distance for link since one of the atoms is in another dimension"
<<
std
::
endl
;
}
}
catch
(
std
::
exception
&
ex
)
catch
(
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Error finding atom for LINK distance calculation: "
<<
ex
.
what
()
<<
std
::
endl
;
std
::
cerr
<<
"Error finding atom for LINK distance calculation: "
<<
ex
.
what
()
<<
std
::
endl
;
}
}
...
@@ -5764,10 +5771,13 @@ void PDBFileParser::Parse(std::istream &is, cif::File &result)
...
@@ -5764,10 +5771,13 @@ void PDBFileParser::Parse(std::istream &is, cif::File &result)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Error parsing PDB"
;
if
(
cif
::
VERBOSE
>=
0
)
if
(
mRec
!=
nullptr
)
{
std
::
cerr
<<
" at line "
<<
mRec
->
mLineNr
;
std
::
cerr
<<
"Error parsing PDB"
;
std
::
cerr
<<
std
::
endl
;
if
(
mRec
!=
nullptr
)
std
::
cerr
<<
" at line "
<<
mRec
->
mLineNr
;
std
::
cerr
<<
std
::
endl
;
}
throw
;
throw
;
}
}
}
}
...
@@ -5947,7 +5957,7 @@ int PDBFileParser::PDBChain::AlignResToSeqRes()
...
@@ -5947,7 +5957,7 @@ int PDBFileParser::PDBChain::AlignResToSeqRes()
switch
(
tb
(
x
,
y
))
switch
(
tb
(
x
,
y
))
{
{
case
-
1
:
case
-
1
:
// if (cif::VERBOSE)
// if (cif::VERBOSE
> 0
)
// std::cerr << "A residue found in the ATOM records "
// std::cerr << "A residue found in the ATOM records "
// << "(" << ry[y].mMonID << " @ " << mDbref.chainID << ":" << ry[y].mSeqNum
// << "(" << ry[y].mMonID << " @ " << mDbref.chainID << ":" << ry[y].mSeqNum
// << ((ry[y].mIcode == ' ' or ry[y].mIcode == 0) ? "" : std::string{ ry[y].mIcode }) << ")"
// << ((ry[y].mIcode == ' ' or ry[y].mIcode == 0) ? "" : std::string{ ry[y].mIcode }) << ")"
...
@@ -6034,7 +6044,6 @@ void ReadPDBFile(std::istream &pdbFile, cif::File &cifFile)
...
@@ -6034,7 +6044,6 @@ void ReadPDBFile(std::istream &pdbFile, cif::File &cifFile)
p
.
Parse
(
pdbFile
,
cifFile
);
p
.
Parse
(
pdbFile
,
cifFile
);
if
(
not
cifFile
.
isValid
())
if
(
not
cifFile
.
isValid
()
and
cif
::
VERBOSE
>=
0
)
// throw std::runtime_error("Resulting mmCIF file is invalid");
std
::
cerr
<<
"Resulting mmCIF file is not valid!"
<<
std
::
endl
;
std
::
cerr
<<
"Resulting mmCIF file is not valid!"
<<
std
::
endl
;
}
}
src/PDB2CifRemark3.cpp
View file @
aec60829
...
@@ -1320,7 +1320,7 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
...
@@ -1320,7 +1320,7 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
if
(
line
!=
"REFINEMENT."
)
if
(
line
!=
"REFINEMENT."
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Unexpected data in REMARK 3"
<<
std
::
endl
;
std
::
cerr
<<
"Unexpected data in REMARK 3"
<<
std
::
endl
;
return
false
;
return
false
;
}
}
...
@@ -1332,7 +1332,7 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
...
@@ -1332,7 +1332,7 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
if
(
not
std
::
regex_match
(
line
,
m
,
rxp
))
if
(
not
std
::
regex_match
(
line
,
m
,
rxp
))
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Expected valid PROGRAM line in REMARK 3"
<<
std
::
endl
;
std
::
cerr
<<
"Expected valid PROGRAM line in REMARK 3"
<<
std
::
endl
;
return
false
;
return
false
;
}
}
...
@@ -1367,8 +1367,9 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
...
@@ -1367,8 +1367,9 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
}
}
catch
(
const
std
::
exception
&
e
)
catch
(
const
std
::
exception
&
e
)
{
{
std
::
cerr
<<
"Error parsing REMARK 3 with "
<<
parser
->
program
()
<<
std
::
endl
if
(
cif
::
VERBOSE
>=
0
)
<<
e
.
what
()
<<
'\n'
;
std
::
cerr
<<
"Error parsing REMARK 3 with "
<<
parser
->
program
()
<<
std
::
endl
<<
e
.
what
()
<<
'\n'
;
score
=
0
;
score
=
0
;
}
}
...
@@ -1411,7 +1412,7 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
...
@@ -1411,7 +1412,7 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
tryParser
(
new
TNT_Remark3Parser
(
program
,
expMethod
,
r
,
db
));
tryParser
(
new
TNT_Remark3Parser
(
program
,
expMethod
,
r
,
db
));
else
if
(
ba
::
starts_with
(
program
,
"X-PLOR"
))
else
if
(
ba
::
starts_with
(
program
,
"X-PLOR"
))
tryParser
(
new
XPLOR_Remark3Parser
(
program
,
expMethod
,
r
,
db
));
tryParser
(
new
XPLOR_Remark3Parser
(
program
,
expMethod
,
r
,
db
));
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Skipping unknown program ("
<<
program
<<
") in REMARK 3"
<<
std
::
endl
;
std
::
cerr
<<
"Skipping unknown program ("
<<
program
<<
") in REMARK 3"
<<
std
::
endl
;
}
}
...
@@ -1420,7 +1421,8 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
...
@@ -1420,7 +1421,8 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
bool
guessProgram
=
scores
.
empty
()
or
scores
.
front
().
score
<
0.9
f
;;
bool
guessProgram
=
scores
.
empty
()
or
scores
.
front
().
score
<
0.9
f
;;
if
(
guessProgram
)
if
(
guessProgram
)
{
{
std
::
cerr
<<
"Unknown or untrusted program in REMARK 3, trying all parsers to see if there is a match"
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Unknown or untrusted program in REMARK 3, trying all parsers to see if there is a match"
<<
std
::
endl
;
tryParser
(
new
BUSTER_TNT_Remark3Parser
(
"BUSTER-TNT"
,
expMethod
,
r
,
db
));
tryParser
(
new
BUSTER_TNT_Remark3Parser
(
"BUSTER-TNT"
,
expMethod
,
r
,
db
));
tryParser
(
new
CNS_Remark3Parser
(
"CNS"
,
expMethod
,
r
,
db
));
tryParser
(
new
CNS_Remark3Parser
(
"CNS"
,
expMethod
,
r
,
db
));
...
@@ -1444,7 +1446,7 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
...
@@ -1444,7 +1446,7 @@ bool Remark3Parser::parse(const std::string& expMethod, PDBRecord* r, cif::Datab
auto
&
best
=
scores
.
front
();
auto
&
best
=
scores
.
front
();
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Choosing "
<<
best
.
parser
->
program
()
<<
" version '"
<<
best
.
parser
->
version
()
<<
"' as refinement program. Score = "
<<
best
.
score
<<
std
::
endl
;
std
::
cerr
<<
"Choosing "
<<
best
.
parser
->
program
()
<<
" version '"
<<
best
.
parser
->
version
()
<<
"' as refinement program. Score = "
<<
best
.
score
<<
std
::
endl
;
auto
&
software
=
db
[
"software"
];
auto
&
software
=
db
[
"software"
];
...
...
src/Secondary.cpp
View file @
aec60829
...
@@ -1240,7 +1240,7 @@ void DSSPImpl::calculateSecondaryStructure()
...
@@ -1240,7 +1240,7 @@ void DSSPImpl::calculateSecondaryStructure()
auto
r1
=
findRes
(
asym1
,
seq1
);
auto
r1
=
findRes
(
asym1
,
seq1
);
if
(
r1
==
mResidues
.
end
())
if
(
r1
==
mResidues
.
end
())
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Missing (incomplete?) residue for SS bond when trying to find "
<<
asym1
<<
'/'
<<
seq1
<<
std
::
endl
;
std
::
cerr
<<
"Missing (incomplete?) residue for SS bond when trying to find "
<<
asym1
<<
'/'
<<
seq1
<<
std
::
endl
;
continue
;
continue
;
// throw std::runtime_error("Invalid file, missing residue for SS bond");
// throw std::runtime_error("Invalid file, missing residue for SS bond");
...
@@ -1249,7 +1249,7 @@ void DSSPImpl::calculateSecondaryStructure()
...
@@ -1249,7 +1249,7 @@ void DSSPImpl::calculateSecondaryStructure()
auto
r2
=
findRes
(
asym2
,
seq2
);
auto
r2
=
findRes
(
asym2
,
seq2
);
if
(
r2
==
mResidues
.
end
())
if
(
r2
==
mResidues
.
end
())
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Missing (incomplete?) residue for SS bond when trying to find "
<<
asym2
<<
'/'
<<
seq2
<<
std
::
endl
;
std
::
cerr
<<
"Missing (incomplete?) residue for SS bond when trying to find "
<<
asym2
<<
'/'
<<
seq2
<<
std
::
endl
;
continue
;
continue
;
// throw std::runtime_error("Invalid file, missing residue for SS bond");
// throw std::runtime_error("Invalid file, missing residue for SS bond");
...
@@ -1300,7 +1300,7 @@ void DSSPImpl::calculateSecondaryStructure()
...
@@ -1300,7 +1300,7 @@ void DSSPImpl::calculateSecondaryStructure()
{
{
if
(
a
==
b
)
if
(
a
==
b
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"In the SS bonds list, the residue "
<<
a
->
mM
<<
" is bonded to itself"
<<
std
::
endl
;
std
::
cerr
<<
"In the SS bonds list, the residue "
<<
a
->
mM
<<
" is bonded to itself"
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -1483,7 +1483,7 @@ SecondaryStructureType DSSP::operator()(const std::string &inAsymID, int inSeqID
...
@@ -1483,7 +1483,7 @@ SecondaryStructureType DSSP::operator()(const std::string &inAsymID, int inSeqID
{
return
r
.
mM
.
asymID
()
==
inAsymID
and
r
.
mM
.
seqID
()
==
inSeqID
;
});
{
return
r
.
mM
.
asymID
()
==
inAsymID
and
r
.
mM
.
seqID
()
==
inSeqID
;
});
if
(
i
!=
mImpl
->
mResidues
.
end
())
if
(
i
!=
mImpl
->
mResidues
.
end
())
result
=
i
->
mSecondaryStructure
;
result
=
i
->
mSecondaryStructure
;
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Could not find secondary structure for "
<<
inAsymID
<<
':'
<<
inSeqID
<<
std
::
endl
;
std
::
cerr
<<
"Could not find secondary structure for "
<<
inAsymID
<<
':'
<<
inSeqID
<<
std
::
endl
;
return
result
;
return
result
;
}
}
...
@@ -1501,7 +1501,7 @@ double DSSP::accessibility(const std::string &inAsymID, int inSeqID) const
...
@@ -1501,7 +1501,7 @@ double DSSP::accessibility(const std::string &inAsymID, int inSeqID) const
{
return
r
.
mM
.
asymID
()
==
inAsymID
and
r
.
mM
.
seqID
()
==
inSeqID
;
});
{
return
r
.
mM
.
asymID
()
==
inAsymID
and
r
.
mM
.
seqID
()
==
inSeqID
;
});
if
(
i
!=
mImpl
->
mResidues
.
end
())
if
(
i
!=
mImpl
->
mResidues
.
end
())
result
=
i
->
mSecondaryStructure
;
result
=
i
->
mSecondaryStructure
;
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Could not find secondary structure for "
<<
inAsymID
<<
':'
<<
inSeqID
<<
std
::
endl
;
std
::
cerr
<<
"Could not find secondary structure for "
<<
inAsymID
<<
':'
<<
inSeqID
<<
std
::
endl
;
return
result
;
return
result
;
}
}
...
@@ -1526,7 +1526,7 @@ bool DSSP::isAlphaHelixEndBeforeStart(const std::string &inAsymID, int inSeqID)
...
@@ -1526,7 +1526,7 @@ bool DSSP::isAlphaHelixEndBeforeStart(const std::string &inAsymID, int inSeqID)
if
(
i
!=
mImpl
->
mResidues
.
end
()
and
i
+
1
!=
mImpl
->
mResidues
.
end
())
if
(
i
!=
mImpl
->
mResidues
.
end
()
and
i
+
1
!=
mImpl
->
mResidues
.
end
())
result
=
i
->
GetHelixFlag
(
HelixType
::
rh_alpha
)
==
Helix
::
End
and
(
i
+
1
)
->
GetHelixFlag
(
HelixType
::
rh_alpha
)
==
Helix
::
Start
;
result
=
i
->
GetHelixFlag
(
HelixType
::
rh_alpha
)
==
Helix
::
End
and
(
i
+
1
)
->
GetHelixFlag
(
HelixType
::
rh_alpha
)
==
Helix
::
Start
;
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Could not find secondary structure for "
<<
inAsymID
<<
':'
<<
inSeqID
<<
std
::
endl
;
std
::
cerr
<<
"Could not find secondary structure for "
<<
inAsymID
<<
':'
<<
inSeqID
<<
std
::
endl
;
return
result
;
return
result
;
...
...
src/Structure.cpp
View file @
aec60829
...
@@ -140,14 +140,14 @@ void FileImpl::load(const std::filesystem::path &path)
...
@@ -140,14 +140,14 @@ void FileImpl::load(const std::filesystem::path &path)
{
{
try
try
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"unrecognized file extension, trying cif"
<<
std
::
endl
;
std
::
cerr
<<
"unrecognized file extension, trying cif"
<<
std
::
endl
;
mData
.
load
(
in
);
mData
.
load
(
in
);
}
}
catch
(
const
cif
::
CifParserError
&
e
)
catch
(
const
cif
::
CifParserError
&
e
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Not cif, trying plain old PDB"
<<
std
::
endl
;
std
::
cerr
<<
"Not cif, trying plain old PDB"
<<
std
::
endl
;
// pffft...
// pffft...
...
@@ -169,7 +169,8 @@ void FileImpl::load(const std::filesystem::path &path)
...
@@ -169,7 +169,8 @@ void FileImpl::load(const std::filesystem::path &path)
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"Error trying to load file "
<<
path
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Error trying to load file "
<<
path
<<
std
::
endl
;
throw
;
throw
;
}
}
...
@@ -317,7 +318,7 @@ const Compound &Atom::AtomImpl::comp() const
...
@@ -317,7 +318,7 @@ const Compound &Atom::AtomImpl::comp() const
mCompound
=
CompoundFactory
::
instance
().
create
(
compID
);
mCompound
=
CompoundFactory
::
instance
().
create
(
compID
);
if
(
cif
::
VERBOSE
and
mCompound
==
nullptr
)
if
(
cif
::
VERBOSE
>
0
and
mCompound
==
nullptr
)
std
::
cerr
<<
"Compound not found: '"
<<
compID
<<
'\''
<<
std
::
endl
;
std
::
cerr
<<
"Compound not found: '"
<<
compID
<<
'\''
<<
std
::
endl
;
}
}
...
@@ -623,7 +624,7 @@ AtomView Residue::unique_atoms() const
...
@@ -623,7 +624,7 @@ AtomView Residue::unique_atoms() const
firstAlt
=
alt
;
firstAlt
=
alt
;
else
if
(
alt
!=
firstAlt
)
else
if
(
alt
!=
firstAlt
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"skipping alternate atom "
<<
atom
<<
std
::
endl
;
std
::
cerr
<<
"skipping alternate atom "
<<
atom
<<
std
::
endl
;
continue
;
continue
;
}
}
...
@@ -829,7 +830,7 @@ float Monomer::phi() const
...
@@ -829,7 +830,7 @@ float Monomer::phi() const
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
}
}
...
@@ -851,7 +852,7 @@ float Monomer::psi() const
...
@@ -851,7 +852,7 @@ float Monomer::psi() const
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
}
}
...
@@ -875,7 +876,7 @@ float Monomer::alpha() const
...
@@ -875,7 +876,7 @@ float Monomer::alpha() const
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
std
::
cerr
<<
ex
.
what
()
<<
std
::
endl
;
}
}
...
@@ -903,7 +904,7 @@ float Monomer::kappa() const
...
@@ -903,7 +904,7 @@ float Monomer::kappa() const
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"When trying to calculate kappa for "
<<
asymID
()
<<
':'
<<
seqID
()
<<
": "
std
::
cerr
<<
"When trying to calculate kappa for "
<<
asymID
()
<<
':'
<<
seqID
()
<<
": "
<<
ex
.
what
()
<<
std
::
endl
;
<<
ex
.
what
()
<<
std
::
endl
;
}
}
...
@@ -926,7 +927,7 @@ float Monomer::tco() const
...
@@ -926,7 +927,7 @@ float Monomer::tco() const
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"When trying to calculate tco for "
<<
asymID
()
<<
':'
<<
seqID
()
<<
": "
std
::
cerr
<<
"When trying to calculate tco for "
<<
asymID
()
<<
':'
<<
seqID
()
<<
": "
<<
ex
.
what
()
<<
std
::
endl
;
<<
ex
.
what
()
<<
std
::
endl
;
}
}
...
@@ -945,7 +946,7 @@ float Monomer::omega() const
...
@@ -945,7 +946,7 @@ float Monomer::omega() const
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"When trying to calculate omega for "
<<
asymID
()
<<
':'
<<
seqID
()
<<
": "
std
::
cerr
<<
"When trying to calculate omega for "
<<
asymID
()
<<
':'
<<
seqID
()
<<
": "
<<
ex
.
what
()
<<
std
::
endl
;
<<
ex
.
what
()
<<
std
::
endl
;
}
}
...
@@ -1016,7 +1017,7 @@ float Monomer::chi(size_t nr) const
...
@@ -1016,7 +1017,7 @@ float Monomer::chi(size_t nr) const
}
}
catch
(
const
std
::
exception
&
e
)
catch
(
const
std
::
exception
&
e
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
e
.
what
()
<<
std
::
endl
;
std
::
cerr
<<
e
.
what
()
<<
std
::
endl
;
result
=
0
;
result
=
0
;
}
}
...
@@ -1182,7 +1183,7 @@ Polymer::Polymer(const Structure &s, const std::string &entityID, const std::str
...
@@ -1182,7 +1183,7 @@ Polymer::Polymer(const Structure &s, const std::string &entityID, const std::str
ix
[
seqID
]
=
index
;
ix
[
seqID
]
=
index
;
emplace_back
(
*
this
,
index
,
seqID
,
authSeqID
,
compoundID
);
emplace_back
(
*
this
,
index
,
seqID
,
authSeqID
,
compoundID
);
}
}
else
if
(
cif
::
VERBOSE
)
else
if
(
cif
::
VERBOSE
>
0
)
{
{
Monomer
m
{
*
this
,
index
,
seqID
,
authSeqID
,
compoundID
};
Monomer
m
{
*
this
,
index
,
seqID
,
authSeqID
,
compoundID
};
std
::
cerr
<<
"Dropping alternate residue "
<<
m
<<
std
::
endl
;
std
::
cerr
<<
"Dropping alternate residue "
<<
m
<<
std
::
endl
;
...
@@ -1327,7 +1328,7 @@ Structure::Structure(File &f, size_t modelNr, StructureOpenOptions options)
...
@@ -1327,7 +1328,7 @@ Structure::Structure(File &f, size_t modelNr, StructureOpenOptions options)
cif
::
tie
(
model_nr
)
=
atomCat
.
front
().
get
(
"pdbx_PDB_model_num"
);
cif
::
tie
(
model_nr
)
=
atomCat
.
front
().
get
(
"pdbx_PDB_model_num"
);
if
(
model_nr
and
*
model_nr
!=
mModelNr
)
if
(
model_nr
and
*
model_nr
!=
mModelNr
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"No atoms loaded for model 1, trying model "
<<
*
model_nr
<<
std
::
endl
;
std
::
cerr
<<
"No atoms loaded for model 1, trying model "
<<
*
model_nr
<<
std
::
endl
;
mModelNr
=
*
model_nr
;
mModelNr
=
*
model_nr
;
loadAtomsForModel
(
options
);
loadAtomsForModel
(
options
);
...
@@ -1335,7 +1336,10 @@ Structure::Structure(File &f, size_t modelNr, StructureOpenOptions options)
...
@@ -1335,7 +1336,10 @@ Structure::Structure(File &f, size_t modelNr, StructureOpenOptions options)
}
}
if
(
mAtoms
.
empty
())
if
(
mAtoms
.
empty
())
std
::
cerr
<<
"Warning: no atoms loaded"
<<
std
::
endl
;
{
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Warning: no atoms loaded"
<<
std
::
endl
;
}
else
else
loadData
();
loadData
();
}
}
...
@@ -1443,7 +1447,7 @@ void Structure::loadData()
...
@@ -1443,7 +1447,7 @@ void Structure::loadData()
if
(
ri
==
resMap
.
end
())
if
(
ri
==
resMap
.
end
())
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Missing residue for atom "
<<
atom
<<
std
::
endl
;
std
::
cerr
<<
"Missing residue for atom "
<<
atom
<<
std
::
endl
;
assert
(
false
);
assert
(
false
);
...
@@ -2006,7 +2010,8 @@ void Structure::changeResidue(Residue &res, const std::string &newCompound,
...
@@ -2006,7 +2010,8 @@ void Structure::changeResidue(Residue &res, const std::string &newCompound,
{
return
a
.
labelAtomID
()
==
a1
;
});
{
return
a
.
labelAtomID
()
==
a1
;
});
if
(
i
==
atoms
.
end
())
if
(
i
==
atoms
.
end
())
{
{
std
::
cerr
<<
"Missing atom for atom ID "
<<
a1
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"Missing atom for atom ID "
<<
a1
<<
std
::
endl
;
continue
;
continue
;
}
}
...
...
src/TlsParser.cpp
View file @
aec60829
...
@@ -248,7 +248,7 @@ struct TLSSelectionNot : public TLSSelection
...
@@ -248,7 +248,7 @@ struct TLSSelectionNot : public TLSSelection
for
(
auto
&
r
:
residues
)
for
(
auto
&
r
:
residues
)
r
.
selected
=
not
r
.
selected
;
r
.
selected
=
not
r
.
selected
;
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"NOT"
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"NOT"
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -267,7 +267,7 @@ struct TLSSelectionAll : public TLSSelection
...
@@ -267,7 +267,7 @@ struct TLSSelectionAll : public TLSSelection
for
(
auto
&
r
:
residues
)
for
(
auto
&
r
:
residues
)
r
.
selected
=
true
;
r
.
selected
=
true
;
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"ALL"
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"ALL"
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -287,7 +287,7 @@ struct TLSSelectionChain : public TLSSelectionAll
...
@@ -287,7 +287,7 @@ struct TLSSelectionChain : public TLSSelectionAll
for
(
auto
&
r
:
residues
)
for
(
auto
&
r
:
residues
)
r
.
selected
=
allChains
or
r
.
chainID
==
m_chain
;
r
.
selected
=
allChains
or
r
.
chainID
==
m_chain
;
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"CHAIN "
<<
m_chain
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"CHAIN "
<<
m_chain
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -307,7 +307,7 @@ struct TLSSelectionResID : public TLSSelectionAll
...
@@ -307,7 +307,7 @@ struct TLSSelectionResID : public TLSSelectionAll
for
(
auto
&
r
:
residues
)
for
(
auto
&
r
:
residues
)
r
.
selected
=
r
.
seqNr
==
m_seq_nr
and
r
.
iCode
==
m_icode
;
r
.
selected
=
r
.
seqNr
==
m_seq_nr
and
r
.
iCode
==
m_icode
;
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"ResID "
<<
m_seq_nr
<<
(
m_icode
?
std
::
string
{
m_icode
}
:
""
)
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"ResID "
<<
m_seq_nr
<<
(
m_icode
?
std
::
string
{
m_icode
}
:
""
)
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -331,7 +331,7 @@ struct TLSSelectionRangeSeq : public TLSSelectionAll
...
@@ -331,7 +331,7 @@ struct TLSSelectionRangeSeq : public TLSSelectionAll
(
r
.
seqNr
<=
m_last
or
m_last
==
kResidueNrWildcard
));
(
r
.
seqNr
<=
m_last
or
m_last
==
kResidueNrWildcard
));
}
}
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Range "
<<
m_first
<<
':'
<<
m_last
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Range "
<<
m_first
<<
':'
<<
m_last
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -374,7 +374,7 @@ struct TLSSelectionRangeID : public TLSSelectionAll
...
@@ -374,7 +374,7 @@ struct TLSSelectionRangeID : public TLSSelectionAll
}
}
}
}
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Through "
<<
m_first
<<
':'
<<
m_last
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Through "
<<
m_first
<<
':'
<<
m_last
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -407,7 +407,7 @@ struct TLSSelectionUnion : public TLSSelection
...
@@ -407,7 +407,7 @@ struct TLSSelectionUnion : public TLSSelection
for
(
auto
ai
=
a
.
begin
(),
bi
=
b
.
begin
(),
ri
=
residues
.
begin
();
ri
!=
residues
.
end
();
++
ai
,
++
bi
,
++
ri
)
for
(
auto
ai
=
a
.
begin
(),
bi
=
b
.
begin
(),
ri
=
residues
.
begin
();
ri
!=
residues
.
end
();
++
ai
,
++
bi
,
++
ri
)
ri
->
selected
=
ai
->
selected
or
bi
->
selected
;
ri
->
selected
=
ai
->
selected
or
bi
->
selected
;
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Union"
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Union"
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -440,7 +440,7 @@ struct TLSSelectionIntersection : public TLSSelection
...
@@ -440,7 +440,7 @@ struct TLSSelectionIntersection : public TLSSelection
for
(
auto
ai
=
a
.
begin
(),
bi
=
b
.
begin
(),
ri
=
residues
.
begin
();
ri
!=
residues
.
end
();
++
ai
,
++
bi
,
++
ri
)
for
(
auto
ai
=
a
.
begin
(),
bi
=
b
.
begin
(),
ri
=
residues
.
begin
();
ri
!=
residues
.
end
();
++
ai
,
++
bi
,
++
ri
)
ri
->
selected
=
ai
->
selected
and
bi
->
selected
;
ri
->
selected
=
ai
->
selected
and
bi
->
selected
;
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Intersection"
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Intersection"
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -462,7 +462,7 @@ struct TLSSelectionByName : public TLSSelectionAll
...
@@ -462,7 +462,7 @@ struct TLSSelectionByName : public TLSSelectionAll
for
(
auto
&
r
:
residues
)
for
(
auto
&
r
:
residues
)
r
.
selected
=
r
.
name
==
m_name
;
r
.
selected
=
r
.
name
==
m_name
;
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Name "
<<
m_name
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Name "
<<
m_name
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -488,7 +488,7 @@ struct TLSSelectionByElement : public TLSSelectionAll
...
@@ -488,7 +488,7 @@ struct TLSSelectionByElement : public TLSSelectionAll
for
(
auto
&
r
:
residues
)
for
(
auto
&
r
:
residues
)
r
.
selected
=
iequals
(
r
.
name
,
m_element
);
r
.
selected
=
iequals
(
r
.
name
,
m_element
);
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
{
{
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Element "
<<
m_element
<<
std
::
endl
;
std
::
cout
<<
std
::
string
(
indentLevel
*
2
,
' '
)
<<
"Element "
<<
m_element
<<
std
::
endl
;
DumpSelection
(
residues
,
indentLevel
);
DumpSelection
(
residues
,
indentLevel
);
...
@@ -890,7 +890,7 @@ TLSSelectionPtr TLSSelectionParserImplPhenix::Parse()
...
@@ -890,7 +890,7 @@ TLSSelectionPtr TLSSelectionParserImplPhenix::Parse()
Match
(
pt_EOLN
);
Match
(
pt_EOLN
);
if
(
extraParenthesis
)
if
(
extraParenthesis
and
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"WARNING: too many closing parenthesis in TLS selection statement"
<<
std
::
endl
;
std
::
cerr
<<
"WARNING: too many closing parenthesis in TLS selection statement"
<<
std
::
endl
;
return
result
;
return
result
;
...
@@ -931,7 +931,7 @@ TLSSelectionPtr TLSSelectionParserImplPhenix::ParseFactor()
...
@@ -931,7 +931,7 @@ TLSSelectionPtr TLSSelectionParserImplPhenix::ParseFactor()
case
'('
:
case
'('
:
Match
(
'('
);
Match
(
'('
);
result
=
ParseAtomSelection
();
result
=
ParseAtomSelection
();
if
(
m_lookahead
==
pt_EOLN
)
if
(
m_lookahead
==
pt_EOLN
and
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"WARNING: missing closing parenthesis in TLS selection statement"
<<
std
::
endl
;
std
::
cerr
<<
"WARNING: missing closing parenthesis in TLS selection statement"
<<
std
::
endl
;
else
else
Match
(
')'
);
Match
(
')'
);
...
@@ -1033,7 +1033,7 @@ TLSSelectionPtr TLSSelectionParserImplPhenix::ParseFactor()
...
@@ -1033,7 +1033,7 @@ TLSSelectionPtr TLSSelectionParserImplPhenix::ParseFactor()
result
.
reset
(
new
TLSSelectionRangeID
(
from
,
to
,
icode_from
,
icode_to
));
result
.
reset
(
new
TLSSelectionRangeID
(
from
,
to
,
icode_from
,
icode_to
));
else
else
{
{
if
(
cif
::
VERBOSE
and
(
icode_from
or
icode_to
))
if
(
cif
::
VERBOSE
>
0
and
(
icode_from
or
icode_to
))
std
::
cerr
<<
"Warning, ignoring insertion codes"
<<
std
::
endl
;
std
::
cerr
<<
"Warning, ignoring insertion codes"
<<
std
::
endl
;
result
.
reset
(
new
TLSSelectionRangeSeq
(
from
,
to
));
result
.
reset
(
new
TLSSelectionRangeSeq
(
from
,
to
));
...
@@ -1231,7 +1231,8 @@ TLSSelectionPtr TLSSelectionParserImplBuster::ParseGroup()
...
@@ -1231,7 +1231,8 @@ TLSSelectionPtr TLSSelectionParserImplBuster::ParseGroup()
std
::
tie
(
chain2
,
seqNr2
)
=
ParseAtom
();
std
::
tie
(
chain2
,
seqNr2
)
=
ParseAtom
();
if
(
chain1
!=
chain2
)
if
(
chain1
!=
chain2
)
{
{
std
::
cerr
<<
"Warning, ranges over multiple chains detected"
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Warning, ranges over multiple chains detected"
<<
std
::
endl
;
TLSSelectionPtr
sc1
(
new
TLSSelectionChain
(
chain1
));
TLSSelectionPtr
sc1
(
new
TLSSelectionChain
(
chain1
));
TLSSelectionPtr
sr1
(
new
TLSSelectionRangeSeq
(
seqNr1
,
kResidueNrWildcard
));
TLSSelectionPtr
sr1
(
new
TLSSelectionRangeSeq
(
seqNr1
,
kResidueNrWildcard
));
...
@@ -1289,7 +1290,7 @@ std::tuple<std::string,int> TLSSelectionParserImplBuster::ParseAtom()
...
@@ -1289,7 +1290,7 @@ std::tuple<std::string,int> TLSSelectionParserImplBuster::ParseAtom()
Match
(
':'
);
Match
(
':'
);
std
::
string
atom
=
m_value_s
;
std
::
string
atom
=
m_value_s
;
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Warning: ignoring atom ID '"
<<
atom
<<
"' in TLS selection"
<<
std
::
endl
;
std
::
cerr
<<
"Warning: ignoring atom ID '"
<<
atom
<<
"' in TLS selection"
<<
std
::
endl
;
Match
(
bt_IDENT
);
Match
(
bt_IDENT
);
...
@@ -1810,7 +1811,8 @@ class TLSSelectionParser
...
@@ -1810,7 +1811,8 @@ class TLSSelectionParser
}
}
catch
(
const
std
::
exception
&
ex
)
catch
(
const
std
::
exception
&
ex
)
{
{
std
::
cerr
<<
"ParseError: "
<<
ex
.
what
()
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>=
0
)
std
::
cerr
<<
"ParseError: "
<<
ex
.
what
()
<<
std
::
endl
;
}
}
return
result
;
return
result
;
...
@@ -1834,14 +1836,14 @@ TLSSelectionPtr ParseSelectionDetails(const std::string& program, const std::str
...
@@ -1834,14 +1836,14 @@ TLSSelectionPtr ParseSelectionDetails(const std::string& program, const std::str
if
(
not
result
)
if
(
not
result
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Falling back to old BUSTER"
<<
std
::
endl
;
std
::
cerr
<<
"Falling back to old BUSTER"
<<
std
::
endl
;
result
=
busterOld
.
Parse
(
selection
);
result
=
busterOld
.
Parse
(
selection
);
}
}
if
(
not
result
)
if
(
not
result
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Falling back to PHENIX"
<<
std
::
endl
;
std
::
cerr
<<
"Falling back to PHENIX"
<<
std
::
endl
;
result
=
phenix
.
Parse
(
selection
);
result
=
phenix
.
Parse
(
selection
);
}
}
...
@@ -1852,35 +1854,35 @@ TLSSelectionPtr ParseSelectionDetails(const std::string& program, const std::str
...
@@ -1852,35 +1854,35 @@ TLSSelectionPtr ParseSelectionDetails(const std::string& program, const std::str
if
(
not
result
)
if
(
not
result
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Falling back to BUSTER"
<<
std
::
endl
;
std
::
cerr
<<
"Falling back to BUSTER"
<<
std
::
endl
;
result
=
buster
.
Parse
(
selection
);
result
=
buster
.
Parse
(
selection
);
}
}
if
(
not
result
)
if
(
not
result
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Falling back to old BUSTER"
<<
std
::
endl
;
std
::
cerr
<<
"Falling back to old BUSTER"
<<
std
::
endl
;
result
=
busterOld
.
Parse
(
selection
);
result
=
busterOld
.
Parse
(
selection
);
}
}
}
}
else
else
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"No known program specified, trying PHENIX"
<<
std
::
endl
;
std
::
cerr
<<
"No known program specified, trying PHENIX"
<<
std
::
endl
;
result
=
phenix
.
Parse
(
selection
);
result
=
phenix
.
Parse
(
selection
);
if
(
not
result
)
if
(
not
result
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Falling back to BUSTER"
<<
std
::
endl
;
std
::
cerr
<<
"Falling back to BUSTER"
<<
std
::
endl
;
result
=
buster
.
Parse
(
selection
);
result
=
buster
.
Parse
(
selection
);
}
}
if
(
not
result
)
if
(
not
result
)
{
{
if
(
cif
::
VERBOSE
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Falling back to old BUSTER"
<<
std
::
endl
;
std
::
cerr
<<
"Falling back to old BUSTER"
<<
std
::
endl
;
result
=
busterOld
.
Parse
(
selection
);
result
=
busterOld
.
Parse
(
selection
);
}
}
...
...
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