Author: bugman
Date: Wed Jan 21 09:54:28 2015
New Revision: 27248
URL: http://svn.gna.org/viewcvs/relax?rev=27248&view=rev
Log:
Better error handling in the structure.align user function.
If no common atoms can be found between the structures, a RelaxError is now
raised for better user
feedback.
Modified:
trunk/pipe_control/structure/main.py
Modified: trunk/pipe_control/structure/main.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/main.py?rev=27248&r1=27247&r2=27248&view=diff
==============================================================================
--- trunk/pipe_control/structure/main.py (original)
+++ trunk/pipe_control/structure/main.py Wed Jan 21 09:54:28 2015
@@ -141,6 +141,10 @@
# Assemble the atomic coordinates and obtain the corresponding element
information.
coord, ids, mol_names, res_names, res_nums, atom_names, elements =
assemble_coordinates(pipes=pipes, molecules=molecules, models=models,
atom_id=atom_id, seq_info_flag=True)
+
+ # Catch missing data.
+ if len(coord[0]) == 0:
+ raise RelaxError("No common atoms could be found between the
structures.")
# The different algorithms.
if method == 'fit to mean':
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits