Author: bugman Date: Mon Apr 21 17:08:26 2008 New Revision: 5928 URL: http://svn.gna.org/viewcvs/relax?rev=5928&view=rev Log: Added a check for the spin number and name being set in the vectors() function. This must be set for the XH vector to be isolated. Modified: 1.3/generic_fns/structure/main.py Modified: 1.3/generic_fns/structure/main.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/main.py?rev=5928&r1=5927&r2=5928&view=diff ============================================================================== --- 1.3/generic_fns/structure/main.py (original) +++ 1.3/generic_fns/structure/main.py Mon Apr 21 17:08:26 2008 @@ -35,7 +35,7 @@ from generic_fns.structure.scientific import Scientific_data from relax_errors import RelaxError, RelaxFileError, RelaxNoPipeError, RelaxNoSequenceError, RelaxPdbError from relax_io import get_file_path -from relax_warnings import RelaxNoPDBFileWarning, RelaxZeroVectorWarning +from relax_warnings import RelaxWarning, RelaxNoPDBFileWarning, RelaxZeroVectorWarning @@ -241,9 +241,14 @@ # The spin identification string. id = generate_spin_id(mol_name, res_num, res_name, spin.num, spin.name) + # Test that the spin number and name are set (essential for the single atom identification). + if spin.num == None and spin.name == None: + warn(RelaxWarning("The spin num and name are not set for the spin " + `id` + ".")) + continue + # The XH vector already exists. if hasattr(spin, 'xh_vect'): - warn(RelaxWarning("The XH vector for the spin " + `id` + " already exists")) + warn(RelaxWarning("The XH vector for the spin " + `id` + " already exists.")) continue # Get the bond info.