Commit 958d1fb3 by maarten

round trip fidelity

git-svn-id: svn+ssh://gitlab/srv/svn-repos/pdb-redo/trunk@365 a1961a4f-ab94-4bcc-80e8-33b5a54de466
parent 28620841
......@@ -1883,7 +1883,7 @@ void WriteRemark3NuclSQ(ostream& pdbFile, Datablock& db)
<< RM3("") << endl
<< RM3(" FIT/AGREEMENT OF MODEL WITH ALL DATA.") << endl
<< RM3(" R VALUE (WORKING + TEST SET, NO CUTOFF) : ") << Fs(pdbx_refine, "R_factor_all_no_cutoff") << endl
<< RM3(" R VALUE (WORKING + TEST SET, NO CUTOFF) : ") << Fs(refine, "ls_R_factor_all") << endl
<< RM3(" R VALUE (WORKING SET, NO CUTOFF) : ") << Fs(pdbx_refine, "R_factor_obs_no_cutoff") << endl
<< RM3(" FREE R VALUE (NO CUTOFF) : ") << Fs(pdbx_refine, "free_R_factor_no_cutoff") << endl
......@@ -1901,7 +1901,7 @@ void WriteRemark3NuclSQ(ostream& pdbFile, Datablock& db)
<< RM3("") << endl
<< RM3(" B VALUES.") << endl
<< RM3(" B VALUE TYPE : ", 7, 2) << Fs(refine, "pdbx_TLS_residual_ADP_flag") << endl
// << RM3(" B VALUE TYPE : ", 7, 2) << Fs(refine, "pdbx_TLS_residual_ADP_flag") << endl
<< RM3(" FROM WILSON PLOT (A**2) : ", 7, 2) << Ff(reflns, "B_iso_Wilson_estimate") << endl
<< RM3(" MEAN B VALUE (OVERALL, A**2) : ", 7, 2) << Ff(refine, "B_iso_mean") << endl
<< RM3(" OVERALL ANISOTROPIC B VALUE.") << endl
......@@ -1987,7 +1987,7 @@ void WriteRemark3ProlSQ(ostream& pdbFile, Datablock& db)
<< RM3("") << endl
<< RM3(" FIT/AGREEMENT OF MODEL WITH ALL DATA.") << endl
<< RM3(" R VALUE (WORKING + TEST SET, NO CUTOFF) : ") << Fs(pdbx_refine, "R_factor_all_no_cutoff") << endl
<< RM3(" R VALUE (WORKING + TEST SET, NO CUTOFF) : ") << Fs(refine, "ls_R_factor_all") << endl
<< RM3(" R VALUE (WORKING SET, NO CUTOFF) : ") << Fs(pdbx_refine, "R_factor_obs_no_cutoff") << endl
<< RM3(" FREE R VALUE (NO CUTOFF) : ") << Fs(pdbx_refine, "free_R_factor_no_cutoff") << endl
......@@ -2005,7 +2005,7 @@ void WriteRemark3ProlSQ(ostream& pdbFile, Datablock& db)
<< RM3("") << endl
<< RM3(" B VALUES.") << endl
<< RM3(" B VALUE TYPE : ", 7, 2) << Fs(refine, "pdbx_TLS_residual_ADP_flag") << endl
// << RM3(" B VALUE TYPE : ", 7, 2) << Fs(refine, "pdbx_TLS_residual_ADP_flag") << endl
<< RM3(" FROM WILSON PLOT (A**2) : ", 7, 2) << Ff(reflns, "B_iso_Wilson_estimate") << endl
<< RM3(" MEAN B VALUE (OVERALL, A**2) : ", 7, 2) << Ff(refine, "B_iso_mean") << endl
<< RM3(" OVERALL ANISOTROPIC B VALUE.") << endl
......
......@@ -750,8 +750,7 @@ class PDBFileParser
string pdb2cifDate(string s)
{
boost::system::error_code ec;
pdb2cifDate(s, ec);
return s;
return pdb2cifDate(s, ec);
}
string pdb2cifAuth(string author)
......@@ -1531,9 +1530,9 @@ void PDBFileParser::ParseTitle()
while (mRec->is("REVDAT"))
{
// 1 - 6 Record name "REVDAT"
int revNum = vI(8, 10); // 8 - 10 Integer modNum Modification number.
int revNum = vI(8, 10); // 8 - 10 Integer modNum Modification number.
// 11 - 12 Continuation continuation Allows concatenation of multiple records.
string date = pdb2cifDate(vS(14, 22)); // 14 - 22 Date modDate Date of modification (or release for
string date = pdb2cifDate(vS(14, 22)); // 14 - 22 Date modDate Date of modification (or release for
// new entries) in DD-MMM-YY format. This is
// not repeated on continued lines.
string modId = vS(24, 27); // 24 - 27 IDCode modId ID code of this datablock. This is not repeated on
......@@ -1564,8 +1563,8 @@ void PDBFileParser::ParseTitle()
}
/*
This is internal stuff for PDB, don't write it
This is internal stuff for PDB, don't write it ???
*/
sort(revdats.begin(), revdats.end());
for (auto& revdat: revdats)
{
......@@ -1587,7 +1586,7 @@ void PDBFileParser::ParseTitle()
});
}
}
*/
//*/
// SPRSDE
if (mRec->is("SPRSDE"))
......
......@@ -343,7 +343,7 @@ const TemplateLine kNUCLSQ_Template[] = {
/* 12 */ { R"(FREE R VALUE TEST SET SIZE \(%\)\s*:\s*(.+))", 1, "refine", { "ls_percent_reflns_R_free" } },
/* 13 */ { R"(FREE R VALUE TEST SET COUNT\s*:\s*(.+))", 1, "refine", { "ls_number_reflns_R_free" } },
/* 14 */ { R"(FIT/AGREEMENT OF MODEL WITH ALL DATA\.)", 1 },
/* 15 */ { R"(R VALUE \(WORKING \+ TEST SET, NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "R_factor_all_no_cutoff" } },
/* 15 */ { R"(R VALUE \(WORKING \+ TEST SET, NO CUTOFF\)\s*:\s*(.+))", 1, "refine", { "ls_R_factor_all" } },
/* 16 */ { R"(R VALUE \(WORKING SET, NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "R_factor_obs_no_cutoff" } },
/* 17 */ { R"(FREE R VALUE \(NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "free_R_factor_no_cutoff" } },
/* 18 */ { R"(FREE R VALUE TEST SET SIZE \(%, NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "free_R_val_test_set_size_perc_no_cutoff" } },
......@@ -393,6 +393,20 @@ class NUCLSQ_Remark3Parser : public Remark3Parser
NUCLSQ_Remark3Parser(const string& name, const string& expMethod, PDBRecord* r, cif::Datablock& db)
: Remark3Parser(name, expMethod, r, db, kNUCLSQ_Template, sizeof(kNUCLSQ_Template) / sizeof(TemplateLine),
regex(R"((NUCLSQ)(?: (\d+(?:\.\d+)?))?)")) {}
virtual void fixup()
{
for (auto r: mDb["refine_hist"])
{
try
{
int p, n, h, s;
cif::tie(p, n, h, s) = r.get("pdbx_number_atoms_protein", "pdbx_number_atoms_nucleic_acid", "pdbx_number_atoms_ligand", "number_atoms_solvent");
r["number_atoms_total"] = p + n + h + s;
}
catch (...) {}
}
}
};
const TemplateLine kPROLSQ_Template[] = {
......@@ -411,7 +425,7 @@ const TemplateLine kPROLSQ_Template[] = {
/* 12 */ { R"(FREE R VALUE TEST SET SIZE \(%\)\s*:\s*(.+))", 1, "refine", { "ls_percent_reflns_R_free" } },
/* 13 */ { R"(FREE R VALUE TEST SET COUNT\s*:\s*(.+))", 1, "refine", { "ls_number_reflns_R_free" } },
/* 14 */ { R"(FIT/AGREEMENT OF MODEL WITH ALL DATA\.)", 1 },
/* 15 */ { R"(R VALUE \(WORKING \+ TEST SET, NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "R_factor_all_no_cutoff" } },
/* 15 */ { R"(R VALUE \(WORKING \+ TEST SET, NO CUTOFF\)\s*:\s*(.+))", 1, "refine", { "ls_R_factor_all" } },
/* 16 */ { R"(R VALUE \(WORKING SET, NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "R_factor_obs_no_cutoff" } },
/* 17 */ { R"(FREE R VALUE \(NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "free_R_factor_no_cutoff" } },
/* 18 */ { R"(FREE R VALUE TEST SET SIZE \(%, NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "free_R_val_test_set_size_perc_no_cutoff" } },
......@@ -468,6 +482,20 @@ class PROLSQ_Remark3Parser : public Remark3Parser
PROLSQ_Remark3Parser(const string& name, const string& expMethod, PDBRecord* r, cif::Datablock& db)
: Remark3Parser(name, expMethod, r, db, kPROLSQ_Template, sizeof(kPROLSQ_Template) / sizeof(TemplateLine),
regex(R"((PROLSQ)(?: (\d+(?:\.\d+)?))?)")) {}
virtual void fixup()
{
for (auto r: mDb["refine_hist"])
{
try
{
int p, n, h, s;
cif::tie(p, n, h, s) = r.get("pdbx_number_atoms_protein", "pdbx_number_atoms_nucleic_acid", "pdbx_number_atoms_ligand", "number_atoms_solvent");
r["number_atoms_total"] = p + n + h + s;
}
catch (...) {}
}
}
};
const TemplateLine kREFMAC_Template[] = {
......
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