From 1f002f88493cca47e52e2c0e8c54f49743a57911 Mon Sep 17 00:00:00 2001 From: Valerio Mariani <vmariani@localhost.localdomain> Date: Thu, 21 Jun 2012 01:50:53 +0200 Subject: [PATCH] Improved lddt output and documentation --- modules/mol/alg/doc/molalg.rst | 4 ++++ modules/mol/alg/src/lddt.cc | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/mol/alg/doc/molalg.rst b/modules/mol/alg/doc/molalg.rst index 29f3750b7..cf8360fc8 100644 --- a/modules/mol/alg/doc/molalg.rst +++ b/modules/mol/alg/doc/molalg.rst @@ -175,6 +175,10 @@ Returns the name of the atom, as a String + .. method:: Print() + + Prints the information to standard output + .. class:: ResidueRDMap Dictionary-like object containing the a list of distances that originate from the a single residue residue, to diff --git a/modules/mol/alg/src/lddt.cc b/modules/mol/alg/src/lddt.cc index a24873fbe..a0108f06a 100644 --- a/modules/mol/alg/src/lddt.cc +++ b/modules/mol/alg/src/lddt.cc @@ -352,12 +352,13 @@ int main (int argc, char **argv) String label="localldt"; std::pair<int,int> total_ov=alg::LocalDistDiffTest(v, glob_dist_list, cutoffs, sequence_separation, label); Real lddt = static_cast<Real>(total_ov.first)/(static_cast<Real>(total_ov.second) ? static_cast<Real>(total_ov.second) : 1); - std::cout << "Global LDDT score: " << lddt << std::endl; - std::cout << "(" << std::fixed << total_ov.first << " conserved distances in the model out of " << total_ov.second << " checked)" << std::endl; + std::cout << "Global LDDT score: " << std::setprecision(4) << lddt << std::endl; + std::cout << "(" << std::fixed << total_ov.first << " conserved distances out of " << total_ov.second + << " checked, over " << cutoffs.size() << " thresholds)" << std::endl; // prints the residue-by-residue statistics std::cout << "Local LDDT Score:" << std::endl; - std::cout << "Chain\tResName\tResNum\tScore\t(Conserved/Total)" << std::endl; + std::cout << "Chain\tResName\tResNum\tScore\t(Conserved/Total, over " << cutoffs.size() << " thresholds)" << std::endl; for (ResidueViewIter rit=v.ResiduesBegin();rit!=v.ResiduesEnd();++rit){ ResidueView ritv = *rit; Real lddt_local = 0; @@ -369,7 +370,7 @@ int main (int argc, char **argv) total_dist=ritv.GetIntProp(label+"_total"); } if (lddt_local!=0) { - std::cout << ritv.GetChain() << "\t" << ritv.GetName() << "\t" << ritv.GetNumber() << '\t' << lddt_local << "\t" << "("<< conserved_dist << "/" << total_dist << ")" <<std::endl; + std::cout << ritv.GetChain() << "\t" << ritv.GetName() << "\t" << ritv.GetNumber() << '\t' << std::setprecision(4) << lddt_local << "\t" << "("<< conserved_dist << "/" << total_dist << ")" <<std::endl; } } std::cout << std::endl; -- GitLab