Author: bugman Date: Tue Jun 19 11:24:39 2012 New Revision: 16949 URL: http://svn.gna.org/viewcvs/relax?rev=16949&view=rev Log: Modified the check_args() method of the dauvergne_protocol model-free auto-analysis for the new data. The heteronuc_type and proton_type are now in the spin's isotope variable, and the bond length 'r' is now the interatomic distance variable 'r'. All spin containers and interatomic data containers are being checked. Modified: branches/interatomic/auto_analyses/dauvergne_protocol.py Modified: branches/interatomic/auto_analyses/dauvergne_protocol.py URL: http://svn.gna.org/viewcvs/relax/branches/interatomic/auto_analyses/dauvergne_protocol.py?rev=16949&r1=16948&r2=16949&view=diff ============================================================================== --- branches/interatomic/auto_analyses/dauvergne_protocol.py (original) +++ branches/interatomic/auto_analyses/dauvergne_protocol.py Tue Jun 19 11:24:39 2012 @@ -29,7 +29,8 @@ # relax module imports. from float import floatAsByteArray from info import Info_box; info = Info_box() -from generic_fns.mol_res_spin import exists_mol_res_spin_data, generate_spin_id, spin_index_loop, spin_loop +from generic_fns.interatomic import interatomic_loop +from generic_fns.mol_res_spin import exists_mol_res_spin_data, generate_spin_id, return_spin, spin_index_loop, spin_loop from generic_fns.pipes import cdp_name, get_pipe, has_pipe, pipe_names, switch from generic_fns import selection from prompt.interpreter import Interpreter @@ -287,24 +288,27 @@ if not spin.select: continue - # Print. - print("Checking spin '%s'." % spin_id) - - # Test if the bond length has been set. - if not hasattr(spin, 'r') or spin.r == None: - raise RelaxNoValueError("bond length") - # Test if the CSA value has been set. if not hasattr(spin, 'csa') or spin.csa == None: - raise RelaxNoValueError("CSA") - - # Test if the heteronucleus type has been set. - if not hasattr(spin, 'heteronuc_type') or spin.heteronuc_type == None: - raise RelaxNoValueError("heteronucleus type") - - # Test if the proton type has been set. - if not hasattr(spin, 'proton_type') or spin.proton_type == None: - raise RelaxNoValueError("proton type") + raise RelaxNoValueError("CSA", spin_id=spin_id) + + # Test if the isotope type has been set. + if not hasattr(spin, 'isotope') or spin.isotope == None: + raise RelaxNoValueError("nuclear isotope type", spin_id=spin_id) + + # Interatomic vars. + for interatom in interatomic_loop(): + # Get the corresponding spins. + spin1 = return_spin(interatom.spin_id1) + spin2 = return_spin(interatom.spin_id2) + + # Skip deselected spins. + if not spin1.select or not spin2.select: + continue + + # Test if the interatomic distance has been set. + if not hasattr(interatom, 'r') or interatom.r == None: + raise RelaxNoValueError("interatomic distance", spin_id=interatom.spin_id1, spin_id2=interatom.spin_id2) # Min vars. if not isinstance(self.grid_inc, int):