mailr6696 - /branches/rdc_analysis/generic_fns/structure/internal.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on July 04, 2008 - 23:38:
Author: bugman
Date: Fri Jul  4 23:37:51 2008
New Revision: 6696

URL: http://svn.gna.org/viewcvs/relax?rev=6696&view=rev
Log:
Added a RelaxWarning for when a CONECT atom is not in the HETATM or ATOM 
records.


Modified:
    branches/rdc_analysis/generic_fns/structure/internal.py

Modified: branches/rdc_analysis/generic_fns/structure/internal.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/internal.py?rev=6696&r1=6695&r2=6696&view=diff
==============================================================================
--- branches/rdc_analysis/generic_fns/structure/internal.py (original)
+++ branches/rdc_analysis/generic_fns/structure/internal.py Fri Jul  4 
23:37:51 2008
@@ -27,6 +27,7 @@
 from numpy import array, float64, zeros
 from re import search
 from string import split, strip
+from warnings import warn
 
 # relax module imports.
 from api_base import Base_struct_API
@@ -34,6 +35,7 @@
 from generic_fns.mol_res_spin import Selection
 from relax_errors import RelaxError
 from relax_io import open_read_file
+from relax_warnings import RelaxWarning
 
 
 
@@ -66,6 +68,9 @@
             # Return the index.
             if self.structural_data[struct_index].atom_num[i] == atom_num:
                 return i
+
+        # Should not be here, the PDB connect records are incorrect.
+        warn(RelaxWarning("The atom number " + `atom_num` + " from the 
CONECT record cannot be found within the ATOM and HETATM records."))
 
 
     def __fill_object_from_pdb(self, records, struct_index):




Related Messages


Powered by MHonArc, Updated Sat Jul 05 00:00:14 2008