Author: bugman
Date: Thu Oct 23 12:01:49 2014
New Revision: 26374

URL: http://svn.gna.org/viewcvs/relax?rev=26374&view=rev
Log:
Fix for the structure.com user function.

This fixes bug #22860 (https://gna.org/bugs/?22860), the failure of the 
structure.com user function
after calling structure.delete.  The number of models in cdp.structure is now 
counted and if set to
zero, RelaxNoPdbError will be raised.


Modified:
    trunk/pipe_control/structure/mass.py

Modified: trunk/pipe_control/structure/mass.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/mass.py?rev=26374&r1=26373&r2=26374&view=diff
==============================================================================
--- trunk/pipe_control/structure/mass.py        (original)
+++ trunk/pipe_control/structure/mass.py        Thu Oct 23 12:01:49 2014
@@ -44,7 +44,7 @@
     """
 
     # Test if a structure has been loaded.
-    if not hasattr(cdp, 'structure'):
+    if not hasattr(cdp, 'structure') or cdp.structure.num_models() == 0:
         raise RelaxNoPdbError
 
     # The selection object.


_______________________________________________
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

Reply via email to