From 3ce557780a7381cb19dc1d305b36bc789026b94d Mon Sep 17 00:00:00 2001 From: Valerio Mariani <valerio.mariani@unibas.ch> Date: Wed, 20 Jun 2012 01:49:07 +0200 Subject: [PATCH] Added check for chain names for lddt, updated documetation --- modules/mol/alg/doc/molalg.rst | 7 ++++--- modules/mol/alg/src/lddt.cc | 6 ++++++ modules/mol/alg/src/local_dist_diff_test.hh | 15 +++++++++++---- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/modules/mol/alg/doc/molalg.rst b/modules/mol/alg/doc/molalg.rst index 997bd85a7..29f3750b7 100644 --- a/modules/mol/alg/doc/molalg.rst +++ b/modules/mol/alg/doc/molalg.rst @@ -115,9 +115,10 @@ Both functions process only standard residues present in the first chain of the reference structures. The only difference between the two functions is that one takes a single reference structure and the other - a list of reference structures. The structures in the list have to be properly aligned before being passed - to the function. Gaps in the alignment are allowed and automatically dealt with, but corresponding residues - in the structures must have the same residue number. + a list of reference structures. The structures in the list have to be properly prepared before being passed + to the function. Corresponding residues in the structures must have the same residue number, the same chain name, + etc. Gaps are allowed and automatically dealt with: if information about a distance is present in at least one of + the structures, it will be considered. If a distance between two atoms is shorter than the inclusion radius in all structures in which the two atoms are present, it is included in the list. However, if the distance is longer than the inclusion radius in at least diff --git a/modules/mol/alg/src/lddt.cc b/modules/mol/alg/src/lddt.cc index a2d04c35d..a24873fbe 100644 --- a/modules/mol/alg/src/lddt.cc +++ b/modules/mol/alg/src/lddt.cc @@ -238,6 +238,12 @@ int main (int argc, char **argv) if (!ref) { exit(-1); } + if (ref_list.size()>0) { + if (ref_list[0].GetChainList()[0].GetName()!=ref.GetChainList()[0].GetName()) { + std::cout << "ERROR: First chains in the reference structures have different names" << std::endl; + exit(-1); + } + } ref_list.push_back(ref.CreateFullView()); } glob_dist_list = CreateDistanceListFromMultipleReferences (ref_list,cutoffs,sequence_separation,radius); diff --git a/modules/mol/alg/src/local_dist_diff_test.hh b/modules/mol/alg/src/local_dist_diff_test.hh index 213e5ccf3..5b860def3 100644 --- a/modules/mol/alg/src/local_dist_diff_test.hh +++ b/modules/mol/alg/src/local_dist_diff_test.hh @@ -161,10 +161,17 @@ GlobalRDMap CreateDistanceList(const EntityView& ref,Real max_dist); /// \brief Creates a list of distances to check during a Local Difference Distance Test starting from multiple reference structures /// -/// Requires a list of reference structure and an inclusion radius (max_dist). If a distance between two atoms is shorter -/// than the inclusion radius in all structures in which the two atoms are present, it is included in the list -/// However, if the distance is longer than the inclusion radius in at least one of the structures, it -/// is not be considered a local interaction and is exluded from the list +/// Requires a list of reference structure and an inclusion radius (max_dist). +/// +/// The structures in the list have to be properly prepared before being passed +/// to the function. Corresponding residues in the structures must have the same residue number, the same chain name, +/// etc. Gaps are allowed and automatically dealt with: if information about a distance is present in at least one of +/// the structures, it will be considered. +/// +/// +/// If a distance between two atoms is shorter than the inclusion radius in all structures in which the two atoms are +/// present, it is included in the list. However, if the distance is longer than the inclusion radius in at least one +/// of the structures, it is not be considered a local interaction and is exluded from the list /// /// The function takes care of residues with ambigous symmetric sidechains. To decide which naming convention to use, the functions /// computes a local distance score of each reference structure with the first reference structure in the list, using only non ambigously-named atoms. -- GitLab