Commit a265b970 by maarten

minder strikte kolom check

git-svn-id: svn+ssh://gitlab/srv/svn-repos/pdb-redo/trunk@369 a1961a4f-ab94-4bcc-80e8-33b5a54de466
parent fa7a0de6
...@@ -1162,14 +1162,11 @@ size_t Category::getColumnIndex(const string& name) const ...@@ -1162,14 +1162,11 @@ size_t Category::getColumnIndex(const string& name) const
break; break;
} }
if (result == mColumns.size() and mCatValidator != nullptr) // validate the name, if it is known at all (since it was not found) if (VERBOSE 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)
{ cerr << "Invalid name used '" + name + "' is not a known column in " + mName << endl;
assert(false);
throw logic_error("Invalid name used? " + name + " is not a known column in " + mName);
}
} }
return result; return result;
......
...@@ -1345,8 +1345,6 @@ bool Remark3Parser::parse(const string& expMethod, PDBRecord* r, cif::Datablock& ...@@ -1345,8 +1345,6 @@ bool Remark3Parser::parse(const string& expMethod, PDBRecord* r, cif::Datablock&
{ {
string program(p->begin(), p->end()); string program(p->begin(), p->end());
unique_ptr<Remark3Parser> parser;
if (ba::starts_with(program, "BUSTER")) if (ba::starts_with(program, "BUSTER"))
tryParser(new BUSTER_TNT_Remark3Parser(program, expMethod, r, db)); tryParser(new BUSTER_TNT_Remark3Parser(program, expMethod, r, db));
else if (ba::starts_with(program, "CNS") or ba::starts_with(program, "CNX")) else if (ba::starts_with(program, "CNS") or ba::starts_with(program, "CNX"))
...@@ -1373,6 +1371,28 @@ bool Remark3Parser::parse(const string& expMethod, PDBRecord* r, cif::Datablock& ...@@ -1373,6 +1371,28 @@ bool Remark3Parser::parse(const string& expMethod, PDBRecord* r, cif::Datablock&
cerr << "Skipping unknown program (" << program << ") in REMARK 3" << endl; cerr << "Skipping unknown program (" << program << ") in REMARK 3" << endl;
} }
if (scores.empty())
{
cerr << "Unknown program in REMARK 3, trying all parsers to see if there is a match" << endl;
for (auto p = make_split_iterator(line, ba::first_finder(", "));
not p.eof(); ++p)
{
string program(p->begin(), p->end());
tryParser(new BUSTER_TNT_Remark3Parser(program, expMethod, r, db));
tryParser(new CNS_Remark3Parser(program, expMethod, r, db));
tryParser(new PHENIX_Remark3Parser(program, expMethod, r, db));
tryParser(new NUCLSQ_Remark3Parser(program, expMethod, r, db));
tryParser(new PROLSQ_Remark3Parser(program, expMethod, r, db));
tryParser(new REFMAC_Remark3Parser(program, expMethod, r, db));
tryParser(new REFMAC5_Remark3Parser(program, expMethod, r, db));
tryParser(new SHELXL_Remark3Parser(program, expMethod, r, db));
tryParser(new TNT_Remark3Parser(program, expMethod, r, db));
tryParser(new XPLOR_Remark3Parser(program, expMethod, r, db));
}
}
bool result = false; bool result = false;
if (not scores.empty()) if (not scores.empty())
......
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