diff --git a/modules/mol/alg/doc/molalg.rst b/modules/mol/alg/doc/molalg.rst
index 997bd85a7cbf08e925820e7b9eca18dadd48e7e4..29f3750b70d3d1aedd50bfc4f23790d2ed3c8cc1 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 a2d04c35d1f9ccc5650888a018e801392e5bd7f1..a24873fbef04d82ff5a6e489dd855a052eca290e 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 213e5ccf399b9a87bd2faf80bb01f69d67a47a09..5b860def3bba5ee47c5c373a0a159ed0c4927f6e 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.